]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSQAVirtualCheckable.h
Web frame and inner rings pointing.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSQAVirtualCheckable.h
1 #ifndef ALIPHOSQAVIRTUALCHECKABLE_H
2 #define ALIPHOSQAVIRTUALCHECKABLE_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 //  Abstract Class for a QA checkable    
10 //                  
11 //*-- Author: Yves Schutz (SUBATECH)
12
13
14 // --- ROOT system ---
15
16 #include "TFolder.h" 
17 #include "TNamed.h" 
18 #include "TTask.h" 
19
20 // --- Standard library ---
21
22 #include <assert.h>
23
24 // --- AliRoot header files ---
25
26 class AliPHOSQAChecker ;
27 class AliPHOSQAAlarm ; 
28
29 class AliPHOSQAVirtualCheckable : public TNamed {
30
31 public:
32
33   AliPHOSQAVirtualCheckable(){}           // default ctor not to be used
34   AliPHOSQAVirtualCheckable(const char * name) ;          // ctor
35   AliPHOSQAVirtualCheckable(AliPHOSQAVirtualCheckable& obj) {assert(0==1);}
36   virtual ~AliPHOSQAVirtualCheckable() ; // dtor
37
38   void AddChecker(AliPHOSQAChecker * ch) ; 
39   void Alarms() const ; 
40   void CheckMe() ;
41   virtual Bool_t HasChanged() const { return fChange ; } 
42   TObjArray * GetAlarms() const { return  (TObjArray*)fAlarms->FindObject(GetName()) ; }  
43   virtual Float_t GetValue() const = 0 ; 
44   TString HasA() const { return fType ; }
45   virtual void Print() const = 0 ; 
46   void RaiseAlarm(const char * time, const char * checked, const char * checker, const char * message) ; 
47   void RemoveChecker(AliPHOSQAChecker *ch) ; 
48   virtual void Reset() = 0 ;
49   void ResetAlarms() ;
50   void Status() const  ; 
51
52 protected:
53   
54   AliPHOSQAChecker * fChecker ; // the task(s) that is going to act on the checkable
55   TString fType ;               // I, F, or O 
56   TFolder * fAlarms ;           // folder that contains the PHOS alarms  
57   Bool_t fChange ;              // tells if the checkable has been updated
58
59   ClassDef(AliPHOSQAVirtualCheckable,1)  // description 
60
61 };
62
63 #endif // ALIPHOSQAVirtualCheckable_H