1 #ifndef ALITRDTRENDVALUE_H
2 #define ALITRDTRENDVALUE_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6 ////////////////////////////////////////////////////////////////////////////
8 // Trend Value Incapsulation //
11 // Alexandru Bercuci <A.Bercuci@gsi.de> //
13 ////////////////////////////////////////////////////////////////////////////
19 class AliTRDtrendValue : public TNamed
21 friend class AliTRDtrendingManager; // allow easy access for Manager
28 AliTRDtrendValue(Char_t *n, Char_t *t);
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();}
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);
48 AliTRDtrendValue(const AliTRDtrendValue &ref);
49 const AliTRDtrendValue& operator=(const AliTRDtrendValue &ref);
51 UChar_t fAlarmLevel;// alarm level
52 Double_t fValue; // current value
53 Double_t fLimits[2*(kNlevels+1)];// limits
54 Char_t fAlarmMessage[kNlevels][1024]; // list of alarm messages
56 struct AliTRDtrendValueResponsible{
57 AliTRDtrendValueResponsible(Char_t *name=NULL, Char_t *mail=NULL);
58 Char_t fNameR[100]; // name of responsible
59 Char_t fMail[200]; // mail of responsible
61 AliTRDtrendValueResponsible fResponsible; // responsible person
62 Int_t fNnotifiable; // number of persons to be notify
63 AliTRDtrendValueResponsible fNotifiable[kNnotifiable]; //also notify these persons
65 ClassDef(AliTRDtrendValue, 0) // TRD trending value representation