Add protectio skipping QA for detectors not present in the simulation
[u/mrichter/AliRoot.git] / 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 ;