]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliDCSArray.h
Change the X and Y values stored by the VertexerZ from (0.,0.) which are the
[u/mrichter/AliRoot.git] / STEER / AliDCSArray.h
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>
16 #include <TObjArray.h>
17 //#include <TTimeStamp.h>
18 class TObjString;
19
20 class 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,
29                 kString = 6,
30                 kDouble = 7
31         };
32         
33         AliDCSArray();
34         AliDCSArray(const AliDCSArray& c);
35         
36         virtual ~AliDCSArray();
37         
38         AliDCSArray& operator=(const AliDCSArray& c);
39         
40         AliDCSArray(Int_t nentries, Bool_t* value, Double_t timeStamp);
41         AliDCSArray(Int_t nentries, Char_t* value, Double_t timeStamp);
42         AliDCSArray(Int_t nentries, Int_t* value, Double_t timeStamp);
43         AliDCSArray(Int_t nentries, UInt_t* value, Double_t timeStamp);
44         AliDCSArray(Int_t nentries, Float_t* value, Double_t timeStamp);
45         AliDCSArray(Int_t nentries, Double_t* value, Double_t timeStamp);
46         AliDCSArray(Int_t nentries, TObjArray* value, Double_t timeStamp);
47         
48         Int_t GetNEntries() const { return fnentries;}
49         Bool_t* GetBool() const { return fBool; }
50         Char_t* GetChar() const { return fChar; }
51         Int_t* GetInt() const { return fInt; }
52         UInt_t* GetUInt() const { return fUInt; }
53         Float_t* GetFloat() const { return fFloat; }
54         Double_t* GetDouble() const { return fDouble; }
55         TObjArray* GetStringArray() const { return fStringArray; }
56
57         Bool_t GetBool(Int_t index) const { return fBool[index]; }
58         Char_t GetChar(Int_t index) const { return fChar[index]; }
59         Int_t GetInt(Int_t index) const { return fInt[index]; }
60         UInt_t GetUInt(Int_t index) const { return fUInt[index]; }
61         Float_t GetFloat(Int_t index) const { return fFloat[index]; }
62         Double_t GetDouble(Int_t index) const { return fDouble[index]; }
63         TObjString* GetStringArray(Int_t index) const { return (TObjString*)fStringArray->At(index); }
64         
65         Type GetType() const { return fType; }
66         
67         Double_t GetTimeStamp() const { return fTimeStamp; }
68         void SetTimeStamp(Double_t timeStamp) { fTimeStamp = timeStamp; }
69         
70  protected:
71         
72         void Init();
73         
74         Type fType;                // type of the value stored
75         
76         Int_t fnentries;           // n. of entries at the same timestamp
77         Bool_t* fBool;             //[fnentries] bool value
78         Char_t* fChar;             //[fnentries] char value
79         Int_t* fInt;               //[fnentries] int value
80         UInt_t* fUInt;             //[fnentries] uint value
81         Float_t* fFloat;           //[fnentries] float value
82         //      TString* fString;   //[fnentries] string value
83         TObjArray* fStringArray;    //TObjArray to store TObjStrinf for string value
84         
85         Double_t fTimeStamp;    // timestamp of this value
86
87         Double_t* fDouble;         //[fnentries] double value
88         
89         ClassDef(AliDCSArray, 2);
90 };
91
92 #endif