]>
Commit | Line | Data |
---|---|---|
3240bb4a | 1 | #ifndef ALITRDTRENDVALUE_H |
2 | #define ALITRDTRENDVALUE_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
61f6b45e | 6 | //////////////////////////////////////////////////////////////////////////// |
7 | // // | |
8 | // Trend Value Incapsulation // | |
9 | // // | |
10 | // Authors: // | |
11 | // Alexandru Bercuci <A.Bercuci@gsi.de> // | |
12 | // // | |
13 | //////////////////////////////////////////////////////////////////////////// | |
3240bb4a | 14 | |
15 | #ifndef ROOT_TNamed | |
16 | #include "TNamed.h" | |
17 | #endif | |
18 | ||
19 | class AliTRDtrendValue : public TNamed | |
20 | { | |
61f6b45e | 21 | friend class AliTRDtrendingManager; // allow easy access for Manager |
22 | public: | |
3240bb4a | 23 | enum ETRDtrendValue{ |
24 | kNlevels = 4 | |
25 | ,kNnotifiable = 10 | |
26 | }; | |
27 | AliTRDtrendValue(); | |
28 | AliTRDtrendValue(Char_t *n, Char_t *t); | |
29 | ||
30 | Double_t Get() const { return fValue;} | |
31 | Int_t GetAlarmLevel(); | |
32 | const char* GetAlarmMessage() const; | |
33 | const char* GetClassName() const; | |
34 | const char* GetValueName() const; | |
35 | const char* GetResponsible(Char_t *n=NULL, Char_t *mail=NULL) const; | |
36 | const char* GetNotifiable(Int_t in, Char_t *n=NULL, Char_t *mail=NULL) const; | |
37 | Bool_t IsAlarm() const { return fAlarmLevel>0;} | |
38 | void Print(Option_t *o="") const; | |
39 | void Set(Double_t v) { fValue=v; GetAlarmLevel();} | |
40 | ||
41 | protected: // only manager can fill these info !! | |
42 | void SetAlarm(Int_t level, Char_t *m) {memcpy(fAlarmMessage[level], m, 1024*sizeof(Char_t));} | |
43 | void SetLimits(Double_t l[2*(kNlevels+1)]) {memcpy(fLimits, l, 2*(kNlevels+1)*sizeof(Double_t));} | |
44 | void SetResponsible(const Char_t *name, const Char_t *mail); | |
45 | void SetNotifiable(const Char_t *name, const Char_t *mail); | |
46 | ||
47 | private: | |
61f6b45e | 48 | AliTRDtrendValue(const AliTRDtrendValue &ref); |
49 | const AliTRDtrendValue& operator=(const AliTRDtrendValue &ref); | |
50 | ||
3240bb4a | 51 | UChar_t fAlarmLevel;// alarm level |
52 | Double_t fValue; // current value | |
53 | Double_t fLimits[2*(kNlevels+1)];// limits | |
61f6b45e | 54 | Char_t fAlarmMessage[kNlevels][1024]; // list of alarm messages |
3240bb4a | 55 | |
56 | struct AliTRDtrendValueResponsible{ | |
57 | AliTRDtrendValueResponsible(Char_t *name=NULL, Char_t *mail=NULL); | |
61f6b45e | 58 | Char_t fNameR[100]; // name of responsible |
59 | Char_t fMail[200]; // mail of responsible | |
3240bb4a | 60 | }; |
61 | AliTRDtrendValueResponsible fResponsible; // responsible person | |
62 | Int_t fNnotifiable; // number of persons to be notify | |
61f6b45e | 63 | AliTRDtrendValueResponsible fNotifiable[kNnotifiable]; //also notify these persons |
3240bb4a | 64 | |
65 | ClassDef(AliTRDtrendValue, 0) // TRD trending value representation | |
66 | }; | |
67 | ||
68 | #endif | |
69 |