1 #ifndef ALI_DCS_VALUE_H
2 #define ALI_DCS_VALUE_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 // This class represents the value(s) of a DCS data point at a given timestamp
15 class AliDCSValue : public TObject {
34 AliDCSValue(const AliDCSValue& c);
38 AliDCSValue& operator=(const AliDCSValue& c);
39 virtual void Copy(TObject& c) const;
41 AliDCSValue(Bool_t value, UInt_t timeStamp);
42 AliDCSValue(Char_t value, UInt_t timeStamp);
43 AliDCSValue(Int_t value, UInt_t timeStamp);
44 AliDCSValue(UInt_t value, UInt_t timeStamp);
45 AliDCSValue(Float_t value, UInt_t timeStamp);
47 AliDCSValue(Int_t size, Bool_t* vals, UInt_t timeStamp);
48 AliDCSValue(Int_t size, Char_t* vals, UInt_t timeStamp);
49 AliDCSValue(Int_t size, Int_t* vals, UInt_t timeStamp);
50 AliDCSValue(Int_t size, UInt_t* vals, UInt_t timeStamp);
51 AliDCSValue(Int_t size, Float_t* vals, UInt_t timeStamp);
53 Bool_t GetBool() const { return fBool; }
54 Char_t GetChar() const { return fChar; }
55 Int_t GetInt() const { return fInt; }
56 UInt_t GetUInt() const { return fUInt; }
57 Float_t GetFloat() const { return fFloat; }
59 Bool_t GetDynBool(Int_t n) const { return fBoolPtr[n]; }
60 Char_t GetDynChar(Int_t n) const { return fCharPtr[n]; }
61 Int_t GetDynInt(Int_t n) const { return fIntPtr[n]; }
62 UInt_t GetDynUInt(Int_t n) const { return fUIntPtr[n]; }
63 Float_t GetDynFloat(Int_t n) const { return fFloatPtr[n]; }
65 Type GetType() const { return fType; }
66 Int_t GetDynamicSize() const { return fLength; }
68 UInt_t GetTimeStamp() const { return fTimeStamp; }
69 void SetTimeStamp(UInt_t timeStamp) { fTimeStamp = timeStamp; }
71 Int_t GetSize() const;
72 static Bool_t IsDynamic(Type type);
74 const Char_t* ToString() const;
79 Type fType; // type of the value stored
81 Bool_t fBool; // bool value
82 Char_t fChar; // char value
83 Int_t fInt; // int value
84 UInt_t fUInt; // uint value
85 Float_t fFloat; // float value
87 UInt_t fLength; // length of the following arrays, the ones that are != 0 are expected to contain fLength entries
89 Bool_t* fBoolPtr; //[fLength] bool array
90 Char_t* fCharPtr; //[fLength] char array
91 Int_t* fIntPtr; //[fLength] int array
92 UInt_t* fUIntPtr; //[fLength] uint array
93 Float_t* fFloatPtr; //[fLength] float array
95 UInt_t fTimeStamp; // timestamp of this value
97 ClassDef(AliDCSValue, 2);