Introducing event specie in QA (Yves)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 27 Dec 2008 10:27:54 +0000 (10:27 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 27 Dec 2008 10:27:54 +0000 (10:27 +0000)
117 files changed:
ACORDE/AliACORDEQAChecker.cxx
ACORDE/AliACORDEQAChecker.h
ACORDE/AliACORDEQADataMakerRec.cxx
ACORDE/AliACORDEQADataMakerRec.h
ACORDE/AliACORDEQADataMakerSim.cxx
ACORDE/AliACORDEQADataMakerSim.h
EMCAL/AliEMCALQADataMakerRec.cxx
EMCAL/AliEMCALQADataMakerRec.h
EMCAL/AliEMCALQADataMakerSim.cxx
EMCAL/AliEMCALQADataMakerSim.h
FMD/AliFMDQADataMakerRec.cxx
FMD/AliFMDQADataMakerRec.h
FMD/AliFMDQADataMakerSim.cxx
FMD/AliFMDQADataMakerSim.h
HMPID/AliHMPIDQAChecker.cxx
HMPID/AliHMPIDQAChecker.h
HMPID/AliHMPIDQADataMakerRec.cxx
HMPID/AliHMPIDQADataMakerRec.h
HMPID/AliHMPIDQADataMakerSim.cxx
HMPID/AliHMPIDQADataMakerSim.h
ITS/AliITSQAChecker.cxx
ITS/AliITSQAChecker.h
ITS/AliITSQADataMakerRec.cxx
ITS/AliITSQADataMakerRec.h
ITS/AliITSQADataMakerSim.cxx
ITS/AliITSQADataMakerSim.h
ITS/AliITSQASDDDataMakerRec.cxx
ITS/AliITSQASDDDataMakerSim.cxx
ITS/AliITSQASPDDataMakerRec.cxx
ITS/AliITSQASPDDataMakerSim.cxx
ITS/AliITSQASSDDataMakerRec.cxx
ITS/AliITSQASSDDataMakerSim.cxx
MUON/AliMUONQAChecker.cxx
MUON/AliMUONQAChecker.h
MUON/AliMUONQADataMakerRec.cxx
MUON/AliMUONQADataMakerRec.h
MUON/AliMUONQADataMakerSim.cxx
MUON/AliMUONQADataMakerSim.h
PHOS/AliPHOSQADataMakerRec.cxx
PHOS/AliPHOSQADataMakerRec.h
PHOS/AliPHOSQADataMakerSim.cxx
PHOS/AliPHOSQADataMakerSim.h
PMD/AliPMDQADataMakerRec.cxx
PMD/AliPMDQADataMakerRec.h
PMD/AliPMDQADataMakerSim.cxx
PMD/AliPMDQADataMakerSim.h
STEER/AliCorrQAChecker.cxx
STEER/AliCorrQAChecker.h
STEER/AliCorrQADataMakerRec.cxx
STEER/AliCorrQADataMakerRec.h
STEER/AliGlobalQADataMaker.cxx
STEER/AliGlobalQADataMaker.h
STEER/AliQA.cxx
STEER/AliQA.h
STEER/AliQAChecker.cxx
STEER/AliQAChecker.h
STEER/AliQACheckerBase.cxx
STEER/AliQACheckerBase.h
STEER/AliQADataMaker.cxx
STEER/AliQADataMaker.h
STEER/AliQADataMakerRec.cxx
STEER/AliQADataMakerRec.h
STEER/AliQADataMakerSim.cxx
STEER/AliQADataMakerSim.h
STEER/AliQADataMakerSteer.cxx
STEER/AliQADataMakerSteer.h
STEER/AliRecoParam.cxx
STEER/AliRecoParam.h
STEER/AliReconstruction.cxx
STEER/AliSimulation.cxx
STEER/AliSimulation.h
STEER/AliTracker.cxx
STEER/AliTracker.h
STEER/CMake_libSTEER.txt
STEER/CMake_libSTEERBase.txt
STEER/STEERBaseLinkDef.h
STEER/STEERLinkDef.h
STEER/libSTEER.pkg
STEER/libSTEERBase.pkg
T0/AliT0QAChecker.cxx
T0/AliT0QAChecker.h
T0/AliT0QADataMakerRec.cxx
T0/AliT0QADataMakerRec.h
T0/AliT0QADataMakerSim.cxx
T0/AliT0QADataMakerSim.h
TOF/AliTOFQAChecker.cxx
TOF/AliTOFQAChecker.h
TOF/AliTOFQADataMakerRec.cxx
TOF/AliTOFQADataMakerRec.h
TOF/AliTOFQADataMakerSim.cxx
TOF/AliTOFQADataMakerSim.h
TPC/AliTPCQADataMakerRec.cxx
TPC/AliTPCQADataMakerRec.h
TPC/AliTPCQADataMakerSim.cxx
TPC/AliTPCQADataMakerSim.h
TPC/AliTPCdataQA.cxx
TPC/AliTPCdataQA.h
TRD/AliTRDQAChecker.h
TRD/AliTRDQADataMakerRec.cxx
TRD/AliTRDQADataMakerRec.h
TRD/AliTRDQADataMakerSim.cxx
TRD/AliTRDQADataMakerSim.h
VZERO/AliVZEROQAChecker.cxx
VZERO/AliVZEROQAChecker.h
VZERO/AliVZEROQADataMakerRec.cxx
VZERO/AliVZEROQADataMakerRec.h
VZERO/AliVZEROQADataMakerSim.cxx
VZERO/AliVZEROQADataMakerSim.h
ZDC/AliZDCQAChecker.cxx
ZDC/AliZDCQAChecker.h
ZDC/AliZDCQADataMakerRec.cxx
ZDC/AliZDCQADataMakerRec.h
ZDC/AliZDCQADataMakerSim.cxx
ZDC/AliZDCQADataMakerSim.h
test/QA/Config.C
test/QA/rec.C
test/QA/sim.C

index a3e80f941676b5da10a0e13237b4af5391813932..5c5aef7c82f578c589cef28876d907a8717d9227 100755 (executable)
 
 ClassImp(AliACORDEQAChecker)
 
-//__________________________________________________________________
+//____________________________________________________________________________
+Double_t * AliACORDEQAChecker::Check(AliQA::ALITASK_t /*index*/)
+{
+  Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    rv[specie] = 0.0 ; 
+  return rv ;  
+}
 
-Double_t AliACORDEQAChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray * list)
+//__________________________________________________________________
+Double_t * AliACORDEQAChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray ** list)
 {
 
 
 // Super-basic check on the QA histograms on the input list: 
   // look whether they are empty!
-  Double_t test = 0.0  ;
-  Int_t count = 0 ; 
-  
-  if (list->GetEntries() == 0){  
-    test = 1. ; // nothing to check
+  Double_t * test = new Double_t[AliRecoParam::kNSpecies] ; 
+  Int_t * count   = new Int_t[AliRecoParam::kNSpecies] ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    test[specie]    = 0.0 ; 
+    count[specie] = 0 ; 
   }
-  else {
-    TIter next(list) ; 
-    TH1 * hdata ;
-    count = 0 ; 
-    while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
-      if (hdata) { 
-       Double_t rv = 0.;
-       if(hdata->GetEntries()>0)rv=1; 
-       AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ; 
-       count++ ; 
-       test += rv ; 
-      }
-      else{
-       AliError("Data type cannot be processed") ;
-      }
-      
+  
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    if (list[specie]->GetEntries() == 0){  
+      test[specie] = 1. ; // nothing to check
     }
-    if (count != 0) { 
-      if (test==0) {
-       AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
-       test = 0.5;  //upper limit value to set kWARNING flag for a task
+    else {
+      TIter next(list[specie]) ; 
+      TH1 * hdata ;
+      while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
+        if (hdata) { 
+          Double_t rv = 0.0 ; 
+          if(hdata->GetEntries()>0)rv=1; 
+          AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ; 
+          count[specie]++ ; 
+          test[specie] += rv ; 
+        }
+        else{
+          AliError("Data type cannot be processed") ;
+        }
       }
-      else {
-       test /= count ;
+      if (count[specie] != 0) { 
+        if (test[specie]==0) {
+          AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
+          test[specie] = 0.5;  //upper limit value to set kWARNING flag for a task
+        }
+        else {
+          test[specie] /= count[specie] ;
+        }
       }
     }
+    AliInfo(Form("Test Result = %f", test[specie])) ; 
   }
-
-  AliInfo(Form("Test Result = %f", test)) ; 
   return test ; 
-
-
-
 }
 
index f58f2c44ebfeaf245fd5fc8a2a84d37b750a817b..5127820510decf754f5f549f51a6b65c29a7b8ca 100755 (executable)
@@ -30,11 +30,8 @@ public:
   AliACORDEQAChecker(const AliACORDEQAChecker& qac) : AliQACheckerBase(qac.GetName(), qac.GetTitle()) {;} // constructor   
   virtual ~AliACORDEQAChecker() {;} // destructor
 
-  virtual Double_t Check(AliQA::ALITASK_t /*index*/, TObjArray * list) ;
-  virtual Double_t Check(AliQA::ALITASK_t /*index*/) {return 0.;} ;
-  virtual Double_t Check() {return 0.;} ;
-  virtual Double_t Check(TObjArray*) {return 0.;} ;
-  virtual Double_t Check(AliQA::ALITASK_t, TNtupleD*) {return -1.;} ;
+  virtual Double_t * Check(AliQA::ALITASK_t index) ;
+  virtual Double_t * Check(AliQA::ALITASK_t index, TObjArray ** list) ;
 //  Double_t CheckEntries(TObjArray * list) const ;/*--> to be implemented*/
 
 
index e343862ac80711215990f71b05b8182e6c64ab7b..acd8d9aed1c72b648d5392bc199064725f882047 100755 (executable)
@@ -66,7 +66,7 @@ AliACORDEQADataMakerRec& AliACORDEQADataMakerRec::operator = (const AliACORDEQAD
   return *this;
 }
 //____________________________________________________________________________
-void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
index 9c7f6e5907e3ba557d1a2814003c7e43cc30098f..109a1e36c14b475aecc2cd2706124e60af88b02d 100755 (executable)
@@ -42,7 +42,7 @@ private:
   virtual void   InitESDs() ;      //book ESD QA histo 
   virtual void   MakeRaws(AliRawReader* rawReader) ;
   virtual void   MakeESDs(AliESDEvent * esd) ;         //Fill hit QA histo
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
   virtual void   StartOfDetectorCycle() ;
   ClassDef(AliACORDEQADataMakerRec,1)  // description 
 
index cf5f17ea3fc658b56507a5d62bed5186c8682654..9c156523275f005be4d8e91b9a79d7cb9c25c5ae 100755 (executable)
@@ -68,11 +68,11 @@ AliACORDEQADataMakerSim& AliACORDEQADataMakerSim::operator = (const AliACORDEQAD
   return *this;
 }
 //____________________________________________________________________________
-void AliACORDEQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliACORDEQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
-   printf("ACORDE---->Detector specific actions at END of cycle\n................\n");
+   AliInfo("ACORDE---->Detector specific actions at END of cycle\n................\n");
 
   AliQAChecker::Instance()->Run(AliQA::kACORDE, task, list) ;
 }
@@ -80,7 +80,7 @@ void AliACORDEQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjAr
 void AliACORDEQADataMakerSim::StartOfDetectorCycle()
 {
   //Detector specific actions at start of cycle
-  printf("ACORDE---->Detector specific actions at START of cycle\n................\n");
+  AliInfo("ACORDE---->Detector specific actions at START of cycle\n................\n");
 }
 //____________________________________________________________________________ 
 void AliACORDEQADataMakerSim::InitHits()
index a043fad9ccb5b2736cb2ee1dd138aa5a0dac5012..5b92771c1fbbb8cd468407df535440f393e22b6c 100755 (executable)
@@ -43,7 +43,7 @@ private:
   virtual void   MakeHits(TClonesArray *) {}       //Dummy for the moment
   virtual void   MakeDigits(TTree* digitsTree) ;   //Fill Digit QA histo
   virtual void   MakeDigits(TClonesArray *) {}       //Dummy for the moment
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
   virtual void   StartOfDetectorCycle() ;
   ClassDef(AliACORDEQADataMakerSim,1)  // description 
 
index 537cf94efc3be9d606479e4f63152148b7f6b5e2..665a601c121c0827b79dbcb85039050ad80c7628 100644 (file)
@@ -70,7 +70,7 @@ AliEMCALQADataMakerRec& AliEMCALQADataMakerRec::operator = (const AliEMCALQAData
 }
  
 //____________________________________________________________________________ 
-void AliEMCALQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliEMCALQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
index 4523faf23dc04e0ba0b1d404a243db24dd77972b..4170d11149fd395cc9b570a0fe9da0252ea1dfb4 100644 (file)
@@ -44,7 +44,7 @@ public:
   virtual ~AliEMCALQADataMakerRec() {;} // dtor
   
 private:
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
   virtual void   InitESDs() ; 
   virtual void   InitRecPoints() ; 
   virtual void   InitRaws() ; 
index 680db64974690f81763a495993c162799fb09347..c0a973a5d6a99cfa83893679e7d5d8c7498850fb 100644 (file)
@@ -68,7 +68,7 @@ AliEMCALQADataMakerSim& AliEMCALQADataMakerSim::operator = (const AliEMCALQAData
 }
  
 //____________________________________________________________________________ 
-void AliEMCALQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliEMCALQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
index 1edda3fa06ea03a27b58e775fb4f62be4e9859ed..ea808474e23ebe6cadf8871fd521459a150b6cad 100644 (file)
@@ -31,7 +31,7 @@ public:
   virtual ~AliEMCALQADataMakerSim() {;} // dtor
   
 private:
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
   virtual void   InitHits() ; 
   virtual void   InitDigits() ; 
   virtual void   InitSDigits() ; 
index 86f937377ca56e805bda31b815c2e1acdac1d0d9..ff36304b236791f14c1f2146abd0724fa7bb6f42 100644 (file)
@@ -90,7 +90,7 @@ AliFMDQADataMakerRec::~AliFMDQADataMakerRec()
 
 void 
 AliFMDQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, 
-                                        TObjArray * list)
+                                        TObjArray ** list)
 {
   // Detector specific actions at end of cycle
   // do the QA checking
index c2069880aa1f47a0a5a88eb67b4909d03ca019fa..d15dc8956ff18a0dc438387033957f5f4bc7d939 100644 (file)
@@ -26,7 +26,7 @@ public:
   AliFMDQADataMakerRec& operator = (const AliFMDQADataMakerRec& qadm) ;
   virtual ~AliFMDQADataMakerRec();
 private:
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list);
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list);
   virtual void   InitESDs(); 
   //  virtual void   InitDigits(); 
   virtual void   InitRecPoints(); 
index 928f65d52cce1cf68b23ea26f3b5337268ac1e3a..df3f81cd4c04866c9f61648298ebd932e053ebc4 100644 (file)
@@ -86,7 +86,7 @@ AliFMDQADataMakerSim::~AliFMDQADataMakerSim()
 
 //_____________________________________________________________________
 void AliFMDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, 
-                                             TObjArray * list)
+                                             TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
index 5cc65d2b8491a0b6d9bf72b35770b679f16dec40..20385718abdcfcea6afd05f3c0128db898699c71 100644 (file)
@@ -29,7 +29,7 @@ class AliFMDQADataMakerSim: public AliQADataMakerSim {
   virtual ~AliFMDQADataMakerSim();  // dtor
   
  private:
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list);
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list);
   virtual void   InitHits(); 
   virtual void   InitDigits(); 
   // virtual void   InitRaws() ; 
index e7e2a463a50ad7f95bd506ee42eb58cb5050a5be..6d834659a0b98b066f4937dc9188e646c99bffdc 100644 (file)
 
 ClassImp(AliHMPIDQAChecker)
 
+//____________________________________________________________________________
+Double_t * AliHMPIDQAChecker::Check(AliQA::ALITASK_t /*index*/)
+{
+  Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    rv[specie] = 0.0 ; 
+  return rv ;  
+}
+
 //_________________________________________________________________
-Double_t AliHMPIDQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list) 
+Double_t * AliHMPIDQAChecker::Check(AliQA::ALITASK_t index, TObjArray ** list) 
 {
 //
 // Main check function: Depending on the TASK, different checks are applied
 // At the moment:       check for empty histograms and checks for RecPoints
 
-  AliDebug(1,Form("AliHMPIDChecker"));
+  Double_t * check = new Double_t[AliRecoParam::kNSpecies] ; 
+  
+//YS THIS IS NOT CORRECT
+  AliInfo(Form("Fix needed ....."));
   AliCDBEntry *QARefRec = AliCDBManager::Instance()->Get("HMPID/QARef/Rec");
   if( !QARefRec){
-    AliInfo("QA reference data NOT retrieved for Recostruction check. No HMPIDChecker  ...exiting");
-    return 1.;
+    AliInfo("QA reference data NOT retrieved for Reconstruction check. No HMPIDChecker  ...exiting");
+    return check;
   }
+//YS THIS IS NOT CORRECT
 
 // checking for empy histograms
-  Double_t check =0;
-  if(CheckEntries(list) == 0)  {
-  AliWarning("histograms are empty");
-  check = 0.4;//-> Corresponds to kWARNING see AliQACheckerBase::Run
-  return check;
- }
-
-// checking rec points
-  if(index == AliQA::kREC) check = CheckRecPoints(list,(TObjArray *)QARefRec->GetObject());
-
-//default check response. It will be changed when reasonable checks will be considered
-  else check = 0.7 ; // /-> Corresponds to kINFO see AliQACheckerBase::Run 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    check[specie] = 1.0;
+    if ( !AliQA::Instance()->IsEventSpecieSet(specie) ) 
+      continue ; 
+    if(CheckEntries(list[specie]) == 0)  {
+      AliWarning("histograms are empty");
+      check[specie] = 0.4;//-> Corresponds to kWARNING see AliQACheckerBase::Run
+    }
+  
+    // checking rec points
+    if(index == AliQA::kREC) check[specie] = CheckRecPoints(list[specie],(TObjArray *)QARefRec->GetObject());
 
+    //default check response. It will be changed when reasonable checks will be considered
+    else check[specie] = 0.7 ; // /-> Corresponds to kINFO see AliQACheckerBase::Run 
+  }
   return check;
 
 }
index 0c20c5cdb9da05f093ac4d6ee158287641b3a933..73182e187c24d5a3baf868bc8a9b0984431f73e1 100644 (file)
@@ -30,11 +30,8 @@ public:
   AliHMPIDQAChecker(const AliHMPIDQAChecker& qac) : AliQACheckerBase(qac.GetName(), qac.GetTitle()) {;} // cpy ctor   
   virtual ~AliHMPIDQAChecker() {;} // dtor
 
-  virtual Double_t Check(AliQA::ALITASK_t index, TObjArray * list) ;
-  virtual Double_t Check(AliQA::ALITASK_t /*index*/) {return 0.;} ;
-  virtual Double_t Check()                           {return 0.;} ;
-  virtual Double_t Check(TObjArray*)                 {return 0.;} ; 
-  virtual Double_t Check(AliQA::ALITASK_t, TNtupleD *) { return 0. ;}
+  virtual Double_t * Check(AliQA::ALITASK_t /*index*/) ;
+  virtual Double_t * Check(AliQA::ALITASK_t index, TObjArray ** list) ;
   
   Double_t CheckEntries(TObjArray * list) const ;
   Double_t CheckRecPoints(TObjArray *listrec, TObjArray *listref) const ;
index 50a0d19769d4bd5720eded493412b2947c161012..63a64d8af5ec09104a26ecb673a983d8bf606c08 100644 (file)
@@ -274,15 +274,17 @@ void AliHMPIDQADataMakerRec::StartOfDetectorCycle()
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
-void AliHMPIDQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray *histos)
+void AliHMPIDQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray **histos)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
   
   if(task==AliQA::kRAWS) {
-    for(Int_t iddl=0;iddl<14;iddl++) {
-     TH1F *h = (TH1F*)histos->At(14+iddl); //ddl histos scaled by the number of events 
-     h->Scale(1./(Float_t)fEvtRaw);
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      for(Int_t iddl=0;iddl<14;iddl++) {
+        TH1F *h = (TH1F*)histos[specie]->At(14+iddl); //ddl histos scaled by the number of events 
+        h->Scale(1./(Float_t)fEvtRaw);
+      }
     }
   }
   
index d5a616342ce39d8927221aeac6cb117f65f1f9af..0f4fdad19d20fab5211ca86a423037bfbad1c2bd 100644 (file)
@@ -37,7 +37,7 @@ private:
   virtual void   MakeRaws(AliRawReader* rawReader);
   virtual void   MakeESDs(AliESDEvent * esd) ;         //Fill hit QA histo
   virtual void   StartOfDetectorCycle() ;
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * obj) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** obj) ;
   Int_t   fEvtRaw;    //internal event counter for raw 
 
   ClassDef(AliHMPIDQADataMakerRec,1)  // description 
index ef4cbff2194386bd259460aeb724f8133d390867..ac1e1b5f8aa4d248382769f299713701e2b9003e 100644 (file)
@@ -239,7 +239,7 @@ void AliHMPIDQADataMakerSim::StartOfDetectorCycle()
   
 }
 
-void AliHMPIDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray *obj)
+void AliHMPIDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray **obj)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
index 737583499b6cf70b4564d6816ac975f7afd7dbcb..ca1c5814e4c1c82288b8112c02bc495db4601f36 100644 (file)
@@ -35,7 +35,7 @@ public:
 
 private:
 
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * obj) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** obj) ;
   virtual void   InitHits() ;      //book hit QA histo 
   virtual void   InitDigits() ;    //book Digit QA histo
   virtual void   InitSDigits() ;   //book SDigits QA histo
index c5dc71df732863637b29af4962ed93aedccbe76c..2b11813dff30fd68676eb505c6a2ff40632cfcd0 100644 (file)
@@ -84,149 +84,161 @@ AliITSQAChecker& AliITSQAChecker::operator=(const AliITSQAChecker& qac){
 }
 
 //____________________________________________________________________________
-Double_t AliITSQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
+Double_t * AliITSQAChecker::Check(AliQA::ALITASK_t /*index*/)
+{
+  Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    rv[specie] = 0.5 ; 
+  return rv ;  
+}
+
+//____________________________________________________________________________
+Double_t * AliITSQAChecker::Check(AliQA::ALITASK_t index, TObjArray ** list)
 {
   
   // Super-basic check on the QA histograms on the input list:
   // look whether they are empty!
   if(index == AliQA::kESD){
-    AliDebug(1,"Checker for ESD");
-    Int_t tested = 0;
-    Int_t empty = 0;
-    Double_t rv = 0.;
-    // The following flags are set to kTRUE if the corresponding
-    // QA histograms exceed a given quality threshold
-    Bool_t cluMapSA = kFALSE;
-    Bool_t cluMapMI = kFALSE;
-    Bool_t cluMI = kFALSE;
-    Bool_t cluSA = kFALSE;
-    Bool_t verSPDZ = kFALSE;
-    if (list->GetEntries() == 0) {
-      rv = 0.; // nothing to check
-    }
-    else {
-      TIter next1(list);
-      TH1 * hdata;
-      Int_t nskipped=0;
-      Bool_t skipped[6]={kFALSE,kFALSE,kFALSE,kFALSE,kFALSE,kFALSE};
-      // look for layers that we wanted to skip
-      while ( (hdata = dynamic_cast<TH1 *>(next1())) ) {
-       if(!hdata) continue;
-       TString hname = hdata->GetName();
-       if(!hname.Contains("hESDSkippedLayers")) continue;
-       for(Int_t k=1; k<7; k++) {
-         if(hdata->GetBinContent(k)>0) { 
-           nskipped++; 
-           skipped[k-1]=kTRUE; 
-         } 
-       } 
+    Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ; 
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      rv[specie] = 0.0 ; 
+      if ( !AliQA::Instance()->IsEventSpecieSet(specie) ) 
+        continue ; 
+      AliDebug(1,"Checker for ESD");
+      Int_t tested = 0;
+      Int_t empty = 0;
+      // The following flags are set to kTRUE if the corresponding
+      // QA histograms exceed a given quality threshold
+      Bool_t cluMapSA = kFALSE;
+      Bool_t cluMapMI = kFALSE;
+      Bool_t cluMI = kFALSE;
+      Bool_t cluSA = kFALSE;
+      Bool_t verSPDZ = kFALSE;
+      if (list[specie]->GetEntries() == 0) {
+        rv[specie] = 0.; // nothing to check
       }
-      TIter next(list);
-      while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
-       if(hdata){
-         TString hname = hdata->GetName();
-         Double_t entries = hdata->GetEntries();
-         ++tested;
-         if(!(entries>0.))++empty;
-         AliDebug(1,Form("ESD hist name %s - entries %12.1g",hname.Data(),entries));
+      else {
+        TIter next1(list[specie]);
+        TH1 * hdata;
+        Int_t nskipped=0;
+        Bool_t skipped[6]={kFALSE,kFALSE,kFALSE,kFALSE,kFALSE,kFALSE};
+        // look for layers that we wanted to skip
+        while ( (hdata = dynamic_cast<TH1 *>(next1())) ) {
+          if(!hdata) continue;
+          TString hname = hdata->GetName();
+          if(!hname.Contains("hESDSkippedLayers")) continue;
+          for(Int_t k=1; k<7; k++) {
+            if(hdata->GetBinContent(k)>0) { 
+              nskipped++; 
+              skipped[k-1]=kTRUE; 
+            } 
+          } 
+        }
+        TIter next(list[specie]);
+        while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
+          if(hdata){
+            TString hname = hdata->GetName();
+            Double_t entries = hdata->GetEntries();
+            ++tested;
+            if(!(entries>0.))++empty;
+            AliDebug(1,Form("ESD hist name %s - entries %12.1g",hname.Data(),entries));
+            if(hname.Contains("hESDClusterMapSA") && entries>0.){
+              cluMapSA = kTRUE;
+              AliDebug(1,Form("Processing histogram %s",hname.Data()));
+              // Check if there are layers with anomalously low 
+              // contributing points to SA reconstructed tracks
+              for(Int_t k=1;k<7;k++){
+                // check if the layer was skipped
+                if(skipped[k-1]) continue;
+                if(hdata->GetBinContent(k)<0.5*(entries/6.)){
+                  cluMapSA = kFALSE;
+                  AliInfo(Form("SA tracks have few points on layer %d - look at histogram hESDClustersSA",k));
+                }
+              }  
+            }
 
-         if(hname.Contains("hESDClusterMapSA") && entries>0.){
-           cluMapSA = kTRUE;
-           AliDebug(1,Form("Processing histogram %s",hname.Data()));
-           // Check if there are layers with anomalously low 
-           // contributing points to SA reconstructed tracks
-           for(Int_t k=1;k<7;k++){
-             // check if the layer was skipped
-             if(skipped[k-1]) continue;
-             if(hdata->GetBinContent(k)<0.5*(entries/6.)){
-               cluMapSA = kFALSE;
-               AliInfo(Form("SA tracks have few points on layer %d - look at histogram hESDClustersSA",k));
-             }
-           }  
-         }
+            else if(hname.Contains("hESDClusterMapMI") && entries>0.){
+              // Check if there are layers with anomalously low 
+              // contributing points to MI reconstructed tracks
+              AliDebug(1,Form("Processing histogram %s",hname.Data()));
+              cluMapMI = kTRUE;
+              for(Int_t k=1;k<7;k++){
+                // check if the layer was skipped
+                if(skipped[k-1]) continue;
+                if(hdata->GetBinContent(k)<0.5*(entries/6.)){
+                  cluMapMI = kFALSE;
+                  AliInfo(Form("MI tracks have few points on layer %d - look at histogram hESDClustersMI",k));
+                }
+              }  
+            }
 
-         else if(hname.Contains("hESDClusterMapMI") && entries>0.){
-           // Check if there are layers with anomalously low 
-           // contributing points to MI reconstructed tracks
-           AliDebug(1,Form("Processing histogram %s",hname.Data()));
-           cluMapMI = kTRUE;
-           for(Int_t k=1;k<7;k++){
-             // check if the layer was skipped
-             if(skipped[k-1]) continue;
-             if(hdata->GetBinContent(k)<0.5*(entries/6.)){
-               cluMapMI = kFALSE;
-               AliInfo(Form("MI tracks have few points on layer %d - look at histogram hESDClustersMI",k));
-             }
-           }  
-         }
+            else if(hname.Contains("hESDClustersMI") && entries>0.){
+              // Check if 6 clusters MI tracks are the majority
+              AliDebug(1,Form("Processing histogram %s",hname.Data()));
+              cluMI = kTRUE;
+              Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
+              for(Int_t k=2; k<7-nskipped; k++){
+                if(hdata->GetBinContent(k)>maxlaytracks){
+                  cluMI = kFALSE;
+                  AliInfo(Form("MI Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersMI",k-1,6-nskipped));
+                }
+              }
+            }
 
-         else if(hname.Contains("hESDClustersMI") && entries>0.){
-           // Check if 6 clusters MI tracks are the majority
-           AliDebug(1,Form("Processing histogram %s",hname.Data()));
-           cluMI = kTRUE;
-           Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
-           for(Int_t k=2; k<7-nskipped; k++){
-             if(hdata->GetBinContent(k)>maxlaytracks){
-               cluMI = kFALSE;
-               AliInfo(Form("MI Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersMI",k-1,6-nskipped));
-             }
-           }
-         }
+            else if(hname.Contains("hESDClustersSA") && entries>0.){
+              // Check if 6 clusters SA tracks are the majority
+              AliDebug(1,Form("Processing histogram %s",hname.Data()));
+              cluSA = kTRUE;
+              Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
+              for(Int_t k=2; k<7-nskipped; k++){
+                if(hdata->GetBinContent(k)>maxlaytracks){
+                  cluSA = kFALSE;
+                  AliInfo(Form("SA Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersSA",k-1,6-nskipped));
+                }
+              }
+            }
 
-         else if(hname.Contains("hESDClustersSA") && entries>0.){
-           // Check if 6 clusters SA tracks are the majority
-           AliDebug(1,Form("Processing histogram %s",hname.Data()));
-           cluSA = kTRUE;
-           Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
-           for(Int_t k=2; k<7-nskipped; k++){
-             if(hdata->GetBinContent(k)>maxlaytracks){
-               cluSA = kFALSE;
-               AliInfo(Form("SA Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersSA",k-1,6-nskipped));
-             }
-           }
-         }
+            else if(hname.Contains("hSPDVertexZ") && entries>0.){
+              // Check if average Z vertex coordinate is -5 < z < 5 cm
+              AliDebug(1,Form("Processing histogram %s",hname.Data()));
+              verSPDZ = kTRUE;
+              if(hdata->GetMean()<-5. && hdata->GetMean()>5.){
+                verSPDZ = kFALSE;
+                AliInfo(Form("Average z vertex coordinate is at z= %10.4g cm",hdata->GetMean()));
+              }
+            }
+          }
 
-         else if(hname.Contains("hSPDVertexZ") && entries>0.){
-           // Check if average Z vertex coordinate is -5 < z < 5 cm
-           AliDebug(1,Form("Processing histogram %s",hname.Data()));
-           verSPDZ = kTRUE;
-           if(hdata->GetMean()<-5. && hdata->GetMean()>5.){
-             verSPDZ = kFALSE;
-             AliInfo(Form("Average z vertex coordinate is at z= %10.4g cm",hdata->GetMean()));
-           }
-         }
-
-       }
-       else{
-         AliError("ESD Checker - invalid data type");
-       }
+          else{
+            AliError("ESD Checker - invalid data type");
+          }
          
-       rv = 0.;
-       if(tested>0){
-         if(tested == empty){
-           rv = 0.1;
-           AliWarning("All ESD histograms are empty");
-         }
-         else {
-           rv = 0.1+0.4*(static_cast<Double_t>(tested-empty)/static_cast<Double_t>(tested));
-           if(cluMapSA)rv+=0.1;
-           if(cluMapMI)rv+=0.1;
-           if(cluMI)rv+=0.1;
-           if(cluSA)rv+=0.1;
-           if(verSPDZ)rv+=0.1;
-         }
-       }
-  
-      }
-    }  
-    AliInfo(Form("ESD - Tested %d histograms, Return value %f \n",tested,rv));
-    return rv;
+          rv[specie] = 0.;
+          if(tested>0){
+            if(tested == empty){
+              rv[specie] = 0.1;
+              AliWarning("All ESD histograms are empty");
+            }
+            else {
+              rv[specie] = 0.1+0.4*(static_cast<Double_t>(tested-empty)/static_cast<Double_t>(tested));
+              if(cluMapSA)rv[specie]+=0.1;
+              if(cluMapMI)rv[specie]+=0.1;
+              if(cluMI)rv[specie]+=0.1;
+              if(cluSA)rv[specie]+=0.1;
+              if(verSPDZ)rv[specie]+=0.1;
+            }
+          }
+        }
+      }  
+      AliInfo(Form("ESD - Tested %d histograms, Return value %f \n",tested,rv[specie]));
+    }
+    return rv ; 
   }  // end of ESD QA
-
+  
+  Double_t * retval = new Double_t[AliRecoParam::kNSpecies] ; 
   //____________________________________________________________________________
 
   Double_t spdCheck, sddCheck, ssdCheck;
-  Double_t retval = 1.;
   //pixel
   if(fDet == 0 || fDet == 1) {
     AliDebug(1,"AliITSQAChecker::Create SPD Checker\n");
@@ -234,8 +246,13 @@ Double_t AliITSQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
       fSPDChecker = new AliITSQASPDChecker();
     }
     fSPDChecker->SetTaskOffset(fSPDOffset);
-    spdCheck = fSPDChecker->Check(index, list);
-    if(spdCheck<retval)retval = spdCheck;
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      retval[specie] = 1.0 ; 
+      if ( AliQA::Instance()->IsEventSpecieSet(specie) ) {
+        spdCheck = fSPDChecker->Check(index, list[specie]);
+        if(spdCheck<retval[specie])retval[specie] = spdCheck;
+      }
+    }
   }
   //drift
   if(fDet == 0 || fDet == 2) {
@@ -244,24 +261,34 @@ Double_t AliITSQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
       fSDDChecker = new AliITSQASDDChecker();
     }
     fSDDChecker->SetTaskOffset(fSDDOffset);
-    sddCheck = fSDDChecker->Check(index, list);
-    if(sddCheck<retval)retval = sddCheck;
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      retval[specie] = 1.0 ; 
+      if ( AliQA::Instance()->IsEventSpecieSet(specie) ) {
+        sddCheck = fSDDChecker->Check(index, list[specie]);
+        if(sddCheck<retval[specie])retval[specie] = sddCheck;
+      }
+    }
   }
   //strip
   if(fDet == 0 || fDet == 3) {
     AliDebug(1,"AliITSQAChecker::Create SSD Checker\n");
     if(!fSSDChecker) {
       fSSDChecker = new AliITSQASSDChecker();
-      AliInfo(Form("Number of monitored objects SSD: %d", list->GetEntries()));
+      AliInfo(Form("Number of monitored objects SSD: %d", list[AliRecoParam::kDefault]->GetEntries()));
     }
     fSSDChecker->SetTaskOffset(fSSDOffset);
-    ssdCheck = fSSDChecker->Check(index, list);
-    if(ssdCheck<retval)retval = ssdCheck;  }
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      retval[specie] = 1.0 ; 
+      if ( AliQA::Instance()->IsEventSpecieSet(specie) ) {
+        ssdCheck = fSSDChecker->Check(index, list[specie]);
+        if(ssdCheck<retval[specie])retval[specie] = ssdCheck;  
+      }
+    }
+  }
   // here merging part for common ITS QA result
   // 
-  AliDebug(1,Form("AliITSQAChecker::QAChecker returned value is %f \n",retval));
-  return retval;
-  
+
+  return retval;  
 }
 
 
index 2f5633c58b6e052d460ec228925fe1a0ec7baf8d..48a17ab198b0236491a52be2ced9a48f77d67df1 100644 (file)
@@ -48,14 +48,12 @@ public:
   virtual void SetDetTaskOffset(Int_t subdet=0,Int_t offset=0);
 
 protected:
