#if !defined(__CINT__) || defined(__MAKECINT__) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif void CheckTDCHistos(Int_t nRun=0, Bool_t optPlot=kTRUE) { if(nRun==0){ printf("\n\n YOU MUST PROVIDE A RUN NUMBER!!! \n\n"); return; } TGrid::Connect("alien:",0,0,"t"); char histoFName[150]; sprintf(histoFName,"alien:///alice/data/2011/Reference/ZDC/%d_tdcReference.root",nRun); TFile *file = TFile::Open(histoFName); file->cd(); TH1F::AddDirectory(0); // TH1F *hTDC[6]; for(Int_t it=0; it<6; it++){ if(it==0) hTDC[it] = dynamic_cast (file->Get("TDCZNC")); else if(it==1) hTDC[it] = dynamic_cast (file->Get("TDCZNA")); else if(it==2) hTDC[it] = dynamic_cast (file->Get("TDCZPC")); else if(it==3) hTDC[it] = dynamic_cast (file->Get("TDCZPA")); else if(it==4) hTDC[it] = dynamic_cast (file->Get("TDCZEM1")); else if(it==5) hTDC[it] = dynamic_cast (file->Get("TDCZEM2")); } if(optPlot){ // Plot the retrieved histos //*********************************************************** // #### ROOT initialization gROOT->Reset(); gStyle->SetCanvasColor(10); gStyle->SetFrameFillColor(10); gStyle->SetOptTitle(0); gStyle->SetOptStat(1111); gStyle->SetOptFit(111); gStyle->SetTitleTextColor(9); gStyle->SetStatTextColor(4); gStyle->SetLineColor(1); gStyle->SetPalette(1); //*********************************************************** TCanvas *c6 = new TCanvas("c6","Side C correlations",0,200,1000,800); c6->Divide(3,2); for(Int_t t=0; t<6; t++){ c6->cd(t+1); gPad->SetLogy(1); hTDC[t]->SetLineColor(kAzure+t); hTDC[t]->Draw(); } char psname[16]; sprintf(psname,"TDCrun%d.gif",nRun); c6->Print(psname); } }