testShowCFD.cxx 720 Bytes
Newer Older
1 2 3 4 5 6 7
void testShowCFD()
{

	gSystem->Load("../libData.so");

	const Long64_t kFirstEvent = 128;

8 9
//	TFile fr("../data/dataDSR4/analysis_08_2_CFD02_06.root");
	TFile fr("../data/dataDSR4/analysis_08_2.root");
10 11 12 13 14
	TTree *tr = (TTree*)fr.Get("atree");

	AEvent *revent = new AEvent();
	tr->SetBranchAddress("Ach0.",&revent);

15
	TGraph *gr[12];
16 17

	//loop over events
18
	for (Int_t i = 0; i < 12; i++) {
19 20
		gr[i] = 0;
		tr->GetEntry(i+kFirstEvent);
21
		gr[i] = new TGraph(*revent->GetGraphCFD());
22 23 24
	}//for over events


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 34 35
	}

//	c1->cd(2);
//	tr->Draw("gAmp.Draw()","","goff",1,124);
}