]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Introducing Raw data QA and replacing the QA data histograms by a Tlist of histograms
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 29 Sep 2007 10:28:47 +0000 (10:28 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 29 Sep 2007 10:28:47 +0000 (10:28 +0000)
STEER/AliQualAss.cxx
STEER/AliQualAss.h
STEER/AliQualAssDataMaker.cxx
STEER/AliQualAssDataMaker.h

index 2645248d10ad36470ef3fc76f88bf0b3d7a1783e..0cd7b7abbc4836545e3921e58aeb02fc3dc52242 100644 (file)
@@ -143,7 +143,7 @@ const Bool_t AliQualAss::CheckRange(DETECTORINDEX det) const
 const Bool_t AliQualAss::CheckRange(ALITASK task) const
 { 
   // check if task is given taskk range: 0:kNTASK
-  Bool_t rv = ( task < kSIM || task > kNTASK )  ? kFALSE : kTRUE ;
+  Bool_t rv = ( task < kRAW || task > kNTASK )  ? kFALSE : kTRUE ;
   if (!rv)
     AliFatal(Form("Module index %d is out of range: 0 <= index <= %d", task, kNTASK)) ;
   return rv ;
@@ -197,6 +197,9 @@ const char * AliQualAss::GetAliTaskName(ALITASK tsk)
   switch (tsk) {
   case kNULLTASK:
     break ; 
+  case kRAW:
+    tskName = "RAW" ;
+    break ;  
   case kSIM:
     tskName = "SIM" ;
     break ;
@@ -272,7 +275,10 @@ AliQualAss * AliQualAss::Instance(const ALITASK tsk)
     switch (tsk) {
     case kNULLTASK:
       break ;
-    case kSIM:
+       case kRAW:
+      fgQA = new AliQualAss(tsk) ;
+      break ;
+       case kSIM:
       fgQA = new AliQualAss(tsk) ;
       break ;
     case kREC:
@@ -303,18 +309,21 @@ const ULong_t AliQualAss::Offset(ALITASK tsk) const
   switch (tsk) {
   case kNULLTASK:
     break ;
-  case kSIM:
+  case kRAW:
     offset+= 0 ;
     break ;
-  case kREC:
+  case kSIM:
     offset+= 4 ;
     break ;
-  case kESD:
+  case kREC:
     offset+= 8 ;
     break ;
-  case kANA:
+  case kESD:
     offset+= 12 ;
     break ;
+  case kANA:
+    offset+= 16 ;
+    break ;
   case kNTASK:
     break ;
   }
index 99e6465169a5be9966bb237ab984436ebf855577..bb21d510491c0c3b0a853643bf75a73b61364af7 100644 (file)
@@ -22,14 +22,14 @@ public:
     kZDC, kPMD, kT0, kVZERO, kACORDE, kHLT, kNDET
   };
   enum ALITASK {
-    kNULLTASK=-1, kSIM, kREC, kESD, kANA, kNTASK
+    kNULLTASK=-1, kRAW, kSIM, kREC, kESD, kANA, kNTASK
   };
   enum QABIT {
     kNULLBit=-1, kINFO, kWARNING, kERROR, kFATAL, kNBIT
   };
   
   enum TASKINDEX {
-    kHITS, kSDIGITS, kDIGITS, kRECPOINTS, kTRACKSEGMENTS, kRECPARTICLES, kESDS
+    kRAWS, kHITS, kSDIGITS, kDIGITS, kRECPOINTS, kTRACKSEGMENTS, kRECPARTICLES, kESDS
   };
   
  // Creators - destructors
index 9566dbf753a0ba112615f10f356e76368b86cf09..ebddb74dcebc6fd1a437c15613403cc719df68f4 100644 (file)
@@ -26,7 +26,7 @@
 // --- ROOT system ---
 #include <TSystem.h> 
 #include <TFile.h>
-#include <TClonesArray.h> 
+#include <TList.h> 
 #include <TTree.h>
 
 // --- Standard library ---
@@ -45,7 +45,13 @@ TString AliQualAssDataMaker::fDetectorDirName("") ;
 AliQualAssDataMaker::AliQualAssDataMaker(const char * name, const char * title) : 
   TNamed(name, title), 
   fOutput(0x0),
-  fDetectorDir(0x0)
+  fDetectorDir(0x0),
+  fDigitsQAList(0x0), 
+  fESDsQAList(0x0), 
+  fHitsQAList(0x0),
+  fRawsQAList(0x0), 
+  fRecPointsQAList(0x0), 
+  fSDigitsQAList(0x0)
 {
   // ctor
   TString tmp(GetName()) ; 
@@ -59,7 +65,13 @@ AliQualAssDataMaker::AliQualAssDataMaker(const char * name, const char * title)
 AliQualAssDataMaker::AliQualAssDataMaker(const AliQualAssDataMaker& qadm) :
   TNamed(qadm.GetName(), qadm.GetTitle()),
   fOutput(qadm.fOutput),
-  fDetectorDir(qadm.fDetectorDir)
+  fDetectorDir(qadm.fDetectorDir),
+  fDigitsQAList(qadm.fDigitsQAList),
+  fESDsQAList(qadm.fESDsQAList),
+  fHitsQAList(qadm.fHitsQAList),
+  fRawsQAList(qadm.fRecPointsQAList),
+  fRecPointsQAList(qadm.fRecPointsQAList),
+  fSDigitsQAList(qadm.fSDigitsQAList)
 {
   //copy ctor
   fDetectorDirName = GetName() ; 
@@ -84,6 +96,12 @@ void AliQualAssDataMaker::Exec(AliQualAss::TASKINDEX task, TObject * data)
    fDetectorDir = fOutput->mkdir(GetDetectorDirName()) ; 
    
   switch (task) { 
+  
+  case AliQualAss::kRAWS:
+    AliInfo("Processing Raws QA") ; 
+    MakeRaws(data) ;
+    break ; 
+
   case AliQualAss::kHITS:
     AliInfo("Processing Hits QA") ; 
     MakeHits(data) ;
@@ -100,13 +118,11 @@ void AliQualAssDataMaker::Exec(AliQualAss::TASKINDEX task, TObject * data)
  
    case AliQualAss::kRECPOINTS:
      AliInfo("Processing RecPoints QA") ; 
-     {
-       TTree * recpoints = dynamic_cast<TTree *>(data) ; 
-       if (recpoints) 
-        MakeRecPoints(recpoints) ;
-       else 
-        AliError("Wrong type of recpoints container") ; 
-     }
+     TTree * recpoints = dynamic_cast<TTree *>(data) ; 
+    if (recpoints) 
+      MakeRecPoints(recpoints) ;
+    else 
+      AliError("Wrong type of recpoints container") ; 
     break ;  
 
    case AliQualAss::kTRACKSEGMENTS:
@@ -179,19 +195,30 @@ void AliQualAssDataMaker::Finish(AliQualAss::TASKINDEX task) const
 } 
 
 //____________________________________________________________________________ 
-void AliQualAssDataMaker::Init(AliQualAss::TASKINDEX task)
+TList *  AliQualAssDataMaker::Init(AliQualAss::TASKINDEX task)
 {
   // general intialisation
-  
   TDirectory * subDir = 0x0 ; 
   
   switch (task) { 
+  case AliQualAss::kRAWS: 
+    subDir = fDetectorDir->GetDirectory("Raws") ; 
+       if (!subDir)
+      subDir = fDetectorDir->mkdir("Raws") ; 
+       subDir->cd() ; 
+       fRawsQAList = new TList() ;      
+    InitRaws() ;
+       return fRawsQAList ;
+    break ; 
+
   case AliQualAss::kHITS: 
     subDir = fDetectorDir->GetDirectory("Hits") ; 
        if (!subDir)
       subDir = fDetectorDir->mkdir("Hits") ; 
        subDir->cd() ; 
+       fHitsQAList = new TList() ;      
     InitHits() ;
+       return fHitsQAList ;
     break ; 
   
   case AliQualAss::kSDIGITS: 
@@ -199,15 +226,19 @@ void AliQualAssDataMaker::Init(AliQualAss::TASKINDEX task)
        if (!subDir)
                subDir = fDetectorDir->mkdir("SDigits") ; 
        subDir->cd() ; 
+       fSDigitsQAList = new TList() ; 
     InitSDigits() ;
+       return fSDigitsQAList ;
     break ; 
 
   case AliQualAss::kDIGITS: 
        subDir = fDetectorDir->GetDirectory("Digits") ; 
        if (!subDir)
                subDir = fDetectorDir->mkdir("Digits") ; 
-       subDir->cd() ; 
+       subDir->cd() ;
+       fDigitsQAList = new TList(); 
        InitDigits() ;
+       return fDigitsQAList ;
        break ; 
          
   case AliQualAss::kRECPOINTS: 
@@ -215,23 +246,25 @@ void AliQualAssDataMaker::Init(AliQualAss::TASKINDEX task)
        if(!subDir)
                subDir = fDetectorDir->mkdir("RecPoints") ; 
        subDir->cd() ; 
+       fRecPointsQAList = new TList ; 
     InitRecPoints() ;
+       return fRecPointsQAList ;
     break ; 
 
   case AliQualAss::kTRACKSEGMENTS: 
-       subDir = fDetectorDir->GetDirectory("TrackSegments") ; 
-       if (!subDir)
-               subDir = fDetectorDir->mkdir("TrackSegments") ; 
-       subDir->cd() ; 
-    InitTrackSegments() ;
+//     subDir = fDetectorDir->GetDirectory("TrackSegments") ; 
+//     if (!subDir)
+//             subDir = fDetectorDir->mkdir("TrackSegments") ; 
+//     subDir->cd() ; 
+//  InitTrackSegments() ;
     break ; 
     
   case AliQualAss::kRECPARTICLES: 
-       subDir = fDetectorDir->GetDirectory("RecParticles") ; 
-       if (!subDir)
-               subDir = fDetectorDir->mkdir("RecParticles") ; 
-       subDir->cd() ; 
-    InitRecParticles() ;
+//     subDir = fDetectorDir->GetDirectory("RecParticles") ; 
+//     if (!subDir)
+//             subDir = fDetectorDir->mkdir("RecParticles") ; 
+//     subDir->cd() ; 
+//    InitRecParticles() ;
     break ; 
     
   case AliQualAss::kESDS: 
@@ -239,7 +272,10 @@ void AliQualAssDataMaker::Init(AliQualAss::TASKINDEX task)
        if (!subDir) 
                subDir = fDetectorDir->mkdir("ESDs") ;
        subDir->cd() ; 
-    InitESDs() ;
+       fESDsQAList = new TList() ; 
+       InitESDs() ;
+       return fRecPointsQAList ;
     break ; 
   }  
+  return 0x0 ; 
 }
index 1483df8f2688d308e7751dceabd6b6cde267d07b..f43807cdd15cd1d030d2baccb224cee266c92bc1 100644 (file)
@@ -15,6 +15,8 @@
 
 
 // --- ROOT system ---
+#include <TH1.h>
+#include <TList.h>
 #include <TNamed.h>  
 class TFile;  
 class TDirectory;
@@ -39,29 +41,51 @@ public:
   virtual void        Exec(AliQualAss::TASKINDEX, TObject * data) ;
   void                Finish(AliQualAss::TASKINDEX task) const ; 
   static const char * GetDetectorDirName() { return fDetectorDirName.Data() ; }
-  void                Init(AliQualAss::TASKINDEX) ;
+  TList *             Init(AliQualAss::TASKINDEX) ;
+  Int_t               Add2DigitsList(TH1 * hist, Int_t index)    { return Add2List(hist, index, fDigitsQAList) ; }
+  Int_t               Add2ESDsList(TH1 * hist, Int_t index)      { return Add2List(hist, index, fESDsQAList) ; }
+  Int_t               Add2HitsList(TH1 * hist, Int_t index)      { return Add2List(hist, index, fHitsQAList) ; }
+  Int_t               Add2RecPointsList(TH1 * hist, Int_t index) { return Add2List(hist, index, fRecPointsQAList) ; }
+  Int_t               Add2RawsList(TH1 * hist, Int_t index)      { return Add2List(hist, index, fRawsQAList) ; }
+  Int_t               Add2SDigitsList(TH1 * hist, Int_t index)   { return Add2List(hist, index, fSDigitsQAList) ; }
+  TH1 *               GetDigitsData(Int_t index)    { return dynamic_cast<TH1 *>(GetData(fDigitsQAList, index)) ; }
+  TH1 *               GetESDsData(Int_t index)      { return dynamic_cast<TH1 *>(GetData(fESDsQAList, index)) ; }
+  TH1 *               GetHitsData(Int_t index)      { return dynamic_cast<TH1 *>(GetData(fHitsQAList, index)) ; }
+  TH1 *               GetRecPointsData(Int_t index) { return dynamic_cast<TH1 *>(GetData(fRecPointsQAList, index)) ; }
+  TH1 *               GetRawsData(Int_t index)      { return dynamic_cast<TH1 *>(GetData(fRawsQAList, index)) ; }
+  TH1 *               GetSDigitsData(Int_t index)   { return dynamic_cast<TH1 *>(GetData(fSDigitsQAList, index)) ; }
+
 protected: 
 
+  Int_t          Add2List(TH1 * hist, Int_t index, TList * list) { list->AddAt(hist, index) ; return list->LastIndex() ; }
+  TObject *      GetData(TList * list, Int_t index)  { return list->At(index) ; } 
   virtual void   InitDigits()        {AliInfo("To ne implemented by detectors");}
   virtual void   InitESDs()          {AliInfo("To ne implemented by detectors");}
   virtual void   InitHits()          {AliInfo("To ne implemented by detectors");}
-  virtual void   InitRecParticles()  {AliInfo("To ne implemented by detectors");}
+  //virtual void   InitRecParticles()  {AliInfo("To ne implemented by detectors");}
   virtual void   InitRecPoints()     {AliInfo("To ne implemented by detectors");}
+  virtual void   InitRaws()          {AliInfo("To ne implemented by detectors");}
   virtual void   InitSDigits()       {AliInfo("To ne implemented by detectors");}
-  virtual void   InitTrackSegments() {AliInfo("To ne implemented by detectors");}
+  //virtual void   InitTrackSegments() {AliInfo("To ne implemented by detectors");}
   virtual void   MakeESDs(AliESDEvent * )          {AliInfo("To ne implemented by detectors");} 
   virtual void   MakeHits(TObject * )              {AliInfo("To ne implemented by detectors");} 
   virtual void   MakeDigits(TObject * )            {AliInfo("To ne implemented by detectors");} 
   //  virtual void   MakeRecParticles(TClonesArray * ) {AliInfo("To ne implemented by detectors");} 
+  virtual void   MakeRaws(TObject * )                {AliInfo("To ne implemented by detectors");} 
   virtual void   MakeRecPoints(TTree * )           {AliInfo("To ne implemented by detectors");} 
   virtual void   MakeSDigits(TObject * )           {AliInfo("To ne implemented by detectors");} 
   //virtual void   MakeTrackSegments(TTree * )       {AliInfo("To ne implemented by detectors");} 
 
-  TFile *       fOutput ;      //! output root file
-  TDirectory *  fDetectorDir ; //! directory for the given detector in the file
+  TFile *        fOutput ;          //! output root file
+  TDirectory *   fDetectorDir ;     //! directory for the given detector in the file
   static TString fDetectorDirName ; //! detector directory name in the quality assurance data file
-  ClassDef(AliQualAssDataMaker,1)  // description 
+  TList *        fDigitsQAList ;    //! list of the digits QA data objects
+  TList *        fESDsQAList ;      //! list of the ESDs QA data objects
+  TList *        fHitsQAList ;      //! list of the hits QA data objects
+  TList *        fRawsQAList ;      //! list of the raws QA data objects
+  TList *        fRecPointsQAList ; //! list of the recpoints QA data objects
+  TList *        fSDigitsQAList ;   //! list of the sdigits QA data objects
+ ClassDef(AliQualAssDataMaker,1)  // description 
 
 };