]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added the fFailed data member that gives the status of the file and of galice
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 Apr 2002 16:12:17 +0000 (16:12 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 Apr 2002 16:12:17 +0000 (16:12 +0000)
EMCAL/AliEMCALGetter.cxx
EMCAL/AliEMCALGetter.h

index 3209329f6c40cfb465371519d93d24b04791dfea..75fc6365e34957d175be1fa6104b4f69d0ab6261 100644 (file)
@@ -103,6 +103,7 @@ AliEMCALGetter::AliEMCALGetter(const char* headerFile, const char* branchTitle,
   //fQAFolder      = dynamic_cast<TFolder*>(gROOT->FindObjectAny("Folders/Run/Conditions/QA")); 
   fTasksFolder   = dynamic_cast<TFolder*>(gROOT->FindObjectAny("Folders/Tasks")) ; 
 
   //fQAFolder      = dynamic_cast<TFolder*>(gROOT->FindObjectAny("Folders/Run/Conditions/QA")); 
   fTasksFolder   = dynamic_cast<TFolder*>(gROOT->FindObjectAny("Folders/Tasks")) ; 
 
+  fFailed = kFALSE ; 
   if ( fHeaderFile != "aliroot"  ) { // to call the getter without a file
 
     //open headers file
   if ( fHeaderFile != "aliroot"  ) { // to call the getter without a file
 
     //open headers file
@@ -116,7 +117,8 @@ AliEMCALGetter::AliEMCALGetter(const char* headerFile, const char* branchTitle,
       
       if (!file->IsOpen()) {
        cerr << "ERROR : AliEMCALGetter::AliEMCALGetter -> Cannot open " << fHeaderFile.Data() << endl ; 
       
       if (!file->IsOpen()) {
        cerr << "ERROR : AliEMCALGetter::AliEMCALGetter -> Cannot open " << fHeaderFile.Data() << endl ; 
-       abort() ; 
+               fFailed = kTRUE ;
+        return ;  
       }
       
       gAlice = static_cast<AliRun *>(file->Get("gAlice")) ;
       }
       
       gAlice = static_cast<AliRun *>(file->Get("gAlice")) ;
@@ -125,7 +127,8 @@ AliEMCALGetter::AliEMCALGetter(const char* headerFile, const char* branchTitle,
 
   if (!gAlice) {
     cerr << "ERROR : AliEMCALGetter::AliEMCALGetter -> Cannot find gAlice in " << fHeaderFile.Data() << endl ; 
 
   if (!gAlice) {
     cerr << "ERROR : AliEMCALGetter::AliEMCALGetter -> Cannot find gAlice in " << fHeaderFile.Data() << endl ; 
-    abort() ; 
+    fFailed = kTRUE ;
+    return ; 
   }
   if (!EMCAL()) {
     if (fDebug)
   }
   if (!EMCAL()) {
     if (fDebug)
index 27a82fac999216d2af905bf178d16e987f960560..06acc925d0e6fc7c11f679ec29ea0d629dd6efda 100644 (file)
@@ -61,6 +61,7 @@ class AliEMCALGetter : public TObject {
   
   virtual ~AliEMCALGetter() ; 
   
   
   virtual ~AliEMCALGetter() ; 
   
+  const Bool_t HasFailed(void) const {return fFailed ;} 
   Bool_t PostHits(void ) const ;  
   Bool_t PostSDigits(      const char * name,  const char * file = 0) const ;  
   Bool_t PostDigits(       const char * name ) const ;  
   Bool_t PostHits(void ) const ;  
   Bool_t PostSDigits(      const char * name,  const char * file = 0) const ;  
   Bool_t PostDigits(       const char * name ) const ;  
@@ -207,6 +208,7 @@ class AliEMCALGetter : public TObject {
   TString        fDigitsTitle ;       //!
   TString        fSDigitsTitle ;      //!
 
   TString        fDigitsTitle ;       //!
   TString        fSDigitsTitle ;      //!
 
+  Bool_t         fFailed ;            //! true if file is not opened and/or galice not found
   Int_t          fDebug ;             // Debug level
 
   Int_t          fNPrimaries ;        //! # of primaries
   Int_t          fDebug ;             // Debug level
 
   Int_t          fNPrimaries ;        //! # of primaries