]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Additional protection for the case when galice.root does not exist
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Oct 2007 07:20:14 +0000 (07:20 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Oct 2007 07:20:14 +0000 (07:20 +0000)
STEER/AliQADataMakerSteer.cxx

index 70485b33822e5e10cff9789bb25d970af96c1bee..800468bb364439bddd192005115f1f41846777b4 100644 (file)
@@ -335,11 +335,16 @@ Bool_t AliQADataMakerSteer::Run(const AliQA::TASKINDEX taskIndex, const  char *
                        fRunLoader->GetEvent(iEvent);
                }
                // loop over detectors
-               TObjArray* detArray = fRunLoader->GetAliRun()->Detectors() ;
+               TObjArray* detArray = NULL ; 
+               if (fRunLoader) // check if RunLoader exists 
+                       if ( fRunLoader->GetAliRun() ) // check if AliRun exists in gAlice.root
+                               detArray = fRunLoader->GetAliRun()->Detectors() ;
                for (UInt_t iDet = 0 ; iDet < fgkNDetectors ; iDet++) {
-                       AliModule* det = static_cast<AliModule*>(detArray->FindObject(AliQA::GetDetName(iDet))) ;
-                       if (!det || !det->IsActive()) 
-                               continue;
+                       if (detArray) {
+                               AliModule* det = static_cast<AliModule*>(detArray->FindObject(AliQA::GetDetName(iDet))) ;
+                               if (!det || !det->IsActive()) 
+                                       continue;
+                       }
                        AliQADataMaker * qadm = GetQADataMaker(iDet) ;
                        if (!qadm) {
                                rv = kFALSE ;