testShowGraphs.cxx 569 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
void testShowGraphs()
{

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

	TFile fr("../data/rawDataDSR4/NeuRad_test_07_1.root");
	TTree *tr = (TTree*)fr.Get("rtree");

	RawEvent *revent = new RawEvent();
	tr->SetBranchAddress("rawEvent",&revent);

	TGraph *gr[10];

	for (Int_t i = 0; i < 10; i++) {
		gr[i] = 0;
		tr->GetEntry(i+28);
		gr[i] = new TGraph(*revent->GetGraph());
	}


	auto c1 = new TCanvas("c1","test",10,10,1000,600);
	c1->Divide(3,2);

	for (Int_t i = 0; i < 6; i++) {
		c1->cd(i+1);
		gr[i]->Draw();
	}

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