From: schutz Date: Wed, 24 Apr 2002 16:21:10 +0000 (+0000) Subject: added fFailed data member that tells is file is opened and galise found X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=dca3a7c469434bf61979d05d7f2981a4c7551b9a;hp=28b243ad3acb202b085ae08d0976c2619fd2e644 added fFailed data member that tells is file is opened and galise found --- diff --git a/PHOS/AliPHOSGetter.cxx b/PHOS/AliPHOSGetter.cxx index 91e18500daa..857b958f386 100644 --- a/PHOS/AliPHOSGetter.cxx +++ b/PHOS/AliPHOSGetter.cxx @@ -104,11 +104,12 @@ AliPHOSGetter::AliPHOSGetter(const char* headerFile, const char* branchTitle ) fQAFolder = dynamic_cast(gROOT->FindObjectAny("Folders/Run/Conditions/QA")); fTasksFolder = dynamic_cast(gROOT->FindObjectAny("Folders/Tasks")) ; + fFailed = kFALSE ; + if ( fHeaderFile != "aliroot" ) { // to call the getter without a file //open headers file TFile * file = static_cast(gROOT->GetFile(fHeaderFile.Data() ) ) ; - if(file == 0){ //if file was not opened yet, read gAlice if(fHeaderFile.Contains("rfio")) // if we read file using HPSS file = TFile::Open(fHeaderFile.Data(),"update") ; @@ -117,7 +118,8 @@ AliPHOSGetter::AliPHOSGetter(const char* headerFile, const char* branchTitle ) if (!file->IsOpen()) { cerr << "ERROR : AliPHOSGetter::AliPHOSGetter -> Cannot open " << fHeaderFile.Data() << endl ; - abort() ; + fFailed = kTRUE ; + return ; } gAlice = static_cast(file->Get("gAlice")) ; @@ -126,7 +128,8 @@ AliPHOSGetter::AliPHOSGetter(const char* headerFile, const char* branchTitle ) if (!gAlice) { cerr << "ERROR : AliPHOSGetter::AliPHOSGetter -> Cannot find gAlice in " << fHeaderFile.Data() << endl ; - abort() ; + fFailed = kTRUE ; + return ; } if (!PHOS()) { if (fDebug) diff --git a/PHOS/AliPHOSGetter.h b/PHOS/AliPHOSGetter.h index 8bd169e317f..994e6c1dfb0 100644 --- a/PHOS/AliPHOSGetter.h +++ b/PHOS/AliPHOSGetter.h @@ -61,6 +61,7 @@ class AliPHOSGetter : public TObject { virtual ~AliPHOSGetter() ; + const Bool_t HasFailed() const { return fFailed ; } Bool_t PostPrimaries(void ) const ; Bool_t PostHits(void ) const ; Bool_t PostSDigits( const char * name, const char * file = 0) const ; @@ -223,6 +224,7 @@ private: TString fDigitsTitle ; //! TString fSDigitsTitle ; //! + Bool_t fFailed ; //! set if file not opend or galice not found Int_t fDebug ; // Debug level Int_t fNPrimaries ; //! # of primaries