-
+  virtual Double_t * Check(AliQA::ALITASK_t /*index*/) ;
+  virtual Double_t * Check(AliQA::ALITASK_t index, TObjArray ** list ) ;
   virtual void SetSPDTaskOffset(Int_t SPDOffset){fSPDOffset = SPDOffset;} ;
   virtual void SetSDDTaskOffset(Int_t SDDOffset){fSDDOffset = SDDOffset;} ;
   virtual void SetSSDTaskOffset(Int_t SSDOffset){fSSDOffset = SSDOffset;} ;
 
-  virtual Double_t Check(AliQA::ALITASK_t /*index*/){return 0.5;}
-  virtual Double_t Check(AliQA::ALITASK_t index, TObjArray * list ) ;
-  Double_t Check(AliQA::ALITASK_t, TNtupleD*) {AliFatal("Not implemented\n"); return 0;}
 private:
 
   Bool_t  fkOnline;
index 6ed04b3f1ba2f775262437260271a62ec6fcda4f..5cf22ebd7ea6c755582462f3c3d2ef9d0a88b6b0 100644 (file)
@@ -121,13 +121,17 @@ void AliITSQADataMakerRec::StartOfDetectorCycle()
 }
 
 //____________________________________________________________________________ 
-void AliITSQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)
+void AliITSQADataMakerRec::EndOfDetectorCycle(AliQA::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(AliQA::kITS, task, list[specie])\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);
index a78b7b871dbf902e16c77d1bf44bb9470cbe8406..fe25b7da6531108a1ad53427eb2a619967601328 100644 (file)
@@ -36,7 +36,7 @@ public:
   AliITSQADataMakerRec(const AliITSQADataMakerRec& qadm);
   AliITSQADataMakerRec& operator = (const AliITSQADataMakerRec& qac);
   virtual void StartOfDetectorCycle();
-  virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list);
+  virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list);
   virtual void EndOfDetectorCycle(const char *fgDataName);
   virtual void InitRaws();
   virtual void InitRecPoints();
index 49e146d4a19fbcd54ecd93ec19a9b866b46d3375..737fffb44b631bba8e9d76042c3153b26e6e4ea8 100644 (file)
@@ -25,6 +25,7 @@
 
 // --- ROOT system ---
 #include <TTree.h>
+#include <TMath.h>
 // --- Standard library ---
 
 // --- AliRoot header files ---
@@ -111,13 +112,16 @@ void AliITSQADataMakerSim::StartOfDetectorCycle()
 }
 
 //____________________________________________________________________________ 
-void AliITSQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)
+void AliITSQADataMakerSim::EndOfDetectorCycle(AliQA::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(AliQA::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);
index f7ed977a93db2b1eecc6a8aa91973314904a9fa0..a2448d0d90d116c1c2f6e87c602747e020c47cf1 100644 (file)
@@ -31,7 +31,7 @@ public:
   AliITSQADataMakerSim(const AliITSQADataMakerSim& qadm);
   AliITSQADataMakerSim& operator = (const AliITSQADataMakerSim& qac);
   virtual void StartOfDetectorCycle();
-  virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list);
+  virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list);
   virtual void InitDigits();
   virtual void InitSDigits();
   virtual void InitHits();
index fe14bc010ddfe156f3e572631f574b4552332b73..6ee9494305bf55bb6c57b059ed414bcd8a64a2db 100644 (file)
@@ -137,7 +137,7 @@ void AliITSQASDDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TO
 void AliITSQASDDDataMakerRec::InitRaws()
 { 
   // Initialization for RAW data - SDD -
-  fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
+  fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
   AliCDBEntry *ddlMapSDD = AliCDBManager::Instance()->Get("ITS/Calib/DDLMapSDD");
   Bool_t cacheStatus = AliCDBManager::Instance()->GetCacheFlag();
   if(!ddlMapSDD)
@@ -394,7 +394,7 @@ void AliITSQASDDDataMakerRec::InitRecPoints()
 {
   // Initialization for RECPOINTS - SDD -
 
-  fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
+  fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
 
   Int_t nOnline=1;
   Int_t  nOnline2=1;
index dd55e08a30dc8bff63d34cd4e3e8d774bc0f5d55..cd2e25d777c9e6ffc0ca0225289bdf9f425d4d21 100644 (file)
@@ -105,7 +105,7 @@ void AliITSQASDDDataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TO
 void AliITSQASDDDataMakerSim::InitDigits()\r
 { \r
   // Initialization for DIGIT data - SDD -  \r
-  fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();\r
+  fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();\r
   //fSDDhTask must be incremented by one unit every time a histogram is ADDED to the QA List\r
   TH1F* h0=new TH1F("SDD DIGITS Module Pattern","SDD DIGITS Module Pattern",260,239.5,499.5);       //hmod\r
   h0->GetXaxis()->SetTitle("SDD Module Number");\r
@@ -159,7 +159,7 @@ void AliITSQASDDDataMakerSim::MakeDigits(TTree * digits)
 void AliITSQASDDDataMakerSim::InitSDigits()\r
 { \r
   // Initialization for SDIGIT data - SDD -\r
-  fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();\r
+  fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries();\r
   //fSDDhTask must be incremented by one unit every time a histogram is ADDED to the QA List\r
   TH1F* h0=new TH1F("SDD SDIGITS Module Pattern","SDIGITS SDD Module Pattern",260,239.5,499.5);       //hmod\r
   h0->GetXaxis()->SetTitle("SDD Module Number");\r
@@ -231,7 +231,7 @@ void AliITSQASDDDataMakerSim::InitHits()
 { \r
 \r
   // Initialization for HITS data - SDD -\r
-  fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();\r
+  fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[AliRecoParam::kDefault])->GetEntries();\r
   //fSDDhTask must be incremented by one unit every time a histogram is ADDED to the QA List\r
   //printf("AliITSQASDDDataMakerSim::InitHits called \n");\r
   TH1F *h0=new TH1F("SDD HITS Module Pattern","SDD HITS Module Pattern",260,239.5,499.5);  \r
index ef5d263899a016c1ac7beef6c4ec2c1f690506d3..605aec66fddb9188478f49826cd2cc2e06f6c7c0 100644 (file)
@@ -110,7 +110,7 @@ void AliITSQASPDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TO
 void AliITSQASPDDataMakerRec::InitRaws()
 { 
   // Initialization for RAW data - SPD -
-  fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
+  fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
   AliInfo("Book Offline Histograms for SPD\n ");
 
   Char_t name[50];
@@ -234,7 +234,7 @@ void AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader)
 void AliITSQASPDDataMakerRec::InitRecPoints()
 {
   // Initialization for RECPOINTS - SPD -
-  fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
+  fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
   TH1F* hlayer= new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.);
   hlayer->GetXaxis()->SetTitle("Layer number");
   hlayer->GetYaxis()->SetTitle("Entries");
index 84b14136456861b04af4d1a5ee873345f99da051..221cf7f96ad9e7cbc25b3102e48e70570f39b2b9 100644 (file)
@@ -104,7 +104,7 @@ void AliITSQASPDDataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TO
 void AliITSQASPDDataMakerSim::InitDigits()
 { 
   // Initialization for DIGIT data - SPD -
-  fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();
+  fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
   //fSPDhDTask must be incremented by one unit every time a histogram is ADDED to the QA List
 
   Char_t name[50];
@@ -202,7 +202,7 @@ void AliITSQASPDDataMakerSim::MakeDigits(TTree *digits)
 void AliITSQASPDDataMakerSim::InitSDigits()
 { 
   // Initialization for SDIGIT data - SPD -
-  fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();
+  fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries();
   //printf("--W-- AliITSQASPDDataMakerSim::InitSDigits()  fGenOffset= %d \n",fGenOffset);
   //fSPDhSTask must be incremented by one unit every time a histogram is ADDED to the QA List
   
@@ -257,7 +257,7 @@ void AliITSQASPDDataMakerSim::MakeSDigits(TTree *sdigits)
 void AliITSQASPDDataMakerSim::InitHits()
 { 
   // Initialization for HITS data - SPD -
-  fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();
+  fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[AliRecoParam::kDefault])->GetEntries();
   //printf("--W-- AliITSQASPDDataMakerSim::InitHits()  fGenOffset= %d \n",fGenOffset);
   //fSPDhHTask must be incremented by one unit every time a histogram is ADDED to the QA List
   Char_t name[50];
index 19ac7ad201f2527e1ad4e09d4a02dbf4bcbc0709..3c21e44926b77d80da5d2e426978adbb04eb86f7 100644 (file)
@@ -281,14 +281,13 @@ void AliITSQASSDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjAr
 
   fSSDEventPerCycle = 0;
   
-  AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
// AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
 }
 
 //____________________________________________________________________________ 
 void AliITSQASSDDataMakerRec::InitRaws() {  
   // Initialization for RAW data - SSD -
-  //  fGenOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
-  fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
+  fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
 
   if(fkOnline) {
     AliInfo("Book Online Histograms for SSD\n");
@@ -883,10 +882,8 @@ void AliITSQASSDDataMakerRec::MonitorOCDBObjects() {
 void AliITSQASSDDataMakerRec::InitRecPoints()
 {
   // Initialization for RECPOINTS - SSD -
-  //printf("*-*-*-*-*-*-*---*-*-*-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::InitRecpoints called \n");
-  //  fGenOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
-  fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
-  //printf("**-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints offset %d \t %d \n",fGenOffset,fGenRecPointsOffset);
+  fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
+  //AliInfo(Form("**-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints offset %d \t %d \n",fGenOffset,fGenRecPointsOffset));
   Int_t nModuleOffset = 500;
   Int_t nITSTotalModules = AliITSgeomTGeo::GetNModules();
 
index 704b9bb14accd43aebe9aeb9d4dc58c12b7307e1..f7a810b77e9947b38adea75bce537eab3f4e682b 100644 (file)
@@ -94,17 +94,17 @@ void AliITSQASSDDataMakerSim::StartOfDetectorCycle() {
 }
 
 //____________________________________________________________________________ 
-void AliITSQASSDDataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list) {
+void AliITSQASSDDataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TObjArray* /*list*/) {
   // launch the QA checking
   AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n"); 
   
-  AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
+//  AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
 }
 
 //____________________________________________________________________________ 
 void AliITSQASSDDataMakerSim::InitDigits() { 
   // Initialization for DIGIT data - SSD -
-  fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();
+  fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
 
   // custom code here
   TH1F *fHistSSDModule = new TH1F("fHistSSDDigitsModule",
@@ -149,7 +149,7 @@ void AliITSQASSDDataMakerSim::MakeDigits(TTree *digits) {
 //____________________________________________________________________________ 
 void AliITSQASSDDataMakerSim::InitSDigits() { 
   // Initialization for SDIGIT data - SSD -
-  fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();
+  fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries();
 
   // custom code here
   TH1F *fHistSSDModule = new TH1F("fHistSSDSDigitsModule",
@@ -191,7 +191,7 @@ void AliITSQASSDDataMakerSim::MakeSDigits(TTree *sdigits) {
 //____________________________________________________________________________ 
 void AliITSQASSDDataMakerSim::InitHits() { 
   // Initialization for HITS data - SSD -
-  fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();
+  fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[AliRecoParam::kDefault])->GetEntries();
 
   // custom code here
   TH1F *fHistSSDModule = new TH1F("fHistSSDHitsModule",
index eab1210d173bc12959fd772dbb33ab1650c72cf7..947096d338588a1f58cc79a7e230d6ec165c06d6 100644 (file)
@@ -61,19 +61,19 @@ AliMUONQAChecker::AliMUONQAChecker(const AliMUONQAChecker& qac) :
 }   
 
 //______________________________________________________________________________
-Double_t 
+Double_t *
 AliMUONQAChecker::Check(AliQA::ALITASK_t /*index*/)
 {
   /// Check data
   
   AliError(Form("This method is not implemented. Should it be ? fDataSubDir = %p (%s)",
                 fDataSubDir, ( fDataSubDir ? fDataSubDir->GetPath() : "")));
-  return 0.0;
+  return NULL;
 }
 
 //______________________________________________________________________________
-Double_t 
-AliMUONQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
+Double_t *
+AliMUONQAChecker::Check(AliQA::ALITASK_t index, TObjArray ** list)
 {
   /// Check objects in list
   
@@ -93,7 +93,7 @@ AliMUONQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
   }
   
   AliWarning(Form("Checker for task %d not implement for the moment",index));
-  return 0.0;
+  return NULL;
 }
 
 //______________________________________________________________________________
@@ -110,19 +110,24 @@ AliMUONQAChecker::GetHisto(TObjArray* list, const char* hname) const
 }
 
 //______________________________________________________________________________
-Double_t 
-AliMUONQAChecker::CheckRecPoints(TObjArray * list)
+Double_t *
+AliMUONQAChecker::CheckRecPoints(TObjArray ** list)
 {
   /// Check rec points
   /// Very binary check for the moment. 
   
-  TH1* h = GetHisto(list,"hTrackerNumberOfClustersPerDE");
+  Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    rv[specie] = 1.0 ; 
   
-  if ( !h ) return 0.75; // only a warning if histo not found, in order not to kill anything because QA failed...
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    TH1* h = GetHisto(list[specie],"hTrackerNumberOfClustersPerDE");
   
-  if ( h->GetMean() == 0.0 ) return MarkHisto(*h,0.0);
+    if ( !h ) rv[specie] =  0.75; // only a warning if histo not found, in order not to kill anything because QA failed...
   
-  return 1.0;
+    else if ( h->GetMean() == 0.0 ) rv[specie] =  MarkHisto(*h,0.0);
+  }
+  return rv;
 }
 
 //______________________________________________________________________________
@@ -140,115 +145,142 @@ AliMUONQAChecker::MarkHisto(TH1& histo, Double_t value) const
 }
 
 //______________________________________________________________________________
-Double_t 
-AliMUONQAChecker::CheckESD(TObjArray * list)
+Double_t *
+AliMUONQAChecker::CheckESD(TObjArray ** list)
 {
   /// Check ESD
   
-  TH1* h = GetHisto(list,"hESDnTracks");
+  Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    rv[specie] = 1.0 ; 
   
-  if (!h) return 0.75;
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    
+    TH1* h = GetHisto(list[specie],"hESDnTracks");
   
-  if ( h->GetMean() == 0.0 ) return MarkHisto(*h,0.0); // no track -> fatal
+    if (!h) rv[specie] = 0.75;
   
-  h = GetHisto(list,"hESDMatchTrig");
+    else if ( h->GetMean() == 0.0 ) rv[specie] =  MarkHisto(*h,0.0); // no track -> fatal
   
-  if (!h) return 0.75;
+    h = GetHisto(list[specie],"hESDMatchTrig");
   
-  if (h->GetMean() == 0.0 ) return MarkHisto(*h,0.25); // no trigger matching -> error
+    if (!h) rv[specie] =  0.75;
   
-  return 1.0;
+    else if (h->GetMean() == 0.0 ) rv[specie] = MarkHisto(*h,0.25); // no trigger matching -> error
+  }
+  return rv;
 }
 
 //______________________________________________________________________________
-Double_t 
-AliMUONQAChecker::CheckRaws(TObjArray * list)
+Double_t *
+AliMUONQAChecker::CheckRaws(TObjArray ** list)
 {
   /// Check raws
 
-       TIter next(list);
-       TObject* object;
-       AliMUONVTrackerData* data(0x0);
+  Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    rv[specie] = 1.0 ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    TIter next(list[specie]);
+    TObject* object;
+    AliMUONVTrackerData* data(0x0);
   
-       while ( (object=next()) && !data )
-       {
-               if (object->InheritsFrom("AliMUONVTrackerData"))
-               {
-                       data = static_cast<AliMUONVTrackerData*>(object);
-               }
-       }
+    while ( (object=next()) && !data )
+      {
+        if (object->InheritsFrom("AliMUONVTrackerData"))
+          {
+            data = static_cast<AliMUONVTrackerData*>(object);
+          }
+      }
 
-  if ( !data ) 
-  {
-    AliError("Did not find TrackerData in the list !");
-    return 0.0;
-  }
+    if ( !data ) 
+      {
+        AliError("Did not find TrackerData in the list !");
+        return NULL;
+      }
   
-  AliMpManuIterator it;
-  Int_t detElemId;
-  Int_t manuId;
-  Int_t n50(0); // number of manus with occupancy above 0.5
-  Int_t n75(0); // number of manus with occupancy above 0.75
-  Int_t n(0); // number of manus with some occupancy
+    AliMpManuIterator it;
+    Int_t detElemId;
+    Int_t manuId;
+    Int_t n50(0); // number of manus with occupancy above 0.5
+    Int_t n75(0); // number of manus with occupancy above 0.75
+    Int_t n(0); // number of manus with some occupancy
   
-  while ( it.Next(detElemId,manuId) )
-  {
-    Float_t occ = data->Manu(detElemId,manuId,2);
-    if (occ > 0 ) ++n;
-    if (occ >= 0.5 ) ++n50;
-    if (occ >= 0.75 ) ++n75;    
-  }
+    while ( it.Next(detElemId,manuId) )
+      {
+        Float_t occ = data->Manu(detElemId,manuId,2);
+        if (occ > 0 ) ++n;
+        if (occ >= 0.5 ) ++n50;
+        if (occ >= 0.75 ) ++n75;    
+      }
 
-  AliInfo(Form("n %d n50 %d n75 %d",n,n50,n75));
+    AliInfo(Form("n %d n50 %d n75 %d",n,n50,n75));
   
-  if ( n == 0 ) 
-  {
-    AliError("Oups. Got zero occupancy in all manus ?!");
-    return 0.0;
-  }
+    if ( n == 0 ) 
+      {
+        AliError("Oups. Got zero occupancy in all manus ?!");
+        rv[specie] =  0.0;
+      }
 
-  if ( n75 ) 
-  {
-    AliError(Form("Got %d manus with occupancy above 0.75",n75));
-    return 0.1;
-  }
+    if ( n75 ) 
+      {
+        AliError(Form("Got %d manus with occupancy above 0.75",n75));
+        rv[specie] =  0.1;
+      }
     
-  if ( n50 ) 
-  {
-    AliWarning(Form("Got %d manus with occupancy above 0.5",n50));
-    return 0.9;
+    if ( n50 ) 
+      {
+        AliWarning(Form("Got %d manus with occupancy above 0.5",n50));
+        rv[specie] =  0.9;
+      }
   }
+  return rv;
+}
 
-       return 1.0;
+//______________________________________________________________________________
+void AliMUONQAChecker::Init(const AliQA::DETECTORINDEX_t det) 
+{
+  // intialises QA and QA checker settings
+  AliQA::Instance(det) ; 
+  Float_t * hiValue  = new Float_t[AliQA::kNBIT] ; 
+  Float_t * lowValue = new Float_t[AliQA::kNBIT] ;
+  lowValue[AliQA::kINFO]      = 0.999   ; 
+  hiValue[AliQA::kINFO]       = 1.0 ; 
+  hiValue[AliQA::kWARNING]    = 0.99 ; 
+  lowValue[AliQA::kWARNING]   = 0.5 ; 
+  lowValue[AliQA::kERROR]     = 0.0   ; 
+  hiValue[AliQA::kERROR]      = 0.5 ; 
+  lowValue[AliQA::kFATAL]     = -1.0   ; 
+  hiValue[AliQA::kFATAL]      = 0.0 ; 
+  SetHiLo(hiValue, lowValue) ; 
 }
 
 //______________________________________________________________________________
 void 
-AliMUONQAChecker::SetQA(AliQA::ALITASK_t index, const Double_t value) const
+AliMUONQAChecker::SetQA(AliQA::ALITASK_t index, const Double_t value) const
 {
   /// sets the QA according the return value of the Check
 
   AliQA * qa = AliQA::Instance(index);
   
-  qa->UnSet(AliQA::kFATAL);
-  qa->UnSet(AliQA::kWARNING);
-  qa->UnSet(AliQA::kERROR);
-  qa->UnSet(AliQA::kINFO);
-  
-  if ( value == 1.0 ) 
-  {
-    qa->Set(AliQA::kINFO);
-  }
-  else if ( value == 0.0 )
-  {
-    qa->Set(AliQA::kFATAL);
-  }
-  else if ( value > 0.5 ) 
-  {
-    qa->Set(AliQA::kWARNING);
-  }
-  else
-  {
-    qa->Set(AliQA::kERROR);
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    qa->UnSet(AliQA::kFATAL, specie);
+    qa->UnSet(AliQA::kWARNING, specie);
+    qa->UnSet(AliQA::kERROR, specie);
+    qa->UnSet(AliQA::kINFO, specie);
+
+    if ( ! value ) { // No checker is implemented, set all QA to Fatal
+      qa->Set(AliQA::kFATAL, specie) ; 
+    } else {
+      if ( value[specie] >= fLowTestValue[AliQA::kFATAL] && value[specie] < fUpTestValue[AliQA::kFATAL] ) 
+        qa->Set(AliQA::kFATAL, specie) ; 
+      else if ( value[specie] > fLowTestValue[AliQA::kERROR] && value[specie] <= fUpTestValue[AliQA::kERROR]  )
+        qa->Set(AliQA::kERROR, specie) ; 
+      else if ( value[specie] > fLowTestValue[AliQA::kWARNING] && value[specie] <= fUpTestValue[AliQA::kWARNING]  )
+        qa->Set(AliQA::kWARNING, specie) ;
+      else if ( value[specie] > fLowTestValue[AliQA::kINFO] && value[specie] <= fUpTestValue[AliQA::kINFO] ) 
+        qa->Set(AliQA::kINFO, specie) ;        
+    }
   }
 }
index 95dfe2a2313e63f5e171c25a8f5f90af7e5a2a54..8309314c6f874334ca45ef7dfa718458bbbadf7c 100644 (file)
@@ -24,17 +24,19 @@ public:
   AliMUONQAChecker(const AliMUONQAChecker& qac);
   virtual ~AliMUONQAChecker();
 
+  virtual void   Init(const AliQA::DETECTORINDEX_t det) ; 
+
 protected:
 
   using AliQACheckerBase::Check;
   
-  virtual Double_t Check(AliQA::ALITASK_t index) ;
-  virtual Double_t Check(AliQA::ALITASK_t index, TObjArray * list) ;
-  virtual void SetQA(AliQA::ALITASK_t index, const Double_t value) const ;     
+  virtual Double_t Check(AliQA::ALITASK_t index) ;
+  virtual Double_t * Check(AliQA::ALITASK_t index, TObjArray ** list) ;
+  virtual void SetQA(AliQA::ALITASK_t index, const Double_t * value) const ;   
        
-  Double_t CheckRaws(TObjArray* list);
-  Double_t CheckRecPoints(TObjArray* list);
-  Double_t CheckESD(TObjArray* list);
+  Double_t * CheckRaws(TObjArray** list);
+  Double_t * CheckRecPoints(TObjArray** list);
+  Double_t * CheckESD(TObjArray** list);
   TH1* GetHisto(TObjArray* list, const char* hname) const;
   Double_t MarkHisto(TH1& histo, Double_t value) const;
   
index f0a9be548eea7ea1fda9e5d56c1989e878b49a76..700963187f0d7863bc932a854fc724ec07c03adb 100644 (file)
@@ -170,7 +170,7 @@ AliMUONQADataMakerRec::~AliMUONQADataMakerRec()
 }
 
 //____________________________________________________________________________ 
-void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)
+void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray** list)
 {
   ///Detector specific actions at end of cycle
   
@@ -179,84 +179,85 @@ void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArra
   // Display trigger histos in a more user friendly way
   DisplayTriggerInfo(task);
   
-  if ( task == AliQA::kRAWS && fTrackerDataMaker ) 
-  {
-    TIter next(list);
-    TObject* o;
-    Bool_t alreadyThere(kFALSE);
-    while ( ( o = next() ) && !alreadyThere )
-    {
-      TString classname(o->ClassName());
-      if ( classname.Contains("TrackerData") ) alreadyThere = kTRUE;
-    }
-    if (!alreadyThere && fTrackerDataMaker) 
-    {
-      AliInfo("Adding fTrackerDataMaker to the list of qa objects");
-      list->AddAt(fTrackerDataMaker->Data(),(Int_t)kTrackerData);
-    }
-    if ( fTrackerDataMaker ) 
-    {
-      TH1* hbp = GetRawsData(kTrackerBusPatchOccupancy);
-      hbp->Reset();
-      TIter nextBP(AliMpDDLStore::Instance()->CreateBusPatchIterator());
-      AliMpBusPatch* bp(0x0);
-      AliMUONVTrackerData* data = fTrackerDataMaker->Data();
-      Int_t occDim = 2;
-      
-      while ( ( bp = static_cast<AliMpBusPatch*>(nextBP())) )
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    SetEventSpecie(specie) ; 
+    if ( task == AliQA::kRAWS && fTrackerDataMaker ) 
       {
-        Int_t busPatchId = bp->GetId();
-        Int_t bin = hbp->FindBin(busPatchId);
-        hbp->SetBinContent(bin,data->BusPatch(busPatchId,occDim));
+        TIter next(list[specie]);
+        TObject* o;
+        Bool_t alreadyThere(kFALSE);
+        while ( ( o = next() ) && !alreadyThere )
+          {
+            TString classname(o->ClassName());
+            if ( classname.Contains("TrackerData") ) alreadyThere = kTRUE;
+          }
+        if (!alreadyThere && fTrackerDataMaker) 
+          {
+            AliInfo("Adding fTrackerDataMaker to the list of qa objects");
+            list[specie]->AddAt(fTrackerDataMaker->Data(),(Int_t)kTrackerData);
+          }
+          if ( fTrackerDataMaker ) 
+            {
+              TH1* hbp = GetRawsData(kTrackerBusPatchOccupancy);
+              hbp->Reset();
+              TIter nextBP(AliMpDDLStore::Instance()->CreateBusPatchIterator());
+              AliMpBusPatch* bp(0x0);
+              AliMUONVTrackerData* data = fTrackerDataMaker->Data();
+              Int_t occDim = 2;
+      
+              while ( ( bp = static_cast<AliMpBusPatch*>(nextBP())) )
+                {
+                  Int_t busPatchId = bp->GetId();
+                  Int_t bin = hbp->FindBin(busPatchId);
+                  hbp->SetBinContent(bin,data->BusPatch(busPatchId,occDim));
+                }
+            }
       }
-    }
-  }
   
-  if ( task == AliQA::kESDS ) {
-  // Normalize ESD histos
-    TH1* h;
-    Int_t bin;
-    AliMpDEIterator it;
-    it.First();
-    while ( !it.IsDone()) {
+    if ( task == AliQA::kESDS ) {
+      // Normalize ESD histos
+      TH1* h;
+      Int_t bin;
+      AliMpDEIterator it;
+      it.First();
+      while ( !it.IsDone()) {
     
-      Int_t detElemId = it.CurrentDEId();
+        Int_t detElemId = it.CurrentDEId();
     
-      if ( AliMpDEManager::GetStationType(detElemId) != AliMp::kStationTrigger ) {
+        if ( AliMpDEManager::GetStationType(detElemId) != AliMp::kStationTrigger ) {
       
-        h = GetESDsData(kESDnClustersPerDE);
-        Double_t nClusters = h->GetBinContent(h->GetXaxis()->FindFixBin((Double_t)detElemId));
+          h = GetESDsData(kESDnClustersPerDE);
+          Double_t nClusters = h->GetBinContent(h->GetXaxis()->FindFixBin((Double_t)detElemId));
       
         if (nClusters > 0) {
        
-         h = GetESDsData(kESDClusterChargePerDE);
-         bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
+          h = GetESDsData(kESDClusterChargePerDE);
+          bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
           h->SetBinContent(bin, h->GetBinContent(bin)/nClusters);
        
-         h = GetESDsData(kESDClusterMultPerDE);
-         bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
+          h = GetESDsData(kESDClusterMultPerDE);
+          bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
           h->SetBinContent(bin, h->GetBinContent(bin)/nClusters);
        
-         h = GetESDsData(kESDResidualXPerDEMean);
-         bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
-         Double_t meanResX = h->GetBinContent(bin)/nClusters;
+          h = GetESDsData(kESDResidualXPerDEMean);
+          bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
+          Double_t meanResX = h->GetBinContent(bin)/nClusters;
           h->SetBinContent(bin, meanResX);
        
-         h = GetESDsData(kESDResidualYPerDEMean);
-         bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
-         Double_t meanResY = h->GetBinContent(bin)/nClusters;
+          h = GetESDsData(kESDResidualYPerDEMean);
+          bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
+          Double_t meanResY = h->GetBinContent(bin)/nClusters;
           h->SetBinContent(bin, meanResY);
        
-         h = GetESDsData(kESDResidualXPerDESigma);
-         bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
-         if (nClusters > 1) h->SetBinContent(bin, TMath::Sqrt(h->GetBinContent(bin)/nClusters - meanResX*meanResX));
-         else h->SetBinContent(bin, 0.);
-       
-         h = GetESDsData(kESDResidualYPerDESigma);
-         bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
-         if (nClusters > 1) h->SetBinContent(bin, TMath::Sqrt(h->GetBinContent(bin)/nClusters - meanResY*meanResY));
-         else h->SetBinContent(bin, 0.);
+          h = GetESDsData(kESDResidualXPerDESigma);
+          bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
+          if (nClusters > 1) h->SetBinContent(bin, TMath::Sqrt(h->GetBinContent(bin)/nClusters - meanResX*meanResX));
+          else h->SetBinContent(bin, 0.);
        
+          h = GetESDsData(kESDResidualYPerDESigma);
+          bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
+          if (nClusters > 1) h->SetBinContent(bin, TMath::Sqrt(h->GetBinContent(bin)/nClusters - meanResY*meanResY));
+          else h->SetBinContent(bin, 0.);
         }
       
       }
@@ -270,7 +271,7 @@ void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArra
       GetESDsData(kESDnClustersPerDE)->Scale(1./nTracks);
     }
   }
-  
+  }
   // do the QA checking
   AliQAChecker::Instance()->Run(AliQA::kMUON, task, list) ;
 }
index 96084b1a659036931aa2631c18856f7e78e6eb0f..081786f4c853e0224f0cac3cc253a4779f195684 100644 (file)
@@ -99,7 +99,7 @@ protected:
   
   virtual void DefaultEndOfDetectorCycle(AliQA::TASKINDEX_t) {}
 
-       virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list);
+       virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray** list);
 
 private:
        
index e3efcaa4357028b7dc87bef6ec8f4e2746b947ad..1ac72b9cdc85149d72c15914c8f0333235882028 100644 (file)
@@ -195,7 +195,7 @@ void AliMUONQADataMakerSim::MakeDigits(TTree* digitsTree)
 }
       
 //____________________________________________________________________________ 
-void AliMUONQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)
+void AliMUONQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray** list)
 {
     ///Detector specific actions at end of cycle
     // do the QA checking
index f5cffebf746ec87f2707a43c7ff4c53200a0623d..b4925d6354dc1f237ad25cbae682e03e7e1862c5 100644 (file)
@@ -50,7 +50,7 @@ private:
       /// make SDigits QA from Tree
   virtual void   MakeDigits(TTree* digitsTree);
   
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list);
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray** list);
 
   AliMUONVHitStore*   fHitStore;   //!< pointer to hit store
   AliMUONVDigitStore* fDigitStore; //!< pointer to digit store
index 1ff31a96a6b56908d2e61b5c58da28e54fd3cc81..f5dccef77c36e3661f7aa32cc421fdc862223d28 100644 (file)
@@ -75,19 +75,24 @@ AliPHOSQADataMakerRec& AliPHOSQADataMakerRec::operator = (const AliPHOSQADataMak
 }
  
 //____________________________________________________________________________ 
-void AliPHOSQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliPHOSQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
-  if(GetRawsData(kHGqualMod1) && GetRawsData(kHGmod1))
-    GetRawsData(kHGqualMod1)->Divide( GetRawsData(kHGmod1) ) ;
-  if(GetRawsData(kHGqualMod2) && GetRawsData(kHGmod2))
-    GetRawsData(kHGqualMod2)->Divide( GetRawsData(kHGmod2) ) ;
-  if(GetRawsData(kHGqualMod3) && GetRawsData(kHGmod3))
-    GetRawsData(kHGqualMod3)->Divide( GetRawsData(kHGmod3) ) ;
-  if(GetRawsData(kHGqualMod4) && GetRawsData(kHGmod4))
-    GetRawsData(kHGqualMod4)->Divide( GetRawsData(kHGmod4) ) ;
-  if(GetRawsData(kHGqualMod5) && GetRawsData(kHGmod5))
-    GetRawsData(kHGqualMod5)->Divide( GetRawsData(kHGmod5) ) ;
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    if ( !AliQA::Instance()->IsEventSpecieSet(specie) ) 
+      continue ; 
+    SetEventSpecie(specie) ; 
+    if(GetRawsData(kHGqualMod1) && GetRawsData(kHGmod1))
+      GetRawsData(kHGqualMod1)->Divide( GetRawsData(kHGmod1) ) ;
+    if(GetRawsData(kHGqualMod2) && GetRawsData(kHGmod2))
+      GetRawsData(kHGqualMod2)->Divide( GetRawsData(kHGmod2) ) ;
+    if(GetRawsData(kHGqualMod3) && GetRawsData(kHGmod3))
+      GetRawsData(kHGqualMod3)->Divide( GetRawsData(kHGmod3) ) ;
+    if(GetRawsData(kHGqualMod4) && GetRawsData(kHGmod4))
+      GetRawsData(kHGqualMod4)->Divide( GetRawsData(kHGmod4) ) ;
+    if(GetRawsData(kHGqualMod5) && GetRawsData(kHGmod5))
+      GetRawsData(kHGqualMod5)->Divide( GetRawsData(kHGmod5) ) ;
+  }
   // do the QA checking
   AliQAChecker::Instance()->Run(AliQA::kPHOS, task, list) ;  
 }
@@ -121,8 +126,7 @@ void AliPHOSQADataMakerRec::InitESDs()
 void AliPHOSQADataMakerRec::InitRecPoints()
 {
   // create Reconstructed Points histograms in RecPoints subdir
-  Bool_t expert   = kTRUE ; 
-  
+  Bool_t expert   = kTRUE ;   
   TH2I * h0 = new TH2I("hRpPHOSxyMod1","RecPoints Rows x Columns for PHOS module 1", 64, -72., 72., 56, -63., 63.) ;                             
   Add2RecPointsList(h0,kRPmod1, expert) ;
   TH2I * h1 = new TH2I("hRpPHOSxyMod2","RecPoints Rows x Columns for PHOS module 2", 64, -72., 72., 56, -63., 63.) ;                             
@@ -327,6 +331,7 @@ void AliPHOSQADataMakerRec::MakeRaws(AliRawReader* rawReader)
    }                 
   }                    
   delete decoder;
+  
   GetRawsData(kEtotLG)->Fill(lgEtot) ; 
   TParameter<double> * p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(kEtotLG)->GetName()))) ; 
   p->SetVal(lgEtot) ; 
index cf620072c4831ff20126807d8836cce916caab2d..46ffef140094cb1ed499951e1f6d3c540296cf82 100644 (file)
@@ -51,7 +51,7 @@ public:
 private:
   const AliPHOSRecoParam* GetRecoParam() const { return dynamic_cast<const AliPHOSRecoParam *>(fRecoParam); }
 
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
   virtual void   InitESDs() ; 
   virtual void   InitRecPoints() ; 
   virtual void   InitRaws() ; 
index 0935a92eb5ea9605250be627285b4baff4b458ac..613df7760ee04d082175069c4128bac46f7837fb 100644 (file)
@@ -72,7 +72,7 @@ AliPHOSQADataMakerSim& AliPHOSQADataMakerSim::operator = (const AliPHOSQADataMak
 }
  
 //____________________________________________________________________________ 
-void AliPHOSQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliPHOSQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
@@ -86,10 +86,11 @@ void AliPHOSQADataMakerSim::InitHits()
   Bool_t expert   = kTRUE ; 
   TH1F * h0 = new TH1F("hPhosHits",    "Hits energy distribution in PHOS",       100, 0., 100.) ; 
   h0->Sumw2() ;
-  Add2HitsList(h0, 0, !expert) ;
+  Add2HitsList(h0, kHits, !expert) ;
   TH1I * h1 = new TH1I("hPhosHitsMul", "Hits multiplicity distribution in PHOS", 500, 0., 10000) ; 
   h1->Sumw2() ;
