added RUN_TYPE in QA
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Jul 2008 13:17:21 +0000 (13:17 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Jul 2008 13:17:21 +0000 (13:17 +0000)
STEER/AliQA.cxx
STEER/AliQA.h
STEER/AliQAChecker.cxx
STEER/AliQACheckerBase.h
test/QA/Save2OCDB.C
test/QA/rawqa.C
test/QA/rec.C
test/QA/recqa.C
test/QA/recraw.C
test/QA/sim.C
test/QA/simqa.C

index c0b4b890e07149c08b4a64378353d006db13a566..e621a52ae16d0d21ec2bcbc02dd85d8b6277d4f7 100644 (file)
@@ -56,6 +56,14 @@ TString    AliQA::fgQAResultDirName      = "" ;
 TString    AliQA::fgQAResultFileName     = "QA.root" ; 
 TString    AliQA::fgDetNames[]           = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD",
                                                                                    "ZDC", "PMD", "T0", "VZERO", "ACORDE", "HLT", "Global"} ;   
+TString    AliQA::fgRTNames[]            = {"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://" ;  
@@ -63,7 +71,7 @@ const TString AliQA::fkgLabAliEnOCDB     = "alien://" ;
 const TString AliQA::fkgRefFileName      = "QA.root" ; 
 const TString AliQA::fkgQAName           = "QA"  ; 
 const TString AliQA::fkgRefOCDBDirName   = "Ref"  ; 
-TString AliQA::fkgRefDataDirName   = "Data"  ; 
+TString AliQA::fkgRefDataDirName                = ""  ; 
 const TString AliQA::fkgQARefOCDBDefault = "alien://folder=/alice/QA/20"  ; 
 //____________________________________________________________________________
 AliQA::AliQA() : 
@@ -357,6 +365,25 @@ 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 ; 
+}
+
 //_______________________________________________________________
 const Bool_t AliQA::IsSet(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit) const
 {
index 1bd7b0ba45c740f21e446d125142ffec4ce41194..76400fc20448595acdde7f9be541b9fe19368764 100644 (file)
@@ -24,7 +24,14 @@ public:
     kNULLTASK=-1, kRAW, kSIM, kREC, kESD, kANA, kNTASK };
        enum QABIT_t {
     kNULLBit=-1, kINFO, kWARNING, kERROR, kFATAL, kNBIT };
