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 |