#include #include #include using namespace std; void ICF7() { TStopwatch t; TFile *file = new TFile ("cal0061.root"); TTree *tree = (TTree*)file->Get("cal"); TChain *ch1 = new TChain("cal"); ch1 -> Add ("cal0061.root"); // cout<< ch1->GetEntries()< Add ("cal0062.root"); ch1 -> Add ("cal0063.root"); ch1 -> Add ("cal0064.root"); ch1 -> Add ("cal0065.root"); ch1 -> Add ("cal0066.root"); ch1 -> Add ("cal0067.root"); ch1 -> Add ("cal0068.root"); ch1 -> Add ("cal0069.root"); ch1 -> Add ("cal0070.root"); ch1 -> Add ("cal0071.root"); ch1 -> Add ("cal0072.root"); ch1 -> Add ("cal0073.root"); ch1 -> Add ("cal0074.root"); cout<< ch1->GetEntries()<SetLogy(); gPad->SetGrid(1,1); //gStyle->SetPalette(kRainBow); for (int i = 0; i<6; i++) { TString name = Form("hist[%d]",i); hist[i] = new TH1F("name","IC anodes at F7",100,-100,1000); hist[i]->SetMarkerColor(i+20); ch1->Draw(TString::Format("F7ICADCcal[%d]>>hist[%d]",i,i),TString::Format("F7ICADCcal[%d]<1000",i),""); hstack ->Add(hist[i]); leg -> AddEntry(hist[i],name,"p"); } }