From 567705d844c86fd54b4e3a7019fba39ff92ef676 Mon Sep 17 00:00:00 2001 From: Vratislav Chudoba Date: Mon, 9 Jan 2017 15:51:35 +0300 Subject: [PATCH] Template for viewing of CFD graphs added. --- macros/testShowCFD.cxx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 macros/testShowCFD.cxx diff --git a/macros/testShowCFD.cxx b/macros/testShowCFD.cxx new file mode 100644 index 0000000..f48591a --- /dev/null +++ b/macros/testShowCFD.cxx @@ -0,0 +1,34 @@ +void testShowCFD() +{ + + gSystem->Load("../libData.so"); + + const Long64_t kFirstEvent = 128; + + TFile fr("../data/dataDSR4/analysis_07_1.root"); + TTree *tr = (TTree*)fr.Get("atree"); + + AEvent *revent = new AEvent(); + tr->SetBranchAddress("Ach0.",&revent); + + TGraph *gr[10]; + + //loop over events + for (Int_t i = 0; i < 10; i++) { + gr[i] = 0; + tr->GetEntry(i+kFirstEvent); + gr[i] = new TGraph(*revent->GetGraph()); + }//for over events + + + TCanvas *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); +} -- 2.18.1