#include #include #include "TChain.h" #include "TROOT.h" #include "TObjectTable.h" #include "WCSimRootEvent.hh" #include "WCSimRootGeom.hh" #include "WCSimPmtInfo.hh" #include "WCSimLAPPDInfo.hh" #include "WCSimEnumerations.hh" #include "WCSimRootOptions.hh" int main(int argc, char* argv[]){ //std::string filepattern="/pnfs/annie/persistent/users/moflaher/wcsim/multipmt/tankonly/wcsim_25_04_19_ANNIEp2v6_nodigit_BNB_Water_10k_22-05-17/wcsim_0.*.root"; std::string filepattern="./wcsim_0.*.root"; if(argc>1){ filepattern=argv[1]; } std::cout<<"Reading file pattern "<Add(filepattern.c_str()); std::cout<<"loaded "< last_entry_of_current_tree){ if(eventi>0){ std::cout<<"Abdout to retrieve the first entry of a new file: cleanup"<Print(); } Long64_t localentry = fChain->LoadTree(eventi); if(localentry<0){ std::cout<<"end of TChain, breaking"<GetTreeNumber(); std::cout<<"Loaded file "<1){ std::cout<<"ending loop"<GetTree()->SetBranchAddress("wcsimrootevent",&wcsimrootevent, &b_wcsimrootevent); if(branchok<0) std::cerr<<"Failed to set branch address for wcsimrootevent"<GetTree()->SetBranchAddress("wcsimrootevent_mrd",&wcsimrootevent_mrd, &b_wcsimrootevent_mrd); if(branchok<0) std::cerr<<"Failed to set branch address for wcsimrootevent_mrd"<GetTree()->SetBranchAddress("wcsimrootevent_facc",&wcsimrootevent_facc, &b_wcsimrootevent_facc); if(branchok<0) std::cerr<<"Failed to set branch address for wcsimrootevent_facc"<SetAutoDelete(true); b_wcsimrootevent_mrd->SetAutoDelete(true); b_wcsimrootevent_facc->SetAutoDelete(true); std::cout<<"getting last entry of this tree: "; last_entry_of_current_tree = eventi+fChain->GetTree()->GetEntriesFast() - 1; std::cout<GetEntry(eventi); if(nbytes<0){ std::cout<<"no bytes, ending loop"<GetTrigger(0); if(tr==nullptr){ std::cout<<"null trigger 0!"<GetNcherenkovhittimes(); if((eventi%100)==0) std::cout<<"check: event "<Print(); std::cout<<"deleting chain"<Print(); }