]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSQAChecker.h
stdlib.h included instead of cstdlib (needed on Alpha)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSQAChecker.h
1 #ifndef ALIPHOSQACHECKER_H
2 #define ALIPHOSQACHECKER_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 //  Base class of a checker, to be instanciated as a task container  
10 //                  
11 //*-- Author: Yves Schutz (SUBATECH)
12
13
14 // --- ROOT system ---
15
16 class TString ; 
17 #include "TTask.h"
18
19 // --- Standard library ---
20
21 #include <assert.h>
22
23 // --- AliRoot header files ---
24
25 #include "AliPHOSQAVirtualCheckable.h"
26
27 class AliPHOSQAChecker : public TTask {
28
29 public:
30
31   AliPHOSQAChecker(){} ;          // default ctor (not to be used)
32   AliPHOSQAChecker(const char * name, const char * title) ; // ctor
33   AliPHOSQAChecker(AliPHOSQAChecker& obj) {assert(0==1);}
34   virtual ~AliPHOSQAChecker() ; // dtor
35
36   void Alarms() { ExecuteTask("A") ; }  
37   virtual TString CheckingOperation(){ return TString(""); } // where the checking operation must be implemented
38   void CheckIt() ; 
39   void CheckIt(AliPHOSQAVirtualCheckable *ca)  ;
40   void Delete() { delete this ; } // Hara-Kiri
41   TList * GetListOfCheckables() const { return fCheckablesList ; } 
42   virtual void  Exec(Option_t *option) ;   
43   virtual void Print() ;
44   void PrintAlarms() ; 
45   void PrintAll() { ExecuteTask("P") ; } 
46   void Remove(AliPHOSQAChecker * ch) {GetListOfTasks()->Remove(ch); }  
47   void Status() ; 
48   void StatusAll() { ExecuteTask("S") ; } 
49
50   friend void AliPHOSQAVirtualCheckable::AddChecker(AliPHOSQAChecker * ch) ;
51   friend AliPHOSQAVirtualCheckable::AliPHOSQAVirtualCheckable(const char * name) ;
52
53
54  private:
55
56   void SetCheckable(AliPHOSQAVirtualCheckable * ca) { fCheckable = ca ; } 
57
58  protected:
59
60   void AddCheckable(AliPHOSQAVirtualCheckable *ca) {fCheckablesList->Add(ca) ;}
61     
62   AliPHOSQAVirtualCheckable * fCheckable ; // current checkable 
63   TList * fCheckablesList ;     // list of checkable objects to be checked 
64
65   ClassDef(AliPHOSQAChecker,1)  // description 
66
67 };
68
69 #endif // ALIPHOSQAChecker_H