#include static const Int_t default_run = 117; // Useful run numbers: // 110: phi = 0, dip 0 // 112: phi = 0, dip 20 // 113: phi = 0, dip 20 (TChained with 112 below) // 115: phi = 0, dip 40 // 117: phi = +22, dip 10 // 119: phi = -22, dip 10 // 121: phi = 0, dip 10 void do_ana(Int_t runnum = default_run, Int_t order = 0) { TString infilename = TString::Format("infiles/run%05d_h.root",runnum); // Load macros used gROOT->ProcessLine(".L Utility.C+g"); gROOT->ProcessLine(".L JFTrackFit.C+g"); gROOT->ProcessLine(".L daqT.C+g"); gROOT->ProcessLine(".L MydaqT.C+g"); gROOT->ProcessLine(".L t2x.C+g"); gROOT->ProcessLine(".L CC_algorithms.C+g"); // Opening a single TFile: TFile f(infilename); TTree * ft = (TTree*)f.Get("daqT"); // Concatenating multiple TTrees in multiple files: // TChain * ft = new TChain("daqT"); // ft->Add("infiles/run00112_h.root"); // ft->Add("infiles/run00113_h.root"); // Instantiate the analysis class with the pointer ft. MydaqT t(ft); // Do some stuff. //t.hTOF_Fit("outfiles"); //t.hTOF_2D("outfiles"); //t.draw_signals(50); // Later we can do things like //Int_t nentries = INT_MAX; Int_t nentries = 1000; TStopwatch timer; timer.Start(); t.Loop(0,nentries,order); //t.Loop(55375,3); timer.Stop(); timer.Print("u"); delete ft; f.Close(); } // int main(int argc, char * argv[]) // { // do_ana(); // }