]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliDCSArray.h
An update of the primary vertex reconstruction method, and change of the magnetic...
[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 <TString.h>
17 #include <TTimeStamp.h>
18
19 class 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,
28                 kString = 6
29         };
30         
31         AliDCSArray();
32         AliDCSArray(const AliDCSArray& c);
33         
34         virtual ~AliDCSArray();
35         
36         AliDCSArray& operator=(const AliDCSArray& c);
37         
38         AliDCSArray(Int_t nentries, Bool_t* value, TTimeStamp* timeStamp);
39         AliDCSArray(Int_t nentries, Char_t* value, TTimeStamp* timeStamp);
40         AliDCSArray(Int_t nentries, Int_t* value, TTimeStamp* timeStamp);
41         AliDCSArray(Int_t nentries, UInt_t* value, TTimeStamp* timeStamp);
42         AliDCSArray(Int_t nentries, Float_t* value, TTimeStamp* timeStamp);
43         AliDCSArray(Int_t nentries, TString* value, TTimeStamp* timeStamp);
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; }
51         TString* GetString() const { return fString; }
52         
53         Type GetType() const { return fType; }
54         
55         TTimeStamp* GetTimeStamp() const { return fTimeStamp; }
56         void SetTimeStamp(TTimeStamp* timeStamp) { fTimeStamp = timeStamp; }
57         
58  protected:
59         
60         void Init();
61         
62         Type fType;            // type of the value stored
63         
64         Int_t fnentries;       // n. of entries at the same timestamp
65         Bool_t* fBool;         //[fnentries] bool value
66         Char_t* fChar;         //[fnentries] char value
67         Int_t* fInt;           //[fnentries] int value
68         UInt_t* fUInt;         //[fnentries] uint value
69         Float_t* fFloat;       //[fnentries] float value
70         TString* fString;      //[fnentries] string value
71         
72         TTimeStamp* fTimeStamp;    // timestamp of this value
73         
74         ClassDef(AliDCSArray, 1);
75 };
76
77 #endif