-  Add2HitsList(h1, 1, !expert) ;
+  Add2HitsList(h1, kHitsMul, !expert) ;
+  
 }
 
 //____________________________________________________________________________ 
@@ -99,10 +100,10 @@ void AliPHOSQADataMakerSim::InitDigits()
   Bool_t expert   = kTRUE ; 
   TH1I * h0 = new TH1I("hPhosDigits",    "Digits amplitude distribution in PHOS",    500, 0, 1000) ; 
   h0->Sumw2() ;
-  Add2DigitsList(h0, 0, !expert) ;
+  Add2DigitsList(h0, kDigits, !expert) ;
   TH1I * h1 = new TH1I("hPhosDigitsMul", "Digits multiplicity distribution in PHOS", 2000, 0, 10000) ; 
   h1->Sumw2() ;
-  Add2DigitsList(h1, 1, !expert) ;
+  Add2DigitsList(h1, kDigitsMul, !expert) ;
 }
 
 //____________________________________________________________________________ 
@@ -112,10 +113,10 @@ void AliPHOSQADataMakerSim::InitSDigits()
   Bool_t expert   = kTRUE ; 
   TH1F * h0 = new TH1F("hPhosSDigits",    "SDigits energy distribution in PHOS",       500, 0., 1000.) ; 
   h0->Sumw2() ;
-  Add2SDigitsList(h0, 0, !expert) ;
+  Add2SDigitsList(h0, kSDigits, !expert) ;
   TH1I * h1 = new TH1I("hPhosSDigitsMul", "SDigits multiplicity distribution in PHOS", 500, 0,  1000) ; 
   h1->Sumw2() ;
-  Add2SDigitsList(h1, 1, !expert) ;
+  Add2SDigitsList(h1, kSDigitsMul, !expert) ;
 }
 
 //____________________________________________________________________________
@@ -126,7 +127,7 @@ void AliPHOSQADataMakerSim::MakeHits()
   TIter next(fHits) ; 
   AliPHOSHit * hit ; 
   while ( (hit = dynamic_cast<AliPHOSHit *>(next())) ) {
-    GetHitsData(0)->Fill( hit->GetEnergy()) ;
+    GetHitsData(kHits)->Fill( hit->GetEnergy()) ;
   }
 }
 
@@ -160,7 +161,7 @@ void AliPHOSQADataMakerSim::MakeDigits(TClonesArray * digits)
     TIter next(digits) ; 
     AliPHOSDigit * digit ; 
     while ( (digit = dynamic_cast<AliPHOSDigit *>(next())) ) {
-      GetDigitsData(0)->Fill( digit->GetEnergy()) ;
+      GetDigitsData(kDigits)->Fill( digit->GetEnergy()) ;
     }  
 }
 
@@ -189,7 +190,7 @@ void AliPHOSQADataMakerSim::MakeSDigits(TClonesArray * sdigits)
     TIter next(sdigits) ; 
     AliPHOSDigit * sdigit ; 
     while ( (sdigit = dynamic_cast<AliPHOSDigit *>(next())) ) {
-      GetSDigitsData(0)->Fill( sdigit->GetEnergy()) ;
+      GetSDigitsData(kSDigits)->Fill( sdigit->GetEnergy()) ;
     } 
 }
 
index 744b100a27c51bccf2c47e44114d35d12243c80b..854a9eb95e6ee25e4c622ce08a1e5b74239a6973 100644 (file)
@@ -26,13 +26,17 @@ class TObjArray ;
 class AliPHOSQADataMakerSim: public AliQADataMakerSim {
 
 public:
+  enum HHitType_t    {kHits=0, kHitsMul} ; 
+  enum HDigitType_t  {kDigits=0, kDigitsMul} ; 
+  enum HSDigitType_t {kSDigits=0, kSDigitsMul} ; 
+
   AliPHOSQADataMakerSim() ;          // ctor
   AliPHOSQADataMakerSim(const AliPHOSQADataMakerSim& qadm) ;   
   AliPHOSQADataMakerSim& operator = (const AliPHOSQADataMakerSim& qadm) ;
   virtual ~AliPHOSQADataMakerSim() {;} // dtor
   
 private:
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
   virtual void   InitHits() ; 
   virtual void   InitDigits() ; 
   virtual void   InitSDigits() ; 
index 05c44f7fba052c3f28292242c9dca1d545a7e35d..7cedd07ebd182e52b81f53b4a676e85395aa6427 100644 (file)
@@ -580,7 +580,7 @@ void AliPMDQADataMakerRec::StartOfDetectorCycle()
   
 }
 //____________________________________________________________________________ 
-void AliPMDQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliPMDQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
index e06aa8d6a78cf0c90f18918321b80dda241391ce..aae8b3b97df5816754d5348b783c88118dfc8557 100644 (file)
@@ -38,7 +38,7 @@ class AliPMDQADataMakerRec: public AliQADataMakerRec {
     virtual void   MakeRecPoints(TTree * recpoTree) ; 
     virtual void   MakeESDs(AliESDEvent * esd) ;
     virtual void   StartOfDetectorCycle() ; 
-    virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+    virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
     
     ClassDef(AliPMDQADataMakerRec,1)  // description 
 
index 2fd2a87ae7b0548a6d94ab964f9dacc482a51bea..ab08b03fc1c782acf702f8035214525fa8f92430 100644 (file)
@@ -333,7 +333,7 @@ void AliPMDQADataMakerSim::StartOfDetectorCycle()
 }
 //____________________________________________________________________________ 
 
-void AliPMDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliPMDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
     //Detector specific actions at end of cycle
     // do the QA checking
index 6f085e64558d0950d55acd11b1b418297340b825..273400721e61ba4d1547d1b85e1d37c24f286847 100644 (file)
@@ -41,7 +41,7 @@ private:
   virtual void   MakeDigits(TClonesArray * digits) ; 
   virtual void   MakeDigits(TTree * digitTree) ; 
   virtual void   StartOfDetectorCycle() ; 
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
 
 
   ClassDef(AliPMDQADataMakerSim,1)  // description 
index 6010b864ea75d1f6c6f2b17dd0a0cd27b20dcd75..dda4f9f873ddbd2797cc21b45187f8b3f801c57b 100644 (file)
 ClassImp(AliCorrQAChecker)
 
 //__________________________________________________________________
-Double_t AliCorrQAChecker::Check(AliQA::ALITASK_t index, TNtupleD * nData) 
+Double_t * AliCorrQAChecker::Check(AliQA::ALITASK_t index, TNtupleD ** nData) 
 {
  // check the QA of correlated data stored in a ntuple
+  
+  Double_t * test = new Double_t[AliRecoParam::kNSpecies] ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    test[specie] = 0. ; 
+    
   if ( index != AliQA::kRAW ) {
     AliWarning("Checker not implemented") ; 
-    return 1.0 ; 
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+      test[specie] = 1. ; 
+    return test ; 
   }
-  Double_t test = 0.0  ;
 //     if (!fRefSubDir) {
 //             test = 1. ; // no reference data
 //     } else {
     if ( ! nData ) {
       AliError(Form("nRawCorr not found in %s", fDataSubDir->GetName())) ; 
     } else {
-      TObjArray * bList = nData->GetListOfBranches() ; 
-      for (Int_t b = 0 ; b < bList->GetEntries() ; b++) {
-        AliInfo(Form("Ntuple parameter name %d : %s", b, bList->At(b)->GetName())) ;  
+      for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+        TObjArray * bList = nData[specie]->GetListOfBranches() ; 
+        for (Int_t b = 0 ; b < bList->GetEntries() ; b++) {
+          AliInfo(Form("Ntuple %s parameter name %d : %s", nData[specie]->GetName(), b, bList->At(b)->GetName())) ;  
+        }
       }
     }
  // }
index 2a7966fc38c1938b9be354589c2a6968a0c9df1f..d1cb14f14c64be2134f67764ab8ba0513fb8703d 100644 (file)
@@ -31,9 +31,9 @@ public:
   AliCorrQAChecker(const AliCorrQAChecker& qac) : AliQACheckerBase(qac.GetName(), qac.GetTitle()) {;} // cpy ctor   
   virtual ~AliCorrQAChecker() {;} // dtor
 
-  virtual Double_t Check(AliQA::ALITASK_t index) { return AliQACheckerBase::Check(index) ;}
-  virtual Double_t Check(AliQA::ALITASK_t index, TObjArray * obj) { return AliQACheckerBase::Check(index, obj) ;}
-  virtual Double_t Check(AliQA::ALITASK_t index, TNtupleD * nData) ; 
+  virtual Double_t *  Check(AliQA::ALITASK_t index) { return AliQACheckerBase::Check(index) ;}
+  virtual Double_t * Check(AliQA::ALITASK_t index, TObjArray ** obj) { return AliQACheckerBase::Check(index, obj) ;}
+  Double_t * Check(AliQA::ALITASK_t index, TNtupleD ** nData) ; 
 
 private:
   
index 2a5d16af793e3392d82c81639dd0aa61fcbad2ab..e3c46e6e9ed24ae4f353c4414154f3b598cb7a0d 100644 (file)
@@ -30,6 +30,7 @@
 #include <TH2F.h> 
 #include <TNtupleD.h>
 #include <TParameter.h>
+#include <TMath.h> 
 
 // --- Standard library ---
 
@@ -47,7 +48,9 @@ AliQADataMakerRec(AliQA::GetDetName(AliQA::kCORR), "Corr Quality Assurance Data
   fqadm(qadm)
 {
   // ctor
-
+  fCorrNt = new TNtupleD *[AliRecoParam::kNSpecies] ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    fCorrNt[specie] = NULL ; 
 }
 
 //____________________________________________________________________________ 
@@ -64,19 +67,32 @@ AliCorrQADataMakerRec::AliCorrQADataMakerRec(const AliCorrQADataMakerRec& qadm)
 //__________________________________________________________________
 AliCorrQADataMakerRec& AliCorrQADataMakerRec::operator = (const AliCorrQADataMakerRec& qadm )
 {
-  // Equal operator.
+  // assign operator.
   this->~AliCorrQADataMakerRec();
   new(this) AliCorrQADataMakerRec(qadm);
   return *this;
 }
+   
+//____________________________________________________________________________ 
+AliCorrQADataMakerRec::~AliCorrQADataMakerRec()  
+{
+  // dtor only destroy the ntuple 
+  if ( fCorrNt ) {
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      if ( fCorrNt[specie] != NULL ) 
+        delete fCorrNt[specie] ; 
+    }
+               delete[] fCorrNt ; 
+       }  
+}
+  
 //____________________________________________________________________________ 
-void AliCorrQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * /*list*/)
+void AliCorrQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** /*list*/)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
   if (task == AliQA::kRAWS) {
-     AliQAChecker::Instance()->Run(AliQA::kCORR, task, fObject) ; 
+     AliQAChecker::Instance()->Run(AliQA::kCORR, task, fCorrNt) ; 
   }
 }
 
@@ -100,7 +116,7 @@ void AliCorrQADataMakerRec::InitRecPoints()
 void AliCorrQADataMakerRec::InitRaws()
 {
   // createa ntuple taking all the parameters declared by detectors
-  if (fObject) 
+  if (fCorrNt) 
     return ; 
   delete fRawsQAList ; // not needed for the time being 
   fRawsQAList = NULL ; 
@@ -124,7 +140,10 @@ void AliCorrQADataMakerRec::InitRaws()
   if (fMaxRawVar == 0) { 
     AliWarning("NTUPLE not created") ; 
   } else {
-    fObject = new TNtupleD(AliQA::GetQACorrName(), "Raws data correlation among detectors", varlist.Data()) ;  
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      char * name = Form("%s_%s", AliQA::GetQACorrName(), AliRecoParam::GetEventSpecieName(specie)) ; 
+      fCorrNt[specie] = new TNtupleD(name, "Raws data correlation among detectors", varlist.Data()) ;  
+    }
   }  
 }
 
@@ -156,7 +175,7 @@ void AliCorrQADataMakerRec::MakeRaws(AliRawReader *)
         varvalue[index++] = p->GetVal() ; 
       }
     }
-    (dynamic_cast<TNtupleD*>(fObject))->Fill(varvalue);
+    (dynamic_cast<TNtupleD*>(fCorrNt[(Int_t)TMath::Log2(fEventSpecie)]))->Fill(varvalue);
     delete [] varvalue;
   }
 }
index 23ddc823c0599bb3232e62585ae8af738d57e654..69349ebef7e849edb235e067fe1743589f7a94b6 100644 (file)
@@ -29,11 +29,11 @@ public:
   AliCorrQADataMakerRec(AliQADataMaker **) ;          // ctor
   AliCorrQADataMakerRec(const AliCorrQADataMakerRec& qadm) ;   
   AliCorrQADataMakerRec& operator = (const AliCorrQADataMakerRec& qadm) ;
-  virtual ~AliCorrQADataMakerRec() {;} // dtor
+  virtual ~AliCorrQADataMakerRec() ; // dtor
   
 private:
 
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
   virtual void   InitESDs() ; 
   virtual void   InitRecPoints() ; 
   virtual void   InitRaws() ; 
index bf6457b699c835c9ab5d01e6739d41400d2ae77c..da923f5cd27c15c94461f6147bf20671e4646e2e 100644 (file)
@@ -18,7 +18,7 @@
 ClassImp(AliGlobalQADataMaker)
  
 //____________________________________________________________________________ 
-void AliGlobalQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliGlobalQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
index 4a07a965162a4f1315d9aa9f3e591ded998ba83a..7254d961410611d7ea3370ae33baa21b4f28bef6 100644 (file)
@@ -28,7 +28,7 @@ public:
        AliQADataMakerRec(qadm) {;}
 
 private:
-       void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+       void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
 
        void InitRaws(); 
        void InitRecPoints();
index 8f9f2115e464c6c45edd0c8ed7c281ceba2efa79..bc91179d692150d5b0b05ff10fb50a9cec41ee5a 100644 (file)
@@ -48,7 +48,7 @@
 ClassImp(AliQA)
 AliQA    * AliQA::fgQA                   = 0x0 ;
 TFile    * AliQA::fgQADataFile           = 0x0 ;   
-TString    AliQA::fgQADataFileName       = "QA" ;  // will transform into Det.QA.run.cycle.root  
+TString    AliQA::fgQADataFileName       = "QA" ;  // will transform into Det.QA.run.root  
 TFile    * AliQA::fgQARefFile            = 0x0 ;   
 TString    AliQA::fgQARefDirName              = "" ; 
 TString    AliQA::fgQARefFileName        = "QA.root" ;
@@ -58,14 +58,6 @@ TString    AliQA::fgQAResultFileName     = "QA.root" ;
 TString    AliQA::fgDetNames[]           = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD",
                                             "ZDC", "PMD", "T0", "VZERO", "ACORDE", "HLT", "Global", "CORR"} ;   
 TString    AliQA::fgGRPPath              = "GRP/GRP/Data" ; 
-TString    AliQA::fgRTNames[]            = {"UNKNOWN", "AUTO_TEST", "CALIBRATION", "CALIBRATION_PULSER", "CHANNEL_DELAY_TUNING", "COSMIC", 
-                                                                                                                                                                               "COSMICS", "DAQ_FO_UNIF_SCAN", "DAQ_GEN_DAC_SCAN", "DAQ_MEAN_TH_SCAN", "DAQ_MIN_TH_SCAN", 
-                                                                                                                                                                               "DAQ_NOISY_PIX_SCAN", "DAQ_PIX_DELAY_SCAN", "DAQ_UNIFORMITY_SCAN", "DCS_FO_UNIF_SCAN", 
-                                                                                                                                                                               "DCS_MEAN_TH_SCAN", "DCS_MIN_TH_SCAN", "DCS_PIX_DELAY_SCAN", "DCS_UNIFORMITY_SCAN", 
-                                                                                                                                                                               "DDL_TEST", "GAIN", "PEDESTAL", "INJECTOR",  "LASER", "MONTECARLO", "NOISE", "NOISY_PIX_SCAN", 
-                                                                                                                                                                               "PHYSICS", "PULSER", "STANDALONE", "STANDALONE_BC", "STANDALONE_CENTRAL", "STANDALONE_COSMIC", 
-                                                                                                                                                                               "STANDALONE_EMD", "STANDALONE_LASER", "STANDALONE_MB", "STANDALONE_PEDESTAL", 
-                                                                                                                                                                               "STANDALONE_SEMICENTRAL", "STANDALONE_PULSER" } ;   
 TString       AliQA::fgTaskNames[]       = {"Raws", "Hits", "SDigits", "Digits", "RecPoints", "TrackSegments", "RecParticles", "ESDs"} ;   
 const TString AliQA::fkgLabLocalFile     = "file://"  ; 
 const TString AliQA::fkgLabLocalOCDB     = "local://" ;  
@@ -73,7 +65,7 @@ const TString AliQA::fkgLabAliEnOCDB     = "alien://" ;
 const TString AliQA::fkgRefFileName      = "QA.root" ; 
 const TString AliQA::fkgQAName           = "QA"  ; 
 const TString AliQA::fkgQACorrNtName     = "CorrQA" ;  
-const TString AliQA::fkgRefOCDBDirName   = "Ref"  ; 
+const TString AliQA::fkgRefOCDBDirName   = "QA"  ; 
 TString AliQA::fkgRefDataDirName              = ""  ; 
 const TString AliQA::fkgQARefOCDBDefault = "alien://folder=/alice/QA/20"  ; 
 const TString AliQA::fkgExpert           = "Expert" ; 
@@ -84,25 +76,34 @@ const UInt_t  AliQA::fkgQABit            = 17 ;
 AliQA::AliQA() : 
   TNamed("", ""), 
   fNdet(kNDET), 
-  fQA(new ULong_t[fNdet]), 
+  fNEventSpecie(AliRecoParam::kNSpecies), 
+  fQA(new ULong_t*[fNdet]), 
   fDet(kNULLDET),
-  fTask(kNULLTASK)
-       
+  fTask(kNULLTASK), 
+  fEventSpecie(AliRecoParam::kDefault), 
+  fEventSpecies(new Bool_t[fNEventSpecie])
 {
   // default constructor
-  // beware singleton: not to be used
-  
-  for (Int_t index = 0 ; index < fNdet ; index++) 
-       fQA[index] = 0 ; 
+  Int_t det ; 
+  for (det = 0 ; det < fNdet ; det++) {
+    fQA[det] = new ULong_t[fNEventSpecie] ; 
+    for (Int_t es = 0 ; es < fNEventSpecie ; es++) 
+      fQA[det][es] = 0 ; 
+  }
+  for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+    fEventSpecies[es] = kFALSE ; 
 }
 
 //____________________________________________________________________________
 AliQA::AliQA(const AliQA& qa) :
   TNamed(qa),
   fNdet(qa.fNdet), 
+  fNEventSpecie(qa.fNEventSpecie), 
   fQA(qa.fQA), 
   fDet(qa.fDet),
-  fTask(qa.fTask)
+  fTask(qa.fTask), 
+  fEventSpecie(qa.fEventSpecie), 
+  fEventSpecies(qa.fEventSpecies)
 { 
   // cpy ctor
 }
@@ -110,55 +111,80 @@ AliQA::AliQA(const AliQA& qa) :
 //_____________________________________________________________________________
 AliQA& AliQA::operator = (const AliQA& qa)
 {
-// assignment operator
-    if(&qa == this) return *this;
+  // assignment operator
+  if(&qa == this) return *this;
     
-    fNdet = qa.fNdet;
-    for (Int_t index = 0 ; index < fNdet ; index++) 
-       fQA[index] = qa.fQA[index]; 
-    return *this;
+  fNdet         = qa.fNdet;
+  fNEventSpecie = qa.fNEventSpecie; 
+  for (Int_t det = 0 ; det < fNdet ; det++) 
+    for (Int_t es = 0 ; es < fNEventSpecie ; es++) 
+        fQA[det][es] = qa.fQA[det][es]; 
+  
+  fNEventSpecie = qa.fNEventSpecie ; 
+  for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+    fEventSpecies[es] = qa. fEventSpecies[es] ; 
+  
+  return *this;
 }
 
 //_______________________________________________________________
 AliQA::AliQA(const DETECTORINDEX_t det) :
   TNamed("QA", "Quality Assurance status"),
   fNdet(kNDET),  
-  fQA(new ULong_t[fNdet]), 
+  fNEventSpecie(AliRecoParam::kNSpecies), 
+  fQA(new ULong_t*[fNdet]), 
   fDet(det),
-  fTask(kNULLTASK) 
+  fTask(kNULLTASK), 
+  fEventSpecie(AliRecoParam::kDefault), 
+  fEventSpecies(new Bool_t[fNEventSpecie]) 
 {
   // constructor to be used
   if (! CheckRange(det) ) {
     fDet = kNULLDET ; 
     return ;
   } 
-  Int_t index ; 
-  for (index = 0; index < fNdet; index++) 
-    fQA[index] = 0 ; 
+  Int_t idet ; 
+  for (idet = 0; idet < fNdet; idet++) {
+    fQA[det] = new ULong_t[fNEventSpecie] ; 
+    for (Int_t es = 0 ; es < fNEventSpecie ; es++) 
+      fQA[idet][es] = 0 ; 
+  }
+  for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+    fEventSpecies[es] = kFALSE ; 
 }
   
 //_______________________________________________________________
 AliQA::AliQA(const ALITASK_t tsk) :
   TNamed("QA", "Quality Assurance status"), 
   fNdet(kNDET),
-  fQA(new ULong_t[fNdet]), 
+  fNEventSpecie(AliRecoParam::kNSpecies), 
+  fQA(new ULong_t*[fNdet]), 
   fDet(kNULLDET),
-  fTask(tsk)
+  fTask(tsk), 
+  fEventSpecie(AliRecoParam::kDefault), 
+  fEventSpecies(new Bool_t[fNEventSpecie])
 {
   // constructor to be used in the AliRoot module (SIM, REC, ESD or ANA)
   if (! CheckRange(tsk) ) {
     fTask = kNULLTASK ; 
     return ;
   } 
-  Int_t index ; 
-  for (index = 0; index < fNdet; index++) 
-    fQA[index] = 0 ; 
+  Int_t det ; 
+  for (det = 0; det < fNdet; det++) {
+    fQA[det] = new ULong_t[fNEventSpecie] ; 
+    for (Int_t es = 0 ; es < fNEventSpecie ; es++) 
+      fQA[det][es] = 0 ; 
+  }
+  for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+    fEventSpecies[es] = kFALSE ; 
 }
 
 //____________________________________________________________________________
 AliQA::~AliQA() 
 {
   // dtor  
+  for (Int_t idet = 0; idet < fNdet; idet++) 
+    delete fQA[idet] ;
   delete[] fQA ;
 }
 
@@ -184,7 +210,7 @@ Bool_t AliQA::CheckFatal() const
   Bool_t rv = kFALSE ;
   Int_t index ;
   for (index = 0; index < kNDET ; index++)
-    rv = rv || IsSet(DETECTORINDEX_t(index), fTask, kFATAL) ;
+    rv = rv || IsSet(DETECTORINDEX_t(index), fTask, fEventSpecie, kFATAL) ;
   return rv ;
 }
 
@@ -220,7 +246,32 @@ Bool_t AliQA::CheckRange(QABIT_t bit) const
   return rv ;
 }
 
-
+//_______________________________________________________________
+Bool_t AliQA::CheckRange(AliRecoParam::EventSpecie_t es) const
+{ 
+  // check if bit is in given bit range: 0-kNBit
+  Bool_t rv = kFALSE ; 
+  switch (es) {
+    case AliRecoParam::kDefault: 
+      rv = kTRUE ; 
+      break ; 
+    case AliRecoParam::kLowMult: 
+      rv = kTRUE ; 
+      break ; 
+    case AliRecoParam::kHighMult: 
+      rv = kTRUE ; 
+      break ; 
+    case AliRecoParam::kCosmic: 
+      rv = kTRUE ; 
+      break ; 
+    case AliRecoParam::kCalib: 
+      rv = kTRUE ; 
+      break ; 
+  }
+  if (!rv)
+    AliFatal(Form("Event Specie %d is not valid", es)) ;
+  return rv ;
+}
 
 //_______________________________________________________________
 const char * AliQA::GetAliTaskName(ALITASK_t tsk)
@@ -375,25 +426,6 @@ TFile * AliQA::GetQAResultFile()
        return fgQAResultFile ;
 }
 
-//_______________________________________________________________
-const TString AliQA::GetRunTypeName(RUNTYPE_t rt) 
-{ 
-       TString rv("Invalid Run Type") ;        
-       if ( rt == kNULLTYPE ) {
-               rv = "Known RUN_TYPE are: \n" ; 
-               for (Int_t index = 0 ; index < kNTYPE; index++) {
-                       rv += Form("%2d -- %s\n", index, fgRTNames[index].Data()) ;  
-               }
-               printf("%s", rv.Data()) ; 
-               return "" ; 
-       }
-       else {
-               if ( rt > kNULLTYPE && rt < kNTYPE )
-                       rv = fgRTNames[rt] ; 
-       }
-       return rv ; 
-}
-
 //_______________________________________________________________
 AliQA::TASKINDEX_t AliQA::GetTaskIndex(const char * name) 
 {
@@ -410,31 +442,43 @@ AliQA::TASKINDEX_t AliQA::GetTaskIndex(const char * name)
 }
 
 //_______________________________________________________________
-Bool_t AliQA::IsSet(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit) const
+Bool_t AliQA::IsSet(DETECTORINDEX_t det, ALITASK_t tsk, Int_t ies, QABIT_t bit) const 
+{
+  // Checks is the requested bit is set
+   
+  const AliRecoParam::EventSpecie_t es = AliRecoParam::Convert(ies) ; 
+  return IsSet(det, tsk, es, bit) ; 
+  
+}  
+
+//_______________________________________________________________
+Bool_t AliQA::IsSet(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) const
 {
   // Checks is the requested bit is set
        
   CheckRange(det) ; 
   CheckRange(tsk) ;
   CheckRange(bit) ;
+  CheckRange(es) ;
        
   ULong_t offset = Offset(tsk) ;
-  ULong_t status = GetStatus(det) ;
+  ULong_t status = GetStatus(det, es) ;
   offset+= bit ;
   status = (status & 1 << offset) != 0 ;
   return status ;
 }
 
 //_______________________________________________________________
-Bool_t AliQA::IsSetAny(DETECTORINDEX_t det, ALITASK_t tsk) const
+Bool_t AliQA::IsSetAny(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es) const
 {
   // Checks is the requested bit is set
        
   CheckRange(det) ; 
   CheckRange(tsk) ;
+  CheckRange(es) ;
        
   ULong_t offset = Offset(tsk) ;
-  ULong_t status = GetStatus(det) ;
+  ULong_t status = GetStatus(det, es) ;
        ULong_t st = 0 ; 
        for ( Int_t bit = 0 ; bit < kNBIT ; bit++) {
                offset+= bit ;
@@ -446,13 +490,14 @@ Bool_t AliQA::IsSetAny(DETECTORINDEX_t det, ALITASK_t tsk) const
                return kTRUE ;
 }
 //_______________________________________________________________
-Bool_t AliQA::IsSetAny(DETECTORINDEX_t det) const
+Bool_t AliQA::IsSetAny(DETECTORINDEX_t det, AliRecoParam::EventSpecie_t es) const
 {
   // Checks is the requested bit is set
        
   CheckRange(det) ; 
+  CheckRange(es) ; 
        
-       ULong_t status = GetStatus(det) ;
+       ULong_t status = GetStatus(det, es) ;
        ULong_t st = 0 ; 
        for ( Int_t tsk = 0 ; tsk < kNTASK ; tsk++) {
                ULong_t offset = Offset(ALITASK_t(tsk)) ;
@@ -470,9 +515,14 @@ Bool_t AliQA::IsSetAny(DETECTORINDEX_t det) const
 //_______________________________________________________________
 AliQA * AliQA::Instance()
 {
-  // Get an instance of the singleton.
-  // Object must have been instantiated with Instance(ALITASK) first
+  // Get an instance of the singleton. The only authorized way to call the ctor
 
+  if ( ! fgQA) {
+    TFile * f = GetQAResultFile() ; 
+    fgQA = dynamic_cast<AliQA *>(f->Get("QA")) ; 
+    if ( ! fgQA ) 
+      fgQA = new AliQA() ;
+  }    
   return fgQA ;
 }
 
@@ -494,7 +544,7 @@ AliQA * AliQA::Instance(const DETECTORINDEX_t det)
 //_______________________________________________________________
 AliQA * AliQA::Instance(const ALITASK_t tsk)
 {
-  // get an instance of the singleton.
+  // Get an instance of the singleton. The only authorized way to call the ctor
 
   if ( ! fgQA)
     switch (tsk) {
@@ -554,8 +604,10 @@ void AliQA::Merge(TCollection * list) {
                                TIter next(list) ;
                                AliQA * qa ; 
                                while ( (qa = (AliQA*)next() ) ) {
-                                       qa->IsSet(DETECTORINDEX_t(det), ALITASK_t(task), QABIT_t(bit)) ;
-                                       Set(QABIT_t(bit)) ; 
+          for (Int_t es = 0 ; es < fNEventSpecie ; es++) {
+            if (qa->IsSet(DETECTORINDEX_t(det), ALITASK_t(task), es, QABIT_t(bit)))
+              Set(QABIT_t(bit), es) ; 
+          }
                                } // qa list
                        } // bit
                } // task
@@ -596,11 +648,26 @@ ULong_t AliQA::Offset(ALITASK_t tsk) const
 }
 
 //_______________________________________________________________
-void AliQA::Set(QABIT_t bit)
+void AliQA::ResetStatus(DETECTORINDEX_t det) 
+{ 
+  // reset the status of det for all event specie
+  for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+    fQA[det][es] = 0 ; 
+}
+
+//_______________________________________________________________
+void AliQA::Set(QABIT_t bit, Int_t ies)
 {
-  // Set the status bit of the current detector in the current module
+  // Set the status bit of the current detector in the current module and for the current event specie 
+   Set(bit, AliRecoParam::Convert(ies)) ;
+}
+
+//_______________________________________________________________
+void AliQA::Set(QABIT_t bit, AliRecoParam::EventSpecie_t es)
+{
+  // Set the status bit of the current detector in the current module and for the current event specie 
   
-  SetStatusBit(fDet, fTask, bit) ;
+  SetStatusBit(fDet, fTask, es, bit) ;
 }
 
 //_____________________________________________________________________________
@@ -625,27 +692,6 @@ void AliQA::SetQARefStorage(const char * name)
        printf("AliQA::SetQARefDir: QA references are in  %s\n", tmp.Data() ) ;
 }
 
-//_____________________________________________________________________________
-void AliQA::SetQARefDataDirName(const char * name) 
-{
-  // Set the lower level directory name where reference data are found
-  TString test(name) ; 
-  RUNTYPE_t rt = kNULLTYPE ; 
-  for (Int_t index = 0; index < kNTYPE; index++) {
-    if (test.CompareTo(fgRTNames[index]) == 0) {
-      rt = (RUNTYPE_t) index ; 
-      break ; 
-    } 
-       }
-       
-       if (rt == kNULLTYPE) {
-      printf("AliQA::SetQARefDataDirName: %s is an unknown RUN TYPE name\n", name) ; 
-      return ; 
-       }
-       SetQARefDataDirName(rt) ; 
-}
-
 //_____________________________________________________________________________
 void AliQA::SetQAResultDirName(const char * name)
 {
@@ -659,39 +705,69 @@ void AliQA::SetQAResultDirName(const char * name)
 }
 
 //_______________________________________________________________
-void AliQA::SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit)
+void AliQA::SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit)
 {
  // Set the status bit for a given detector and a given task
 
   CheckRange(det) ;
   CheckRange(tsk) ;
   CheckRange(bit) ;
+  CheckRange(es) ;
 
   ULong_t offset = Offset(tsk) ;
-  ULong_t status = GetStatus(det) ;
+  ULong_t status = GetStatus(det, es) ;
   offset+= bit ;
   status = status | 1 << offset ;
-  SetStatus(det, status) ;
+  SetStatus(det, es, status) ;
+}
+
+//_______________________________________________________________
+void AliQA::Show() const 
+{ 
+  // dispplay the QA status word
+
+  for (Int_t ies = 0 ; ies < fNEventSpecie ; ies++) {
+    const Bool_t what = IsEventSpecieSet(ies) ;
+    if ( what )
+      ShowStatus(fDet, fTask, AliRecoParam::Convert(ies)) ; 
+  }
+}
+
+//_______________________________________________________________
+void AliQA::Show(DETECTORINDEX_t det) const 
+{ 
+  // dispplay the QA status word
+  
+  for (Int_t ies = 0 ; ies < fNEventSpecie ; ies++) {
+    const Bool_t what = IsEventSpecieSet(ies) ;
+    if ( what )
+      ShowStatus(fDet, kNULLTASK, AliRecoParam::Convert(ies)) ; 
+  }
 }
 
 //_______________________________________________________________
-void AliQA::ShowAll() const
+void AliQA::ShowAll() const 
 {
   // dispplay the QA status word
   Int_t index ;
   for (index = 0 ; index < kNDET ; index++) {
                for (Int_t tsk = kRAW ; tsk < kNTASK ; tsk++) {
-                       ShowStatus(DETECTORINDEX_t(index), ALITASK_t(tsk)) ;
-               }
+      for (Int_t ies = 0 ; ies < fNEventSpecie ; ies++) {
+        const Bool_t what = IsEventSpecieSet(ies) ;
+        if ( what )
+          ShowStatus(DETECTORINDEX_t(index), ALITASK_t(tsk), AliRecoParam::Convert(ies)) ;
+      }
+    }
        }
 }
 
 //_______________________________________________________________
-void AliQA::ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk) const
+void AliQA::ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es) const
 {
        // Prints the full QA status of a given detector
        CheckRange(det) ;
-       ULong_t status = GetStatus(det) ;
+       CheckRange(es) ;
+       ULong_t status = GetStatus(det, es) ;
        ULong_t tskStatus[kNTASK] ; 
        tskStatus[kRAW] = status & 0x0000f ;
        tskStatus[kSIM] = status & 0x000f0 ;
@@ -699,52 +775,60 @@ void AliQA::ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk) const
        tskStatus[kESD] = status & 0x0f000 ;
        tskStatus[kANA] = status & 0xf0000 ;
 
-       AliInfo(Form("====> QA Status for %8s raw =0x%x, sim=0x%x, rec=0x%x, esd=0x%x, ana=0x%x", GetDetName(det).Data(), 
+       AliInfo(Form("====> QA Status for %8s %8s raw =0x%x, sim=0x%x, rec=0x%x, esd=0x%x, ana=0x%x", GetDetName(det).Data(), AliRecoParam::GetEventSpecieName(es), 
                                 tskStatus[kRAW], tskStatus[kSIM], tskStatus[kREC], tskStatus[kESD], tskStatus[kANA] )) ;
        if (tsk == kNULLTASK) {
                for (Int_t itsk = kRAW ; itsk < kNTASK ; itsk++) {
-                       ShowASCIIStatus(det, ALITASK_t(itsk), tskStatus[itsk]) ; 
+                       ShowASCIIStatus(es, det, ALITASK_t(itsk), tskStatus[itsk]) ; 
                } 
        } else {
-                       ShowASCIIStatus(det, tsk, tskStatus[tsk]) ; 
+                       ShowASCIIStatus(es, det, tsk, tskStatus[tsk]) ; 
        }
 }
 
 //_______________________________________________________________
-void AliQA::ShowASCIIStatus(DETECTORINDEX_t det, ALITASK_t tsk, const ULong_t status) const 
+void AliQA::ShowASCIIStatus(AliRecoParam::EventSpecie_t es, DETECTORINDEX_t det, ALITASK_t tsk, const ULong_t status) const 
 {
        // print the QA status in human readable format
        TString text; 
        for (Int_t bit = kINFO ; bit < kNBIT ; bit++) {
-               if (IsSet(det, tsk, QABIT_t(bit))) {
+               if (IsSet(det, tsk, es, QABIT_t(bit))) {
                        text = GetBitName(QABIT_t(bit)) ; 
                        text += " " ; 
                }
        }
        if (! text.IsNull())
-               printf("           %8s %4s 0x%4lx, Problem signalled: %8s \n", GetDetName(det).Data(), GetAliTaskName(tsk), status, text.Data()) ; 
+               printf("           %8s %8s %4s 0x%4lx, Problem signalled: %8s \n", AliRecoParam::GetEventSpecieName(es), GetDetName(det).Data(), GetAliTaskName(tsk), status, text.Data()) ; 
+}
+
+//_______________________________________________________________
+void AliQA::UnSet(QABIT_t bit, Int_t ies)
+{
+       // UnSet the status bit of the current detector in the current module
+               UnSet(bit, AliRecoParam::Convert(ies)) ;
 }
 
 //_______________________________________________________________
-void AliQA::UnSet(QABIT_t bit)
+void AliQA::UnSet(QABIT_t bit, AliRecoParam::EventSpecie_t es)
 {
        // UnSet the status bit of the current detector in the current module
        
-       UnSetStatusBit(fDet, fTask, bit) ;
+       UnSetStatusBit(fDet, fTask, es, bit) ;
 }
 
 //_______________________________________________________________
-void AliQA::UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit)
+void AliQA::UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit)
 {
        // UnSet the status bit for a given detector and a given task
        
        CheckRange(det) ;
        CheckRange(tsk) ;
        CheckRange(bit) ;
+       CheckRange(es) ;
        
        ULong_t offset = Offset(tsk) ;
-       ULong_t status = GetStatus(det) ;
+       ULong_t status = GetStatus(det, es) ;
        offset+= bit ;
        status = status & 0 << offset ;
-       SetStatus(det, status) ;
+       SetStatus(det, es, status) ;
 }
