er  dev
testShowCFD.cxx
1 void testShowCFD()
2 {
3 
4  gSystem->Load("../libData.so");
5 
6  const Long64_t kFirstEvent = 128;
7 
8 // TFile fr("../data/dataDSR4/analysis_08_2_CFD02_06.root");
9  TFile fr("../data/dataDSR4/analysis_08_2.root");
10  TTree *tr = (TTree*)fr.Get("atree");
11 
12  AEvent *revent = new AEvent();
13  tr->SetBranchAddress("Ach0.",&revent);
14 
15  TGraph *gr[12];
16 
17  //loop over events
18  for (Int_t i = 0; i < 12; i++) {
19  gr[i] = 0;
20  tr->GetEntry(i+kFirstEvent);
21  gr[i] = new TGraph(*revent->GetGraphCFD());
22  }//for over events
23 
24 
25  TCanvas *c1 = new TCanvas("c1","CFD implementation",10,10,1000,600);
26  c1->Divide(3,4);
27 
28  for (Int_t i = 0; i < 12; i++) {
29  c1->cd(i+1);
30  gr[i]->Draw("");
31  }
32 
33 // c1->cd(2);
34 // tr->Draw("gAmp.Draw()","","goff",1,124);
35 }