void testShowGraphs() { gSystem->Load("../libData.so"); const Long64_t kFirstEvent = 128; // TFile fr("../data/dataDSR4/analysis_07_1.root"); // TFile fr("../data/dataDSR4/analysis_07_8.root"); TFile fr("../data/dataTektronix/analysisExp7.root"); TTree *tr = (TTree*)fr.Get("atree"); AEvent *revent = new AEvent(); cout << tr->SetBranchAddress("Ach0.",&revent) << endl; TGraph *gr[10]; cout << "warning" << endl; cout << tr->GetEntries() << endl; //loop over events for (Long64_t i = 0; i < 10; i++) { gr[i] = 0; cout << "warning 1" << endl; cout << i+kFirstEvent << endl; // tr->GetEntry(i+kFirstEvent); tr->GetEntry(i); cout << "warning 2" << endl; gr[i] = new TGraph(*revent->GetGraphSignal()); }//for over events cout << "warning 3" << endl; TCanvas *c1 = new TCanvas("c1","test",10,10,1000,600); c1->Divide(3,2); for (Int_t k = 0; k < 6; k++) { c1->cd(k+1); gr[k]->Draw(); } // c1->cd(2); // tr->Draw("gAmp.Draw()","","goff",1,124); }