index d1cda92ee7715a12f8a120bf7c4b1bf765fa825c..d39cb9ffb32ef361c00ef5dfba0fd3fc358ca7bd 100644 (file)
 //
 
 #include <TNamed.h> 
+#include <TMath.h> 
 class TFile ; 
 
 #include "AliLog.h"
+#include "AliRecoParam.h"
 
 class AliQA : public TNamed {
 public:
@@ -24,14 +26,6 @@ public:
     kNULLTASK=-1, kRAW, kSIM, kREC, kESD, kANA, kNTASK };
        enum QABIT_t {
     kNULLBit=-1, kINFO, kWARNING, kERROR, kFATAL, kNBIT };
-    enum RUNTYPE_t {
-      kNULLTYPE=-1, kUNKOWN, kAUTO_TEST, kCALIBRATION, kCALIBRATION_PULSER, kCHANNEL_DELAY_TUNING, kCOSMIC, kCOSMICS, kDAQ_FO_UNIF_SCAN, 
-                       kDAQ_GEN_DAC_SCAN, kDAQ_MEAN_TH_SCAN, kDAQ_MIN_TH_SCAN, kDAQ_NOISY_PIX_SCAN, kDAQ_PIX_DELAY_SCAN, kDAQ_UNIFORMITY_SCAN, 
-                       kDCS_FO_UNIF_SCAN, kDCS_MEAN_TH_SCAN, kDCS_MIN_TH_SCAN, kDCS_PIX_DELAY_SCAN, kDCS_UNIFORMITY_SCAN, kDDL_TEST, kGAIN, 
-                       kPEDESTAL, kINJECTOR,  kLASER, kMONTECARLO, kNOISE, kNOISY_PIX_SCAN,  kPHYSICS, kPULSER, kSTANDALONE, kSTANDALONE_BC, 
-                       kSTANDALONE_CENTRAL, kSTANDALONE_COSMIC, kSTANDALONE_EMD, kSTANDALONE_LASER, kSTANDALONE_MB, kSTANDALONE_PEDESTAL, 
-                       kSTANDALONE_SEMICENTRAL, kSTANDALONE_PULSER, kNTYPE};
-       
        enum TASKINDEX_t {
     kNULLTASKINDEX=-1, kRAWS, kHITS, kSDIGITS, kDIGITS, kRECPOINTS, kTRACKSEGMENTS, kRECPARTICLES, kESDS, kNTASKINDEX };
   
@@ -47,7 +41,7 @@ public:
        static  AliQA *        Instance(const DETECTORINDEX_t det) ;
        static  AliQA *        Instance(const ALITASK_t tsk) ;
        static  AliQA *        Instance(const TASKINDEX_t tsk) ;
-       Bool_t           CheckFatal() const ;
+       Bool_t                 CheckFatal() const ;
        static void            Close() ; 
        static const char *    GetAliTaskName(ALITASK_t tsk) ;
   static const TString   GetExpert() { return fkgExpert ; }
@@ -55,7 +49,7 @@ public:
        static const TString   GetLabLocalFile() { return fkgLabLocalFile ; } 
        static const TString   GetLabLocalOCDB() { return fkgLabLocalOCDB ; } 
        static const TString   GetLabAliEnOCDB() { return fkgLabAliEnOCDB ; } 
-       static       DETECTORINDEX_t GetDetIndex(const char * name) ; 
+       static DETECTORINDEX_t GetDetIndex(const char * name) ; 
        static const TString   GetDetName(DETECTORINDEX_t det) { return fgDetNames[det] ; }
        static const char *    GetDetName(Int_t det) ;
        static const TString   GetGRPPath() { return fgGRPPath ; }  
@@ -74,46 +68,54 @@ public:
        static const char  *   GetQARefStorage() { return fgQARefDirName.Data() ; }
        static const char  *   GetRefOCDBDirName() { return fkgRefOCDBDirName.Data() ; }
        static const char  *   GetRefDataDirName() { return fkgRefDataDirName.Data() ; }
-       static const TString   GetRunTypeName(RUNTYPE_t rt = kNULLTYPE) ;
-       static       TASKINDEX_t GetTaskIndex(const char * name) ; 
+       static     TASKINDEX_t GetTaskIndex(const char * name) ; 
        static       TString   GetTaskName(UInt_t tsk) { return fgTaskNames[tsk] ; }
-             Bool_t           IsSet(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit) const ;
-             Bool_t           IsSetAny(DETECTORINDEX_t det, ALITASK_t tsk) const ;
-             Bool_t           IsSetAny(DETECTORINDEX_t det) const ;
+  Bool_t                 IsEventSpecieSet(AliRecoParam::EventSpecie_t es) const { return fEventSpecies[(Int_t)TMath::Log2(es)] ; }
+  Bool_t                 IsEventSpecieSet(Int_t es) const { return fEventSpecies[es] ; }
+  Bool_t                 IsSet(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) const ;
+  Bool_t                 IsSet(DETECTORINDEX_t det, ALITASK_t tsk, Int_t es, QABIT_t bit) const ;
+  Bool_t                 IsSetAny(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es) const ;
+  Bool_t                 IsSetAny(DETECTORINDEX_t det, AliRecoParam::EventSpecie_t es) const ;
        void                   Merge(TCollection * list) ; 
-       void                   Set(QABIT_t bit) ;
+       void                   Set(QABIT_t bit, AliRecoParam::EventSpecie_t es) ;
+       void                   Set(QABIT_t bit, Int_t es) ;
+  void                   SetEventSpecie(AliRecoParam::EventSpecie_t es) { fEventSpecies[(Int_t)TMath::Log2(es)] = kTRUE ; }
        static void                            SetQAResultDirName(const char * name) ; 
        static void            SetQARefStorage(const char * name) ; 
-       static void            SetQARefDataDirName(RUNTYPE_t rt) { fkgRefDataDirName = GetRunTypeName(rt) ; }
-       static void            SetQARefDataDirName(const char * name) ;
-       void                   Show() const { ShowStatus(fDet, fTask) ; }
-       void                   Show(DETECTORINDEX_t det) const { ShowStatus(det) ; }
+       static void            SetQARefDataDirName(AliRecoParam::EventSpecie_t es) { fkgRefDataDirName = AliRecoParam::GetEventSpecieName(es) ; }
+       static void            SetQARefDataDirName(Int_t es) { fkgRefDataDirName = AliRecoParam::GetEventSpecieName(es) ; }
+       void                   Show() const 
+       void                   Show(DETECTORINDEX_t det) const ;
        void                   ShowAll() const ;
-       void                   ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk=kNULLTASK) const ;
-       void                   UnSet(QABIT_t bit) ;
+       void                   ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk=kNULLTASK, AliRecoParam::EventSpecie_t es=AliRecoParam::kDefault) const ;
+       void                   UnSet(QABIT_t bit, AliRecoParam::EventSpecie_t es) ;
+       void                   UnSet(QABIT_t bit, Int_t es) ;
 
 private:      
 
              Bool_t         CheckRange(DETECTORINDEX_t det) const ;
              Bool_t         CheckRange(ALITASK_t tsk) const ;
              Bool_t         CheckRange(QABIT_t bit) const ;
+        Bool_t         CheckRange(AliRecoParam::EventSpecie_t es) const ;
        const char *         GetBitName(QABIT_t bit) const ;
-             ULong_t        GetStatus(DETECTORINDEX_t det) const  { return fQA[det] ;}
+        ULong_t        GetStatus(DETECTORINDEX_t det, AliRecoParam::EventSpecie_t es) const  { return fQA[det][(Int_t)TMath::Log2(es)] ;}
        void                 Finish() const ;  
              ULong_t        Offset(ALITASK_t tsk) const ;
-       void                 ShowASCIIStatus(DETECTORINDEX_t det, ALITASK_t tsk, ULong_t status) const ; 
-       void                 ResetStatus(DETECTORINDEX_t det) { fQA[det] = 0 ; }
+       void                 ShowASCIIStatus(AliRecoParam::EventSpecie_t es, DETECTORINDEX_t det, ALITASK_t tsk, ULong_t status) const ; 
+       void                 ResetStatus(DETECTORINDEX_t det) 
        void                 Set(DETECTORINDEX_t det) { fDet = det ;}
        void                 Set(ALITASK_t tsk) { fTask = tsk ; AliDebug(1, Form("Ready to set QA status in %s", GetAliTaskName(tsk) )) ; }
-       void                 SetStatus(DETECTORINDEX_t det, ULong_t status) { fQA[det] = status ; }
-       void                 SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit) ;
-       void                 UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit) ;
+       void                 SetStatus(DETECTORINDEX_t det, AliRecoParam::EventSpecie_t es, ULong_t status) { fQA[det][(Int_t)TMath::Log2(es)] = status ; }
+       void                 SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) ;
+       void                 UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) ;
 
        static AliQA *       fgQA                               ; // pointer to the instance of the singleton
        Int_t                fNdet                  ; // number of detectors
-       ULong_t    *         fQA                                ; //[fNdet] the status word 4 bits for SIM, REC, ESD, ANA each
-       DETECTORINDEX_t      fDet                               ; //!  the current detector (ITS, TPC, ....)
-       ALITASK_t            fTask                      ; //!  the current environment (SIM, REC, ESD, ANA)
+  Int_t                fNEventSpecie          ; // number of Event Specie (see AliRecoParam)
+       ULong_t    **        fQA                                ; //[fNdet][fNEventSpecie] the status word 4 bits for SIM, REC, ESD, ANA each
+       DETECTORINDEX_t      fDet                               ; //! the current detector (ITS, TPC, ....)
+       ALITASK_t            fTask                      ; //! the current environment (SIM, REC, ESD, ANA)
+  AliRecoParam::EventSpecie_t fEventSpecie    ; //! the current event specie
        static TString       fgDetNames[]                 ; //! list of detector names   
        static TString       fgGRPPath              ; //! path of the GRP object in OCDB
        static TFile *       fgQADataFile                 ; //! the output file where the quality assurance maker store their results
@@ -138,6 +140,7 @@ private:
        static const TString fkgRefOCDBDirName      ; //! name of Reference directory name in OCDB      
        static       TString fkgRefDataDirName      ; //! name of Reference directory name in OCDB for data     
        static const TString fkgQARefOCDBDefault    ; //! default storage for QA in OCDB 
+  Bool_t *             fEventSpecies          ; //[fNEventSpecie] list of event species encountered in a run
 
  ClassDef(AliQA,1)  //ALICE Quality Assurance Object
 };
index 21035a801d535d92277872ddd634b584bed1c7a8..4e90eb42e029f3dc687019ebf1dde6ed9a78f7ed 100644 (file)
@@ -55,7 +55,8 @@ AliQAChecker::AliQAChecker(const char* name, const char* title) :
   fRunInfo(0x0), 
   fRunInfoOwner(kFALSE), 
   fRefFile(0x0), 
-  fFoundDetectors(".")
+  fFoundDetectors("."), 
+  fEventSpecie(AliRecoParam::kDefault) 
 {
   // ctor: initialise checkers and open the data file   
   for (Int_t det = 0 ; det < AliQA::kNDET ; det++) 
@@ -69,7 +70,8 @@ AliQAChecker::AliQAChecker(const AliQAChecker& qac) :
   fRunInfo(qac.fRunInfo), 
   fRunInfoOwner(kFALSE),   
   fRefFile(qac.fRefFile), 
-  fFoundDetectors(qac.fFoundDetectors)
+  fFoundDetectors(qac.fFoundDetectors),
+  fEventSpecie(qac.fEventSpecie)
 {
   // copy constructor
   
@@ -144,16 +146,15 @@ AliQAChecker::~AliQAChecker()
 }
  
 //_____________________________________________________________________________
-void AliQAChecker::GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TObjArray *& dirOCDB)     
+void AliQAChecker::GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TObjArray **& dirOCDB)     
 { 
   // Opens and returns the file with the reference data 
        
   dirFile = NULL ; 
-  dirOCDB = NULL ; 
   TString refStorage(AliQA::GetQARefStorage()) ; 
-  //refStorage += AliQA::GetQARefFileName() ;
   if (refStorage.Contains(AliQA::GetLabLocalFile())) { 
     refStorage.ReplaceAll(AliQA::GetLabLocalFile(), "") ; 
+    refStorage += AliQA::GetQARefFileName() ;
     if ( fRefFile ) 
       if ( fRefFile->IsOpen() ) 
                                        fRefFile->Close() ; 
@@ -172,23 +173,30 @@ void AliQAChecker::GetRefSubDir(const char * det, const char * task, TDirectory
     }  
   } else if (refStorage.Contains(AliQA::GetLabLocalOCDB()) || refStorage.Contains(AliQA::GetLabAliEnOCDB())) { 
     AliCDBManager* man = AliCDBManager::Instance() ;
-    if ( strcmp(AliQA::GetRefDataDirName(), "") == 0 ) { // the name of the last level of the directory is not set (RUNTYPE)
-      // Get it from RunInfo
-      if (!fRunInfo)  // not yet set, get the info from GRP
-                               LoadRunInfoFromGRP() ; 
-      AliQA::SetQARefDataDirName(fRunInfo->GetRunType()) ;
-    }
-    if ( ! man->GetLock() ) { 
-      man->SetDefaultStorage(AliQA::GetQARefStorage()) ; 
-      man->SetSpecificStorage("*", AliQA::GetQARefStorage()) ;
-    }
-    char * detOCDBDir = Form("%s/%s/%s", det, AliQA::GetRefOCDBDirName(), AliQA::GetRefDataDirName()) ; 
-    AliInfo(Form("Reference QA data are taken from %s", detOCDBDir)) ;
-    AliCDBEntry * entry = man->Get(detOCDBDir, man->GetRun()) ;
-    if (entry) {
-      TList * listDetQAD = dynamic_cast<TList *>(entry->GetObject()) ;
-      if ( listDetQAD ) 
-                               dirOCDB = dynamic_cast<TObjArray *>(listDetQAD->FindObject(task)) ; 
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      if ( !AliQA::Instance()->IsEventSpecieSet(specie) ) 
+        continue ; 
+      //if ( strcmp(AliQA::GetRefDataDirName(), "") == 0 ) { // the name of the last level of the directory is not set (EventSpecie)
+        // Get it from RunInfo
+        //if (!fRunInfo)  // not yet set, get the info from GRP
+        //  LoadRunInfoFromGRP() ; 
+      AliQA::SetQARefDataDirName(specie) ;
+      //}
+      if ( ! man->GetLock() ) { 
+        man->SetDefaultStorage(AliQA::GetQARefStorage()) ; 
+        man->SetSpecificStorage("*", AliQA::GetQARefStorage()) ;
+      }
+      char * detOCDBDir = Form("%s/%s/%s", det, AliQA::GetRefOCDBDirName(), AliQA::GetRefDataDirName()) ; 
+      AliCDBEntry * entry = man->Get(detOCDBDir, man->GetRun()) ;
+      if (entry) {
+        dirOCDB = new TObjArray*[AliRecoParam::kNSpecies] ;    
+        TList * listDetQAD = dynamic_cast<TList *>(entry->GetObject()) ;
+        TIter next(listDetQAD) ;
+        TObjArray * ar ; 
+        while ( ar = (TObjArray*)next() )
+          if ( listDetQAD ) 
+          dirOCDB[specie] = dynamic_cast<TObjArray *>(listDetQAD->FindObject(Form("%s/%s", task, AliRecoParam::GetEventSpecieName(specie)))) ; 
+      }
     }
   }
 }
@@ -265,16 +273,42 @@ void AliQAChecker::LoadRunInfoFromGRP()
   fRunInfo = new AliRunInfo(lhcState, beamType, beamEnergy, runType, activeDetectors);
 
   fRunInfoOwner = kTRUE ; 
+
+  // set the event specie
+  fEventSpecie = AliRecoParam::kDefault ;
+  if (strcmp(runType,"PHYSICS")) {
+    // Not a physics run, the event specie is set to kCalib
+    fEventSpecie = AliRecoParam::kCalib ;
+    return;
+  }
+  if (strcmp(lhcState,"STABLE_BEAMS") == 0) {
+    // Heavy ion run (any beam tha is not pp, the event specie is set to kHighMult
+    fEventSpecie = AliRecoParam::kHighMult ;
+    if ((strcmp(beamType,"p-p") == 0) ||
+        (strcmp(beamType,"p-")  == 0) ||
+        (strcmp(beamType,"-p")  == 0) ||
+        (strcmp(beamType,"P-P") == 0) ||
+        (strcmp(beamType,"P-")  == 0) ||
+        (strcmp(beamType,"-P")  == 0)) {
+      // Proton run, the event specie is set to kLowMult
+      fEventSpecie = AliRecoParam::kLowMult ;
+    }
+    else if (strcmp(beamType,"-") == 0) {
+      // No beams, we assume cosmic data
+      fEventSpecie = AliRecoParam::kCosmic ;
+    }
+    else if (strcmp(beamType,"UNKNOWN") == 0) {
+      // No LHC beam information is available, we use the default event specie
+      fEventSpecie = AliRecoParam::kDefault ;
+    }
+  }
 }
 
 //_____________________________________________________________________________
 Bool_t AliQAChecker::Run(const char * fileName)
 {
   // run the Quality Assurance Checker for all tasks Hits, SDigits, Digits, recpoints, tracksegments, recparticles and ESDs
-  // starting from data in file
-
-  Bool_t rv = kFALSE ; 
-  
+  // starting from data in file  
   TStopwatch stopwatch;
   stopwatch.Start();
 
@@ -291,9 +325,9 @@ Bool_t AliQAChecker::Run(const char * fileName)
     for ( det = 0; det < AliQA::kNDET ; det++) {
       detName = AliQA::GetDetName(det) ; 
       if (detNameQA.Contains(detName)) {
-       fFoundDetectors+=detName ; 
-       fFoundDetectors+="." ;          
-       break ; 
+        fFoundDetectors+=detName ; 
+        fFoundDetectors+="." ;         
+        break ; 
       }
     } 
     TDirectory * detDir = AliQA::GetQADataFile(fileName)->GetDirectory(detKey->GetName()) ; 
@@ -308,34 +342,32 @@ Bool_t AliQAChecker::Run(const char * fileName)
       taskDir->cd() ; 
       AliQACheckerBase * qac = GetDetQAChecker(det) ; 
       if (qac)
-               AliInfo(Form("QA checker found for %s", detName.Data())) ; 
+        AliInfo(Form("QA checker found for %s", detName.Data())) ; 
       if (!qac)
-               AliFatal(Form("QA checker not found for %s", detName.Data())) ; 
+        AliFatal(Form("QA checker not found for %s", detName.Data())) ; 
       AliQA::ALITASK_t index = AliQA::kNULLTASK ; 
       if ( taskName == AliQA::GetTaskName(AliQA::kHITS) ) 
-               index = AliQA::kSIM ; 
+        index = AliQA::kSIM ; 
       if ( taskName == AliQA::GetTaskName(AliQA::kSDIGITS) ) 
-               index = AliQA::kSIM ; 
+        index = AliQA::kSIM ; 
       if ( taskName == AliQA::GetTaskName(AliQA::kDIGITS) ) 
-               index = AliQA::kSIM ; 
+        index = AliQA::kSIM ; 
       if ( taskName == AliQA::GetTaskName(AliQA::kRECPOINTS) ) 
-               index = AliQA::kREC ; 
+        index = AliQA::kREC ; 
       if ( taskName == AliQA::GetTaskName(AliQA::kTRACKSEGMENTS) ) 
-               index = AliQA::kREC ; 
+        index = AliQA::kREC ; 
       if ( taskName == AliQA::GetTaskName(AliQA::kRECPARTICLES) ) 
-               index = AliQA::kREC ; 
+        index = AliQA::kREC ; 
       if ( taskName == AliQA::GetTaskName(AliQA::kESDS) ) 
-               index = AliQA::kESD ; 
+        index = AliQA::kESD ; 
       qac->Init(AliQA::DETECTORINDEX_t(det)) ; 
-
-         TDirectory * refDir    = NULL ; 
-         TObjArray * refOCDBDir = NULL ;       
-         GetRefSubDir(detNameQA.Data(), taskName.Data(), refDir, refOCDBDir) ;
-         if ( refDir || refOCDBDir) {
+      
+      TDirectory * refDir     = NULL ; 
+      TObjArray ** refOCDBDir = NULL ; 
+      GetRefSubDir(detNameQA.Data(), taskName.Data(), refDir, refOCDBDir) ;
                  qac->SetRefandData(refDir, refOCDBDir, taskDir) ;
                  qac->Run(index) ; 
-         }
-       }
+    }
   }
   AliInfo("QA performed for following detectors:") ; 
   for ( Int_t det = 0; det < AliQA::kNDET; det++) {
@@ -345,14 +377,11 @@ Bool_t AliQAChecker::Run(const char * fileName)
     }  
   }
   printf("\n") ; 
-  rv = kTRUE ; 
-
-  return rv ; 
-  
+  return kTRUE ; 
 }
 
 //_____________________________________________________________________________
-Bool_t AliQAChecker::Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TObject * obj)
+Bool_t AliQAChecker::Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TObjArray ** list)
 {
        // run the Quality Assurance Checker for detector det, for task task starting from data in list
 
@@ -380,21 +409,49 @@ Bool_t AliQAChecker::Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TO
        else if ( task == AliQA::kESDS ) 
                index = AliQA::kESD ; 
 
-       TDirectory * refDir    = NULL ; 
-       TObjArray * refOCDBDir = NULL ; 
-       qac->Init(det) ; 
-       GetRefSubDir(AliQA::GetDetName(det), AliQA::GetTaskName(task), refDir, refOCDBDir) ;
-       if ( refDir || refOCDBDir)  // references found
-         qac->SetRefandData(refDir, refOCDBDir) ; 
-       
-  TString className(obj->ClassName()) ; 
-  if (className.Contains(TObjArray::Class()->GetName())) {
-    qac->Run(index, static_cast<TObjArray *>(obj)) ; 
-  } else if (className.Contains(TNtupleD::Class()->GetName())) {
-    qac->Run(index, static_cast<TNtupleD *>(obj)) ; 
-  } else {
-    AliError(Form("%s class not implemented", className.Data())) ; 
-    return kFALSE ; 
-  }
+       TDirectory * refDir     = NULL ; 
+       TObjArray ** refOCDBDir = NULL  ;       
+  qac->Init(det) ; 
+  GetRefSubDir(AliQA::GetDetName(det), AliQA::GetTaskName(task), refDir, refOCDBDir) ;
+  qac->SetRefandData(refDir, refOCDBDir) ; 
+  qac->Run(index, list) ; 
        return kTRUE ; 
 }
+
+//_____________________________________________________________________________
+Bool_t AliQAChecker::Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TNtupleD ** list)
+{
+       // run the Quality Assurance Checker for detector det, for task task starting from data in list
+  
+       AliQACheckerBase * qac = GetDetQAChecker(det) ; 
+       if (qac)
+               AliDebug(1, Form("QA checker found for %s", AliQA::GetDetName(det).Data())) ;
+       if (!qac)
+               AliError(Form("QA checker not found for %s", AliQA::GetDetName(det).Data())) ; 
+  
+       AliQA::ALITASK_t index = AliQA::kNULLTASK ; 
+       if ( task == AliQA::kRAWS ) 
+               index = AliQA::kRAW ; 
+       else if ( task == AliQA::kHITS ) 
+               index = AliQA::kSIM ; 
+       else if ( task == AliQA::kSDIGITS ) 
+               index = AliQA::kSIM ; 
+       else if ( task == AliQA::kDIGITS ) 
+               index = AliQA::kSIM ; 
+       else if ( task == AliQA::kRECPOINTS ) 
+               index = AliQA::kREC ; 
+       else if ( task == AliQA::kTRACKSEGMENTS ) 
+               index = AliQA::kREC ; 
+       else if ( task == AliQA::kRECPARTICLES ) 
+               index = AliQA::kREC ; 
+       else if ( task == AliQA::kESDS ) 
+               index = AliQA::kESD ; 
+  
+       TDirectory * refDir     = NULL ; 
+       TObjArray ** refOCDBDir = NULL ;        
+  qac->Init(det) ; 
+  GetRefSubDir(AliQA::GetDetName(det), AliQA::GetTaskName(task), refDir, refOCDBDir) ;
+  qac->SetRefandData(refDir, refOCDBDir) ; 
+  qac->Run(index, list) ; 
+  return kTRUE ; 
+}
index 01d03e542a27122fa6ddf2543c573dc0a50091fb..11fddce85fc7f670a2c7b2fb7bbebee41724c041 100644 (file)
 
 #include <TNamed.h>
 #include <TFile.h>  
+class TNtupleD ;
 
 #include "AliQA.h"
+#include "AliRecoParam.h"
 class AliCDBEntry ; 
 class AliRunInfo ;
 class AliQACheckerBase ; 
@@ -32,27 +34,29 @@ public:
 
   static  AliQAChecker * Instance() ;
   AliQACheckerBase *     GetDetQAChecker(Int_t det) ; 
-  void                   GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TObjArray *& dirOCDB) ;
+  void                   GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TObjArray **& dirOCDB) ;
 //  static TFile *         GetQAResultFile() ;
 //  static const char *    GetQAResultFileName() { return fgQAResultFileName.Data() ; }
 //  void                   SetQAResultDirName(const char * name) ; 
 //  void                   SetRefDirName(const char * name) ; 
 
   virtual Bool_t Run(const char * fileName = NULL) ;
-  virtual Bool_t Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TObject * obj = NULL);
+  virtual Bool_t Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TObjArray ** list);
+  virtual Bool_t Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TNtupleD ** list);
   void SetRunInfo(AliRunInfo * ei) {fRunInfo = ei;}
 
 private:
 
   void LoadRunInfoFromGRP() ; 
 
-  static AliQAChecker *fgQAChecker ;             // pointer to the instance of the singleton
-  TFile *              fDataFile ;               //! Data file to check
-  AliRunInfo *       fRunInfo ;              //! Event info object 
-  Bool_t               fRunInfoOwner;          //! owns fRunInfo or not
-  TFile *              fRefFile ;                //! Reference Data file 
-  TString              fFoundDetectors ;         //! detectors for which the Quality assurance could be done
-  AliQACheckerBase *   fCheckers[AliQA::kNDET] ; //! list of detectors checkers
+  static AliQAChecker *       fgQAChecker ;             // pointer to the instance of the singleton
+  TFile *                     fDataFile ;               //! Data file to check
+  AliRunInfo *                fRunInfo ;                //! Event info object 
+  Bool_t                      fRunInfoOwner;            //! owns fRunInfo or not
+  TFile *                     fRefFile ;                //! Reference Data file 
+  TString                     fFoundDetectors ;         //! detectors for which the Quality assurance could be done
+  AliQACheckerBase *          fCheckers[AliQA::kNDET] ; //! list of detectors checkers
+  AliRecoParam::EventSpecie_t fEventSpecie ;            //! event specie deduced from the GRP data
   ClassDef(AliQAChecker, 1)  // class for running generation, simulation and digitization
 };
 #endif
index f644bb925648b78db6315fc9f1568f902dd30a9d..07a23c8a30339da5cef60a219c40f042fc0bf553 100644 (file)
@@ -49,9 +49,28 @@ AliQACheckerBase::AliQACheckerBase(const char * name, const char * title) :
   TNamed(name, title), 
   fDataSubDir(0x0),
   fRefSubDir(0x0), 
-  fRefOCDBSubDir(0x0)
+  fRefOCDBSubDir(0x0), 
+  fLowTestValue(0x0),
+  fUpTestValue(0x0)
 {
   // ctor
+  fLowTestValue = new Float_t[AliQA::kNBIT] ; 
+  fUpTestValue  = new Float_t[AliQA::kNBIT] ; 
+  fLowTestValue[AliQA::kINFO]    =  0.5   ; 
+  fUpTestValue[AliQA::kINFO]     = 1.0 ; 
+  fLowTestValue[AliQA::kWARNING] =  0.002 ; 
+  fUpTestValue[AliQA::kWARNING]  = 0.5 ; 
+  fLowTestValue[AliQA::kERROR]   =  0.0   ; 
+  fUpTestValue[AliQA::kERROR]    = 0.002 ; 
+  fLowTestValue[AliQA::kFATAL]   = -1.0   ; 
+  fUpTestValue[AliQA::kFATAL]    = 0.0 ; 
+  
+  AliInfo("Default setting is:") ;
+  printf( "                      INFO    -> %1.5f <  value <  %1.5f \n", fLowTestValue[AliQA::kINFO], fUpTestValue[AliQA::kINFO]) ; 
+  printf( "                      WARNING -> %1.5f <  value <= %1.5f \n", fLowTestValue[AliQA::kWARNING], fUpTestValue[AliQA::kWARNING]) ; 
+  printf( "                      ERROR   -> %1.5f <  value <= %1.5f \n", fLowTestValue[AliQA::kERROR], fUpTestValue[AliQA::kERROR]) ; 
+  printf( "                      FATAL   -> %1.5f <= value <  %1.5f \n", fLowTestValue[AliQA::kFATAL], fUpTestValue[AliQA::kFATAL]) ; 
+  
 }
 
 //____________________________________________________________________________ 
@@ -59,9 +78,15 @@ AliQACheckerBase::AliQACheckerBase(const AliQACheckerBase& qac) :
   TNamed(qac.GetName(), qac.GetTitle()),
   fDataSubDir(qac.fDataSubDir), 
   fRefSubDir(qac.fRefSubDir), 
-  fRefOCDBSubDir(qac.fRefOCDBSubDir)
+  fRefOCDBSubDir(qac.fRefOCDBSubDir), 
+  fLowTestValue(qac.fLowTestValue),
+  fUpTestValue(qac.fLowTestValue)
 {
   //copy ctor
+  for (Int_t index = 0 ; index < AliQA::kNBIT ; index++) {
+    fLowTestValue[index]  = qac.fLowTestValue[index] ; 
+    fUpTestValue[index] = qac.fUpTestValue[index] ; 
+  }
     
 }
 
@@ -74,99 +99,116 @@ AliQACheckerBase& AliQACheckerBase::operator = (const AliQACheckerBase& qadm )
   return *this;
 }
 
+//____________________________________________________________________________ 
+AliQACheckerBase::~AliQACheckerBase()
+{
+  delete [] fLowTestValue ; 
+  delete [] fUpTestValue ; 
+}
+
 //____________________________________________________________________________
-Double_t AliQACheckerBase::Check(AliQA::ALITASK_t /*index*/) 
+Double_t AliQACheckerBase::Check(AliQA::ALITASK_t /*index*/) 
 {
   // Performs a basic checking
   // Compares all the histograms stored in the directory
   // With reference histograms either in a file of in OCDB  
 
-       Double_t test = 0.0  ;
-       Int_t count = 0 ; 
-
-       if (!fDataSubDir)  
-               test = 1. ; // nothing to check
-       else 
-               if (!fRefSubDir && !fRefOCDBSubDir)
-                       test = -1 ; // no reference data
-               else {
-                       TList * keyList = fDataSubDir->GetListOfKeys() ; 
-                       TIter next(keyList) ; 
-                       TKey * key ;
-                       count = 0 ; 
-                       while ( (key = static_cast<TKey *>(next())) ) {
-                               TObject * odata = fRefSubDir->Get(key->GetName()) ; 
-                               if ( odata->IsA()->InheritsFrom("TH1") ) {
-                                       TH1 * hdata = static_cast<TH1*>(odata) ;
-                                       TH1 * href = NULL ; 
-                                       if (fRefSubDir) 
-                                               href  = static_cast<TH1*>(fRefSubDir->Get(key->GetName())) ;
-                                       else if (fRefOCDBSubDir) {
-                                               href  = static_cast<TH1*>(fRefOCDBSubDir->FindObject(key->GetName())) ;
-                                       }
-                                       if (!href) 
-                                               test = -1 ; // no reference data ; 
-                                       else {
-                                               Double_t rv =  DiffK(hdata, href) ;
-                                               AliInfo(Form("%s ->Test = %f", hdata->GetName(), rv)) ; 
-                                               test += rv ; 
-                                               count++ ; 
-                                       }
-                               } else
-                                       AliError(Form("%s Is a Classname that cannot be processed", key->GetClassName())) ;
-                       }
-               } 
-       
-       if (count != 0) 
-               test /= count ;
-   
-       return test ;
+       Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
+       Int_t count[AliRecoParam::kNSpecies]   = { 0 }; 
+
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    test[specie] = 1.0 ; 
+    if ( !AliQA::Instance()->IsEventSpecieSet(specie) ) 
+      continue ; 
+    if (!fDataSubDir) {
+      test[specie] = 0. ; // nothing to check
+    } else if (!fRefSubDir && !fRefOCDBSubDir) {
+        test[specie] = -1 ; // no reference data
+    } else {
+      TList * keyList = fDataSubDir->GetListOfKeys() ; 
+      TIter next(keyList) ; 
+      TKey * key ;
+      count[specie] = 0 ; 
+      while ( (key = static_cast<TKey *>(next())) ) {
+        TObject * odata = fRefSubDir->Get(key->GetName()) ; 
+        if ( odata->IsA()->InheritsFrom("TH1") ) {
+          TH1 * hdata = static_cast<TH1*>(odata) ;
+          TH1 * href = NULL ; 
+          if (fRefSubDir) 
+            href  = static_cast<TH1*>(fRefSubDir->Get(key->GetName())) ;
+          else if (fRefOCDBSubDir[specie]) {  
+            href  = static_cast<TH1*>(fRefOCDBSubDir[specie]->FindObject(key->GetName())) ;
+          }
+          if (!href) 
+            test[specie] = -1 ; // no reference data ; 
+          else {
+            Double_t rv =  DiffK(hdata, href) ;
+            AliInfo(Form("%s ->Test = %f", hdata->GetName(), rv)) ; 
+            test[specie] += rv ; 
+            count[specie]++ ; 
+          }
+        } else
+          AliError(Form("%s Is a Classname that cannot be processed", key->GetClassName())) ;
+      }
+      if (count[specie] != 0) 
+        test[specie] /= count[specie] ;
+    }
+  }
+       return test ;
 }  
 
 //____________________________________________________________________________
