]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSQAVirtualCheckable.h
Functions renamed to get a prefix PHOS
[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(){
34     fChecker = 0 ; 
35     fAlarms = 0;
36   }           // default ctor not to be used
37   AliPHOSQAVirtualCheckable(const char * name) ;          // ctor
38   AliPHOSQAVirtualCheckable(AliPHOSQAVirtualCheckable& obj) {assert(0==1);}
39   virtual ~AliPHOSQAVirtualCheckable() ; // dtor
40
41   void AddChecker(AliPHOSQAChecker * ch) ; 
42   void Alarms() const ; 
43   void CheckMe() ;
44   virtual Bool_t HasChanged() const { return fChange ; } 
45   TObjArray * GetAlarms() const { return  (TObjArray*)fAlarms->FindObject(GetName()) ; }  
46   virtual Float_t GetValue() const = 0 ; 
47   TString HasA() const { return fType ; }
48   virtual void Print() const = 0 ; 
49   void RaiseAlarm(const char * time, const char * checked, const char * checker, const char * message) ; 
50   void RemoveChecker(AliPHOSQAChecker *ch) ; 
51   virtual void Reset() = 0 ;
52   void ResetAlarms() ;
53   void Status() const  ; 
54
55 protected:
56   
57   AliPHOSQAChecker * fChecker ; // the task(s) that is going to act on the checkable
58   TString fType ;               // I, F, or O 
59   TFolder * fAlarms ;           // folder that contains the PHOS alarms  
60   Bool_t fChange ;              // tells if the checkable has been updated
61
62   ClassDef(AliPHOSQAVirtualCheckable,1)  // description 
63
64 };
65
66 #endif // ALIPHOSQAVirtualCheckable_H