From 7610d054f503b8de2a1930e635d85b6232e61790 Mon Sep 17 00:00:00 2001 From: Vratislav Chudoba Date: Mon, 16 Jan 2017 20:36:25 +0300 Subject: [PATCH] Bug in application "ConvertRawToAnalyzed" solved. --- convertRawToAnalyzed/analyse.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/convertRawToAnalyzed/analyse.cpp b/convertRawToAnalyzed/analyse.cpp index 636bef4..71c64a7 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; } -- 2.18.1