-Double_t AliQACheckerBase::Check(AliQA::ALITASK_t /*index*/, TObjArray * list) 
+Double_t * AliQACheckerBase::Check(AliQA::ALITASK_t /*index*/, TObjArray ** list) 
 {
   // Performs a basic checking
   // Compares all the histograms in the list
 
-       Double_t test = 0.0  ;
-       Int_t count = 0 ; 
-
-       if (list->GetEntries() == 0)  
-               test = 1. ; // nothing to check
-       else {
-               if (!fRefSubDir)
-                       test = -1 ; // no reference data
-               else {
-                       TIter next(list) ; 
-                       TH1 * hdata ;
-                       count = 0 ; 
-                       while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
-                               if ( hdata) { 
-                                       TH1 * href = NULL ; 
-                                       if (fRefSubDir) 
-                                               href  = static_cast<TH1*>(fRefSubDir->Get(hdata->GetName())) ;
-                                       else if (fRefOCDBSubDir)
-                                               href  = static_cast<TH1*>(fRefOCDBSubDir->FindObject(hdata->GetName())) ;
-                                       if (!href) 
-                                               test = -1 ; // no reference data ; 
-                                       else {
-                                               Double_t rv =  DiffK(hdata, href) ;
-                                               AliInfo(Form("%s ->Test = %f", hdata->GetName(), rv)) ; 
-                                               test += rv ; 
-                                               count++ ; 
-                                       }
-                               } 
-                               else
-                                       AliError("Data type cannot be processed") ;
-                       }
-               }
-       }
-       if (count != 0) 
-               test /= count ;
+       Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
+       Int_t count[AliRecoParam::kNSpecies]   = { 0 }; 
+
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    test[specie] = 1.0 ; 
+    if ( !AliQA::Instance()->IsEventSpecieSet(specie) ) 
+      continue ; 
+    if (list[specie]->GetEntries() == 0)  
+      test[specie] = 0. ; // nothing to check
+    else {
+      if (!fRefSubDir && !fRefOCDBSubDir)
+        test[specie] = -1 ; // no reference data
+      else {
+        TIter next(list[specie]) ; 
+        TH1 * hdata ;
+        count[specie] = 0 ; 
+        while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
+          if ( hdata) { 
+            if ( hdata->TestBit(AliQA::GetExpertBit()) )  // does not perform the test for expert data
+              continue ; 
+            TH1 * href = NULL ; 
+            if (fRefSubDir) 
+              href  = static_cast<TH1*>(fRefSubDir->Get(hdata->GetName())) ;
+            else if (fRefOCDBSubDir[specie])
+              href  = static_cast<TH1*>(fRefOCDBSubDir[specie]->FindObject(hdata->GetName())) ;
+            if (!href) 
+              test[specie] = -1 ; // no reference data ; 
+            else {
+              Double_t rv =  DiffK(hdata, href) ;
+              AliInfo(Form("%s ->Test = %f", hdata->GetName(), rv)) ; 
+              test[specie] += rv ; 
+              count[specie]++ ; 
+            }
+          } 
+          else
+            AliError("Data type cannot be processed") ;
+        }
+        if (count[specie] != 0) 
+          test[specie] /= count[specie] ;
+      }
+    }
+  }
        return test ;
 }  
 
+
 //____________________________________________________________________________ 
 Double_t AliQACheckerBase::DiffC(const TH1 * href, const TH1 * hin) const
 {
@@ -191,36 +233,22 @@ Double_t AliQACheckerBase::DiffK(const TH1 * href, const TH1 * hin) const
   return hin->KolmogorovTest(href) ;  
 }
 
-//____________________________________________________________________________ 
-void AliQACheckerBase::Init(const AliQA::DETECTORINDEX_t det)
-{
-  AliQA::Instance(det) ; 
-}
-
 //____________________________________________________________________________
-void AliQACheckerBase::Run(AliQA::ALITASK_t index, TObject * obj
+void AliQACheckerBase::Run(AliQA::ALITASK_t index, TObjArray ** list
 { 
        AliDebug(1, Form("Processing %s", AliQA::GetAliTaskName(index))) ; 
   
-       Double_t rv = -1 ;      
-  if ( !obj ) {
+       Double_t * rv = NULL ;
+  if ( !list) 
     rv = Check(index) ;
-  } else { 
-    TString className(obj->IsA()->GetName()) ; 
-    if (className.Contains("TObjArray")) {
-      rv = Check(index, static_cast<TObjArray *>(obj)) ;
-    } else if (className.Contains("TNtupleD")) { 
-      rv = Check(index, static_cast<TNtupleD *>(obj)) ;
-    }  else {
-      AliError(Form("%s class not implemented", className.Data())) ; 
-    }
-  }
-  
+  else 
+    rv = Check(index, list) ;
        SetQA(index, rv) ;      
        
   AliDebug(1, Form("Test result of %s", AliQA::GetAliTaskName(index))) ;
        
+  if (rv) 
+    delete [] rv ; 
   Finish() ; 
 }
 
@@ -236,18 +264,43 @@ void AliQACheckerBase::Finish() const
 }
 
 //____________________________________________________________________________
-void AliQACheckerBase::SetQA(AliQA::ALITASK_t index, Double_t value) const
+void AliQACheckerBase::SetHiLo(Float_t * hiValue, Float_t * lowValue) 
 {
-       // sets the QA according the return value of the Check
+  AliInfo("Previous setting was:") ;
+  printf( "                      INFO    -> %1.5f <  value <  %1.5f \n", fLowTestValue[AliQA::kINFO], fUpTestValue[AliQA::kINFO]) ; 
+  printf( "                      WARNING -> %1.5f <  value <= %1.5f \n", fLowTestValue[AliQA::kWARNING], fUpTestValue[AliQA::kWARNING]) ; 
+  printf( "                      ERROR   -> %1.5f <  value <= %1.5f \n", fLowTestValue[AliQA::kERROR], fUpTestValue[AliQA::kERROR]) ; 
+  printf( "                      FATAL   -> %1.5f <= value <  %1.5f \n", fLowTestValue[AliQA::kFATAL], fUpTestValue[AliQA::kFATAL]) ; 
+  
+  for (Int_t index = 0 ; index < AliQA::kNBIT ; index++) {
+    fLowTestValue[index]  = lowValue[index] ; 
+    fUpTestValue[index] = hiValue[index] ; 
+  }
+  AliInfo("Current setting is:") ;
+  printf( "                      INFO    -> %1.5f <  value <  %1.5f \n", fLowTestValue[AliQA::kINFO], fUpTestValue[AliQA::kINFO]) ; 
+  printf( "                      WARNING -> %1.5f <  value <= %1.5f \n", fLowTestValue[AliQA::kWARNING], fUpTestValue[AliQA::kWARNING]) ; 
+  printf( "                      ERROR   -> %1.5f <  value <= %1.5f \n", fLowTestValue[AliQA::kERROR], fUpTestValue[AliQA::kERROR]) ; 
+  printf( "                      FATAL   -> %1.5f <= value <  %1.5f \n", fLowTestValue[AliQA::kFATAL], fUpTestValue[AliQA::kFATAL]) ; 
+}
 
-       AliQA * qa = AliQA::Instance(index) ; 
+//____________________________________________________________________________
+void AliQACheckerBase::SetQA(AliQA::ALITASK_t index, Double_t * value) const
+{
+       // sets the QA according the return value of the Check
 
-       if ( value <= 0.) 
-               qa->Set(AliQA::kFATAL) ; 
-       else if ( value > 0 && value <= 0.0002 )
-               qa->Set(AliQA::kERROR) ; 
-       else if ( value > 0.0002 && value <= 0.5 )
-               qa->Set(AliQA::kWARNING) ;
-       else if ( value > 0.5 && value < 1 ) 
-               qa->Set(AliQA::kINFO) ;                 
+  AliQA * qa = AliQA::Instance(index) ;
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    if (  value == NULL ) { // No checker is implemented, set all QA to Fatal
+      qa->Set(AliQA::kFATAL, specie) ; 
+    } else {
+      if ( value[specie] >= fLowTestValue[AliQA::kFATAL] && value[specie] < fUpTestValue[AliQA::kFATAL] ) 
+        qa->Set(AliQA::kFATAL, specie) ; 
+      else if ( value[specie] > fLowTestValue[AliQA::kERROR] && value[specie] <= fUpTestValue[AliQA::kERROR]  )
+        qa->Set(AliQA::kERROR, specie) ; 
+      else if ( value[specie] > fLowTestValue[AliQA::kWARNING] && value[specie] <= fUpTestValue[AliQA::kWARNING]  )
+        qa->Set(AliQA::kWARNING, specie) ;
+      else if ( value[specie] > fLowTestValue[AliQA::kINFO] && value[specie] <= fUpTestValue[AliQA::kINFO] ) 
+        qa->Set(AliQA::kINFO, specie) ;        
+    }
+  }
 }
index 4010b90d8b1548a811c13ce999b86bbe4eb04c8f..74686ea0a65c7611d3f409a6caf58249879f9381 100644 (file)
@@ -32,24 +32,28 @@ public:
   AliQACheckerBase(const char * name = "", const char * title = "") ;          // ctor
   AliQACheckerBase(const AliQACheckerBase& qac) ;   
   AliQACheckerBase& operator = (const AliQACheckerBase& qac) ;
-  virtual ~AliQACheckerBase() {;} // dtor
+  virtual ~AliQACheckerBase() ; // dtor
 
-  void   Init(const AliQA::DETECTORINDEX_t det) ; 
-  void   Run(AliQA::ALITASK_t tsk, TObject * obj = NULL); 
-  void   SetRefandData(TDirectory * ref, TObjArray * refOCDB, TDirectory * data=NULL) { fRefSubDir = ref ;  fRefOCDBSubDir = refOCDB, fDataSubDir = data ; }
+  virtual void   Init(const AliQA::DETECTORINDEX_t det)   { AliQA::Instance(det) ; }
+  void           Run(AliQA::ALITASK_t tsk, TObjArray ** list = NULL); 
+  void           Run(AliQA::ALITASK_t /*tsk*/, TNtupleD ** /*nt*/) {;} 
+  void           SetHiLo(Float_t * hiValue, Float_t * lowValue) ; 
+  void           SetRefandData(TDirectory * ref, TObjArray ** refOCDB, TDirectory * data=NULL) { fRefSubDir = ref ;  fRefOCDBSubDir = refOCDB, fDataSubDir = data ; }
 
 protected:
-  virtual Double_t Check(AliQA::ALITASK_t index) ;
-  virtual Double_t Check(AliQA::ALITASK_t, TObjArray *) ; 
-  virtual Double_t Check(AliQA::ALITASK_t, TNtupleD *) { return -1.0 ;} 
-  Double_t DiffC(const TH1 * href, const TH1 * hin) const ;   
-  Double_t DiffK(const TH1 * href, const TH1 * hin) const ;   
-  void           Finish() const ; 
-  virtual void   SetQA(AliQA::ALITASK_t index, Double_t value) const ; 
-
-  TDirectory  * fDataSubDir    ; //! directory for the current task directory in the current detector directory in the data file
-  TDirectory  * fRefSubDir     ; //! directory for the current task directory in the current detector directory in the reference file
-  TObjArray   * fRefOCDBSubDir ; //! Entry in OCDB for the current detector 
+  virtual      Double_t * Check(AliQA::ALITASK_t index) ;
+  virtual      Double_t * Check(AliQA::ALITASK_t, TObjArray **) ; 
+
+  Double_t     DiffC(const TH1 * href, const TH1 * hin) const ;   
+  Double_t     DiffK(const TH1 * href, const TH1 * hin) const ;   
+  void         Finish() const ; 
+  virtual void SetQA(AliQA::ALITASK_t index, Double_t * value) const ; 
+
+  TDirectory  * fDataSubDir     ; //! directory for the current task directory in the current detector directory in the data file
+  TDirectory  * fRefSubDir      ; //! directory for the current task directory in the current detector directory in the reference file
+  TObjArray   ** fRefOCDBSubDir ; //! Entry in OCDB for the current detector 
+  Float_t     * fLowTestValue   ; // array of lower bounds for INFO, WARNING, ERROR, FATAL   
+  Float_t     * fUpTestValue    ; // array of upper bounds for INFO, WARNING, ERROR, FATAL   
 
   ClassDef(AliQACheckerBase,1)  // description 
 
index bbd3da17549de6d71eef01f35951835ff1be842b..e5bebb907347683162f7ae04974eb138b7ecc270 100644 (file)
 #include <TTree.h>
 #include <TClonesArray.h>
 #include <TParameter.h>
+#include <TH1K.h>
+#include <TH2C.h>
+#include <TH2D.h>
+#include <TH2F.h>
+#include <TH2I.h>
+#include <TH3C.h>
+#include <TH3D.h>
+#include <TH3F.h>
+#include <TH3I.h>
+#include <TH3S.h>
 
 // --- Standard library ---
 
@@ -52,11 +62,14 @@ AliQADataMaker::AliQADataMaker(const char * name, const char * title) :
   fCycle(9999999), 
   fCycleCounter(0), 
   fWriteExpert(kFALSE),
-  fParameterList(0x0), 
-  fRun(0)
+  fParameterList(new TList*[AliRecoParam::kNSpecies]), 
+  fRun(0), 
+  fEventSpecie(AliRecoParam::kDefault)
 {
   // ctor
   fDetectorDirName = GetName() ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    fParameterList[specie] = NULL ; 
 }
 
 //____________________________________________________________________________ 
@@ -70,41 +83,54 @@ AliQADataMaker::AliQADataMaker(const AliQADataMaker& qadm) :
   fCycleCounter(qadm.fCycleCounter), 
   fWriteExpert(qadm.fWriteExpert),
   fParameterList(qadm.fParameterList),  
-  fRun(qadm.fRun)
+  fRun(qadm.fRun), 
+  fEventSpecie(qadm.fEventSpecie)
 {
   //copy ctor
   fDetectorDirName = GetName() ; 
 }
 
 //____________________________________________________________________________
-Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray * list, const Bool_t expert, const Bool_t saveForCorr) 
+Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray ** list, const Bool_t expert, const Bool_t saveForCorr) 
 { 
        // Set histograms memory resident and add to the list
        // Maximm allowed is 10000
-        TString className(hist->ClassName()) ;
-        if( ! className.BeginsWith("T") ) {
-               AliError(Form("QA data Object must be a generic ROOT object and not %s", className.Data())) ; 
-//             return -1 ;
-       }
-       if ( index > 10000 ) {
+  
+  Int_t rv = -1 ; 
+  TClass * classType = hist->Class() ;
+  TString className(classType->GetName()) ; 
+  if( ! className.BeginsWith("T") && ! classType->InheritsFrom("TH1") ) {
+    AliError(Form("QA data Object must be a generic ROOT object and derive fom TH1 and not %s", className.Data())) ; 
+       } else if ( index > 10000 ) {
                AliError("Max number of authorized QA objects is 10000") ; 
-               return -1 ; 
-       } else {
-               hist->SetDirectory(0) ; 
-    
+  } else {    
     if (expert) 
       hist->SetBit(AliQA::GetExpertBit()) ; 
-               
-    list->AddAtAndExpand(hist, index) ; 
-    char * name = Form("%s_%s", list->GetName(), hist->GetName()) ;  
-    TParameter<double> * p = new TParameter<double>(name, 9999.9999) ;
-    if(saveForCorr) {  
-      if ( ! fParameterList )
-        fParameterList = new TList() ; 
-      fParameterList->Add(p) ;
+               TH1 * histClone[AliRecoParam::kNSpecies] ; 
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      histClone[specie] = CloneMe(hist, specie) ; 
+      histClone[specie]->SetDirectory(0) ; 
+      list[specie]->AddAtAndExpand(histClone[specie], index) ; 
+      if(saveForCorr) {  
+        char * name = Form("%s_%s", list[AliRecoParam::kDefault]->GetName(), hist->GetName()) ;  
+        TParameter<double> * p = new TParameter<double>(name, 9999.9999) ;
+        if ( fParameterList[specie] == NULL )
+          fParameterList[specie] = new TList() ; 
+        fParameterList[specie]->Add(p) ;
+      }
     }
-    return list->GetLast() ;
+    rv = list[AliRecoParam::kDefault]->GetLast() ;
   }
+  delete hist ; 
+  return rv ; 
+}
+
+//____________________________________________________________________________
+TH1 *  AliQADataMaker::CloneMe(TH1 * hist, Int_t specie) const  
+{
+  // clones a histogram 
+  char * name = Form("%s_%s", AliRecoParam::GetEventSpecieName(specie), hist->GetName()) ;
+  return dynamic_cast<TH1 *>(hist->Clone(name)) ; 
 }
 
 //____________________________________________________________________________
@@ -114,7 +140,8 @@ void AliQADataMaker::DefaultEndOfDetectorCycle(AliQA::TASKINDEX_t task)
        // sets the QA result to Fatal
        AliQA::Instance(AliQA::GetDetIndex(GetName())) ;
        AliQA * qa = AliQA::Instance(task) ;
-       qa->Set(AliQA::kFATAL) ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    qa->Set(AliQA::kFATAL, specie) ; 
        AliQA::GetQAResultFile()->cd() ; 
        qa->Write(AliQA::GetQAName(), kWriteDelete) ;   
        AliQA::GetQAResultFile()->Close() ; 
@@ -129,17 +156,18 @@ void AliQADataMaker::Finish() const
 } 
 
 //____________________________________________________________________________ 
-TObject * AliQADataMaker::GetData(TObjArray * list, const Int_t index)  
+TObject * AliQADataMaker::GetData(TObjArray ** list, const Int_t index)  
 { 
        // Returns the QA object at index. Limit is 100. 
-       if (list) {
+       if (list[AliRecoParam::AConvert(fEventSpecie)]) {
                if ( index > 10000 ) {
                        AliError("Max number of authorized QA objects is 10000") ; 
                        return NULL ; 
                } else {
-                       return list->At(index) ; 
+      Int_t esindex = AliRecoParam::AConvert(fEventSpecie) ; 
+      return list[esindex]->At(index) ; 
                }       
-       } else {
+  } else {
                AliError("Data list is NULL !!") ; 
                return NULL ;           
        }
index 56b9974f0dc302f60cce1eb70d2e2ae2d377e27e..57a6336ce9f356405a8a34c8f65a4a21cbaedf2a 100644 (file)
@@ -31,6 +31,7 @@ class AliDetectorRecoParam;
 
 // --- AliRoot header files ---
 #include "AliQA.h"
+#include "AliRecoParam.h" 
 
 class AliQADataMaker: public TNamed {
   
@@ -46,9 +47,9 @@ public:
        virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE)       = 0 ; 
        virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE)            = 0 ; 
        virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE)         = 0 ; 
-       virtual void        Exec(AliQA::TASKINDEX_t, TObject * data)         = 0 ;
-       virtual void        EndOfCycle()                                     = 0 ;
-       virtual void        EndOfCycle(AliQA::TASKINDEX_t)                   = 0 ;
+       virtual void        Exec(AliQA::TASKINDEX_t, TObject * data)                                       = 0 ;
+       virtual void        EndOfCycle()                                           = 0 ;
+       virtual void        EndOfCycle(AliQA::TASKINDEX_t        )                 = 0 ;
        void                Finish() const ; 
        virtual TH1 *       GetDigitsData(const Int_t index)                       = 0 ; 
        virtual TH1 *       GetESDsData(const Int_t index)                         = 0 ; 
@@ -57,27 +58,29 @@ public:
        virtual TH1 *       GetRawsData(const Int_t index)                         = 0 ; 
        virtual TH1 *       GetSDigitsData(const Int_t index)                      = 0 ; 
        const char *        GetDetectorDirName() const { return fDetectorDirName.Data() ; }
-  TList *             GetParameterList() const { return fParameterList ; }
-       Int_t         Increment() { return ++fCycleCounter ; } 
-       virtual TObjArray * Init(AliQA::TASKINDEX_t, Int_t cycles = -1)                              = 0 ;
-       virtual void        Init(AliQA::TASKINDEX_t, TObjArray * list, Int_t run, Int_t cycles = -1) = 0 ;
-       Bool_t        IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; }
+  TList *             GetParameterList() const { return fParameterList[AliRecoParam::AConvert(fEventSpecie)] ; }
+       Int_t               Increment() { return ++fCycleCounter ; } 
+       virtual TObjArray** Init(AliQA::TASKINDEX_t, Int_t cycles = -1)                               = 0 ;
+       virtual void        Init(AliQA::TASKINDEX_t, TObjArray ** list, Int_t run, Int_t cycles = -1) = 0 ;
+       Bool_t              IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; }
        void                Reset() { fCycleCounter = 0 ; }
        void                SetCycle(Int_t nevts) { fCycle = nevts ; } 
   void                SetWriteExpert() { fWriteExpert = kTRUE ; }
-       virtual void        StartOfCycle(Int_t run = -1)                                                      = 0 ;
+       virtual void        StartOfCycle(Int_t run = -1)                                                 = 0 ;
        virtual void        StartOfCycle(AliQA::TASKINDEX_t, Int_t run, const Bool_t sameCycle = kFALSE) = 0 ;
   void                UnSetWriteExpert() { fWriteExpert = kFALSE ; }
   Bool_t              WriteExpert() { return fWriteExpert ; }
-
-       virtual void        SetRecoParam(const AliDetectorRecoParam */*param*/) { return; }
+  void                SetEventSpecie(AliRecoParam::EventSpecie_t es) { fEventSpecie = es ; }
+  void                SetEventSpecie(Int_t es) { fEventSpecie = AliRecoParam::Convert(es) ; }
+       virtual void        SetRecoParam(const AliDetectorRecoParam */*param*/) {AliInfo("To be implemented by AliQADataMakerRec, not needed yet in Sim") ; } 
          
 protected: 
 
-       Int_t          Add2List(TH1 * hist, const Int_t index, TObjArray * list, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE) ;
+       Int_t          Add2List(TH1 * hist, const Int_t index, TObjArray ** list, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE) ;
+  TH1 *          CloneMe(TH1 * hist, Int_t specie) const ; 
        virtual void   DefaultEndOfDetectorCycle(AliQA::TASKINDEX_t task ) ; 
-       virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * obj ) = 0 ; 
-       TObject *      GetData(TObjArray * list, const Int_t index) ;
+       virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list ) = 0 ; 
+       TObject *      GetData(TObjArray ** list, const Int_t index) ;
        virtual void   InitDigits()        = 0 ; 
        virtual void   InitESDs()          = 0 ; 
        virtual void   InitHits()          = 0 ; 
@@ -107,9 +110,9 @@ protected:
        Int_t          fCycle ;           //! length (# events) of the QA data acquisition cycle  
        Int_t          fCycleCounter ;    //! cycle counter
   Bool_t         fWriteExpert ;     //! flag to write or not the expert QA data
-  TList *        fParameterList ;   //! list of QA data parameters
+  TList **       fParameterList ;   //! list of QA data parameters
        Int_t          fRun ;             //! run number
-
+  AliRecoParam::EventSpecie_t fEventSpecie ; //! event specie, see AliRecoParam
 private:
        AliQADataMaker& operator = (const AliQADataMaker& /*qadm*/); // Not implemented
 
index 93e2981214ca3d7ff8c9fc993a3581b7dc46a554..0a0dafbe5026d0ec9c808ce15174d6d17a79f17f 100644 (file)
@@ -26,6 +26,7 @@
 // --- ROOT system ---
 #include <TFile.h>
 #include <TTree.h>
+#include <TNtupleD.h>
 
 // --- Standard library ---
 
@@ -43,7 +44,7 @@ AliQADataMakerRec::AliQADataMakerRec(const char * name, const char * title) :
   fESDsQAList(NULL), 
   fRawsQAList(NULL), 
   fRecPointsQAList(NULL),
-  fObject(NULL), 
+  fCorrNt(NULL), 
   fRecoParam(NULL) 
 {
   // ctor
@@ -56,7 +57,7 @@ AliQADataMakerRec::AliQADataMakerRec(const AliQADataMakerRec& qadm) :
   fESDsQAList(qadm.fESDsQAList),
   fRawsQAList(qadm.fRawsQAList),
   fRecPointsQAList(qadm.fRecPointsQAList),
-  fObject(qadm.fObject),  
+  fCorrNt(qadm.fCorrNt),  
   fRecoParam(qadm.fRecoParam) 
 {
   //copy ctor
@@ -70,19 +71,31 @@ AliQADataMakerRec::~AliQADataMakerRec()
 {
        //dtor: delete the TObjArray and thei content
        if ( fESDsQAList ) {
-               if ( fESDsQAList->IsOwner() ) 
-                       fESDsQAList->Delete() ;     
-               delete fESDsQAList ;     
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      if ( fESDsQAList[specie] ) {
+        if ( fESDsQAList[specie]->IsOwner() ) 
+          fESDsQAList[specie]->Delete() ;     
+      }
+    }
+    delete[] fESDsQAList ;
        }
        if ( fRawsQAList ) {
-               if ( fRawsQAList->IsOwner() ) 
-                       fRawsQAList->Delete() ;
-               delete fRawsQAList ;
-       }
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      if ( fRawsQAList[specie] ) {
+        if ( fRawsQAList[specie]->IsOwner() ) 
+          fRawsQAList[specie]->Delete() ;
+      }
+    }
+    delete[] fRawsQAList ;
+  }
        if ( fRecPointsQAList ) {
-               if ( fRecPointsQAList->IsOwner() ) 
-                       fRecPointsQAList->Delete() ; 
-               delete fRecPointsQAList ; 
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      if ( fRecPointsQAList[specie] ) {
+        if ( fRecPointsQAList[specie]->IsOwner() ) 
+          fRecPointsQAList[specie]->Delete() ;
+      }
+    }
+               delete[] fRecPointsQAList ; 
        }
 }
 
@@ -110,7 +123,7 @@ void AliQADataMakerRec::EndOfCycle(AliQA::TASKINDEX_t task)
 {
        // Finishes a cycle of QA 
        
-       TObjArray * list = NULL ; 
+       TObjArray ** list = NULL ; 
        
        if ( task == AliQA::kRAWS )     
                list = fRawsQAList ; 
@@ -120,7 +133,7 @@ void AliQADataMakerRec::EndOfCycle(AliQA::TASKINDEX_t task)
                list = fESDsQAList ; 
 
  
-       if ( ! list && ! fObject ) 
+       if ( ! list && ! fCorrNt ) 
     return ; 
   //DefaultEndOfDetectorCycle(task) ;
        EndOfDetectorCycle(task, list) ;
@@ -129,30 +142,38 @@ void AliQADataMakerRec::EndOfCycle(AliQA::TASKINDEX_t task)
                subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ; 
        if ( subDir ) {
                subDir->cd() ; 
-               if (list) {
-      TIter next(list) ; 
-      TObject * obj ; 
-      while( (obj = next()) ) {
-        if (!obj->TestBit(AliQA::GetExpertBit()))
-          obj->Write() ;
-      }
-      if (WriteExpert()) {
-        TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; 
-        if ( expertDir ) { // Write only if requested
-          expertDir->cd() ;
-          next.Reset() ; 
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(specie)) ;
+      if (eventSpecieDir) {
+        eventSpecieDir->cd() ;    
+        if (list[specie]) {
+          TIter next(list[specie]) ; 
+          TObject * obj ; 
           while( (obj = next()) ) {
             if (!obj->TestBit(AliQA::GetExpertBit()))
-              continue ; 
-            obj->Write() ;
-          }      
+              obj->Write() ;
+          }
+          if (WriteExpert()) {
+            TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQA::GetExpert()) ; 
+            if ( expertDir ) { // Write only if requested
+              expertDir->cd() ;
+              next.Reset() ; 
+              while( (obj = next()) ) {
+                if (!obj->TestBit(AliQA::GetExpertBit()))
+                  continue ; 
+                obj->Write() ;
+              }      
+            }
+          }
+        }
+        if ( !fCorrNt )
+          continue ; 
+        if (fCorrNt[specie] && AliQA::GetDetIndex(GetName()) == AliQA::kCORR) {
+          eventSpecieDir->cd() ; 
+          fCorrNt[specie]->Write() ; 
         }
       }
     }
-    if (fObject && AliQA::GetDetIndex(GetName()) == AliQA::kCORR) {
-      subDir->cd() ; 
-      fObject->Write() ; 
-    }
     fOutput->Save() ; 
        }
 }
@@ -188,43 +209,51 @@ void AliQADataMakerRec::Exec(AliQA::TASKINDEX_t task, TObject * data)
 }
 
 //____________________________________________________________________________ 
-TObjArray *  AliQADataMakerRec::Init(AliQA::TASKINDEX_t task, Int_t cycles)
+TObjArray **  AliQADataMakerRec::Init(AliQA::TASKINDEX_t task, Int_t cycles)
 {
   // general intialisation
-       
-       TObjArray * rv = NULL ; 
+
+       TObjArray ** rv = NULL ; 
   
        if (cycles > 0)
                SetCycle(cycles) ;  
        
        if ( task == AliQA::kRAWS ) {
                if (! fRawsQAList ) { 
-                       fRawsQAList = new TObjArray(100) ;       
-      fRawsQAList->SetName(Form("%s_%s", GetName(), AliQA::GetTaskName(task).Data())) ; 
+      fRawsQAList = new TObjArray *[AliRecoParam::kNSpecies] ; 
+      for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+        fRawsQAList[specie] = new TObjArray(100) ;      
+        fRawsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
+      }
                        InitRaws() ;
                }
                rv = fRawsQAList ;
        } else if ( task == AliQA::kRECPOINTS ) {
                if ( ! fRecPointsQAList ) {
-                       fRecPointsQAList = new TObjArray(100) ; 
-      fRecPointsQAList->SetName(Form("%s_%s", GetName(), AliQA::GetTaskName(task).Data())) ; 
-                       InitRecPoints() ;
+      fRecPointsQAList = new TObjArray *[AliRecoParam::kNSpecies] ; 
+      for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+        fRecPointsQAList[specie] = new TObjArray(100) ; 
+        fRecPointsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ; 
+      }
+      InitRecPoints() ;
                }
                rv = fRecPointsQAList ;
        } else if ( task == AliQA::kESDS ) {
                if ( ! fESDsQAList ) {
-                       fESDsQAList = new TObjArray(100) ;
-      fESDsQAList->SetName(Form("%s_%s", GetName(), AliQA::GetTaskName(task).Data())) ; 
+      fESDsQAList = new TObjArray *[AliRecoParam::kNSpecies] ; 
+      for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+        fESDsQAList[specie] = new TObjArray(100) ;
+        fESDsQAList[specie]->SetName(Form("%s_%s", GetName(), AliQA::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ; 
+      }
                        InitESDs() ;
                }
                rv = fESDsQAList ;
        }
-       
        return rv ; 
 }
 
 //____________________________________________________________________________ 
-void AliQADataMakerRec::Init(AliQA::TASKINDEX_t task, TObjArray * list, Int_t run, Int_t cycles)
+void AliQADataMakerRec::Init(AliQA::TASKINDEX_t task, TObjArray ** list, Int_t run, Int_t cycles)
 {
   // Intialisation by passing the list of QA data booked elsewhere
   
@@ -274,13 +303,14 @@ void AliQADataMakerRec::StartOfCycle(AliQA::TASKINDEX_t task, Int_t run, const B
        TDirectory * subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ; 
        if (!subDir)
                subDir = fDetectorDir->mkdir(AliQA::GetTaskName(task)) ;  
-  TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; 
-  if (!expertDir)
-    expertDir = subDir->mkdir(AliQA::GetExpert()) ; 
   
-       subDir->cd() ; 
-  
-
+  for ( Int_t specie = AliRecoParam::kDefault ; specie < AliRecoParam::kNSpecies ; specie++ ) {
+    TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(specie)) ; 
+    if (!eventSpecieDir) 
+      eventSpecieDir = subDir->mkdir(AliRecoParam::GetEventSpecieName(specie)) ; 
+    TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQA::GetExpert()) ; 
+    if (!expertDir)
+      expertDir = eventSpecieDir->mkdir(AliQA::GetExpert()) ; 
+  } 
        StartOfDetectorCycle() ; 
 }
index 925f555c062ccb57561ab6b94bc69e54d779abb5..e4a5659384a26f497b4aee33b25f1b6b03d25921 100644 (file)
@@ -14,7 +14,7 @@
 //
 
 // --- ROOT system ---
-
+class TNtupleD ; 
 // --- Standard library ---
 
 // --- AliRoot header files ---
@@ -39,15 +39,15 @@ public:
        virtual void        Exec(AliQA::TASKINDEX_t task, TObject * data) ;
        virtual void        EndOfCycle() ;
        virtual void        EndOfCycle(AliQA::TASKINDEX_t task) ;
-       virtual void        EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * ) {AliInfo("To be implemented by detectors");} 
-       virtual TH1 *       GetDigitsData(const Int_t /*index*/)    { return NULL ; } 
-       virtual TH1 *       GetESDsData(const Int_t index)      { return dynamic_cast<TH1 *>(GetData(fESDsQAList, index)) ; }
-       virtual TH1 *       GetHitsData(const Int_t /*index*/)      { return NULL ; }
-       virtual TH1 *       GetRecPointsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fRecPointsQAList, index)) ; }
-       virtual TH1 *       GetRawsData(const Int_t index)     { return fRawsQAList ? dynamic_cast<TH1 *>(GetData(fRawsQAList, index)) : NULL ; }
+       virtual void        EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** ) {AliInfo("To be implemented by detectors");} 
+       virtual TH1 *       GetDigitsData(const Int_t /*index*/) { return NULL ; } 
+       virtual TH1 *       GetESDsData(const Int_t index)       { return dynamic_cast<TH1 *>(GetData(fESDsQAList, index)) ; }
+       virtual TH1 *       GetHitsData(const Int_t /*index*/)   { return NULL ; }
+       virtual TH1 *       GetRecPointsData(const Int_t index)  { return dynamic_cast<TH1 *>(GetData(fRecPointsQAList, index)) ; }
+       virtual TH1 *       GetRawsData(const Int_t index)       { return dynamic_cast<TH1 *>(GetData(fRawsQAList, index))  ; }
        virtual TH1 *       GetSDigitsData(const Int_t /*index*/)   { return NULL ; }  
-       virtual TObjArray * Init(AliQA::TASKINDEX_t task, Int_t cycles = -1) ;
-       virtual void        Init(AliQA::TASKINDEX_t task, TObjArray * list, Int_t run, Int_t cycles = -1) ;
+       virtual TObjArray** Init(AliQA::TASKINDEX_t task, Int_t cycles = -1) ;
+       virtual void        Init(AliQA::TASKINDEX_t task, TObjArray ** list, Int_t run, Int_t cycles = -1) ;
        virtual void        StartOfCycle(Int_t run = -1) ;
        virtual void        StartOfCycle(AliQA::TASKINDEX_t task, Int_t run, const Bool_t sameCycle = kFALSE) ;
 
@@ -75,10 +75,10 @@ protected:
        virtual void   MakeSDigits(TTree * )               {AliWarning("Call not valid") ; }    
        virtual void   StartOfDetectorCycle()              {AliInfo("To be implemented by detectors");} 
 
-       TObjArray *                 fESDsQAList ;      //! list of the ESDs QA data objects
-       TObjArray *                 fRawsQAList ;      //! list of the raws QA data objects
-       TObjArray *                 fRecPointsQAList ; //! list of the RecPoints QA data objects
-  TObject   *                 fObject ;          //! This is used by Corr only to hold its Ntuple. Allows to write something else than TH1 to QA data file
+       TObjArray * *               fESDsQAList ;      //! list of the ESDs QA data objects
+       TObjArray * *               fRawsQAList ;      //! list of the raws QA data objects
+       TObjArray * *               fRecPointsQAList ; //! list of the RecPoints QA data objects
+  TNtupleD  * *               fCorrNt ;          //! This is used by Corr only to hold its Ntuple. 
   const AliDetectorRecoParam *fRecoParam;        //! const pointer to the reco parameters to be used in the reco QA
   
  ClassDef(AliQADataMakerRec,2)  // description 
index 128ef56b8c14ab17238c3ada09167c18adca7cf0..45b516e0689296db58e7dde3195030e86a6d7694 100644 (file)
@@ -63,19 +63,25 @@ AliQADataMakerSim::~AliQADataMakerSim()
 {
        //dtor: delete the TObjArray and thei content
        if ( fDigitsQAList ) { 
-               if ( fDigitsQAList->IsOwner() )
-                       fDigitsQAList->Delete() ;     
-               delete fDigitsQAList ;     
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      if ( fDigitsQAList[specie]->IsOwner() )
+                       fDigitsQAList[specie]->Delete() ;
+    }
+               delete[] fDigitsQAList ;     
        }
        if ( fHitsQAList ) {
-               if ( fHitsQAList->IsOwner() ) 
-                       fHitsQAList->Delete() ;
-               delete fHitsQAList ;
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      if ( fHitsQAList[specie]->IsOwner() ) 
+                       fHitsQAList[specie]->Delete() ;
+    }
+               delete[] fHitsQAList ;
        }
        if ( fSDigitsQAList ) { 
-               if ( fSDigitsQAList->IsOwner() ) 
-                       fSDigitsQAList->Delete() ; 
-               delete fSDigitsQAList ; 
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      if ( fSDigitsQAList[specie]->IsOwner() ) 
+                       fSDigitsQAList[specie]->Delete() ; 
+    }
+               delete[] fSDigitsQAList ; 
        }
 }
 
