]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliDCSArray.h
Updating class to parse LHC file coming from DCS (AliLHCReader)
[u/mrichter/AliRoot.git] / STEER / AliDCSArray.h
index 51c7963936caa0b3961fd3c25bc35218a9c65304..806c41e52851286493ed7f8784e6d520addc65e0 100644 (file)
@@ -13,8 +13,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 #include <TObject.h>
-#include <TString.h>
-#include <TTimeStamp.h>
+#include <TObjArray.h>
+//#include <TTimeStamp.h>
 
 class AliDCSArray : public TObject {
  public:
@@ -25,7 +25,8 @@ class AliDCSArray : public TObject {
                kInt = 3,
                kUInt = 4,
                kFloat = 5,
-               kString = 6
+               kString = 6,
+               kDouble = 7
        };
        
        AliDCSArray();
@@ -35,12 +36,13 @@ class AliDCSArray : public TObject {
        
        AliDCSArray& operator=(const AliDCSArray& c);
        
-       AliDCSArray(Int_t nentries, Bool_t* value, TTimeStamp* timeStamp);
-       AliDCSArray(Int_t nentries, Char_t* value, TTimeStamp* timeStamp);
-       AliDCSArray(Int_t nentries, Int_t* value, TTimeStamp* timeStamp);
-       AliDCSArray(Int_t nentries, UInt_t* value, TTimeStamp* timeStamp);
-       AliDCSArray(Int_t nentries, Float_t* value, TTimeStamp* timeStamp);
-       AliDCSArray(Int_t nentries, TString* value, TTimeStamp* timeStamp);
+       AliDCSArray(Int_t nentries, Bool_t* value, Double_t timeStamp);
+       AliDCSArray(Int_t nentries, Char_t* value, Double_t timeStamp);
+       AliDCSArray(Int_t nentries, Int_t* value, Double_t timeStamp);
+       AliDCSArray(Int_t nentries, UInt_t* value, Double_t timeStamp);
+       AliDCSArray(Int_t nentries, Float_t* value, Double_t timeStamp);
+       AliDCSArray(Int_t nentries, Double_t* value, Double_t timeStamp);
+       AliDCSArray(Int_t nentries, TObjArray* value, Double_t timeStamp);
        
        Int_t GetNEntries() const { return fnentries;}
        Bool_t* GetBool() const { return fBool; }
@@ -48,30 +50,42 @@ class AliDCSArray : public TObject {
        Int_t* GetInt() const { return fInt; }
        UInt_t* GetUInt() const { return fUInt; }
        Float_t* GetFloat() const { return fFloat; }
-       TString* GetString() const { return fString; }
+       Double_t* GetDouble() const { return fDouble; }
+       TObjArray* GetStringArray() const { return fStringArray; }
+
+       Bool_t GetBool(Int_t index) const { return fBool[index]; }
+       Char_t GetChar(Int_t index) const { return fChar[index]; }
+       Int_t GetInt(Int_t index) const { return fInt[index]; }
+       UInt_t GetUInt(Int_t index) const { return fUInt[index]; }
+       Float_t GetFloat(Int_t index) const { return fFloat[index]; }
+       Double_t GetDouble(Int_t index) const { return fDouble[index]; }
+       TObjArray GetStringArray(Int_t index) const { return fStringArray[index]; }
        
        Type GetType() const { return fType; }
        
-       TTimeStamp* GetTimeStamp() const { return fTimeStamp; }
-       void SetTimeStamp(TTimeStamp* timeStamp) { fTimeStamp = timeStamp; }
+       Double_t GetTimeStamp() const { return fTimeStamp; }
+       void SetTimeStamp(Double_t timeStamp) { fTimeStamp = timeStamp; }
        
  protected:
        
        void Init();
        
-       Type fType;            // type of the value stored
+       Type fType;                // type of the value stored
        
-       Int_t fnentries;       // n. of entries at the same timestamp
-       Bool_t* fBool;         //[fnentries] bool value
-       Char_t* fChar;         //[fnentries] char value
-       Int_t* fInt;           //[fnentries] int value
-       UInt_t* fUInt;         //[fnentries] uint value
-       Float_t* fFloat;       //[fnentries] float value
-       TString* fString;      //[fnentries] string value
+       Int_t fnentries;           // n. of entries at the same timestamp
+       Bool_t* fBool;             //[fnentries] bool value
+       Char_t* fChar;             //[fnentries] char value
+       Int_t* fInt;               //[fnentries] int value
+       UInt_t* fUInt;             //[fnentries] uint value
+       Float_t* fFloat;           //[fnentries] float value
+       //      TString* fString;   //[fnentries] string value
+       TObjArray* fStringArray;    //TObjArray to store TObjStrinf for string value
        
-       TTimeStamp* fTimeStamp;    // timestamp of this value
+       Double_t fTimeStamp;    // timestamp of this value
+
+       Double_t* fDouble;         //[fnentries] double value
        
-       ClassDef(AliDCSArray, 1);
+       ClassDef(AliDCSArray, 2);
 };
 
 #endif