-  
+    enum RUNTYPE_t {
+               kNULLTYPE=-1, 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 {
     kRAWS, kHITS, kSDIGITS, kDIGITS, kRECPOINTS, kTRACKSEGMENTS, kRECPARTICLES, kESDS, kNTASKINDEX };
   
@@ -62,12 +69,13 @@ 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 const TString   GetTaskName(TASKINDEX_t tsk) { return fgTaskNames[tsk] ; }
        const Bool_t           IsSet(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit) const ;
        void                   Set(QABIT_t bit) ;
        static void                        SetQAResultDirName(const char * name) ; 
        static void            SetQARefStorage(const char * name) ; 
-       static void            SetQARefDataDirName( const char * name) { fkgRefDataDirName = name ; }
+       static void            SetQARefDataDirName(RUNTYPE_t rt) { fkgRefDataDirName = GetRunTypeName(rt) ; }
     void                   Show() const { ShowStatus(fDet) ; }
        void                   ShowAll() const ;
        void                   UnSet(QABIT_t bit) ;
@@ -104,6 +112,7 @@ private:
        static TFile *       fgQAResultFile     ; //! File where to find the QA result
        static TString       fgQAResultDirName  ; //! the location of the output file where the QA results are stored  
        static TString       fgQAResultFileName ; //! the output file where the QA results are stored  
+       static TString       fgRTNames[]            ; //! list of Run Type names   
        static TString       fgTaskNames[]          ; //! list of tasks names   
        static const TString fkgLabLocalFile    ; //! label to identify a file as local 
        static const TString fkgLabLocalOCDB    ; //! label to identify a file as local OCDB 
index 77fc36e6fafbc63398645615997707348fa4c077..3f56c93801c58a5d2fa790ebc1a82a7034844833 100644 (file)
@@ -158,8 +158,7 @@ void AliQAChecker::GetRefSubDir(const char * det, const char * task, TDirectory
                        man->SetDefaultStorage(AliQA::GetQARefStorage()) ; 
                        man->SetSpecificStorage("*", AliQA::GetQARefStorage()) ;
                }
-               char detOCDBDir[20] ; 
-               sprintf(detOCDBDir, "%s/%s/%s", det, AliQA::GetRefOCDBDirName(), AliQA::GetRefDataDirName()) ; 
+               char * detOCDBDir = Form("%s/%s/%s", det, AliQA::GetRefOCDBDirName(), AliQA::GetRefDataDirName()) ; 
                AliCDBEntry * entry = man->Get(detOCDBDir, man->GetRun()) ;
                if (entry) {
                        TList * listDetQAD = dynamic_cast<TList *>(entry->GetObject()) ;
index bcf6a23c1c8dbea3c92dca2f0170a605f2e8737e..e92de8000e5fd0b02e8eeab0f172c96064c79626 100644 (file)
@@ -43,7 +43,7 @@ protected:
   const Double_t DiffC(const TH1 * href, const TH1 * hin) const ;   
   const Double_t DiffK(const TH1 * href, const TH1 * hin) const ;   
   void           Finish() const ; 
-  virtual void   SetQA(AliQA::ALITASK_t index, const Double_t value) 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
index 9a90bf3e9e5b39df437a9ef5bfc849416d371b04..d1c8ddf06363ce7daa899e1c99a6900ca006c389 100644 (file)
@@ -3,9 +3,9 @@ void Save2OCDB(Int_t runNumber=0)
   // Save QA data generated by DataMaker into OCDB
   const char * kYear = "08" ; 
   // where ? 
-  AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ;
-  AliQA::SetQARefDataDirName("Sim") ; //Data, Pedestals, BlackEvent, .....
-  //AliQA::SetQARefStorage("local://./TestCDB/QA") ;
+  //AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ;
+  AliQA::SetQARefStorage("local://$ALICE_ROOT") ;
+  AliQA::SetQARefDataDirName(AliQA::kMONTECARLO) ; //RUN_TYPE
   AliQADataMakerSteer qas ; 
   qas.Save2OCDB(runNumber) ; 
 }
index 0cca31ed07d75d0ba458c0fbac5eff8423a67e87..8589518df769fdb20982db8c63c7bc5f2280c164 100644 (file)
@@ -27,8 +27,9 @@ void rawqa(const Int_t runNumber, Int_t maxFiles = 10, const char* year = "08")
 {      
        char kDefaultOCDBStorage[120] ; 
        sprintf(kDefaultOCDBStorage, "alien://folder=/alice/data/20%s/LHC%sa/OCDB/", year, year) ; 
-       AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), year)) ;  
-       AliQA::SetQARefDataDirName("Data") ; //Data, Pedestals, BlackEvent, ..... 
+       //AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), year)) ;  
+       AliQA::SetQARefStorage("local://$ALICE_ROOT") ;
+       AliQA::SetQARefDataDirName(AliQA::kMONTECARLO) ; //RUN_TYPE
        
        UInt_t maxEvents = 99999 ;
        if ( maxFiles < 0 ) {
index f3b5e618ad187666e25a08ed9fc9c3815d94dc5b..e4bf6ece66605f818029783760cc89d0c26c7395 100644 (file)
@@ -17,15 +17,15 @@ void rec() {
   //AliPHOSRecoParam* recEmc = new AliPHOSRecoParamEmc();
   //   recEmc->SetSubtractPedestals(kFALSE);
   //   AliPHOSReconstructor::SetRecoParamEmc(recEmc);  
-       if (! reco.SetRunQA("ALL:ALL") ) {
+       if (! reco.SetRunQA("ITS:ALL") ) {
                printf("SetRunQA ERROR\n") ; 
                exit ; 
        }
        reco.SetInLoopQA() ; 
          
        // AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ;
-  AliQA::SetQARefStorage("$ALICE_ROOT") ;
-  AliQA::SetQARefDataDirName("Sim") ; //Data, Pedestals, BlackEvent, .....
+  AliQA::SetQARefStorage("local://$ALICE_ROOT") ;
+  AliQA::SetQARefDataDirName(AliQA::kMONTECARLO) ; //RUN_TYPE
   
 // **** The field map settings must be the same as in Config.C !
   AliMagFMaps *field=new AliMagFMaps("Maps","Maps",2,1.,10.,AliMagFMaps::k5kG);
index 501a26e1101dac84b264ed7c5a439a1ecfdab2ff..5f235432767d319789909bafd3c45d1fe25bfefb 100644 (file)
@@ -8,8 +8,9 @@ void recqa()
        man->SetDefaultStorage("local://$ALICE_ROOT");
        TString detectors("ITS TPC TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO");
        
-       AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ;
-       AliQA::SetQARefDataDirName("Sim") ; //Data, Pedestals, BlackEvent, .....
+       //AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ;
+       AliQA::SetQARefStorage("local://$ALICE_ROOT") ;
+       AliQA::SetQARefDataDirName(AliQA::kMONTECARLO) ; //RUN_TYPE
    
   AliQADataMakerSteer qas ; 
   qas.Run(detectors.Data(), AliQA::kRECPOINTS);
index 47e44c0e51011f3abff7dcc232d472bc5d7d33b9..916e09c85072fe26a507831edb711b21290b43bb 100644 (file)
@@ -18,7 +18,7 @@ void recraw() {
   //AliPHOSRecoParam* recEmc = new AliPHOSRecoParamEmc();
   //   recEmc->SetSubtractPedestals(kFALSE);
   //   AliPHOSReconstructor::SetRecoParamEmc(recEmc);  
-       if (! reco.SetRunQA("ALL:ALL") ) {
+       if (! reco.SetRunQA("ITS:ALL") ) {
                printf("SetRunQA ERROR\n") ; 
                exit ; 
        }
@@ -26,7 +26,7 @@ void recraw() {
          
   //AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ;
   AliQA::SetQARefStorage("local://$ALICE_ROOT") ;
-  AliQA::SetQARefDataDirName("Sim") ; //Data, Pedestals, BlackEvent, .....
+  AliQA::SetQARefDataDirName(AliQA::kMONTECARLO) ; //RUN_TYPE
   
 // **** The field map settings must be the same as in Config.C !
   AliMagFMaps *field=new AliMagFMaps("Maps","Maps",2,1.,10.,AliMagFMaps::k5kG);
index 2296c378e08b21a7e310e8ee4f2297bb7b618a46..33e92bce6890f3f1dc8812a9dd709e366bda8ce4 100644 (file)
@@ -10,8 +10,9 @@ void sim(Int_t nev=1) {
   simu.SetSpecificStorage("EMCAL/*","local://DB");
 
   simu.SetRunQA("ALL:ALL") ; 
-  AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ;
-  AliQA::SetQARefDataDirName("Sim") ; //Data, Pedestals, BlackEvent, .....
+ // AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ;
+  AliQA::SetQARefStorage("local://$ALICE_ROOT") ;
+  AliQA::SetQARefDataDirName(AliQA::kMONTECARLO) ; //RUN_TYPE
 
   TStopwatch timer;
   timer.Start();
index db69a2e4a9bdbbeda6bafe37002ad068917e86b8..e7dbd936ce29e7f600901729f30ad1721ffed574 100644 (file)
@@ -8,8 +8,9 @@ void simqa()
        man->SetDefaultStorage("local://$ALICE_ROOT");
        TString detectors("ITS TPC TRD TOF PHOS HMPID EMCAL MUON FMD PMD ZDC T0 VZERO"); 
        
-       AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ;
-       AliQA::SetQARefDataDirName("Sim") ; //Data, Pedestals, BlackEvent, .....
+       //AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ;
+       AliQA::SetQARefStorage("local://$ALICE_ROOT") ;
+       AliQA::SetQARefDataDirName(AliQA::kMONTECARLO) ; //RUN_TYPE
   
 
        AliQADataMakerSteer qas ;