]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliQA.h
Bug fix. Removed delete statement
[u/mrichter/AliRoot.git] / STEER / AliQA.h
index adc0026f21dcb0968f11e8c8e816a9017186228f..bf632349efdb7bed8dc6f66247c5f59761f520ba 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef ALIQA_H
 #define ALIQA_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
+* See cxx source for full Copyright notice                               */
 
 /* $Id$ */
 
@@ -16,91 +16,129 @@ class TFile ;
 
 class AliQA : public TNamed {
 public:
-
-       enum DETECTORINDEX {
+  
+       enum DETECTORINDEX_t {
     kNULLDET=-1, kITS, kTPC, kTRD, kTOF, kPHOS, kHMPID, kEMCAL, kMUON, kFMD,
-    kZDC, kPMD, kT0, kVZERO, kACORDE, kHLT, kNDET };
-       enum ALITASK {
+    kZDC, kPMD, kT0, kVZERO, kACORDE, kHLT, kGLOBAL, kCORR, kNDET};
+       enum ALITASK_t {
     kNULLTASK=-1, kRAW, kSIM, kREC, kESD, kANA, kNTASK };
-       enum QABIT {
+       enum QABIT_t {
     kNULLBit=-1, kINFO, kWARNING, kERROR, kFATAL, kNBIT };
-  
-       enum TASKINDEX {
-    kRAWS, kHITS, kSDIGITS, kDIGITS, kRECPOINTS, kTRACKSEGMENTS, kRECPARTICLES, kESDS, kNTASKINDEX };
+  enum RUNTYPE_t {
+    kNULLTYPE=-1, kUNKOWN, kAUTOTEST, kCALIBRATION, kCALIBRATIONPULSER, kCHANNELDELAYTUNING, kCOSMIC, kCOSMICS, kDAQFOUNIFSCAN, 
+    kDAQGENDACSCAN, kDAQMEANTHSCAN, kDAQMINTHSCAN, kDAQNOISYPIXSCAN, kDAQPIXDELAYSCAN, kDAQUNIFORMITYSCAN, 
+    kDCSFOUNIFSCAN, kDCSMEANTHSCAN, kDCSMINTHSCAN, kDCSPIXDELAYSCAN, kDCSUNIFORMITYSCAN, kDDLTEST, kGAIN, 
+    kPEDESTAL, kINJECTOR,  kLASER, kMONTECARLO, kNOISE, kNOISYPIXSCAN,  kPHYSICS, kPULSER, kSTANDALONE, kSTANDALONEBC, 
+    kSTANDALONECENTRAL, kSTANDALONECOSMIC, kSTANDALONEEMD, kSTANDALONELASER, kSTANDALONEMB, kSTANDALONEPEDESTAL, 
+    kSTANDALONESEMICENTRAL, kSTANDALONEPULSER, kNTYPE};
+       
+       enum TASKINDEX_t {
+    kNULLTASKINDEX=-1, kRAWS, kHITS, kSDIGITS, kDIGITS, kRECPOINTS, kTRACKSEGMENTS, kRECPARTICLES, kESDS, kNTASKINDEX };
   
        // Creators - destructors
        AliQA(); // beware singleton, not to be used
-       AliQA(const ALITASK tsk) ;
-       AliQA(const DETECTORINDEX det) ;
+       AliQA(const ALITASK_t tsk) ;
+       AliQA(const DETECTORINDEX_t det) ;
        AliQA(const AliQA& qa) ;   
        AliQA& operator = (const AliQA& qa) ;
        virtual ~AliQA();
-       static  AliQA *   Instance() ;
-       static  AliQA *   Instance(const DETECTORINDEX det) ;
-       static  AliQA *   Instance(const ALITASK tsk) ;
-       const Bool_t           AddQAData2CDB(const char * defSto) const ;
-       const Bool_t           CheckFatal() const ;
+  
+       static  AliQA *        Instance() ;
+       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 ;
        static void            Close() ; 
-       static const char *    GetAliTaskName(ALITASK tsk) ;
-    static const TString   GetLabLocalFile() { return fkgLabLocalFile ; } 
-    static const TString   GetLabLocalOCDB() { return fkgLabLocalOCDB ; } 
-    static const TString   GetLabAliEnOCDB() { return fkgLabAliEnOCDB ; } 
-       static const TString   GetDetName(DETECTORINDEX det) { return fgDetNames[det] ; }
-       static const TString   GetTaskName(TASKINDEX tsk) { return fgTaskNames[tsk] ; }
+       static  char *         GetAliTaskName(ALITASK_t tsk) ;
+  static const TString   GetExpert() { return fgkExpert ; }
+  static  UInt_t         GetExpertBit() { return fgkExpertBit ; }
+       static const TString   GetLabLocalFile() { return fgkLabLocalFile ; } 
+       static const TString   GetLabLocalOCDB() { return fgkLabLocalOCDB ; } 
+       static const TString   GetLabAliEnOCDB() { return fgkLabAliEnOCDB ; } 
+       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 ; }  
+  static  UInt_t         GetQABit() { return fgkQABit ; }
+       static TFile *         GetQADataFile(const char * name, const Int_t run) ; 
+       static TFile *         GetQADataFile(const char * fileName) ;
+       static const char *    GetQADataFileName(const char * name, const Int_t run) 
+    {return Form("%s.%s.%d.root", name, fgQADataFileName.Data(), run)  ; }
        static const char *    GetQADataFileName() { return fgQADataFileName.Data() ; }
-       static TFile *         GetQADataFile(const char * name, const Int_t run, const Int_t cycle) ; 
-       static TFile *             GetQADataFile(const char * fileName) ;
+       static const char *    GetQAName() { return fgkQAName ; } 
+  static const char *    GetQACorrName() { return fgkQACorrNtName ; }
        static TFile *         GetQAResultFile() ; 
        static const char  *   GetQAResultFileName() { return (fgQAResultDirName + fgQAResultFileName).Data() ; }
+       static const char  *   GetQARefDefaultStorage() { return fgkQARefOCDBDefault.Data() ; }
        static const char  *   GetQARefFileName() { return fgQARefFileName ; }
        static const char  *   GetQARefStorage() { return fgQARefDirName.Data() ; }
-       static const char  *   GetQARefOCDBDirName() { return fkgRefOCDBDirName .Data() ; }
-       const Bool_t           IsSet(DETECTORINDEX det, ALITASK tsk, QABIT bit) const ;
-       void                   Set(QABIT bit) ;
-       static void                        SetQAResultDirName(const char * name) ; 
+       static const char  *   GetRefOCDBDirName() { return fgkRefOCDBDirName.Data() ; }
+       static const char  *   GetRefDataDirName() { return fgkRefDataDirName.Data() ; }
+       static const TString   GetRunTypeName(RUNTYPE_t rt = kNULLTYPE) ;
+       static  TASKINDEX_t    GetTaskIndex(const char * name) ; 
+       static const 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 ;
+       void                   Merge(TCollection * list) ; 
+       void                   Set(QABIT_t bit) ;
+       static void                            SetQAResultDirName(const char * name) ; 
        static void            SetQARefStorage(const char * name) ; 
-       void                   Show() const { ShowStatus(fDet) ; }
+       static void            SetQARefDataDirName(RUNTYPE_t rt) { fgkRefDataDirName = GetRunTypeName(rt) ; }
+       static void            SetQARefDataDirName(const char * name) ;
+       void                   Show() const { ShowStatus(fDet, fTask) ; }
+       void                   Show(DETECTORINDEX_t det) const { ShowStatus(det) ; }
        void                   ShowAll() const ;
-
+       void                   UnSet(QABIT_t bit) ;
+  
 private:      
-
-       const Bool_t         CheckRange(DETECTORINDEX det) const ;
-       const Bool_t         CheckRange(ALITASK tsk) const ;
-       const Bool_t         CheckRange(QABIT bit) const ;
-       const char *         GetBitName(QABIT bit) const ;
-       const ULong_t        GetStatus(DETECTORINDEX det) const  { return fQA[det] ;}
+    
+  Bool_t               CheckRange(DETECTORINDEX_t det) const ;
+  Bool_t               CheckRange(ALITASK_t tsk) const ;
+  Bool_t               CheckRange(QABIT_t bit) const ;
+  char *               GetBitName(QABIT_t bit) const ;
+  ULong_t              GetStatus(DETECTORINDEX_t det) const  { return fQA[det] ;}
        void                 Finish() const ;  
-       const ULong_t        Offset(ALITASK tsk) const ;
-       virtual void         ShowStatus(DETECTORINDEX det) const ;
-       void                 ResetStatus(DETECTORINDEX det) { fQA[det] = 0 ; }
-       void                 Set(DETECTORINDEX det) { fDet = det ;}
-       void                 Set(ALITASK tsk) { fTask = tsk ; AliInfo(Form("Ready to set QA status in %s", GetAliTaskName(tsk) )) ; }
-       void                 SetStatus(DETECTORINDEX det, UShort_t status) { fQA[det] = status ; }
-       void                 SetStatusBit(DETECTORINDEX det, ALITASK tsk, QABIT 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        fDet                           ; //!  the current detector (ITS, TPC, ....)
-       ALITASK              fTask                      ; //!  the current environment (SIM, REC, ESD, ANA)
-       static TString       fgDetNames[]           ; //! list of detector names   
-       static TFile *       fgQADataFile           ; //! the output file where the quality assurance maker store their results
-       static TString       fgQADataFileName   ; //! the name of the file where the quality assurance maker store their results
-       static TFile *       fgQARefFile            ; //! the output file where the quality assurance maker store their results
-       static TString       fgQARefDirName         ; //! name of directory where to find the reference data file
-       static TString       fgQARefFileName    ; //! file name where to find the reference data
-       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       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 
-       static const TString fkgLabAliEnOCDB    ; //! label to identify a file as AliEn OCDB 
-       static const TString fkgRefFileName     ; //! name of Reference File Name 
-       static const TString fkgRefOCDBDirName  ; //! name of Reference directory name in OCDB          
-
- ClassDef(AliQA,1)  //ALICE Quality Assurance Object
+  ULong_t              Offset(ALITASK_t tsk) const ;
+       void                 ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk=kNULLTASK) const ;
+       void                 ShowASCIIStatus(DETECTORINDEX_t det, ALITASK_t tsk, ULong_t status) const ; 
+       void                 ResetStatus(DETECTORINDEX_t det) { fQA[det] = 0 ; }
+       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, UShort_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) ;
+  
+       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)
+       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
+       static TString       fgQADataFileName       ; //! the name of the file where the quality assurance maker store their results
+       static TFile *       fgQARefFile                  ; //! the output file where the quality assurance maker store their results
+       static TString       fgQARefDirName             ; //! name of directory where to find the reference data file
+       static TString       fgQARefFileName        ; //! file name where to find the reference data
+       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 fgkExpert              ; //! name for the expert directory
+  static const UInt_t  fgkExpertBit           ; //! TObject bit identifing the object as "expert"
+       static const TString fgkLabLocalFile        ; //! label to identify a file as local 
+       static const TString fgkLabLocalOCDB        ; //! label to identify a file as local OCDB 
+       static const TString fgkLabAliEnOCDB        ; //! label to identify a file as AliEn OCDB 
+       static const TString fgkRefFileName         ; //! name of Reference File Name 
+       static const UInt_t  fgkQABit               ; //! bit in the QA data object which is set when Checker does not return 0
+       static const TString fgkQAName              ; //! name of QA object 
+       static const TString fgkQACorrNtName        ; //! name of QA Correlation Ntuple
+       static const TString fgkRefOCDBDirName      ; //! name of Reference directory name in OCDB      
+       static       TString fgkRefDataDirName      ; //! name of Reference directory name in OCDB for data     
+       static const TString fgkQARefOCDBDefault    ; //! default storage for QA in OCDB 
+  
+  ClassDef(AliQA,1)  //ALICE Quality Assurance Object
 };
 #endif