I tried to reproduce the problem with using histoGUI example.
However I couldn't reproduce it; namely two graphs are shown.
I attached a modification for the example, which I applied for the test.
If you attach something similar which can reproduce the problem, it will be easier for me to find the reason.
Ryu
diff --git a/examples/histoGUI/histoGUI.xml b/examples/histoGUI/histoGUI.xml
index 3043dec..489052a 100644
--- a/examples/histoGUI/histoGUI.xml
+++ b/examples/histoGUI/histoGUI.xml
@@ -34,6 +34,7 @@
<GraphName>MyGraph</GraphName>
<GraphFolderName>mygraphs</GraphFolderName>
<GraphType>TGraph</GraphType>
+ <GraphArraySize>2</GraphArraySize>
<GraphXLabel>X</GraphXLabel>
<GraphYLabel>Y</GraphYLabel>
<GraphXmin>0</GraphXmin>
@@ -43,7 +44,9 @@
<Argus>
<Tab>
<TabName>GeneratedHisto</TabName>
+ <ObjectArrayIndex>0-1</ObjectArrayIndex>
<Index>4</Index>
+ <DrawSamePad>true</DrawSamePad>
</Tab>
</Argus>
</Graph>
diff --git a/examples/histoGUI/src/tasks/HGUITFillHisto.cpp b/examples/histoGUI/src/tasks/HGUITFillHisto.cpp
index 6ada840..c4dd95f 100644
--- a/examples/histoGUI/src/tasks/HGUITFillHisto.cpp
+++ b/examples/histoGUI/src/tasks/HGUITFillHisto.cpp
@@ -51,7 +51,10 @@ ClassImp(HGUITFillHisto)
void HGUITFillHisto::Init()
{
- GetMyGraph()->SetMarkerStyle(31);
+ GetMyGraphAt(0)->SetMarkerStyle(31);
+ GetMyGraphAt(1)->SetMarkerStyle(31);
+ GetMyGraphAt(0)->SetMarkerColor(2);
+ GetMyGraphAt(1)->SetMarkerColor(4);
GetMyGraphError()->SetMarkerStyle(8);
GetMyGraphError()->SetMarkerColor(4);
}
@@ -69,17 +72,23 @@ void HGUITFillHisto::Event()
GetMyHistoAt(2)->SetLineColor(2);
GetMyHistoAt(3)->SetLineColor(4);
GetMyOtherHisto()->Fill(gRandom->Gaus(0,40));
- GetMyGraph()->SetPoint(0,0,gRandom->Rndm());
- GetMyGraph()->SetPoint(1,1,gRandom->Rndm());
- GetMyGraph()->SetPoint(2,2,gRandom->Rndm());
- GetMyGraph()->SetPoint(3,3,gRandom->Rndm());
- GetMyGraph()->SetPoint(4,4,gRandom->Rndm());
+ GetMyGraphAt(0)->SetPoint(0,0,gRandom->Rndm());
+ GetMyGraphAt(0)->SetPoint(1,1,gRandom->Rndm());
+ GetMyGraphAt(0)->SetPoint(2,2,gRandom->Rndm());
+ GetMyGraphAt(0)->SetPoint(3,3,gRandom->Rndm());
+ GetMyGraphAt(0)->SetPoint(4,4,gRandom->Rndm());
+ GetMyGraphAt(1)->SetPoint(0,0,gRandom->Rndm());
+ GetMyGraphAt(1)->SetPoint(1,1,gRandom->Rndm());
+ GetMyGraphAt(1)->SetPoint(2,2,gRandom->Rndm());
+ GetMyGraphAt(1)->SetPoint(3,3,gRandom->Rndm());
+ GetMyGraphAt(1)->SetPoint(4,4,gRandom->Rndm());
GetMyGraphError()->SetPoint(0,0,gRandom->Rndm());
GetMyGraphError()->SetPoint(1,1,gRandom->Rndm());
GetMyGraphError()->SetPoint(2,2,gRandom->Rndm());
GetMyGraphError()->SetPoint(3,3,gRandom->Rndm());
GetMyGraphError()->SetPoint(4,4,gRandom->Rndm());
- ArgusHistoDisplay::SetLimits(GetMyGraph());
+ ArgusHistoDisplay::SetLimits(GetMyGraphAt(0));
+ ArgusHistoDisplay::SetLimits(GetMyGraphAt(1));
ArgusHistoDisplay::SetLimits(GetMyGraphError());
}
> I wanted to add two different TGraphs (Corresponding to two calorimeters) into
> the same pad.
> So in the xml file I did:
> <Graph>
> <GraphName>MyGraph</GraphName>
> <GraphFolderName>mygraphs</GraphFolderName>
> <GraphType>TGraph</GraphType>
> <GraphArraySize>2</GraphArraySize>
> <GraphXLabel>Event no.</GraphXLabel>
> <GraphYLabel>Island no.</GraphYLabel>
> <GraphXmin>0</GraphXmin>
> <GraphXmax>10000</GraphXmax>
> <GraphYmin>0</GraphYmin>
> <GraphYmax>100000</GraphYmax>
> <Argus>
> <Tab>
> <TabName>SummaryFCBank</TabName>
> <ObjectArrayIndex>0-1</ObjectArrayIndex>
> <Index>1</Index>
> <DrawSamePad>true</DrawSamePad>
> </Tab>
> </Argus>
> </Graph>
>
>
> And in src/tasks:
> in the HGUITFillHisto.cpp code I did:
> for(int icalo=1; icalo<3; icalo++) [For each calorimeter there is one bank, and one n_islands value from that
> bank per event.]
> {
> GetMyGraphAt(icalo-1)->SetPoint(gAnalyzer->GetCurrentEventNumber(),gAnalyzer->GetCurrentEventNumber(),n_islands);
>
> GetMyGraphAt(0)->SetMarkerColor(2);
>
> GetMyGraphAt(1)->SetMarkerColor(3);
>
> ArgusHistoDisplay::SetLimits(GetMyGraphAt(icalo-1));
>
> }
>
> But then I get an empty pad in the tab.
> It works when I create the TGraph for only one calorimeter, using GetMyGraph().
>
> Any help would be much appreciated.
>
> Thanks!
> Sudeshna |