Changes to compile with Root6 on macosx64
[u/mrichter/AliRoot.git] / STEER / 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>
a6088e29 18class TObjString;
d96c6484 19
20class AliDCSArray : public TObject {
21 public:
22 enum Type {
23 kInvalid = 0,
24 kBool = 1,
25 kChar = 2,
26 kInt = 3,
27 kUInt = 4,
28 kFloat = 5,
30ec5bf7 29 kString = 6,
30 kDouble = 7
d96c6484 31 };
32
33 AliDCSArray();
d96c6484 34
35 virtual ~AliDCSArray();
36
30ec5bf7 37 AliDCSArray(Int_t nentries, Bool_t* value, Double_t timeStamp);
38 AliDCSArray(Int_t nentries, Char_t* value, Double_t timeStamp);
39 AliDCSArray(Int_t nentries, Int_t* value, Double_t timeStamp);
40 AliDCSArray(Int_t nentries, UInt_t* value, Double_t timeStamp);
41 AliDCSArray(Int_t nentries, Float_t* value, Double_t timeStamp);
42 AliDCSArray(Int_t nentries, Double_t* value, Double_t timeStamp);
43 AliDCSArray(Int_t nentries, TObjArray* value, Double_t timeStamp);
d96c6484 44
45 Int_t GetNEntries() const { return fnentries;}
46 Bool_t* GetBool() const { return fBool; }
47 Char_t* GetChar() const { return fChar; }
48 Int_t* GetInt() const { return fInt; }
49 UInt_t* GetUInt() const { return fUInt; }
50 Float_t* GetFloat() const { return fFloat; }
30ec5bf7 51 Double_t* GetDouble() const { return fDouble; }
52 TObjArray* GetStringArray() const { return fStringArray; }
53
54 Bool_t GetBool(Int_t index) const { return fBool[index]; }
55 Char_t GetChar(Int_t index) const { return fChar[index]; }
56 Int_t GetInt(Int_t index) const { return fInt[index]; }
57 UInt_t GetUInt(Int_t index) const { return fUInt[index]; }
58 Float_t GetFloat(Int_t index) const { return fFloat[index]; }
59 Double_t GetDouble(Int_t index) const { return fDouble[index]; }
a6088e29 60 TObjString* GetStringArray(Int_t index) const { return (TObjString*)fStringArray->At(index); }
d96c6484 61
62 Type GetType() const { return fType; }
63
30ec5bf7 64 Double_t GetTimeStamp() const { return fTimeStamp; }
65 void SetTimeStamp(Double_t timeStamp) { fTimeStamp = timeStamp; }
d96c6484 66
67 protected:
68
69 void Init();
70
30ec5bf7 71 Type fType; // type of the value stored
d96c6484 72
30ec5bf7 73 Int_t fnentries; // n. of entries at the same timestamp
74 Bool_t* fBool; //[fnentries] bool value
75 Char_t* fChar; //[fnentries] char value
76 Int_t* fInt; //[fnentries] int value
77 UInt_t* fUInt; //[fnentries] uint value
78 Float_t* fFloat; //[fnentries] float value
79 // TString* fString; //[fnentries] string value
80 TObjArray* fStringArray; //TObjArray to store TObjStrinf for string value
d96c6484 81
30ec5bf7 82 Double_t fTimeStamp; // timestamp of this value
83
84 Double_t* fDouble; //[fnentries] double value
22098a2e 85
86 private:
87 AliDCSArray(const AliDCSArray& c);
88 AliDCSArray& operator=(const AliDCSArray& c);
d96c6484 89
30ec5bf7 90 ClassDef(AliDCSArray, 2);
d96c6484 91};
92
93#endif