Fixes for bug #49914: Compilation breaks in trunk, and bug #48629: Trunk cannot read...
[u/mrichter/AliRoot.git] / ITS / AliITSQADataMakerSim.cxx
index 49e146d..6035f93 100644 (file)
@@ -25,6 +25,7 @@
 
 // --- ROOT system ---
 #include <TTree.h>
+#include <TMath.h>
 // --- Standard library ---
 
 // --- AliRoot header files ---
@@ -33,7 +34,7 @@
 #include "AliITSQASDDDataMakerSim.h"
 #include "AliITSQASSDDataMakerSim.h"
 #include "AliLog.h"
-#include "AliQA.h"
+#include "AliQAv1.h"
 #include "AliQAChecker.h"
 #include "AliITSQAChecker.h"
 #include "AliRawReader.h"
@@ -42,7 +43,7 @@ ClassImp(AliITSQADataMakerSim)
 
 //____________________________________________________________________________ 
 AliITSQADataMakerSim::AliITSQADataMakerSim(Short_t subDet) :
-AliQADataMakerSim(AliQA::GetDetName(AliQA::kITS), "ITS Quality Assurance Data Maker"),
+AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kITS), "ITS Quality Assurance Data Maker"),
 fSubDetector(subDet),
 fSPDDataMaker(NULL),
 fSDDDataMaker(NULL),
@@ -111,28 +112,32 @@ void AliITSQADataMakerSim::StartOfDetectorCycle()
 }
 
 //____________________________________________________________________________ 
-void AliITSQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)
+void AliITSQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray** list)
 {
   // launch the QA checking
-  AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n"); 
-  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list);
-  if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list);
-  if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list);
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    SetEventSpecie(specie) ; 
+    AliDebug(1,"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n"); 
+    if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list[specie]);
+    if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list[specie]);
+    if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list[specie]);
   
-  AliQAChecker *qac = AliQAChecker::Instance();
-  AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
-  Int_t subdet=GetSubDet();
-  qacb->SetSubDet(subdet);
+  
+    AliQAChecker *qac = AliQAChecker::Instance();
+    AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
+    Int_t subdet=GetSubDet();
+    qacb->SetSubDet(subdet);
 
-  if(subdet== 0 ){
-    qacb->SetTaskOffset(fSPDDataMaker->GetOffset(task),fSDDDataMaker->GetOffset(task),fSSDDataMaker->GetOffset(task)); //Setting the offset for the QAChecker list             
-    }
-  else
-    if(subdet!=0){
-      Int_t offset=GetDetTaskOffset(subdet, task);
-      qacb->SetDetTaskOffset(subdet,offset);
+    if(subdet== 0 ){
+      qacb->SetTaskOffset(fSPDDataMaker->GetOffset(task),fSDDDataMaker->GetOffset(task),fSSDDataMaker->GetOffset(task)); //Setting the offset for the QAChecker list           
     }
-       qac->Run( AliQA::kITS , task, list);  //temporary skipping the checking
+    else
+      if(subdet!=0){
+       Int_t offset=GetDetTaskOffset(subdet, task);
+       qacb->SetDetTaskOffset(subdet,offset);
+      }
+    qac->Run( AliQAv1::kITS , task, list); 
+  }
 }
 
 //____________________________________________________________________________ 
@@ -245,7 +250,7 @@ void AliITSQADataMakerSim::MakeHits(TTree * hits)
 
 //_________________________________________________________________
 
-Int_t AliITSQADataMakerSim::GetDetTaskOffset(Int_t subdet,AliQA::TASKINDEX_t task)
+Int_t AliITSQADataMakerSim::GetDetTaskOffset(Int_t subdet,AliQAv1::TASKINDEX_t task)
 {
   switch(subdet)
     {