@@ -102,7 +108,7 @@ void AliQADataMakerSim::EndOfCycle()
 void AliQADataMakerSim::EndOfCycle(AliQA::TASKINDEX_t task) 
 { 
   // Finishes a cycle of QA data acquistion
-       TObjArray * list = 0x0 ; 
+       TObjArray ** list = NULL ; 
        
        if ( task == AliQA::kHITS ) 
                list = fHitsQAList ; 
@@ -119,26 +125,32 @@ void AliQADataMakerSim::EndOfCycle(AliQA::TASKINDEX_t task)
     subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ; 
        if (subDir) { 
                subDir->cd() ; 
-    TIter next(list) ; 
-    TH1 * obj ; 
-    while ( (obj = dynamic_cast<TH1 *>(next())) ) {
-      if (!obj->TestBit(AliQA::GetExpertBit()))
-        obj->Write() ;
-    }
-    if (WriteExpert()) {
-      TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; 
-      if ( expertDir ) {
-        expertDir->cd() ;
-        next.Reset() ; 
-        while ( (obj = dynamic_cast<TH1 *>(next())) ) {
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(specie)) ;
+      if (eventSpecieDir) {
+        eventSpecieDir->cd() ; 
+        TIter next(list[specie]) ; 
+        TObject * obj ; 
+        while ( (obj = next()) )  {
           if (!obj->TestBit(AliQA::GetExpertBit()))
-            continue ; 
-          obj->Write() ;
-        }      
+            obj->Write() ;
+        }
+        if (WriteExpert()) {
+          TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQA::GetExpert()) ; 
+          if ( expertDir ) {
+            expertDir->cd() ;
+            next.Reset() ; 
+            while ( (obj = next()) ) {
+              if (!obj->TestBit(AliQA::GetExpertBit()))
+                continue ; 
+            obj->Write() ;
+            }      
+          }
+        }
       }
     }
+    fOutput->Save() ; 
   }
-  fOutput->Save() ; 
   ResetCycle() ; 
 }
  
@@ -190,31 +202,40 @@ void AliQADataMakerSim::Exec(AliQA::TASKINDEX_t task, TObject * data)
 }
 
 //____________________________________________________________________________ 
-TObjArray *  AliQADataMakerSim::Init(AliQA::TASKINDEX_t task, Int_t cycles)
+TObjArray **  AliQADataMakerSim::Init(AliQA::TASKINDEX_t task, Int_t cycles)
 {
   // general intialisation
        
        if (cycles > 0)
                SetCycle(cycles) ;  
-       TObjArray * rv = NULL ; 
+       TObjArray ** rv = NULL ; 
        if ( task == AliQA::kHITS ) {
                if ( ! fHitsQAList ) {
-                       fHitsQAList = new TObjArray(100) ;       
-   fHitsQAList->SetName(Form("%s/%s", GetName(), AliQA::GetTaskName(task).Data())) ; 
+      fHitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ; 
+      for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+        fHitsQAList[specie] = new TObjArray(100) ;      
+        fHitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
+      }
                        InitHits() ;
                }
                rv = fHitsQAList ;
        } else if ( task == AliQA::kSDIGITS ) {
                if ( ! fSDigitsQAList ) {
-                       fSDigitsQAList = new TObjArray(100) ; 
-   fSDigitsQAList->SetName(Form("%s/%s", GetName(), AliQA::GetTaskName(task).Data())) ; 
-                       InitSDigits() ;
+      fSDigitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ; 
+      for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+        fSDigitsQAList[specie] = new TObjArray(100) ; 
+        fSDigitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ; 
+      }
+      InitSDigits() ;
                }
                rv = fSDigitsQAList ;
    } else if ( task == AliQA::kDIGITS ) {
           if ( ! fDigitsQAList ) {
-                  fDigitsQAList = new TObjArray(100) ;
-     fDigitsQAList->SetName(Form("%s/%s", GetName(), AliQA::GetTaskName(task).Data())) ; 
+       fDigitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ; 
+       for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {    
+         fDigitsQAList[specie] = new TObjArray(100) ;
+         fDigitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
+       }
                   InitDigits() ;
           }
           rv =  fDigitsQAList ;
@@ -224,7 +245,7 @@ TObjArray *  AliQADataMakerSim::Init(AliQA::TASKINDEX_t task, Int_t cycles)
 }
 
 //____________________________________________________________________________ 
-void AliQADataMakerSim::Init(AliQA::TASKINDEX_t task, TObjArray * list, Int_t run, Int_t cycles)
+void AliQADataMakerSim::Init(AliQA::TASKINDEX_t task, TObjArray ** list, Int_t run, Int_t cycles)
 {
   // Intialisation by passing the list of QA data booked elsewhere
   
@@ -276,11 +297,13 @@ void AliQADataMakerSim::StartOfCycle(AliQA::TASKINDEX_t task, Int_t run, const B
        if (!subDir)
                subDir = fDetectorDir->mkdir(AliQA::GetTaskName(task)) ;  
   
-  TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; 
-  if (!expertDir)
-    expertDir = subDir->mkdir(AliQA::GetExpert()) ; 
-
-       subDir->cd() ; 
-         
+  for ( Int_t index = AliRecoParam::kDefault ; index < AliRecoParam::kNSpecies ; index++ ) {
+    TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(index)) ; 
+    if (!eventSpecieDir) 
+      eventSpecieDir = subDir->mkdir(AliRecoParam::GetEventSpecieName(index)) ; 
+    TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQA::GetExpert()) ; 
+    if (!expertDir) 
+      expertDir = eventSpecieDir->mkdir(AliQA::GetExpert()) ; 
+   }   
        StartOfDetectorCycle() ; 
 }
index 0abc60759d4bdd3b2005e74b72cbccbbd9b3542a..99bc0be53fb44e179aa1440731ab69778aa047f0 100644 (file)
@@ -37,15 +37,15 @@ public:
        virtual void        Exec(AliQA::TASKINDEX_t task, TObject * data) ;
        virtual void        EndOfCycle() ;
        virtual void        EndOfCycle(AliQA::TASKINDEX_t task) ;
-       virtual void        EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * ) {AliInfo("To be implemented by detectors");} 
+       virtual void        EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** ) {AliInfo("To be implemented by detectors");} 
        virtual TH1 *       GetDigitsData(const Int_t index)    { return dynamic_cast<TH1 *>(GetData(fDigitsQAList, index)) ; }
        virtual TH1 *       GetESDsData(const Int_t /*index*/)      { return NULL ; }
        virtual TH1 *       GetHitsData(const Int_t index)      { return dynamic_cast<TH1 *>(GetData(fHitsQAList, index)) ; }
        virtual TH1 *       GetRecPointsData(const Int_t /*index*/) { return NULL ; }
        virtual TH1 *       GetRawsData(const Int_t /*index*/)      { return NULL ; } 
        virtual TH1 *       GetSDigitsData(const Int_t index)   { return dynamic_cast<TH1 *>(GetData(fSDigitsQAList, index)) ; }
-       virtual TObjArray * Init(AliQA::TASKINDEX_t task, Int_t cycles = -1) ;
-       virtual void        Init(AliQA::TASKINDEX_t task, TObjArray * list, Int_t run, Int_t cycles = -1) ;
+       virtual TObjArray** Init(AliQA::TASKINDEX_t task, Int_t cycles = -1) ;
+       virtual void        Init(AliQA::TASKINDEX_t task, TObjArray ** list, Int_t run, Int_t cycles = -1) ;
        virtual void        StartOfCycle(Int_t run = -1) ;
        virtual void        StartOfCycle(AliQA::TASKINDEX_t task, Int_t run, const Bool_t sameCycle = kFALSE) ;
 
@@ -68,9 +68,9 @@ protected:
        virtual void   MakeSDigits(TTree * )            {AliInfo("To be implemented by detectors");} 
        virtual void   StartOfDetectorCycle()           {AliInfo("To be implemented by detectors");} 
 
-       TObjArray *    fDigitsQAList ;    //! list of the digits QA data objects
-       TObjArray *    fHitsQAList ;      //! list of the hits QA data objects
-       TObjArray *    fSDigitsQAList ;   //! list of the sdigits QA data objects
+       TObjArray *    fDigitsQAList ;    //! list of the digits QA data objects
+       TObjArray *    fHitsQAList ;      //! list of the hits QA data objects
+       TObjArray * *   fSDigitsQAList ;   //! list of the sdigits QA data objects
   
  ClassDef(AliQADataMakerSim,1)  // description 
 
index 0c5a1aaf54ba5782fcb308dc40cd26402b2a2830..f928b7a4bfd4514bdf51346f32589e1e26eb5d81 100644 (file)
@@ -80,7 +80,8 @@ AliQADataMakerSteer::AliQADataMakerSteer(const Char_t * mode, const Char_t* gAli
        fRawReader(NULL), 
        fRawReaderDelete(kTRUE), 
        fRunLoader(NULL), 
-  fTasks("")
+  fTasks(""), 
+  fEventSpecie(AliRecoParam::kDefault)
 {
        // default ctor
        fMaxEvents = fNumberOfEvents ; 
@@ -89,7 +90,7 @@ AliQADataMakerSteer::AliQADataMakerSteer(const Char_t * mode, const Char_t* gAli
                        fLoader[iDet]      = NULL ;
                        fQADataMaker[iDet] = NULL ;
                        fQACycles[iDet]    = 999999 ;
-      fQAWriteExpert[iDet] = kFALSE ;
+      fQAWriteExpert[iDet] = kTRUE ;
                }
        }       
 }
@@ -113,7 +114,8 @@ AliQADataMakerSteer::AliQADataMakerSteer(const AliQADataMakerSteer & qas) :
        fRawReader(NULL), 
        fRawReaderDelete(kTRUE), 
        fRunLoader(NULL), 
-  fTasks(qas.fTasks)
+  fTasks(qas.fTasks),
+  fEventSpecie(qas.fEventSpecie)
 {
        // cpy ctor
        for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
@@ -181,7 +183,7 @@ Bool_t AliQADataMakerSteer::DoIt(const AliQA::TASKINDEX_t taskIndex)
                                AliQADataMaker * qadm = GetQADataMaker(iDet) ;
                                if (!qadm) continue; // This detector doesn't have any QA (for example, HLT)
                                if ( qadm->IsCycleDone() ) {
-                                       qadm->EndOfCycle(taskIndex) ;
+          qadm->EndOfCycle(taskIndex) ;
                                }
                                TTree * data = NULL ; 
                                AliLoader* loader = GetLoader(qadm->GetUniqueID());
@@ -265,7 +267,8 @@ Bool_t AliQADataMakerSteer::Finish(const AliQA::TASKINDEX_t taskIndex)
        for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
                if (IsSelected(AliQA::GetDetName(iDet))) {
                        AliQADataMaker * qadm = GetQADataMaker(iDet) ;
-                       if (qadm) qadm->EndOfCycle(taskIndex) ; 
+                       if (qadm) 
+        qadm->EndOfCycle(taskIndex) ;
                }
        }
        return kTRUE ; 
@@ -337,12 +340,14 @@ AliLoader * AliQADataMakerSteer::GetLoader(Int_t iDet)
 }
 
 //_____________________________________________________________________________
-AliQADataMaker * AliQADataMakerSteer::GetQADataMaker(const Int_t iDet)
+AliQADataMaker * AliQADataMakerSteer::GetQADataMaker(const Int_t iDet) 
 {
        // get the quality assurance data maker for a detector
        
-       if (fQADataMaker[iDet]) 
+       if (fQADataMaker[iDet]) {
+    fQADataMaker[iDet]->SetEventSpecie(fEventSpecie) ; 
                return fQADataMaker[iDet] ;
+  }
        
        AliQADataMaker * qadm = NULL ;
        
@@ -351,6 +356,7 @@ AliQADataMaker * AliQADataMakerSteer::GetQADataMaker(const Int_t iDet)
                qadm->SetName(AliQA::GetDetName(iDet));
                qadm->SetUniqueID(iDet);
                fQADataMaker[iDet] = qadm;
+    qadm->SetEventSpecie(fEventSpecie) ; 
                return qadm;
        }
 
@@ -359,6 +365,7 @@ AliQADataMaker * AliQADataMakerSteer::GetQADataMaker(const Int_t iDet)
                qadm->SetName(AliQA::GetDetName(iDet));
                qadm->SetUniqueID(iDet);
                fQADataMaker[iDet] = qadm;
+    qadm->SetEventSpecie(fEventSpecie) ; 
                return qadm;
   }
 
@@ -393,9 +400,10 @@ AliQADataMaker * AliQADataMakerSteer::GetQADataMaker(const Int_t iDet)
                qadm->SetName(AliQA::GetDetName(iDet));
                qadm->SetUniqueID(iDet);
                fQADataMaker[iDet] = qadm ;
+    qadm->SetEventSpecie(fEventSpecie) ; 
        }
-       
-               return qadm ;
+
+  return qadm ;
 }
 
 //_____________________________________________________________________________
@@ -523,15 +531,14 @@ Bool_t AliQADataMakerSteer::Init(const AliQA::TASKINDEX_t taskIndex, const  char
        if ( !  AliGeomManager::GetGeometry() ) 
                AliGeomManager::LoadGeometry() ; 
        
-       InitQADataMaker(fRunNumber, fRecoParam, detArray) ; //, fCycleSame, kTRUE, detArray) ; 
+       InitQADataMaker(fRunNumber, detArray) ; //, fCycleSame, kTRUE, detArray) ; 
        return kTRUE ; 
 }
 
 //_____________________________________________________________________________
