AliAlignObjAngles becomes AliAlignObjParams (Raffaele)
[u/mrichter/AliRoot.git] / STEER / AliQualAss.h
CommitLineData
421ab0fb 1#ifndef ALIQualAss_H
2#define ALIQualAss_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//
9// Quality Assurance Object
10//
11
a5fa6165 12#include <TNamed.h>
421ab0fb 13class TFile ;
14
15class AliQualAss : public TNamed {
16public:
17
18 enum DETECTORINDEX {
19 kNULLDET=-1, kITS, kTPC, kTRD, kTOF, kPHOS, kHMPID, kEMCAL, kMUON, kFMD,
20 kZDC, kPMD, kT0, kVZERO, kACORDE, kHLT, kNDET
21 };
22 enum ALITASK {
23 kNULLTASK=-1, kSIM, kREC, kESD, kANA, kNTASK
24 };
25 enum QABIT {
26 kNULLBit=-1, kINFO, kWARNING, kERROR, kFATAL, kNBIT
27 };
28
29 enum TASKINDEX {
30 kHITS, kSDIGITS, kDIGITS, kRECPOINTS, kTRACKSEGMENTS, kRECPARTICLES, kESDS
31 };
32
33 // Creators - destructors
34 AliQualAss(); // beware singleton, not to be used
a5fa6165 35 AliQualAss(const ALITASK tsk) ;
36 AliQualAss(const DETECTORINDEX det) ;
421ab0fb 37 AliQualAss(const AliQualAss& qa) ;
38 AliQualAss& operator = (const AliQualAss& qa) ;
39 virtual ~AliQualAss();
40
41 static AliQualAss * Instance() ;
a5fa6165 42 static AliQualAss * Instance(const DETECTORINDEX det) ;
43 static AliQualAss * Instance(const ALITASK tsk) ;
421ab0fb 44 const Bool_t CheckFatal() const ;
a5fa6165 45 static const char * GetAliTaskName(ALITASK tsk) ;
46 static const char * GetDataName() { return fgDataName.Data() ; }
47 static const TString GetDetName(DETECTORINDEX det) { return fgDetNames[det] ; }
48 static const TString GetTaskName(TASKINDEX tsk) { return fgTaskNames[tsk] ; }
49 static const char * GetDetName(Int_t det) ;
421ab0fb 50 static TFile * GetQADMOutFile() ;
51 void Set(QABIT bit) ;
52 void Show() const { ShowStatus(fDet) ; }
53 void ShowAll() const ;
54
55private:
56
57 const Bool_t CheckRange(DETECTORINDEX det) const ;
58 const Bool_t CheckRange(ALITASK tsk) const ;
59 const Bool_t CheckRange(QABIT bit) const ;
421ab0fb 60 const char * GetBitName(QABIT bit) const ;
61 const ULong_t GetStatus(DETECTORINDEX det) const { return fQA[det] ;}
62 void Finish() const ;
63 const Bool_t IsSet(DETECTORINDEX det, ALITASK tsk, QABIT bit) const ;
64 const ULong_t Offset(ALITASK tsk) const ;
65 virtual void ShowStatus(DETECTORINDEX det) const ;
66 void ResetStatus(DETECTORINDEX det) { fQA[det] = 0 ; }
67 void Set(DETECTORINDEX det) { fDet = det ;}
a5fa6165 68 void Set(ALITASK tsk) { fTask = tsk ; AliInfo(Form("Ready to set QA status in %s", GetAliTaskName(tsk) )) ; }
421ab0fb 69 void SetStatus(DETECTORINDEX det, UShort_t status) { fQA[det] = status ; }
70 void SetStatusBit(DETECTORINDEX det, ALITASK tsk, QABIT bit) ;
71
72 static AliQualAss *fgQA ; // pointer to the instance of the singleton
73 Int_t fNdet ; // # of detectors
74 ULong_t * fQA ; //[kNDET] the status word 4 bits for SIM, REC, ESD, ANA each
75 DETECTORINDEX fDet ; //! the current detector (ITS, TPC, ....)
76 ALITASK fTask ; //! the current environment (SIM, REC, ESD, ANA)
a5fa6165 77 static TFile * fgDataFile ; //! the output file where the quality assurance maker store their results
78 static TString fgDataName ; //! the name of the file where the quality assurance maker store their results
79 static TString fgDetNames[] ; //! list of detector names
80 static TString fgTaskNames[]; //! list of tasks names
81 ClassDef(AliQualAss,1) //ALICE Quality Assurance Object
421ab0fb 82};
83#endif