Add protectio skipping QA for detectors not present in the simulation
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 21 Oct 2007 16:51:50 +0000 (16:51 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 21 Oct 2007 16:51:50 +0000 (16:51 +0000)
STEER/AliQADataMakerSteer.cxx

index 8f3346cde4ed278eaecab8f67c8ccea2f9a8ee79..d7e2b3774614d1700bc47cec966b975a7e846aea 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "AliESDEvent.h"
 #include "AliLog.h"
+#include "AliModule.h"
 #include "AliQA.h"
 #include "AliQADataMaker.h"
 #include "AliQADataMakerSteer.h" 
@@ -329,7 +330,11 @@ Bool_t AliQADataMakerSteer::Run(const AliQA::TASKINDEX taskIndex, const  char *
                        fRunLoader->GetEvent(iEvent);
                }
                // loop over detectors
+               TObjArray* detArray = fRunLoader->GetAliRun()->Detectors() ;
                for (UInt_t iDet = 0 ; iDet < fgkNDetectors ; iDet++) {
+                       AliModule* det = static_cast<AliModule*>(detArray->At(iDet)) ;
+                       if (!det || !det->IsActive()) 
+                               continue;
                        AliQADataMaker * qadm = GetQADataMaker(iDet) ;
                        if (!qadm) {
                                rv = kFALSE ;