]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliDCSArray.h
Fix for the loophole in the magnets currents check: the L3Off/DipON was passing the...
[u/mrichter/AliRoot.git] / STEER / AliDCSArray.h
CommitLineData
d96c6484 1#ifndef ALI_DCS_ARRAY_H
2#define ALI_DCS_ARRAY_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9////////////////////////////////////////////////////////////////////////////////
10// //
11// This class represents the value(s) of a the LHC DPs at a given timestamp //
12// //
13////////////////////////////////////////////////////////////////////////////////
14
15#include <TObject.h>
30ec5bf7 16#include <TObjArray.h>
17//#include <TTimeStamp.h>
d96c6484 18
19class AliDCSArray : public TObject {
20 public:
21 enum Type {
22 kInvalid = 0,
23 kBool = 1,
24 kChar = 2,
25 kInt = 3,
26 kUInt = 4,
27 kFloat = 5,
30ec5bf7 28 kString = 6,
29 kDouble = 7
d96c6484 30 };
31
32 AliDCSArray();
33 AliDCSArray(const AliDCSArray& c);
34
35 virtual ~AliDCSArray();
36
37 AliDCSArray& operator=(const AliDCSArray& c);
38
30ec5bf7 39 AliDCSArray(Int_t nentries, Bool_t* value, Double_t timeStamp);
40 AliDCSArray(Int_t nentries, Char_t* value, Double_t timeStamp);
41 AliDCSArray(Int_t nentries, Int_t* value, Double_t timeStamp);
42 AliDCSArray(Int_t nentries, UInt_t* value, Double_t timeStamp);
43 AliDCSArray(Int_t nentries, Float_t* value, Double_t timeStamp);
44 AliDCSArray(Int_t nentries, Double_t* value, Double_t timeStamp);
45 AliDCSArray(Int_t nentries, TObjArray* value, Double_t timeStamp);
d96c6484 46
47 Int_t GetNEntries() const { return fnentries;}
48 Bool_t* GetBool() const { return fBool; }
49 Char_t* GetChar() const { return fChar; }
50 Int_t* GetInt() const { return fInt; }
51 UInt_t* GetUInt() const { return fUInt; }
52 Float_t* GetFloat() const { return fFloat; }
30ec5bf7 53 Double_t* GetDouble() const { return fDouble; }
54 TObjArray* GetStringArray() const { return fStringArray; }
55
56 Bool_t GetBool(Int_t index) const { return fBool[index]; }
57 Char_t GetChar(Int_t index) const { return fChar[index]; }
58 Int_t GetInt(Int_t index) const { return fInt[index]; }
59 UInt_t GetUInt(Int_t index) const { return fUInt[index]; }
60 Float_t GetFloat(Int_t index) const { return fFloat[index]; }
61 Double_t GetDouble(Int_t index) const { return fDouble[index]; }
62 TObjArray GetStringArray(Int_t index) const { return fStringArray[index]; }
d96c6484 63
64 Type GetType() const { return fType; }
65
30ec5bf7 66 Double_t GetTimeStamp() const { return fTimeStamp; }
67 void SetTimeStamp(Double_t timeStamp) { fTimeStamp = timeStamp; }
d96c6484 68
69 protected:
70
71 void Init();
72
30ec5bf7 73 Type fType; // type of the value stored
d96c6484 74
30ec5bf7 75 Int_t fnentries; // n. of entries at the same timestamp
76 Bool_t* fBool; //[fnentries] bool value
77 Char_t* fChar; //[fnentries] char value
78 Int_t* fInt; //[fnentries] int value
79 UInt_t* fUInt; //[fnentries] uint value
80 Float_t* fFloat; //[fnentries] float value
81 // TString* fString; //[fnentries] string value
82 TObjArray* fStringArray; //TObjArray to store TObjStrinf for string value
d96c6484 83
30ec5bf7 84 Double_t fTimeStamp; // timestamp of this value
85
86 Double_t* fDouble; //[fnentries] double value
d96c6484 87
30ec5bf7 88 ClassDef(AliDCSArray, 2);
d96c6484 89};
90
91#endif