/// To load type in the terminal: root -l runProof.C\(1,-1\) #include "TProof.h" #include "TStopwatch.h" #include "TChain.h" #include "TSelector.h" #include "TROOT.h" #include "TError.h" void runProof(bool withProof=true, Long64_t nev=10) { TStopwatch timer; timer.Start(); TProof* proof = 0; if (withProof) { proof = TProof::Open("lite://"); if (!proof) { Warning("runProof", "Failed to open ProofLite"); return; } proof->Load("Lib.C+"); proof->Load("Selector.C+"); } else { gROOT->ProcessLine(".L Lib.C+"); gROOT->ProcessLine(".L Selector.C+"); } TChain* chain = new TChain("T"); chain->AddFile("/home/ganis/local/root/test/azg/Hijing_000244918_AA_05020_100.root"); if (proof) chain->SetProof(proof); TSelector* sel = (TSelector*)gROOT->ProcessLine("new Selector"); Printf("%p", sel); if (nev < 0) nev = TChain::kMaxEntries; timer.Stop(); timer.Print(); timer.Start(); chain->Process(sel,"",nev); timer.Stop(); timer.Print(); }