diff --git a/convertRawToAnalyzed/analyse.cpp b/convertRawToAnalyzed/analyse.cpp index 636bef4f7546cc7a56adaf68e215a2407ee3c342..71c64a7d1e1f89d2fd372cc8e9b790d0842b02e2 100644 --- a/convertRawToAnalyzed/analyse.cpp +++ b/convertRawToAnalyzed/analyse.cpp @@ -52,6 +52,10 @@ int main(int argc, char* argv[]) } TFile *f = new TFile(infiles.Data()); + if (/*f == 0 || */f->IsZombie()) { + Error("convertRawToAnalyzed", "Input file was not opened. Program will be terminated"); + return 2; + } TTree *tr = (TTree*)f->Get("rtree"); TString bName; @@ -88,7 +92,7 @@ int main(int argc, char* argv[]) wevent[j]->ProcessEvent(); //here all the analysis is going on so far } - if ( !(i%100) ) { printf("Found event #%d\n", i); } + if ( !(i%100) ) { printf("Found event #%lld\n", i); } tw->Fill(); } @@ -98,5 +102,5 @@ int main(int argc, char* argv[]) tw->Write(); fw->Close(); - return 1; + return 0; }