-void  AliQADataMakerSteer::InitQADataMaker(UInt_t run, const AliRecoParam & par, TObjArray * detArray) 
+void  AliQADataMakerSteer::InitQADataMaker(UInt_t run, TObjArray * detArray) 
 {
        // Initializes The QADataMaker for all active detectors and for all active tasks 
-
        for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
                if (IsSelected(AliQA::GetDetName(iDet))) {
                        AliQADataMaker * qadm = GetQADataMaker(iDet) ;
@@ -539,6 +546,8 @@ void  AliQADataMakerSteer::InitQADataMaker(UInt_t run, const AliRecoParam & par,
                                AliError(Form("AliQADataMaker not found for %s", AliQA::GetDetName(iDet))) ; 
                                fDetectorsW.ReplaceAll(AliQA::GetDetName(iDet), "") ; 
                        } else {
+        if (fQAWriteExpert[iDet])
+          qadm->SetWriteExpert() ; 
                                AliDebug(1, Form("Data Maker found for %s", qadm->GetName())) ; 
                                // skip non active detectors
                                if (detArray) {
@@ -548,12 +557,11 @@ void  AliQADataMakerSteer::InitQADataMaker(UInt_t run, const AliRecoParam & par,
                                }
                                if (fQAWriteExpert[iDet]) qadm->SetWriteExpert() ; 
              // Set default reco params
-                               qadm->SetRecoParam(par.GetDetRecoParam(iDet));
         Bool_t sameCycle = kFALSE ; 
                                for (UInt_t taskIndex = 0; taskIndex < AliQA::kNTASKINDEX; taskIndex++) {
                                        if ( fTasks.Contains(Form("%d", taskIndex)) ) {
-            qadm->StartOfCycle(AliQA::GetTaskIndex(AliQA::GetTaskName(taskIndex)), run,  sameCycle) ;
                                                qadm->Init(AliQA::GetTaskIndex(AliQA::GetTaskName(taskIndex)), GetQACycles(qadm->GetUniqueID())) ;
+            qadm->StartOfCycle(AliQA::GetTaskIndex(AliQA::GetTaskName(taskIndex)), run,  sameCycle) ;
             sameCycle = kTRUE ;
                                        }
                                }
@@ -877,6 +885,7 @@ void AliQADataMakerSteer::RunOneEvent(AliRawReader * rawReader)
         qadm->EndOfCycle() ;
       }
       AliCodeTimerStart(Form("running RAW quality assurance data maker for %s", AliQA::GetDetName(iDet))); 
+      qadm->SetEventSpecie(fEventSpecie) ; 
                        qadm->Exec(AliQA::kRAWS, rawReader) ;
       AliCodeTimerStop(Form("running RAW quality assurance data maker for %s", AliQA::GetDetName(iDet)));
                }
@@ -927,7 +936,7 @@ void AliQADataMakerSteer::RunOneEventInOneDetector(Int_t det, TTree * tree)
 }
 
 //_____________________________________________________________________________
-Bool_t AliQADataMakerSteer::Save2OCDB(const Int_t runNumber, const char * year, const char * detectors) const
+Bool_t AliQADataMakerSteer::Save2OCDB(const Int_t runNumber, AliRecoParam::EventSpecie_t es, const char * year, const char * detectors) const
 {
        // take the locasl QA data merge into a single file and save in OCDB 
        Bool_t rv = kTRUE ; 
@@ -949,13 +958,13 @@ Bool_t AliQADataMakerSteer::Save2OCDB(const Int_t runNumber, const char * year,
                        return kFALSE ; 
                TString inputFileName(Form("Merged.%s.Data.%d.root", AliQA::GetQADataFileName(), runNumber)) ; 
                inputFile = TFile::Open(inputFileName.Data()) ; 
-               rv = SaveIt2OCDB(runNumber, inputFile, year) ; 
+               rv = SaveIt2OCDB(runNumber, inputFile, year, es) ; 
        } else {
                for (Int_t index = 0; index < AliQA::kNDET; index++) {
                        if (sdet.Contains(AliQA::GetDetName(index))) {
                                TString inputFileName(Form("%s.%s.%d.root", AliQA::GetDetName(index), AliQA::GetQADataFileName(), runNumber)) ; 
                                inputFile = TFile::Open(inputFileName.Data()) ;                         
-                               rv *= SaveIt2OCDB(runNumber, inputFile, year) ; 
+                               rv *= SaveIt2OCDB(runNumber, inputFile, year, es) ; 
                        }
                }
        }
@@ -963,7 +972,7 @@ Bool_t AliQADataMakerSteer::Save2OCDB(const Int_t runNumber, const char * year,
 }
 
 //_____________________________________________________________________________
-Bool_t AliQADataMakerSteer::SaveIt2OCDB(const Int_t runNumber, TFile * inputFile, const char * year) const
+Bool_t AliQADataMakerSteer::SaveIt2OCDB(const Int_t runNumber, TFile * inputFile, const char * year, AliRecoParam::EventSpecie_t es) const
 {
        // reads the TH1 from file and adds it to appropriate list before saving to OCDB
        Bool_t rv = kTRUE ;
@@ -991,30 +1000,50 @@ Bool_t AliQADataMakerSteer::SaveIt2OCDB(const Int_t runNumber, TFile * inputFile
                TDirectory * detDir = inputFile->GetDirectory(AliQA::GetDetName(detIndex)) ; 
                if ( detDir ) {
                        AliInfo(Form("Entering %s", detDir->GetName())) ;
+      AliQA::SetQARefDataDirName(es) ;
                        TString detOCDBDir(Form("%s/%s/%s", AliQA::GetDetName(detIndex), AliQA::GetRefOCDBDirName(), AliQA::GetRefDataDirName())) ; 
-      printf("SSSSSSSSSSSSSSSSSSSSS %s\n", detOCDBDir.Data()) ; 
                        AliCDBId idr(detOCDBDir.Data(), runNumber, AliCDBRunRange::Infinity())  ;
                        TList * listDetQAD = new TList() ;
                        TString listName(Form("%s QA data Reference", AliQA::GetDetName(detIndex))) ; 
-                       mdr.SetComment("HMPID QA stuff");
+                       mdr.SetComment(Form("%s QA stuff", AliQA::GetDetName(detIndex)));
                        listDetQAD->SetName(listName) ; 
                        TList * taskList = detDir->GetListOfKeys() ; 
                        TIter nextTask(taskList) ; 
                        TKey * taskKey ; 
                        while ( (taskKey = dynamic_cast<TKey*>(nextTask())) ) {
                                TDirectory * taskDir = detDir->GetDirectory(taskKey->GetName()) ; 
-                               AliInfo(Form("Saving %s", taskDir->GetName())) ; 
+        TDirectory * esDir   = taskDir->GetDirectory(AliRecoParam::GetEventSpecieName(es)) ; 
+                               AliInfo(Form("Saving %s", esDir->GetName())) ; 
                                TObjArray * listTaskQAD = new TObjArray(100) ; 
-                               listTaskQAD->SetName(taskKey->GetName()) ;
+                               listTaskQAD->SetName(Form("%s/%s", taskKey->GetName(), AliRecoParam::GetEventSpecieName(es))) ;
                                listDetQAD->Add(listTaskQAD) ; 
-                               TList * histList = taskDir->GetListOfKeys() ; 
+                               TList * histList = esDir->GetListOfKeys() ; 
                                TIter nextHist(histList) ; 
                                TKey * histKey ; 
                                while ( (histKey = dynamic_cast<TKey*>(nextHist())) ) {
-                                       TObject * odata = taskDir->Get(histKey->GetName()) ; 
+                                       TObject * odata = esDir->Get(histKey->GetName()) ; 
                                        if ( !odata ) {
                                                AliError(Form("%s in %s/%s returns a NULL pointer !!", histKey->GetName(), detDir->GetName(), taskDir->GetName())) ;
                                        } else {
+            if ( AliQA::GetExpert() == histKey->GetName() ) {
+              TDirectory * expertDir   = esDir->GetDirectory(histKey->GetName()) ; 
+              TList * expertHistList = expertDir->GetListOfKeys() ; 
+              TIter nextExpertHist(expertHistList) ; 
+              TKey * expertHistKey ; 
+              while ( (expertHistKey = dynamic_cast<TKey*>(nextExpertHist())) ) {
+                TObject * expertOdata = expertDir->Get(expertHistKey->GetName()) ; 
+                if ( !expertOdata ) {
+                  AliError(Form("%s in %s/%s/Expert returns a NULL pointer !!", expertHistKey->GetName(), detDir->GetName(), taskDir->GetName())) ;
+                } else {
+                  AliInfo(Form("Adding %s", expertHistKey->GetName())) ;
+                  if ( expertOdata->IsA()->InheritsFrom("TH1") ) {
+                    AliInfo(Form("Adding %s", expertHistKey->GetName())) ;
+                    TH1 * hExpertdata = static_cast<TH1*>(expertOdata) ; 
+                    listTaskQAD->Add(hExpertdata) ; 
+                  }                  
+                }                
+              }
+            }
                                                AliInfo(Form("Adding %s", histKey->GetName())) ;
                                                if ( odata->IsA()->InheritsFrom("TH1") ) {
                                                        AliInfo(Form("Adding %s", histKey->GetName())) ;
@@ -1031,17 +1060,19 @@ Bool_t AliQADataMakerSteer::SaveIt2OCDB(const Int_t runNumber, TFile * inputFile
 }      
 
 //_____________________________________________________________________________
-void AliQADataMakerSteer::SetRecoParam(const char* detector, AliDetectorRecoParam *par)
+void AliQADataMakerSteer::SetEventSpecie(AliRecoParam::EventSpecie_t es) 
+{
+  // set the current event specie and inform AliQA that this event specie has been encountered
+  fEventSpecie = es ;
+  AliQA::Instance()->SetEventSpecie(es) ; 
+}
+
+//_____________________________________________________________________________
+void AliQADataMakerSteer::SetRecoParam(const Int_t det, const AliDetectorRecoParam *par) 
 {
   // Set custom reconstruction parameters for a given detector
   // Single set of parameters for all the events
-  for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
-    if(!strcmp(detector, AliQA::GetDetName(iDet))) {
-      par->SetAsDefault();
-      fRecoParam.AddDetRecoParam(iDet,par);
-      break;
-    }
-  }
+  GetQADataMaker(det)->SetRecoParam(par) ; 
 }
 
 
index 46c3b31ffdf45a49aeca46a00309dfa005ee9957..d8586cf7a13c03339bffa2ecd213b7c3cc0bd736 100644 (file)
@@ -1,4 +1,4 @@
-#ifndef ALIQADATAMAKERSTEER_H
+ #ifndef ALIQADATAMAKERSTEER_H
 #define ALIQADATAMAKERSTEER_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
@@ -46,7 +46,7 @@ public:
        TObjArray * GetFromOCDB(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, const char * year) const ; 
        AliQADataMaker * GetQADataMaker(const Int_t iDet) ; 
        void        Increment() ;
-       void        InitQADataMaker(UInt_t run, const AliRecoParam & par, TObjArray * detArray=0x0) ;
+       void        InitQADataMaker(UInt_t run, TObjArray * detArray=0x0) ;
        Bool_t      Merge(const Int_t runNumber = -1 ) const ;  
        void        Reset(const Bool_t sameCycle = kFALSE) ;  
        TString     Run(const char * detectors, const AliQA::TASKINDEX_t taskIndex=AliQA::kNULLTASKINDEX, Bool_t const sameCycle = kFALSE, const char * fileName = NULL) ; 
@@ -55,29 +55,30 @@ public:
        void        RunOneEvent(AliRawReader * rawReader) ; 
        void        RunOneEventInOneDetector(Int_t det, TTree * tree) ; 
        void        RunOneEvent(AliESDEvent *& esd)  ;
-       Bool_t      Save2OCDB(const Int_t runNumber, const char * year = "08", const char * detectors = "ALL") const ; 
+       Bool_t      Save2OCDB(const Int_t runNumber, AliRecoParam::EventSpecie_t es, const char * year = "08", const char * detectors = "ALL") const ; 
        void        SetActiveDetectors(TString aDet) { fDetectors = aDet ;  }
        void        SetCycleLength(const AliQA::DETECTORINDEX_t det, const Int_t cycle) { fQACycles[det] = cycle ; }
        void        SetWriteExpert(const AliQA::DETECTORINDEX_t det) { fQAWriteExpert[det] = kTRUE ; }
-       void        SetEventRange(UInt_t first, UInt_t last) { fFirstEvent = first ; fMaxEvents = last - first + 1 ; }      
+       void        SetEventRange(UInt_t first, UInt_t last) { fFirstEvent = first ; fMaxEvents = last - first + 1 ; }    
+  void        SetEventSpecie(AliRecoParam::EventSpecie_t es) ; 
        void        SetFirsEvent(UInt_t first) { fFirstEvent = first ; }      
        void        SetMaxEvents(UInt_t max) { fMaxEvents = max ; }      
        void        SetNewCycle() { fCycleSame = kTRUE ; }
-       void        SetRecoParam(const char* detector, AliDetectorRecoParam *par) ;
+       void        SetRecoParam(const Int_t det, const AliDetectorRecoParam *par) ;
        void        SetRunLoader(AliRunLoader * rl) { fRunLoader = rl ; }
        void        SetTasks(TString tasks) { fTasks = tasks ; }
 
 private: 
        Bool_t                    DoIt(const AliQA::TASKINDEX_t taskIndex) ;
        AliLoader   * GetLoader(Int_t iDet) ; 
-       Int_t   GetQACycles(const Int_t iDet) const { return fQACycles[iDet] ; }
+       Int_t         GetQACycles(const Int_t iDet) const { return fQACycles[iDet] ; }
        Bool_t                    Init(const AliQA::TASKINDEX_t taskIndex, const  char * fileName = NULL) ;
        Bool_t        InitRunLoader() ; 
        Bool_t        IsSelected(const char * detName)  ;
        Bool_t        Finish(const AliQA::TASKINDEX_t taskIndex) ;
        Bool_t        MergeData(const Int_t runNumber) const ;  
        Bool_t        MergeResults(const Int_t runNumber) const ;  
-       Bool_t        SaveIt2OCDB(const Int_t runNumber, TFile * inputFile, const char * year) const ;  
+       Bool_t        SaveIt2OCDB(const Int_t runNumber, TFile * inputFile, const char * year, AliRecoParam::EventSpecie_t es) const ;  
 
  
        UInt_t                  fCurrentEvent ;                 //! event counter
@@ -102,7 +103,7 @@ private:
        AliQADataMaker *        fQADataMaker[fgkNDetectors];    //! array of QA data maker objects
        Int_t                   fQACycles[fgkNDetectors];       //! array of QA cycle length
        Bool_t                  fQAWriteExpert[fgkNDetectors];  //! array of QA cycle length
-       
+       AliRecoParam::EventSpecie_t fEventSpecie ;              //! event specie, see AliRecoParam::EventSpecie_t 
   ClassDef(AliQADataMakerSteer, 0)      // class for running the QA makers
 };
 
index 77d06fd4fb4c9c6e44c6276dd7585c40849de397..1425c390b3db415f58915fc9beec43f06ef39290 100644 (file)
@@ -26,6 +26,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "TObjArray.h"
+#include "TMath.h"
 #include "AliDetectorRecoParam.h"
 
 #include "AliLog.h"
@@ -35,6 +36,8 @@
 
 ClassImp(AliRecoParam)
 
+TString AliRecoParam::fkgEventSpecieName[] = {"Default", "LowMultiplicity", "HighMultiplicity", "Cosmic", "Calibration", "Unknown"} ; 
+
 AliRecoParam::AliRecoParam(): 
   TObject(),
   fEventSpecie(kDefault)
@@ -92,6 +95,32 @@ AliRecoParam::~AliRecoParam(){
   }
 }
 
+Int_t AliRecoParam::AConvert(EventSpecie_t es)
+{
+  //Converts EventSpecie_t  into int
+  return static_cast<Int_t>(TMath::Log2(es)) ; 
+  
+}
+
+AliRecoParam::EventSpecie_t AliRecoParam::Convert(Int_t ies)
+{
+  //Converts int into EventSpecie_t
+  AliRecoParam::EventSpecie_t es = AliRecoParam::kDefault ; 
+  
+  Int_t i = (Int_t)TMath::Power(2, ies) ; 
+  
+  if ( i == AliRecoParam::kLowMult) 
+    es = kLowMult ; 
+  else if ( i == AliRecoParam::kHighMult) 
+    es = kHighMult ;   
+  else if ( i == AliRecoParam::kCosmic) 
+    es = kCosmic ;   
+  else if ( i == AliRecoParam::kCalib) 
+    es = kCalib ;   
+  
+  return es ;   
+}
+
 void  AliRecoParam::Print(Option_t *option) const {
   //
   // Print reconstruction setup
@@ -127,13 +156,14 @@ void AliRecoParam::SetEventSpecie(const AliRunInfo *runInfo, const AliEventInfo
 
   if (strcmp(runInfo->GetLHCState(),"STABLE_BEAMS") == 0) {
     // In case of stable beams
-    if ((strcmp(runInfo->GetBeamType(),"A-A") == 0) ||
-       (strcmp(runInfo->GetBeamType(),"A-") == 0) ||
-       (strcmp(runInfo->GetBeamType(),"-A") == 0)) {
-      // Heavy ion run, the event specie is set to kHighMult
+//    if ((strcmp(runInfo->GetBeamType(),"A-A") == 0) ||
+//     (strcmp(runInfo->GetBeamType(),"A-") == 0) ||
+//     (strcmp(runInfo->GetBeamType(),"-A") == 0)) {
+      // Heavy ion run (any beam tha is not pp, the event specie is set to kHighMult
       fEventSpecie = kHighMult;
-    }
-    else if ((strcmp(runInfo->GetBeamType(),"p-p") == 0) ||
+//    }
+//    else 
+    if ((strcmp(runInfo->GetBeamType(),"p-p") == 0) ||
             (strcmp(runInfo->GetBeamType(),"p-") == 0) ||
             (strcmp(runInfo->GetBeamType(),"-p") == 0) ||
             (strcmp(runInfo->GetBeamType(),"P-P") == 0) ||
@@ -280,22 +310,54 @@ const char*  AliRecoParam::PrintEventSpecie() const
   // event specie
   switch (fEventSpecie) {
   case kDefault:
-    return "Default";
+    return fkgEventSpecieName[0].Data() ;
     break;
   case kLowMult:
-    return "Low-multiplicity";
+    return fkgEventSpecieName[1].Data() ;
     break;
   case kHighMult:
-    return "High-multiplicity";
+    return fkgEventSpecieName[2].Data() ;
     break;
   case kCosmic:
-    return "Cosmic";
+    return fkgEventSpecieName[3].Data() ;
     break;
   case kCalib:
-    return "Calibration";
+    return fkgEventSpecieName[4].Data() ;
     break;
   default:
-    return "Unknown";
+    return fkgEventSpecieName[5].Data() ;
     break;
   }
 }
+
+const char * AliRecoParam::GetEventSpecieName(EventSpecie_t es)
+{
+  switch (es) {
+    case kDefault:
+      return fkgEventSpecieName[0].Data() ;
+      break;
+    case kLowMult:
+      return fkgEventSpecieName[1].Data() ;
+      break;
+    case kHighMult:
+      return fkgEventSpecieName[2].Data() ;
+      break;
+    case kCosmic:
+      return fkgEventSpecieName[3].Data() ;
+      break;
+    case kCalib:
+      return fkgEventSpecieName[4].Data() ;
+      break;
+    default:
+      return fkgEventSpecieName[5].Data() ;
+      break;
+  }
+}
+
+const char * AliRecoParam::GetEventSpecieName(Int_t esIndex)
+{
+  if ( esIndex >= 0 && esIndex < kNSpecies) 
+    return fkgEventSpecieName[esIndex].Data() ;
+  else 
+    return fkgEventSpecieName[kNSpecies].Data() ;
+}
index 12900702c15c501beb2d6d71d2c1b5e198c5ea5f..64c81d85217bfc23f64ae4b8cf6ee6a0ceb6b35a 100644 (file)
@@ -36,10 +36,14 @@ class AliRecoParam : public TObject
                      kCosmic = 8,
                      kCalib = 16};
 
+  static Int_t                  AConvert(EventSpecie_t es) ; 
+  static EventSpecie_t          Convert(Int_t es) ; 
   virtual void                  Print(Option_t *option="") const;
   const TObjArray              *GetDetRecoParamArray(Int_t iDet) const { return fDetRecoParams[iDet]; }
   void                          SetEventSpecie(const AliRunInfo*runInfo, const AliEventInfo &evInfo);
   EventSpecie_t                 GetEventSpecie() const { return fEventSpecie; }
+  static const char*            GetEventSpecieName(EventSpecie_t es);
+  static const char*            GetEventSpecieName(Int_t esIndex);
   const char*                   PrintEventSpecie() const;
   const AliDetectorRecoParam   *GetDetRecoParam(Int_t iDet) const;
   void                          AddDetRecoParam(Int_t iDet, AliDetectorRecoParam* param);
@@ -48,13 +52,14 @@ class AliRecoParam : public TObject
   AliRecoParam(const AliRecoParam&);
   AliRecoParam& operator=(const AliRecoParam&);
 
+
 private:
 
   Int_t      fDetRecoParamsIndex[kNSpecies][kNDetectors]; // index to fDetRecoParams arrays
   TObjArray *fDetRecoParams[kNDetectors];   // array with reconstruction-parameter objects for all detectors
   EventSpecie_t fEventSpecie;               // current event specie
-
-  ClassDef(AliRecoParam, 5)
+  static TString fkgEventSpecieName[] ; // the names of the event species
+  ClassDef(AliRecoParam, 6)
 };
 
 
index 9b80b954743ce78f9f0c54fe94aac1163618e10d..47c4d0fc08bd0f07455b6b37ab6f8f25d5169f04 100644 (file)
@@ -925,7 +925,7 @@ Bool_t AliReconstruction::InitGRP() {
   }
 
   fRunInfo = new AliRunInfo(lhcState, beamType, beamEnergy, runType, activeDetectors);
-
+  printf("qqqqqqqqqqqqqqqqqqqqqqq %s %s %f %s %d\n", lhcState.Data(), beamType.Data(), beamEnergy, runType.Data(), activeDetectors);
   fRunInfo->Dump();
 
 
@@ -1404,14 +1404,12 @@ void AliReconstruction::SlaveBegin(TTree*)
     fQASteer->SetActiveDetectors(fQADetectors) ; 
     for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
       fQASteer->SetCycleLength(AliQA::DETECTORINDEX_t(det), fQACycles[det]) ;  
-      if (fQAWriteExpert[det])
-        fQASteer->SetWriteExpert(AliQA::DETECTORINDEX_t(det)) ;
+      fQASteer->SetWriteExpert(AliQA::DETECTORINDEX_t(det)) ;
     }
-    
     if (!fRawReader && fQATasks.Contains(AliQA::kRAWS))
       fQATasks.ReplaceAll(Form("%d",AliQA::kRAWS), "") ;
     fQASteer->SetTasks(fQATasks) ; 
-    fQASteer->InitQADataMaker(AliCDBManager::Instance()->GetRun(), fRecoParam) ; 
+    fQASteer->InitQADataMaker(AliCDBManager::Instance()->GetRun()) ; 
   }
   
   if (fRunGlobalQA) {
@@ -1421,7 +1419,7 @@ void AliReconstruction::SlaveBegin(TTree*)
     AliInfo(Form("Initializing the global QA data maker"));
     if (fQATasks.Contains(Form("%d", AliQA::kRECPOINTS))) {
       qadm->StartOfCycle(AliQA::kRECPOINTS, AliCDBManager::Instance()->GetRun(), sameCycle) ; 
-      TObjArray *arr=qadm->Init(AliQA::kRECPOINTS);
+      TObjArray **arr=qadm->Init(AliQA::kRECPOINTS);
       AliTracker::SetResidualsArray(arr);
       sameCycle = kTRUE ; 
     }
@@ -1510,16 +1508,20 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent)
       if (!IsSelected(fgkDetectorName[iDet], detStr)) continue;
       AliReconstructor *reconstructor = GetReconstructor(iDet);
       if (reconstructor && fRecoParam.GetDetRecoParamArray(iDet)) {
-       const AliDetectorRecoParam *par = fRecoParam.GetDetRecoParam(iDet);
-       reconstructor->SetRecoParam(par);
+        const AliDetectorRecoParam *par = fRecoParam.GetDetRecoParam(iDet);
+        reconstructor->SetRecoParam(par);
+        if (fRunQA) {
+          fQASteer->SetRecoParam(iDet, par) ; 
+        }
       }
     }
   }
 
     // QA on single raw 
-    if (fRunQA) 
-                       fQASteer->RunOneEvent(fRawReader) ;  
-
+  if (fRunQA) {
+    fQASteer->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
+    fQASteer->RunOneEvent(fRawReader) ;  
+  }
     // local single event reconstruction
     if (!fRunLocalReconstruction.IsNull()) {
       TString detectors=fRunLocalReconstruction;
@@ -1734,11 +1736,13 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent)
     // write ESD
     if (fCleanESD) CleanESD(fesd);
 
-  if (fRunQA) 
+  if (fRunQA) {
+    fQASteer->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
     fQASteer->RunOneEvent(fesd) ; 
-
+  }
   if (fRunGlobalQA) {
       AliQADataMaker *qadm = fQASteer->GetQADataMaker(AliQA::kGLOBAL);
+      qadm->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
       if (qadm && fQATasks.Contains(Form("%d", AliQA::kESDS)))
         qadm->Exec(AliQA::kESDS, fesd);
     }
@@ -1844,9 +1848,9 @@ void AliReconstruction::SlaveTerminate()
   }
 
   // End of cycle for the in-loop  
-  if (fRunQA) {
+  if (fRunQA) 
     fQASteer->EndOfCycle() ;
-  }
+  
   if (fRunGlobalQA) {
     AliQADataMaker *qadm = fQASteer->GetQADataMaker(AliQA::kGLOBAL);
     if (qadm) {
@@ -1940,9 +1944,10 @@ Bool_t AliReconstruction::RunLocalEventReconstruction(const TString& detectors)
     }
 
                TString detQAStr(fQADetectors) ; 
-               if (fRunQA) 
+               if (fRunQA) {
+      fQASteer->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
                        fQASteer->RunOneEventInOneDetector(iDet, clustersTree) ; 
-    
+    }
        loader->WriteRecPoints("OVERWRITE");
        loader->UnloadRecPoints();
        AliSysInfo::AddStamp(Form("LRec%s_%d",fgkDetectorName[iDet],eventNr), iDet,1,eventNr);
@@ -2187,7 +2192,7 @@ Bool_t AliReconstruction::RunTracking(AliESDEvent*& esd)
 
     // run tracking
     if (iDet>1) // start filling residuals for the "outer" detectors
-    if (fRunGlobalQA) AliTracker::SetFillResiduals(kTRUE);     
+    if (fRunGlobalQA) AliTracker::SetFillResiduals(fRecoParam.GetEventSpecie(), kTRUE);     
 
     if (fTracker[iDet]->PropagateBack(esd) != 0) {
       AliError(Form("%s backward propagation failed", fgkDetectorName[iDet]));
@@ -2207,7 +2212,7 @@ Bool_t AliReconstruction::RunTracking(AliESDEvent*& esd)
     AliSysInfo::AddStamp(Form("Tracking1%s_%d",fgkDetectorName[iDet],eventNr), iDet,3, eventNr);
   }
   //stop filling residuals for the "outer" detectors
-  if (fRunGlobalQA) AliTracker::SetFillResiduals(kFALSE);     
+  if (fRunGlobalQA) AliTracker::SetFillResiduals(fRecoParam.GetEventSpecie(), kFALSE);     
 
   // pass 3: TRD + TPC + ITS refit inwards
 
@@ -2217,7 +2222,7 @@ Bool_t AliReconstruction::RunTracking(AliESDEvent*& esd)
 
     // run tracking
     if (iDet<2) // start filling residuals for TPC and ITS
-    if (fRunGlobalQA) AliTracker::SetFillResiduals(kTRUE);     
+    if (fRunGlobalQA) AliTracker::SetFillResiduals(fRecoParam.GetEventSpecie(), kTRUE);     
 
     if (fTracker[iDet]->RefitInward(esd) != 0) {
       AliError(Form("%s inward refit failed", fgkDetectorName[iDet]));
@@ -2245,7 +2250,7 @@ Bool_t AliReconstruction::RunTracking(AliESDEvent*& esd)
     AliSysInfo::AddStamp(Form("RUnloadCluster%s_%d",fgkDetectorName[iDet],eventNr), iDet,5, eventNr);
   }
   // stop filling residuals for TPC and ITS
-  if (fRunGlobalQA) AliTracker::SetFillResiduals(kFALSE);     
+  if (fRunGlobalQA) AliTracker::SetFillResiduals(fRecoParam.GetEventSpecie(), kFALSE);     
 
   eventNr++;
   return kTRUE;
@@ -2753,36 +2758,37 @@ void AliReconstruction::CheckQA()
 // check the QA of SIM for this run and remove the detectors 
 // with status Fatal
   
-       TString newRunLocalReconstruction ; 
-       TString newRunTracking ;
-       TString newFillESD ;
-        
-       for (Int_t iDet = 0; iDet < AliQA::kNDET; iDet++) {
-               TString detName(AliQA::GetDetName(iDet)) ;
-               AliQA * qa = AliQA::Instance(AliQA::DETECTORINDEX_t(iDet)) ; 
-               if ( qa->IsSet(AliQA::DETECTORINDEX_t(iDet), AliQA::kSIM, AliQA::kFATAL)) {
-                               AliInfo(Form("QA status for %s in Hits and/or SDIGITS  and/or Digits was Fatal; No reconstruction performed", detName.Data())) ;
-               } else {
-                       if ( fRunLocalReconstruction.Contains(AliQA::GetDetName(iDet)) || 
-                                       fRunLocalReconstruction.Contains("ALL") )  {
-                               newRunLocalReconstruction += detName ; 
-                               newRunLocalReconstruction += " " ;                      
-                       }
-                       if ( fRunTracking.Contains(AliQA::GetDetName(iDet)) || 
-                                       fRunTracking.Contains("ALL") )  {
-                               newRunTracking += detName ; 
-                               newRunTracking += " " ;                         
-                       }
-                       if ( fFillESD.Contains(AliQA::GetDetName(iDet)) || 
-                                       fFillESD.Contains("ALL") )  {
-                               newFillESD += detName ; 
-                               newFillESD += " " ;                     
-                       }
-               }
-       }
-       fRunLocalReconstruction = newRunLocalReconstruction ; 
-       fRunTracking            = newRunTracking ; 
-       fFillESD                = newFillESD ; 
+//     TString newRunLocalReconstruction ; 
+//     TString newRunTracking ;
+//     TString newFillESD ;
+//      
+//     for (Int_t iDet = 0; iDet < AliQA::kNDET; iDet++) {
+//             TString detName(AliQA::GetDetName(iDet)) ;
+//             AliQA * qa = AliQA::Instance(AliQA::DETECTORINDEX_t(iDet)) ;       
+//      if ( qa->IsSet(AliQA::DETECTORINDEX_t(iDet), AliQA::kSIM, specie, AliQA::kFATAL)) {
+//        AliInfo(Form("QA status for %s %s in Hits and/or SDIGITS  and/or Digits was Fatal; No reconstruction performed", 
+//                   detName.Data(), AliRecoParam::GetEventSpecieName(es))) ;
+//                     } else {
+//                     if ( fRunLocalReconstruction.Contains(AliQA::GetDetName(iDet)) || 
+//                                     fRunLocalReconstruction.Contains("ALL") )  {
+//                             newRunLocalReconstruction += detName ; 
+//                             newRunLocalReconstruction += " " ;                      
+//                     }
+//                     if ( fRunTracking.Contains(AliQA::GetDetName(iDet)) || 
+//                                     fRunTracking.Contains("ALL") )  {
+//                             newRunTracking += detName ; 
+//                             newRunTracking += " " ;                         
+//                     }
+//                     if ( fFillESD.Contains(AliQA::GetDetName(iDet)) || 
+//                                     fFillESD.Contains("ALL") )  {
+//                             newFillESD += detName ; 
+//                             newFillESD += " " ;                     
+//                     }
+//             }
+//     }
+//     fRunLocalReconstruction = newRunLocalReconstruction ; 
+//     fRunTracking            = newRunTracking ; 
+//     fFillESD                = newFillESD ; 
 }
 
 //_____________________________________________________________________________
index 1061315165eff0d63a1be07582e3301527302238..a3881924a26ed024168dca16407edb0a40854fa8 100644 (file)
@@ -187,6 +187,7 @@ AliSimulation::AliSimulation(const char* configFileName,
   fQATasks("ALL"),     
   fQASteer(NULL), 
   fRunQA(kTRUE), 
+  fEventSpecie(AliRecoParam::kDefault),
   fRunHLT("default"),
   fWriteGRPEntry(kTRUE)
 {
@@ -1748,11 +1749,10 @@ Bool_t AliSimulation::RunQA()
 
        TString detectorsw("") ;  
        Bool_t rv = kTRUE ; 
+  fQASteer->SetEventSpecie(fEventSpecie) ;
        detectorsw = fQASteer->Run(fQADetectors.Data()) ; 
        if ( detectorsw.IsNull() ) 
                rv = kFALSE ; 
-  else 
-    fQASteer->EndOfCycle(detectorsw) ; 
        return rv ; 
 }
 
@@ -1799,6 +1799,9 @@ Bool_t AliSimulation::SetRunQA(TString detAndAction)
        fRunQA = kTRUE ;
        fQASteer->SetActiveDetectors(fQADetectors) ; 
        fQASteer->SetTasks(fQATasks) ; 
+  for (Int_t det = 0 ; det < AliQA::kNDET ; det++) 
+    fQASteer->SetWriteExpert(AliQA::DETECTORINDEX_t(det)) ;
+  
        return kTRUE; 
 } 
 
@@ -1842,7 +1845,6 @@ void AliSimulation::ProcessEnvironmentVars()
 }
 
 //---------------------------------------------------------------------
-
 void AliSimulation::WriteGRPEntry()
 {
   // Get the necessary information from galice (generator, trigger etc) and
@@ -1869,14 +1871,23 @@ void AliSimulation::WriteGRPEntry()
     TString beamType = projectile + "-" + target;
     beamType.ReplaceAll(" ","");
     if (!beamType.CompareTo("-")) {
-
-       grpObj->SetBeamType("UNKNOWN");
+      grpObj->SetBeamType("UNKNOWN");
     }
     else {
-       grpObj->SetBeamType(beamType);
+      grpObj->SetBeamType(beamType);
+      // Heavy ion run, the event specie is set to kHighMult
+      fEventSpecie = AliRecoParam::kHighMult;
+      if ((strcmp(beamType,"p-p") == 0) ||
+          (strcmp(beamType,"p-")  == 0) ||
+          (strcmp(beamType,"-p")  == 0) ||
+          (strcmp(beamType,"P-P") == 0) ||
+          (strcmp(beamType,"P-")  == 0) ||
+          (strcmp(beamType,"-P")  == 0)) {
+        // Proton run, the event specie is set to kLowMult
+        fEventSpecie = AliRecoParam::kLowMult;
+      } 
     }
-  }
-  else {
+  } else {
     AliWarning("Unknown beam type and energy! Setting energy to 0");
     grpObj->SetBeamEnergy(0);
     grpObj->SetBeamType("UNKNOWN");
index b92a3089fd0e22db35cc3deb00c159cad24fe0f4..9c420acbcd77d0e6bd3ee128d96099a6285aad78 100644 (file)
@@ -146,19 +146,19 @@ private:
   TObjArray      fEventsPerFile;      // number of events per file for given detectors and data types
 
   TObjArray*     fBkgrdFileNames;     // names of background files for merging
-  TObjArray*    fAlignObjArray;      // array with the alignment objects to be applied to the geometry
+  TObjArray*      fAlignObjArray;      // array with the alignment objects to be applied to the geometry
   Bool_t         fUseBkgrdVertex;     // use vertex from background in case of merging
   Bool_t         fRegionOfInterest;   // digitization in region of interest
 
-  TString       fCDBUri;             //! Uri of the default CDB storage
-  TObjArray      fSpecCDBUri;         //! Array with detector specific CDB storages
-  Int_t         fRun;                //! Run number, will be passed to CDB and gAlice!!
-  Int_t         fSeed;               //! Seed for random number generator 
-  Bool_t        fInitCDBCalled;      //! flag to check if CDB storages are already initialized
-  Bool_t        fInitRunNumberCalled;  //! flag to check if run number is already initialized
-  Bool_t        fSetRunNumberFromDataCalled;  //! flag to check if run number is already loaded from run loader
+  TString       fCDBUri;                            //! Uri of the default CDB storage
+  TObjArray  fSpecCDBUri;                  //! Array with detector specific CDB storages
+  Int_t           fRun;                                     //! Run number, will be passed to CDB and gAlice!!
+  Int_t           fSeed;                        //! Seed for random number generator 
+  Bool_t          fInitCDBCalled;               //! flag to check if CDB storages are already initialized
+  Bool_t          fInitRunNumberCalled;         //! flag to check if run number is already initialized
+  Bool_t          fSetRunNumberFromDataCalled;  //! flag to check if run number is already loaded from run loader
   
-  Bool_t         fEmbeddingFlag;      // Flag for embedding
+  Bool_t     fEmbeddingFlag;      // Flag for embedding
   
   //QA stuff
   static const Int_t   fgkNDetectors = 15 ;             // number of detectors
@@ -167,6 +167,7 @@ private:
   TString              fQATasks ;                       // list of QA tasks to be performed    
   AliQADataMakerSteer * fQASteer ;                      // steering object to run QA
   Bool_t               fRunQA ;                         // Runs the QA at the end of simulation
+  AliRecoParam::EventSpecie_t fEventSpecie ;                   // type of event (see AliRecoParam::EventSpecie_t)
 
   //HLT
   TString        fRunHLT;             // HLT options, HLT is disabled if empty, default='default'
index 355c539ef45b38cb28d4a2ae16f086b181fbb59d..3681118c318af1e50839dce1871b66302dcf1862 100644 (file)
@@ -37,7 +37,8 @@ Bool_t AliTracker::fgUniformField=kTRUE;
 Double_t AliTracker::fgBz=kAlmost0Field;
 const AliMagF *AliTracker::fgkFieldMap=0;
 Bool_t AliTracker::fFillResiduals=kFALSE;
-TObjArray *AliTracker::fResiduals=0;
+TObjArray **AliTracker::fResiduals=NULL;
+AliRecoParam::EventSpecie_t AliTracker::fEventSpecie=AliRecoParam::kDefault;
 
 ClassImp(AliTracker)
 
@@ -48,7 +49,7 @@ AliTracker::AliTracker():
   fZ(0),
   fSigmaX(0.005),
   fSigmaY(0.005),
-  fSigmaZ(0.010)
+  fSigmaZ(0.010) 
 {
   //--------------------------------------------------------------------
   // The default constructor.
@@ -399,27 +400,27 @@ void AliTracker::FillResiduals(const AliExternalTrackParam *t,
 
   TH1F *h=0;
   AliGeomManager::ELayerID layer=AliGeomManager::VolUIDToLayer(id);
-  h=(TH1F*)fResiduals->At(2*layer-2);
+  h=(TH1F*)fResiduals[fEventSpecie]->At(2*layer-2);
   h->Fill(residuals[0]);
-  h=(TH1F*)fResiduals->At(2*layer-1);
+  h=(TH1F*)fResiduals[fEventSpecie]->At(2*layer-1);
   h->Fill(residuals[1]);
 
   if (layer==5) {
     if (p[1]<0) {  // SSD1 absolute residuals
-       ((TH1F*)fResiduals->At(40))->Fill(t->GetY()-p[0]); //C side
-       ((TH1F*)fResiduals->At(41))->Fill(t->GetZ()-p[1]);
+       ((TH1F*)fResiduals[fEventSpecie]->At(40))->Fill(t->GetY()-p[0]); //C side
+       ((TH1F*)fResiduals[fEventSpecie]->At(41))->Fill(t->GetZ()-p[1]);
     } else {             
-       ((TH1F*)fResiduals->At(42))->Fill(t->GetY()-p[0]); //A side
-       ((TH1F*)fResiduals->At(43))->Fill(t->GetZ()-p[1]);
+       ((TH1F*)fResiduals[fEventSpecie]->At(42))->Fill(t->GetY()-p[0]); //A side
+       ((TH1F*)fResiduals[fEventSpecie]->At(43))->Fill(t->GetZ()-p[1]);
     }           
   }
   if (layer==6) {  // SSD2 absolute residuals
     if (p[1]<0) {
-       ((TH1F*)fResiduals->At(44))->Fill(t->GetY()-p[0]); //C side
-       ((TH1F*)fResiduals->At(45))->Fill(t->GetZ()-p[1]);
+       ((TH1F*)fResiduals[fEventSpecie]->At(44))->Fill(t->GetY()-p[0]); //C side
+       ((TH1F*)fResiduals[fEventSpecie]->At(45))->Fill(t->GetZ()-p[1]);
     } else {
-       ((TH1F*)fResiduals->At(46))->Fill(t->GetY()-p[0]); //A side
-       ((TH1F*)fResiduals->At(47))->Fill(t->GetZ()-p[1]);
+       ((TH1F*)fResiduals[fEventSpecie]->At(46))->Fill(t->GetY()-p[0]); //A side
+       ((TH1F*)fResiduals[fEventSpecie]->At(47))->Fill(t->GetZ()-p[1]);
     }
   }
 
index 384170579dca0cf05bddb844881d19a4a3998476..8ee933ce872bb6a15c3f77088eae062d2d5bb1ab 100644 (file)
@@ -12,6 +12,8 @@
 //-------------------------------------------------------------------------
 #include <TObject.h>
 #include <AliPlaneEff.h>
+#include "AliRecoParam.h"
+
 
 class TTree;
 class AliMagF;
@@ -72,8 +74,8 @@ public:
   static void FillResiduals(const AliExternalTrackParam *t,
                           Double_t *p, Double_t *cov, 
                            UShort_t id, Bool_t updated=kTRUE);
-  static void SetFillResiduals(Bool_t flag=kTRUE) { fFillResiduals=flag; }
-  static void SetResidualsArray(TObjArray *arr) { fResiduals=arr; }
+  static void SetFillResiduals(AliRecoParam::EventSpecie_t es, Bool_t flag=kTRUE) { fFillResiduals=flag; fEventSpecie = es ;}
+  static void SetResidualsArray(TObjArray **arr) { fResiduals=arr; }
 
 protected:
   AliTracker(const AliTracker &atr);
@@ -85,7 +87,7 @@ private:
   static Double_t fgBz;               // Nominal Bz (kG)
 
   static Bool_t fFillResiduals;       // Fill residuals flag
-  static TObjArray *fResiduals;    //! Array of histograms with residuals
+  static TObjArray **fResiduals;    //! Array of histograms with residuals
 
   Double_t fX;  //X-coordinate of the primary vertex
   Double_t fY;  //Y-coordinate of the primary vertex
@@ -94,7 +96,9 @@ private:
   Double_t fSigmaX; // error of the primary vertex position in X
   Double_t fSigmaY; // error of the primary vertex position in Y
   Double_t fSigmaZ; // error of the primary vertex position in Z
-
+  
+  static AliRecoParam::EventSpecie_t fEventSpecie ; //! event specie, see AliRecoParam
+  
   ClassDef(AliTracker,4) //abstract tracker
 };
 
index f58cac5fdc136f7ddc7d7c62ae38565555c08a76..a34addb6b8d8ab8db85a1b4f7b5acefca424b044 100644 (file)
@@ -63,12 +63,9 @@ AliCorrQAChecker.cxx
 AliGlobalQAChecker.cxx 
 AliQACheckerBase.cxx 
 AliMillepede.cxx 
-AliRecoParam.cxx 
-AliDetectorRecoParam.cxx 
 AliPlaneEff.cxx 
 AliTriggerRunScalers.cxx AliGRPPreprocessor.cxx 
 AliGRPRecoParam.cxx 
-AliRunInfo.cxx AliEventInfo.cxx 
 AliRelAlignerKalman.cxx 
 AliESDTagCreator.cxx 
 AliGRPObject.cxx
index 9a441cdda6820a32aa62542a6b158b460adf888f..0eff6689d5e15870c3f64b314b6448f28ce3214d 100644 (file)
@@ -25,6 +25,9 @@ set(SRCS
   AliPDG.cxx
   AliQA.cxx
   AliTimeStamp.cxx AliTriggerScalers.cxx AliTriggerScalersRecord.cxx
+  AliRunInfo.cxx AliEventInfo.cxx 
+  AliRecoParam.cxx 
+  AliDetectorRecoParam.cxx 
 )
 
 # fill list of header files from list of source files
index dbf0fa0a80d8ef91e5307da8906e8c1464500a6b..350c3c5ff29114cbfea6614a71797b81f4a3f0bb 100644 (file)
@@ -64,4 +64,9 @@
 #pragma link C++ class AliTriggerScalers+;
 #pragma link C++ class AliTriggerScalersRecord+;
 
+#pragma link C++ class AliRunInfo+;
+#pragma link C++ class AliEventInfo+;
+#pragma link C++ class AliDetectorRecoParam+;
+#pragma link C++ class AliRecoParam+;
+
 #endif
index 7f52290a25d723a3713f324d92aa786953c97357..0fe17af0540ec7f9552d419ae8f856edb75689ef 100644 (file)
 #pragma link C++ class AliQACheckerBase+;
 #pragma link C++ class AliMillepede+;
 
-#pragma link C++ class AliDetectorRecoParam+;
-#pragma link C++ class AliRecoParam+;
 #pragma link C++ class AliPlaneEff+;
 
 #pragma link C++ class AliTriggerRunScalers+;
 #pragma link C++ class AliGRPPreprocessor+;
 #pragma link C++ class AliGRPRecoParam+;
 
-#pragma link C++ class AliRunInfo+;
-#pragma link C++ class AliEventInfo+;
-
 #pragma link C++ class AliRelAlignerKalman+;
 
 #pragma link C++ class AliESDTagCreator+;
index dac181a5e1f6f9618aab5b591eab256d2ce7ba25..2a367dbe012a0479f4a40e2232edf8b7e3f20943 100644 (file)
@@ -62,12 +62,9 @@ AliCorrQAChecker.cxx \
 AliGlobalQAChecker.cxx \
 AliQACheckerBase.cxx \
 AliMillepede.cxx \
-AliRecoParam.cxx \
-AliDetectorRecoParam.cxx \
 AliPlaneEff.cxx \
 AliTriggerRunScalers.cxx AliGRPPreprocessor.cxx \
 AliGRPRecoParam.cxx \
-AliRunInfo.cxx AliEventInfo.cxx \
 AliRelAlignerKalman.cxx \
 AliESDTagCreator.cxx \
 AliGRPObject.cxx
index ff1b79f3da346c16ec6ca95264e9f7d4423d69b5..8dbfd1488439508ea7689577977af7b0dd8fa4a4 100644 (file)
@@ -23,7 +23,9 @@ SRCS = AliVParticle.cxx \
        AliCodeTimer.cxx \
        AliPDG.cxx \
        AliQA.cxx \
-       AliTimeStamp.cxx AliTriggerScalers.cxx AliTriggerScalersRecord.cxx
+       AliTimeStamp.cxx AliTriggerScalers.cxx AliTriggerScalersRecord.cxx \
+       AliRunInfo.cxx AliEventInfo.cxx \
+       AliRecoParam.cxx AliDetectorRecoParam.cxx
 
 HDRS:= $(SRCS:.cxx=.h) 
 
index 44b6cafc45a10b938fa71277a2b3cfa857113c34..fe38f5fcdcadd43b94c1b954f46ec1c7c2a264c5 100644 (file)
 ClassImp(AliT0QAChecker)
 
 
+//____________________________________________________________________________
+Double_t * AliT0QAChecker::Check(AliQA::ALITASK_t /*index*/)
+{
+  Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    rv[specie] = 0.0 ; 
+  return rv ;  
+}
+
 //__________________________________________________________________
-Double_t AliT0QAChecker::Check(AliQA::ALITASK_t index,TObjArray * list)
+Double_t * AliT0QAChecker::Check(AliQA::ALITASK_t index,TObjArray ** list)
 {
 
   // Super-basic check on the QA histograms on the input list:
   // look whether they are empty!
 
+  Double_t * test = new Double_t[AliRecoParam::kNSpecies] ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    test[specie]    = 10.0 ; 
 
-  Double_t test = 10.0  ;
-  
   Double_t nent[250];
   TString hname[250];
   const char *cname;
@@ -69,160 +79,141 @@ Double_t AliT0QAChecker::Check(AliQA::ALITASK_t index,TObjArray * list)
   memset(w,1,250*sizeof(Double_t));
   TH2 *fhRecDiff[3];  
   TH2 *fhRawEff[250];
-   TH1 *fhESD[2];
-
-  //  TString dataType = AliQA::GetAliTaskName(index);
-
-  if (list->GetEntries() == 0){
-    test = 1. ; // nothing to check
-  }
-  else {
-    
-    TIter next(list) ;
+  TH1 *fhESD[2];
+  
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    //  TString dataType = AliQA::GetAliTaskName(index);
+    if (list[specie]->GetEntries() == 0){
+      test[specie] = 1. ; // nothing to check
+    }
+    else {
+    TIter next(list[specie]) ;
     TH1 * hdata ;
-    
     TH2 * h ;
-    //  printf(" data type %i %s nentries %i\n",
-    //    index,dataType.Data(),list->GetEntries());
-    
-    for (Int_t ir=0; ir<list->GetEntries(); ir++) 
-      {
-       //raw
-       if(index==0 ){
-         /*
-         if(ir < 205) {
-           hdata = (TH1*) list->UncheckedAt(ir);
-           if(hdata) {
-             cname = hdata->GetName();
-             hname[ir] = cname;
-             AliDebug(10,Form("count %i %s \n",ir, hname[ir].Data())) ;
-             fhRaw[ir] = hdata;
-           }
-           }*/
-         if(ir > 204) {
-           //    else{
-           h = (TH2*) list->UncheckedAt(ir);
-           printf(" index %i ir %i \n", index,ir);
-           if(h) {
-             cname = h->GetName();
-             hname[ir] = cname;
-             AliDebug(1,Form("count %i %s \n",ir, hname[ir].Data())) ;
-             fhRawEff[ir] = h;
-           }
-         }
-       }
+    //  AliInfo(Form(" data type %i %s nentries %i\n",
+    //    index,dataType.Data(),list->GetEntries()));
+    for (Int_t ir=0; ir<list[specie]->GetEntries(); ir++) {
+      //raw
+      if(index==0 ){
+        /*
+         if(ir < 205) {
+         hdata = (TH1*) list[specie]->UncheckedAt(ir);
+         if(hdata) {
+         cname = hdata->GetName();
+         hname[ir] = cname;
+         AliDebug(10,Form("count %i %s \n",ir, hname[ir].Data())) ;
+         fhRaw[ir] = hdata;
+         }
+         }*/
+        if(ir > 204) {
+          //     else{
+          h = (TH2*) list[specie]->UncheckedAt(ir);
+          AliInfo(Form(" index %i ir %i \n", index,ir));
+          if(h) {
+            cname = h->GetName();
+            hname[ir] = cname;
+            AliDebug(1,Form("count %i %s \n",ir, hname[ir].Data())) ;
+            fhRawEff[ir] = h;
+          }
+        }
+      }
      
-       //rec
-       if(index==2){
-         h = (TH2*) list->UncheckedAt(ir);
-         
-         if(h) {
-           cname = h->GetName();
-           hname[ir] = cname;
-           AliDebug(1,Form("count %i %s \n",ir, hname[ir].Data())) ;
-           fhRecDiff[ir] = h;
-         }
-       }
-       //esd
-       if(index==3){
-         cout<<" ir "<<ir<<endl;
-         hdata = (TH1*) list->UncheckedAt(ir);
-         if(hdata){
-           fhESD[ir] = hdata;
-           AliDebug(1,Form("count %i %s ",ir, hname[ir].Data()) );
-         }
-       }
+      //rec
+      if(index==2){
+        h = (TH2*) list[specie]->UncheckedAt(ir);
+        if(h) {
+          cname = h->GetName();
+          hname[ir] = cname;
+          AliDebug(1,Form("count %i %s \n",ir, hname[ir].Data())) ;
+          fhRecDiff[ir] = h;
+        }
+      }
+      //esd
+      if(index==3){
+        cout<<" ir "<<ir<<endl;
+        hdata = (TH1*) list[specie]->UncheckedAt(ir);
+        if(hdata){
+          fhESD[ir] = hdata;
+          AliDebug(1,Form("count %i %s ",ir, hname[ir].Data()) );
+        }
       }
-      
-    if (index == 0)
-      {
-       //raw data
+    }
+      if (index == 0) {
+        //raw data
        
-       for (Int_t icase=205; icase<207; icase++) {
-         for (Int_t idet=0; idet<24; idet++) {
-           Double_t mean = fhRawEff[icase]->
-             ProjectionY(Form("%s_py_%i_%i",
-                              fhRawEff[icase]->GetName(), idet,icase),
-                         idet,idet+1)->GetMean();
-           Double_t rms= fhRawEff[icase]->
-             ProjectionY(Form("%s_py%i_%i", 
-                              fhRawEff[icase]->GetName(), idet,icase),
-                         idet,idet+1)->GetRMS();
-           printf("name %s icase %i idet %i mean %f, rms %f\n",
-                  fhRawEff[icase]->GetName(), icase, idet, mean,rms);
-           
-           if (mean<1.2 && mean> 0.8 ) {
-             test = 1;
-             AliDebug(1,Form("All channels works meane efficieny %f with rms %f test %f",  mean, rms, test)) ; 
-           }
-           if (mean<=0.8 && mean>= 0.5 ){
-             test = 0.5;
-             AliDebug(1,Form("%s problem in channel %i  efficieny %f test %f",
-                             fhRawEff[icase]->GetName(), idet,  mean, test)) ; 
-           }
-           if (mean<0.5 ) { 
-             test = 0.25;
-             AliDebug(1,Form("%s big problem in channel %i  efficieny %f test %f",
-                             fhRawEff[icase]->GetName(), idet,  mean, test)) ; 
-           }
-            
-         }
-         
-       }
+        for (Int_t icase=205; icase<207; icase++) {
+          for (Int_t idet=0; idet<24; idet++) {
+            Double_t mean = fhRawEff[icase]->ProjectionY(Form("%s_py_%i_%i",
+                                                              fhRawEff[icase]->GetName(), idet,icase),
+                                                              idet,idet+1)->GetMean();
+            Double_t rms= fhRawEff[icase]->ProjectionY(Form("%s_py%i_%i", 
+                                                            fhRawEff[icase]->GetName(), idet,icase),
+                                                            idet,idet+1)->GetRMS();
+            AliInfo(Form("name %s icase %i idet %i mean %f, rms %f\n",
+                    fhRawEff[icase]->GetName(), icase, idet, mean,rms));
+            if (mean<1.2 && mean> 0.8 ) {
+              test[specie] = 1;
+              AliDebug(1,Form("All channels works meane efficieny %f with rms %f test %f",  mean, rms, test[specie])) ; 
+            }
+            if (mean<=0.8 && mean>= 0.5 ){
+              test[specie] = 0.5;
+              AliDebug(1,Form("%s problem in channel %i  efficieny %f test %f",
+                              fhRawEff[icase]->GetName(), idet,  mean, test[specie])) ; 
+            }
+            if (mean<0.5 ) { 
+              test[specie] = 0.25;
+              AliDebug(1,Form("%s big problem in channel %i  efficieny %f test %f",
+                              fhRawEff[icase]->GetName(), idet,  mean, test[specie])) ; 
+            }
+          }
+        }
       }
-    
-    if(index == 2){
-      //rec points
-      for (Int_t icase=0; icase<2; icase++) {
-       for (Int_t idet=0; idet<24; idet++) {
-         Double_t mean = fhRecDiff[icase]->
-           ProjectionY(Form("%s_py", fhRecDiff[icase]->GetName()),
-                       idet,idet+1)->GetMean();
-         Double_t rms= fhRecDiff[icase]->
-           ProjectionY(Form("%s_py", fhRecDiff[icase]->GetName()),
-                       idet,idet+1)->GetRMS();
-         printf("name %s icase %i idet %i mean %f, rms %f\n",
-                fhRecDiff[icase]->GetName(), icase, idet, mean,rms); 
+      if(index == 2){
+        //rec points
+        for (Int_t icase=0; icase<2; icase++) {
+          for (Int_t idet=0; idet<24; idet++) {
+            Double_t mean = fhRecDiff[icase]->
+            ProjectionY(Form("%s_py", fhRecDiff[icase]->GetName()),
+                        idet,idet+1)->GetMean();
+            Double_t rms= fhRecDiff[icase]->
+            ProjectionY(Form("%s_py", fhRecDiff[icase]->GetName()),
+                        idet,idet+1)->GetRMS();
+            AliInfo(Form("name %s icase %i idet %i mean %f, rms %f\n",
+                         fhRecDiff[icase]->GetName(), icase, idet, mean,rms)); 
                  
-         if(TMath::Abs(mean) >1.5 || rms >1){
-           AliDebug(1,Form(" calibration is nor perfect; test=%f", test)) ;
-           test=0.25;
-         }
-         if(mean>3 || rms >5) {
-           test = 0.1;
-           AliDebug(1,Form(" wrong calibration test=%f", test)) ;
-           } 
-        }
-               
-      }         
-    }
-       
-    if (index == 3) {
-      //ESD
-      for (Int_t icase=0; icase<2; icase++) {
-       Double_t rmsVertex = fhESD[icase]->GetRMS();
-       Double_t meanVertex = fhESD[icase]->GetMean();
-
-       test=1;
-       cout<<"numentries "<< fhESD[icase]->GetEntries()<<" meanVertex "<<meanVertex<<" rmsVertex "<<rmsVertex<<endl;
-       if (TMath::Abs(rmsVertex)>3) {
-         test=0.25;
-         AliDebug(1,Form("Vertex position resolution not good  , rms= %f test=%f",
-                           rmsVertex, test)) ; 
-       }
-       if (TMath::Abs(meanVertex)>3) {
-         test=0.25;
-         AliDebug(1,Form("Vertex position bad calibrated  , Mean= %f test=%f",
-                         meanVertex, test)) ; 
-       }
+            if(TMath::Abs(mean) >1.5 || rms >1){
+              AliDebug(1,Form(" calibration is nor perfect; test=%f", test)) ;
+              test[specie]=0.25;
+            }
+            if(mean>3 || rms >5) {
+              test[specie] = 0.1;
+              AliDebug(1,Form(" wrong calibration test=%f", test[specie])) ;
+            } 
+          }
+        }       
       }
-      
-    }
-       
-  } //  if (list->GetEntries() != 0
-    
-  AliInfo(Form("Test Result = %f", test)) ;
-  
+      if (index == 3) {
+        //ESD
+        for (Int_t icase=0; icase<2; icase++) {
+          Double_t rmsVertex = fhESD[icase]->GetRMS();
+          Double_t meanVertex = fhESD[icase]->GetMean();
+          test[specie]=1;
+          AliInfo(Form("numentries %d meanVertex %f rmsVertex %f", fhESD[icase]->GetEntries(), meanVertex, rmsVertex));
+          if (TMath::Abs(rmsVertex)>3) {
+            test[specie]=0.25;
+            AliDebug(1,Form("Vertex position resolution not good  , rms= %f test=%f",
+                            rmsVertex, test[specie])) ; 
+          }
+          if (TMath::Abs(meanVertex)>3) {
+            test[specie]=0.25;
+            AliDebug(1,Form("Vertex position bad calibrated  , Mean= %f test=%f",
+                            meanVertex, test[specie])) ; 
+          }
+        }
+      }
+    } //  if (list->GetEntries() != 0
+    AliInfo(Form("Test Result = %f", test[specie])) ;
+  } 
   return test ;
 }
 
index 9486441141a3e56e0130d42c53453a7d1a981a4d..1588b8b9cbbc76cfc70e4f975a0899e53c9437b9 100644 (file)
@@ -30,13 +30,9 @@ public:
  // dtor
  virtual ~AliT0QAChecker() {;}
 private:
-  virtual Double_t Check(AliQA::ALITASK_t,TObjArray * list) ;
-  virtual Double_t Check(TObjArray*) {return 0.;}
-  virtual Double_t Check(AliQA::ALITASK_t,  TNtupleD*) {return 0.;}
-  virtual Double_t Check(AliQA::ALITASK_t) {return 0.;}
-  virtual Double_t Check() {return 0.;} ;
+  virtual Double_t * Check(AliQA::ALITASK_t) ; 
+  virtual Double_t * Check(AliQA::ALITASK_t, TObjArray ** list) ;
   
-
   ClassDef(AliT0QAChecker,1)  // description 
 
 };
index ccd2fc998752f8da7acb01f131343d8d7b12aea2..9fd3bedda685ff554bdce55270f227413067813d 100644 (file)
@@ -81,35 +81,38 @@ AliT0QADataMakerRec& AliT0QADataMakerRec::operator = (const AliT0QADataMakerRec&
   return *this;
 }
 //____________________________________________________________________________
-void AliT0QADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliT0QADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
   AliQAChecker::Instance()->Run(AliQA::kT0, task, list) ;
- if ( task == AliQA::kRAWS ) {
-  const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"};
- for (Int_t itr=0; itr<6; itr++) {
-    GetRawsData(197)->Fill(triggers[itr], fNumTriggersCal[itr]);
-    GetRawsData(197)->SetBinContent(itr+1, fNumTriggersCal[itr]);
-  }  
-    GetRawsData(205)->SetOption("COLZ");
-    GetRawsData(206)->SetOption("COLZ");
-    GetRawsData(207)->SetOption("COLZ");
-    GetRawsData(205)->GetXaxis()->SetTitle("#PMT");
-    GetRawsData(206)->GetXaxis()->SetTitle("#PMT");
-    GetRawsData(205)->GetYaxis()->SetTitle("NeventsReg/Nevents");
-    GetRawsData(206)->GetYaxis()->SetTitle("NeventsReg/Nevents");
-    GetRawsData(207)->GetXaxis()->SetTitle("#PMT");
-    GetRawsData(207)->GetYaxis()->SetTitle("Charge, #channels");
- }
- if ( task == AliQA::kRECPOINTS) {
-   GetRecPointsData(0)->SetOption("COLZ");
-  GetRecPointsData(1)->SetOption("COLZ");
-  GetRecPointsData(0)->GetXaxis()->SetTitle("#PMT");
-  GetRecPointsData(1)->GetXaxis()->SetTitle("#PMT");
-  GetRecPointsData(0)->GetYaxis()->SetTitle("CFD time");
-  GetRecPointsData(1)->GetYaxis()->SetTitle("Charge, #channels");
- }
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    SetEventSpecie(specie) ; 
+    if ( task == AliQA::kRAWS ) {
+      const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"};
+      for (Int_t itr=0; itr<6; itr++) {
+        GetRawsData(197)->Fill(triggers[itr], fNumTriggersCal[itr]);
+        GetRawsData(197)->SetBinContent(itr+1, fNumTriggersCal[itr]);
+      }  
+      GetRawsData(205)->SetOption("COLZ");
+      GetRawsData(206)->SetOption("COLZ");
+      GetRawsData(207)->SetOption("COLZ");
+      GetRawsData(205)->GetXaxis()->SetTitle("#PMT");
+      GetRawsData(206)->GetXaxis()->SetTitle("#PMT");
+      GetRawsData(205)->GetYaxis()->SetTitle("NeventsReg/Nevents");
+      GetRawsData(206)->GetYaxis()->SetTitle("NeventsReg/Nevents");
+      GetRawsData(207)->GetXaxis()->SetTitle("#PMT");
+      GetRawsData(207)->GetYaxis()->SetTitle("Charge, #channels");
+    }
+    if ( task == AliQA::kRECPOINTS) {
+      GetRecPointsData(0)->SetOption("COLZ");
+      GetRecPointsData(1)->SetOption("COLZ");
+      GetRecPointsData(0)->GetXaxis()->SetTitle("#PMT");
+      GetRecPointsData(1)->GetXaxis()->SetTitle("#PMT");
+      GetRecPointsData(0)->GetYaxis()->SetTitle("CFD time");
+      GetRecPointsData(1)->GetYaxis()->SetTitle("Charge, #channels");
+    }
+  }
 }
 
 //____________________________________________________________________________
index 4dfaba476bacbfbf5f3a5afde5866ce2ea0e1e23..9a72b2cf181ed41093cd1b932d14cb2e84c93503 100644 (file)
@@ -37,7 +37,7 @@ private:
   virtual void   MakeRaws(AliRawReader* rawReader) ;
   virtual void   MakeRecPoints(TTree * clusters)    ;  //Fill cluster QA histo
   virtual void   MakeESDs(AliESDEvent * esd) ;         //Fill hit QA histo
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
   virtual void   StartOfDetectorCycle() ;
 
   Int_t fNumTriggers[6];  //number of trigger signals;
index a94178321ac859ec9bbd1a9a2770ebfdfa942464..880b8c281a906dfeab341cd07635bc33e1bda745 100644 (file)
@@ -90,7 +90,7 @@ AliT0QADataMakerSim& AliT0QADataMakerSim::operator = (const AliT0QADataMakerSim&
   return *this;
 }
 //____________________________________________________________________________
-void AliT0QADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliT0QADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
index 36d6955a9cf5c8b85a49954a4f8d2f22ef73d50f..a38fe8fece809fb8eed8b1a1b67fa728c5dd4bfd 100644 (file)
@@ -37,7 +37,7 @@ private:
   virtual void   MakeHits(TClonesArray *) {}       //Dummy for the moment
   virtual void   MakeDigits(TTree* digitsTree) ;   //Fill Digit QA histo
   virtual void   MakeDigits(TClonesArray *) {}       //Dummy for the moment
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
   virtual void   StartOfDetectorCycle() ;
   ClassDef(AliT0QADataMakerSim,1)  // description 
 
index 7b73e75c39ec3c54bdfb7a7ea3632de3a6255a84..89a5cd87dcb975267c53bee2313b815374ef7085 100644 (file)
 ClassImp(AliTOFQAChecker)
 
 //____________________________________________________________________________
-Double_t AliTOFQAChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray * list) 
+Double_t * AliTOFQAChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray ** list) 
 {
 
   // Super-basic check on the QA histograms on the input list: 
   // look whether they are empty!
 
-  Double_t test = 0.0  ;
-  Int_t count = 0 ; 
-  
-  if (list->GetEntries() == 0){  
-    test = 1. ; // nothing to check
-  }
-  else {
-    TIter next(list) ; 
-    TH1 * hdata ;
-    count = 0 ; 
-    while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
-      if (hdata) { 
-       Double_t rv = 0.;
-       if(hdata->GetEntries()>0)rv=1; 
-       AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ; 
-       count++ ; 
-       test += rv ; 
-      }
-      else{
-       AliError("Data type cannot be processed") ;
-      }
-      
+  Double_t * test  = new Double_t[AliRecoParam::kNSpecies] ; 
+  Int_t count[AliRecoParam::kNSpecies] = { 0 }; 
+
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    test[specie] = 1.0 ; 
+    if ( !AliQA::Instance()->IsEventSpecieSet(specie) ) 
+      continue ; 
+    if (list[specie]->GetEntries() == 0){  
+      test[specie] = 0.0 ; // nothing to check
     }
-    if (count != 0) { 
-      if (test==0) {
-       AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
-       test = 0.5;  //upper limit value to set kWARNING flag for a task
+    else {
+      TIter next(list[specie]) ; 
+      TH1 * hdata ;
+      count[specie] = 0 ; 
+      while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
+        if (hdata) { 
+          Double_t rv = 0.;
+          if(hdata->GetEntries()>0)rv=1; 
+          AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ; 
+          count[specie]++ ; 
+          test[specie] += rv ; 
+        }
+        else{
+          AliError("Data type cannot be processed") ;
+        }
       }
-      else {
-       test /= count ;
+      if (count[specie] != 0) { 
+        if (test[specie]==0) {
+          AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
+          test[specie] = 0.5;  //upper limit value to set kWARNING flag for a task
+        }
+        else {
+        test[specie] /= count[specie] ;
+        }
+        AliInfo(Form("Test Result = %f", test[specie])) ; 
       }
     }
   }
-
-  AliInfo(Form("Test Result = %f", test)) ; 
   return test ; 
 }  
 
index 2fdb8ae7d21636b3231525e0572712500744994a..397900fe87649678155e89c8d2b27f4035879c61 100644 (file)
@@ -27,11 +27,8 @@ public:
 
  protected:
 
-  virtual Double_t Check(AliQA::ALITASK_t /*index*/, TObjArray * list) ;
-  virtual Double_t Check(AliQA::ALITASK_t /*index*/) {return 0.;} 
-  virtual Double_t Check() {return 0.;} 
-  virtual Double_t Check(TObjArray*) {return 0.;} 
-  virtual Double_t Check(AliQA::ALITASK_t,  TNtupleD*) {return 0.;}
+  virtual Double_t * Check(AliQA::ALITASK_t /*index*/, TObjArray ** list) ;
+  virtual Double_t * Check(AliQA::ALITASK_t /*index*/) {return NULL;} 
   
   ClassDef(AliTOFQAChecker,2)  // description 
 
index d0dabf91b2a64f8805da9cff1d2bd64aa1b9e5f1..16622aad4bb5207c731e1d980b57658cee82f07e 100644 (file)
@@ -309,7 +309,7 @@ void AliTOFQADataMakerRec::StartOfDetectorCycle()
 }
 
 //____________________________________________________________________________ 
-void AliTOFQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliTOFQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
index cee82f8a91f87f9678700c196829322ff0a7045e..f883b1657eccdcbe56c4f96d09eeb7066ccbf87a 100644 (file)
@@ -29,7 +29,7 @@ private:
   virtual void   MakeRecPoints(TTree * recTree) ; 
   virtual void   MakeRaws(AliRawReader* rawReader) ; 
   virtual void   StartOfDetectorCycle() ; 
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list) ;
   virtual void   GetMapIndeces(Int_t *in, Int_t *out) ; 
 
   ClassDef(AliTOFQADataMakerRec,1)  // description 
index 35118fcd39cf0ed60d20fb6bad66299debc4fd51..bd7896ad771d2890646a5e82a998e0e623f7be9b 100644 (file)
@@ -338,7 +338,7 @@ void AliTOFQADataMakerSim::StartOfDetectorCycle()
 }
 
 //____________________________________________________________________________ 
-void AliTOFQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliTOFQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
index 4054ae66762d8b902b57012362fa4353762debe0..98fbde5a7a31da629e63a3e6e4e80c6c1bbffc0d 100644 (file)
@@ -32,7 +32,7 @@ private:
   virtual void   MakeSDigits(TClonesArray * sdigits) ; 
   virtual void   MakeSDigits(TTree * sdigTree);
   virtual void   StartOfDetectorCycle() ; 
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list) ;
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list) ;
   virtual void   GetMapIndeces(Int_t *in, Int_t *out) ; 
 
   ClassDef(AliTOFQADataMakerSim,1)  // description 
index 96423d3b2e059d89489f5012dde5531d130ab1a7..e93376283818d7829b4077af53ad135694f40533 100644 (file)
@@ -70,17 +70,13 @@ ClassImp(AliTPCQADataMakerRec)
 AliTPCQADataMakerRec::AliTPCQADataMakerRec() : 
   AliQADataMakerRec(AliQA::GetDetName(AliQA::kTPC), 
                    "TPC Rec Quality Assurance Data Maker"),
-  fTPCdataQA(0),
-  fHistESDclusters(0),fHistESDratio(0), fHistESDpt(0),
-  fHistRawsOccupancy(0), fHistRawsOccupancyVsSector(0),
-  fHistRawsNClustersPerEventVsSector(0), fHistRawsQVsSector(0),
-  fHistRawsQmaxVsSector(0),
-  fHistRecPointsQmaxShort(0), fHistRecPointsQmaxMedium(0), 
-  fHistRecPointsQmaxLong(0), fHistRecPointsQShort(0), 
-  fHistRecPointsQMedium(0), fHistRecPointsQLong(0),
-  fHistRecPointsRow(0)
+  fTPCdataQA(NULL)
 {
   // ctor
+  fTPCdataQA = new AliTPCdataQA*[AliRecoParam::kNSpecies] ;
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    fTPCdataQA[specie] = NULL ; 
+  
   for(Int_t i = 0; i < 6; i++)
     fMapping[i] = 0;
 }
@@ -88,15 +84,7 @@ AliTPCQADataMakerRec::AliTPCQADataMakerRec() :
 //____________________________________________________________________________ 
 AliTPCQADataMakerRec::AliTPCQADataMakerRec(const AliTPCQADataMakerRec& qadm) :
   AliQADataMakerRec(),
-  fTPCdataQA(0),
-  fHistESDclusters(0),fHistESDratio(0), fHistESDpt(0),
-  fHistRawsOccupancy(0), fHistRawsOccupancyVsSector(0),
-  fHistRawsNClustersPerEventVsSector(0), fHistRawsQVsSector(0),
-  fHistRawsQmaxVsSector(0),
-  fHistRecPointsQmaxShort(0), fHistRecPointsQmaxMedium(0), 
-  fHistRecPointsQmaxLong(0), fHistRecPointsQShort(0), 
-  fHistRecPointsQMedium(0), fHistRecPointsQLong(0),
-  fHistRecPointsRow(0)
+  fTPCdataQA(NULL)
 {
   //copy ctor 
   // Does not copy the calibration object, instead InitRaws have to be
@@ -104,6 +92,10 @@ AliTPCQADataMakerRec::AliTPCQADataMakerRec(const AliTPCQADataMakerRec& qadm) :
   SetName((const char*)qadm.GetName()) ; 
   SetTitle((const char*)qadm.GetTitle()); 
 
+  fTPCdataQA = new AliTPCdataQA*[AliRecoParam::kNSpecies] ;
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    fTPCdataQA[specie] = NULL ; 
+  
   for(Int_t i = 0; i < 6; i++)
     fMapping[i] = 0;
 
@@ -111,32 +103,7 @@ AliTPCQADataMakerRec::AliTPCQADataMakerRec(const AliTPCQADataMakerRec& qadm) :
   // Associate class histogram objects to the copies in the list
   // Could also be done with the indexes
   //
-  fHistESDclusters   = (TH1F*)fESDsQAList->FindObject("hESDclusters");
-  fHistESDratio             = (TH1F*)fESDsQAList->FindObject("hESDratio");
-  fHistESDpt         = (TH1F*)fESDsQAList->FindObject("hESDpt");
-
-  fHistRawsOccupancy = (TH1F*)fRawsQAList->FindObject("hRawsOccupancy");
-  fHistRawsOccupancyVsSector = 
-    (TH1F*)fRawsQAList->FindObject("hRawsOccupancyVsSector");
-  fHistRawsNClustersPerEventVsSector = 
-    (TH1F*)fRawsQAList->FindObject("hRawsNClustersPerEventVsSector");
-  fHistRawsQVsSector = (TH1F*)fRawsQAList->FindObject("hRawsQVsSector");
-  fHistRawsQmaxVsSector = (TH1F*)fRawsQAList->FindObject("hRawsQmaxVsSector");
-  
-  fHistRecPointsQmaxShort  = 
-    (TH1F*)fRecPointsQAList->FindObject("hRecPointsQmaxShort");
-  fHistRecPointsQmaxMedium = 
-    (TH1F*)fRecPointsQAList->FindObject("hRecPointsQmaxMedium");
-  fHistRecPointsQmaxLong   = 
-    (TH1F*)fRecPointsQAList->FindObject("hRecPointsQmaxLong"); 
-  fHistRecPointsQShort     = 
-    (TH1F*)fRecPointsQAList->FindObject("hRecPointsQShort");
-  fHistRecPointsQMedium    = 
-    (TH1F*)fRecPointsQAList->FindObject("hRecPointsQMedium");
-  fHistRecPointsQLong      = 
-    (TH1F*)fRecPointsQAList->FindObject("hRecPointsQLong");
-  fHistRecPointsRow      = 
-    (TH1F*)fRecPointsQAList->FindObject("hRecPointsRow");
+
 }
 
 //__________________________________________________________________
@@ -152,95 +119,115 @@ AliTPCQADataMakerRec& AliTPCQADataMakerRec::operator = (const AliTPCQADataMakerR
 AliTPCQADataMakerRec::~AliTPCQADataMakerRec()
 {
   // Destructor
-  delete fTPCdataQA; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
+    if ( fTPCdataQA[specie] != NULL )
+      delete fTPCdataQA[specie] ; 
+  delete[] fTPCdataQA; 
 
   for(Int_t i = 0; i < 6; i++) 
     delete fMapping[i];
 }
  
 //____________________________________________________________________________ 
-void AliTPCQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliTPCQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
+  
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    if ( !AliQA::Instance()->IsEventSpecieSet(specie) ) 
+      continue ; 
+    if(fTPCdataQA[specie] != NULL) { // do the final step of the QA for Raw data
 
-  if(fTPCdataQA) { // do the final step of the QA for Raw data
-
-    fTPCdataQA->Analyse(); // 31/1-08 Analyse is now protected against
+      fTPCdataQA[specie]->Analyse(); // 31/1-08 Analyse is now protected against
                            //         RAW data files with no TPC data
-    
-    //Add2RawsList(fTPCdataQA, 0);
-    // get the histograms and add them to the output
-    // 31/8-08 Histogram is only added if the Calibration class 
-    //         receives TPC data 
-    const Int_t eventCounter = fTPCdataQA->GetEventCounter();
-    if(eventCounter>0) { // some TPC data has been processed
-
-      // Reset histograms and refill them 
-      fHistRawsOccupancy->Reset();
-      fHistRawsOccupancyVsSector->Reset();
-      fHistRawsNClustersPerEventVsSector->Reset();
-      fHistRawsQVsSector->Reset();
-      fHistRawsQmaxVsSector->Reset();
+
+      SetEventSpecie(specie) ; 
+      TH1F * histRawsOccupancy                 = (TH1F*)GetRawsData(kOccupancy) ;
+      TH1F * histRawsOccupancyVsSector         = (TH1F*)GetRawsData(kOccupancyVsSector) ;
+      TH1F * histRawsNClustersPerEventVsSector = (TH1F*)GetRawsData(kNClustersPerEventVsSector) ;
+      TH1F * histRawsQVsSector                 = (TH1F*)GetRawsData(kQVsSector) ;
+      TH1F * histRawsQmaxVsSector              = (TH1F*)GetRawsData(kQmaxVsSector) ;
+      if ( !histRawsOccupancy ||
+          !histRawsOccupancyVsSector ||
+          !histRawsNClustersPerEventVsSector ||
+          !histRawsQVsSector ||
+          !histRawsQmaxVsSector) {
+        AliError("Something very wrong here, corrupted memory ?????. Please check\n") ; 
+        continue ; 
+      }
+        
+      //Add2RawsList(fTPCdataQA, 0);
+      // get the histograms and add them to the output
+      // 31/8-08 Histogram is only added if the Calibration class 
+      //         receives TPC data 
+      const Int_t eventCounter = fTPCdataQA[specie]->GetEventCounter();
+      if(eventCounter>0) { // some TPC data has been processed
+
+        // Reset histograms and refill them 
+        histRawsOccupancy->Reset();
+        histRawsOccupancyVsSector->Reset();
+        histRawsNClustersPerEventVsSector->Reset();
+        histRawsQVsSector->Reset();
+        histRawsQmaxVsSector->Reset();
       
-      TH1F* hNorm72 = new TH1F("hNorm72", "histogram to normalize 72 sectors",
-                              72, 0, 72);
-      hNorm72->Sumw2();
-      TH1F* hNorm108 = new TH1F("hNorm108", "histogram to normalize 108 sectors (medium and long pads are split up)",
-                              108, 0, 108);
-      hNorm108->Sumw2();
-
-      for (Int_t iSec = 0; iSec < 72; iSec++) {
+        TH1F* hNorm72 = new TH1F("hNorm72", "histogram to normalize 72 sectors",
+                                 72, 0, 72);
+        hNorm72->Sumw2();
+        TH1F* hNorm108 = new TH1F("hNorm108", "histogram to normalize 108 sectors (medium and long pads are split up)",
+                                  108, 0, 108);
+        hNorm108->Sumw2();
+
+        for (Int_t iSec = 0; iSec < 72; iSec++) {
        
-       AliTPCCalROC* occupancyROC = 
-         fTPCdataQA->GetNoThreshold()->GetCalROC(iSec); 
-       AliTPCCalROC* nclusterROC = 
-         fTPCdataQA->GetNLocalMaxima()->GetCalROC(iSec); 
-       AliTPCCalROC* qROC = 
-         fTPCdataQA->GetMeanCharge()->GetCalROC(iSec); 
-       AliTPCCalROC* qmaxROC = 
-         fTPCdataQA->GetMaxCharge()->GetCalROC(iSec); 
-
-       const Int_t nRows = occupancyROC->GetNrows(); 
-       for (Int_t iRow = 0; iRow < nRows; iRow++) {
-
-         Int_t helpSector = iSec;
-         if(iRow>=64)
-           helpSector += 36; // OROC (long pads)
-
-         const Int_t nPads = occupancyROC->GetNPads(iRow); 
-         for (Int_t iPad = 0; iPad < nPads; iPad++) {
+          AliTPCCalROC* occupancyROC = 
+          fTPCdataQA[specie]->GetNoThreshold()->GetCalROC(iSec); 
+          AliTPCCalROC* nclusterROC = 
+          fTPCdataQA[specie]->GetNLocalMaxima()->GetCalROC(iSec); 
+          AliTPCCalROC* qROC = 
+          fTPCdataQA[specie]->GetMeanCharge()->GetCalROC(iSec); 
+          AliTPCCalROC* qmaxROC = 
+          fTPCdataQA[specie]->GetMaxCharge()->GetCalROC(iSec); 
+
+          const Int_t nRows = occupancyROC->GetNrows(); 
+          for (Int_t iRow = 0; iRow < nRows; iRow++) {
+
+            Int_t helpSector = iSec;
+            if(iRow>=64)
+              helpSector += 36; // OROC (long pads)
+
+            const Int_t nPads = occupancyROC->GetNPads(iRow); 
+            for (Int_t iPad = 0; iPad < nPads; iPad++) {
        
-           fHistRawsOccupancy->Fill(occupancyROC->GetValue(iRow, iPad));
-           hNorm72->Fill(iSec);
-           fHistRawsOccupancyVsSector
-             ->Fill(iSec, occupancyROC->GetValue(iRow, iPad));
+              histRawsOccupancy->Fill(occupancyROC->GetValue(iRow, iPad));
+              hNorm72->Fill(iSec);
+              histRawsOccupancyVsSector
+              ->Fill(iSec, occupancyROC->GetValue(iRow, iPad));
 
-           const Int_t nClusters = TMath::Nint(nclusterROC->GetValue(iRow, iPad));
+              const Int_t nClusters = TMath::Nint(nclusterROC->GetValue(iRow, iPad));
            
-           if(nClusters>0) {
+              if(nClusters>0) {
              
-             fHistRawsNClustersPerEventVsSector->Fill(iSec, nClusters);
-             hNorm108->Fill(helpSector, nClusters);
-             fHistRawsQVsSector->Fill(helpSector, 
-                                      nClusters*qROC->GetValue(iRow, iPad));
-             fHistRawsQmaxVsSector->Fill(helpSector, 
-                                         nClusters*qmaxROC->GetValue(iRow, iPad));
-           }
-         }
-       }
-      } // end loop over sectors
+                histRawsNClustersPerEventVsSector->Fill(iSec, nClusters);
+                hNorm108->Fill(helpSector, nClusters);
+                histRawsQVsSector->Fill(helpSector, 
+                                       nClusters*qROC->GetValue(iRow, iPad));
+                histRawsQmaxVsSector->Fill(helpSector, 
+                                          nClusters*qmaxROC->GetValue(iRow, iPad));
+              }
+            }
+          }
+        } // end loop over sectors
       
-      // Normalize histograms
-      fHistRawsOccupancyVsSector->Divide(hNorm72);
-      fHistRawsNClustersPerEventVsSector->Scale(1.0/Float_t(eventCounter));
-      fHistRawsQVsSector->Divide(hNorm108);
-      fHistRawsQmaxVsSector->Divide(hNorm108);
-      delete hNorm72;
-      delete hNorm108;
-
+        // Normalize histograms
+        histRawsOccupancyVsSector->Divide(hNorm72);
+        histRawsNClustersPerEventVsSector->Scale(1.0/Float_t(eventCounter));
+        histRawsQVsSector->Divide(hNorm108);
+        histRawsQmaxVsSector->Divide(hNorm108);
+        delete hNorm72;
+        delete hNorm108;
+      }
     }
   }
-
   AliQAChecker::Instance()->Run(AliQA::kTPC, task, list) ;  
 }
 
@@ -248,23 +235,23 @@ void AliTPCQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray
 void AliTPCQADataMakerRec::InitESDs()
 {
   //create ESDs histograms in ESDs subdir  
-  fHistESDclusters = 
+  TH1F * histESDclusters = 
     new TH1F("hESDclusters", "N TPC clusters per track; N clusters; Counts",
             160, 0, 160);
-  fHistESDclusters->Sumw2();
-  Add2ESDsList(fHistESDclusters, 0);
+  histESDclusters->Sumw2();
+  Add2ESDsList(histESDclusters, KClusters);
 
-  fHistESDratio = 
+  TH1F * histESDratio = 
     new TH1F("hESDratio", "Ratio: TPC clusters / findable; Ratio: cluster/findable; Counts",
             100, 0, 1);
-  fHistESDratio->Sumw2();
-  Add2ESDsList(fHistESDratio, 1);
+  histESDratio->Sumw2();
+  Add2ESDsList(histESDratio, kRatio);
   
-  fHistESDpt = 
+  TH1F * histESDpt = 
     new TH1F("hESDpt", "P_{T} distribution; p_{T} [GeV/c]; Counts",
             50, 0, 5);
-  fHistESDpt->Sumw2();
-  Add2ESDsList(fHistESDpt, 2);
+  histESDpt->Sumw2();
+  Add2ESDsList(histESDpt, kPt);
 }
 
 //____________________________________________________________________________ 
@@ -278,87 +265,89 @@ void AliTPCQADataMakerRec::InitRaws()
   // Laurent Aphecetche pointed out that the mapping was read from file
   // for each event, so now we read in the map here and set if for 
   // the raw data qa
-  fTPCdataQA = new AliTPCdataQA();
-  LoadMaps(); // Load Altro maps
-  fTPCdataQA->SetAltroMapping(fMapping); // set Altro mapping
-  fTPCdataQA->SetRangeTime(100, 920); // set time bin interval 
-  Add2RawsList(fTPCdataQA, 0); // This is used by the AMORE monitoring
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    fTPCdataQA[specie] = new AliTPCdataQA(AliRecoParam::Convert(specie));
+    LoadMaps(); // Load Altro maps
+    fTPCdataQA[specie]->SetAltroMapping(fMapping); // set Altro mapping
+    fTPCdataQA[specie]->SetRangeTime(100, 920); // set time bin interval 
+//    Add2RawsList(fTPCdataQA, kTPCdataQA); // This is used by the AMORE monitoring <------- THIS WILL FAIL (YS)
+  }
 
-  fHistRawsOccupancy = 
+  TH1F * histRawsOccupancy = 
     new TH1F("hRawsOccupancy", "Occupancy (all pads); Occupancy; Counts",
             100, 0, 1);
-  fHistRawsOccupancy->Sumw2();
-  Add2RawsList(fHistRawsOccupancy, 1);
-
-  fHistRawsOccupancyVsSector = 
+  histRawsOccupancy->Sumw2();
+  Add2RawsList(histRawsOccupancy, kOccupancy);
+  
+  TH1F * histRawsOccupancyVsSector = 
     new TH1F("hRawsOccupancyVsSector", "Occupancy vs sector; Sector; Occupancy",
             72, 0, 72);
-  fHistRawsOccupancyVsSector->Sumw2();
-  Add2RawsList(fHistRawsOccupancyVsSector, 2);
+  histRawsOccupancyVsSector->Sumw2();
+  Add2RawsList(histRawsOccupancyVsSector, kOccupancyVsSector);
 
-  fHistRawsNClustersPerEventVsSector = 
+  TH1F * histRawsNClustersPerEventVsSector = 
     new TH1F("hRawsNClustersPerEventVsSector", "Nclusters per event vs sector; Sector; Nclusters per event",
             72, 0, 72);
-  fHistRawsNClustersPerEventVsSector->Sumw2();
-  Add2RawsList(fHistRawsNClustersPerEventVsSector, 3);
+  histRawsNClustersPerEventVsSector->Sumw2();
+  Add2RawsList(histRawsNClustersPerEventVsSector, kNClustersPerEventVsSector);
   
-  fHistRawsQVsSector = 
+  TH1F * histRawsQVsSector = 
     new TH1F("hRawsQVsSector", "<Q> vs sector (OROC med: 36-71, long: 72-107); Sector; <Q>",
             108, 0, 108);
-  fHistRawsQVsSector->Sumw2();
-  Add2RawsList(fHistRawsQVsSector, 4);
+  histRawsQVsSector->Sumw2();
+  Add2RawsList(histRawsQVsSector, kQVsSector);
 
-  fHistRawsQmaxVsSector = 
+  TH1F * histRawsQmaxVsSector = 
     new TH1F("hRawsQmaxVsSector", "<Qmax> vs sector (OROC med: 36-71, long: 72-107); Sector; <Qmax>",
             108, 0, 108);
-  fHistRawsQmaxVsSector->Sumw2();
-  Add2RawsList(fHistRawsQmaxVsSector, 5);
+  histRawsQmaxVsSector->Sumw2();
+  Add2RawsList(histRawsQmaxVsSector, kQmaxVsSector);
 }
 
 //____________________________________________________________________________ 
 void AliTPCQADataMakerRec::InitRecPoints()
 {
-  fHistRecPointsQmaxShort = 
+  TH1F * histRecPointsQmaxShort = 
     new TH1F("hRecPointsQmaxShort", "Qmax distrbution (short pads); Qmax; Counts",
             100, 0, 300);
-  fHistRecPointsQmaxShort->Sumw2();
-  Add2RecPointsList(fHistRecPointsQmaxShort, 0);
+  histRecPointsQmaxShort->Sumw2();
+  Add2RecPointsList(histRecPointsQmaxShort, kQmaxShort);
 
-  fHistRecPointsQmaxMedium = 
+  TH1F * histRecPointsQmaxMedium = 
     new TH1F("hRecPointsQmaxMedium", "Qmax distrbution (medium pads); Qmax; Counts",
             100, 0, 300);
-  fHistRecPointsQmaxMedium->Sumw2();
-  Add2RecPointsList(fHistRecPointsQmaxMedium, 1);
+  histRecPointsQmaxMedium->Sumw2();
+  Add2RecPointsList(histRecPointsQmaxMedium, kQmaxMedium);
 
-  fHistRecPointsQmaxLong = 
+  TH1F * histRecPointsQmaxLong = 
     new TH1F("hRecPointsQmaxLong", "Qmax distrbution (long pads); Qmax; Counts",
             100, 0, 300);
-  fHistRecPointsQmaxLong->Sumw2();
-  Add2RecPointsList(fHistRecPointsQmaxLong, 2);
+  histRecPointsQmaxLong->Sumw2();
+  Add2RecPointsList(histRecPointsQmaxLong, kQmaxLong);
 
-  fHistRecPointsQShort = 
+  TH1F * histRecPointsQShort = 
     new TH1F("hRecPointsQShort", "Q distrbution (short pads); Q; Counts",
             100, 0, 2000);
-  fHistRecPointsQShort->Sumw2();
-  Add2RecPointsList(fHistRecPointsQShort, 3);
+  histRecPointsQShort->Sumw2();
+  Add2RecPointsList(histRecPointsQShort, kQShort);
 
-  fHistRecPointsQMedium = 
+  TH1F * histRecPointsQMedium = 
     new TH1F("hRecPointsQMedium", "Q distrbution (medium pads); Q; Counts",
             100, 0, 2000);
-  fHistRecPointsQMedium->Sumw2();
-  Add2RecPointsList(fHistRecPointsQMedium, 4);
+  histRecPointsQMedium->Sumw2();
+  Add2RecPointsList(histRecPointsQMedium, kQMedium);
 
-  fHistRecPointsQLong = 
+  TH1F * histRecPointsQLong = 
     new TH1F("hRecPointsQLong", "Q distrbution (long pads); Q; Counts",
             100, 0, 2000);
-  fHistRecPointsQLong->Sumw2();
-  Add2RecPointsList(fHistRecPointsQLong, 5);
+  histRecPointsQLong->Sumw2();
+  Add2RecPointsList(histRecPointsQLong, kQLong);
 
-  fHistRecPointsRow = 
+  TH1F * histRecPointsRow = 
     new TH1F("hRecPointsRow", "Clusters per row; Row; Counts",
             159, 0, 159);
-  fHistRecPointsRow->Sumw2();
-  Add2RecPointsList(fHistRecPointsRow, 6);
+  histRecPointsRow->Sumw2();
+  Add2RecPointsList(histRecPointsRow, kRow);
 }
 
 //____________________________________________________________________________
@@ -380,9 +369,9 @@ void AliTPCQADataMakerRec::MakeESDs(AliESDEvent * esd)
     Int_t nTPCclusters         = track->GetTPCNcls();
     Int_t nTPCclustersFindable = track->GetTPCNclsF();
     if ( nTPCclustersFindable<=0) continue;
-    fHistESDclusters->Fill(nTPCclusters);
-    fHistESDratio->Fill(Float_t(nTPCclusters)/Float_t(nTPCclustersFindable));
-    fHistESDpt->Fill(track->Pt()); 
+    GetESDsData(KClusters)->Fill(nTPCclusters);
+    GetESDsData(kRatio)->Fill(Float_t(nTPCclusters)/Float_t(nTPCclustersFindable));
+    GetESDsData(kPt)->Fill(track->Pt()); 
   }
 }
 
@@ -394,8 +383,8 @@ void AliTPCQADataMakerRec::MakeRaws(AliRawReader* rawReader)
   // to handle the data and then in the end extract the data
   //
        rawReader->Reset() ; 
-  fTPCdataQA->ProcessEvent(rawReader);  
-}
+  fTPCdataQA[AliRecoParam::AConvert(fEventSpecie)]->ProcessEvent(rawReader);  
+ }
 
 //____________________________________________________________________________
 void AliTPCQADataMakerRec::MakeRecPoints(TTree* recTree)