]>
Commit | Line | Data |
---|---|---|
64a7c78d | 1 | #ifndef AliZDCDataDCS_H |
2 | #define AliZDCDataDCS_H | |
3 | ||
5a8e8156 | 4 | //////////////////////////////////////////////// |
5 | // Class for ZDC DCS data // | |
6 | //////////////////////////////////////////////// | |
7 | ||
8 | ||
64a7c78d | 9 | #include <TMap.h> |
10 | #include <TClonesArray.h> | |
11 | #include <TGraph.h> | |
12 | ||
13 | class AliZDCDataDCS : public TObject { | |
14 | public: | |
e83c8d88 | 15 | enum {kNAliases=28, kNGraphs=24}; |
16 | ||
17 | AliZDCDataDCS(); | |
18 | AliZDCDataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime, | |
19 | UInt_t startTimeDCSQuery, UInt_t endTimeDCSQuery); | |
20 | AliZDCDataDCS(const AliZDCDataDCS & data); | |
21 | AliZDCDataDCS& operator=(const AliZDCDataDCS & data); | |
22 | ~AliZDCDataDCS(); | |
23 | ||
24 | void SetRun(Int_t run) {fRun = run;} | |
25 | void SetStartTime(Int_t startTime) {fStartTime = startTime;} | |
26 | void SetEndTime(Int_t endTime) {fEndTime = endTime;} | |
27 | void SetStartTimeDCSQuery(Int_t startTimeDCSQuery) {fStartTimeDCSQuery = startTimeDCSQuery;} | |
28 | void SetEndTimeDCSQuery(Int_t endTimeDCSQuery) {fEndTimeDCSQuery = endTimeDCSQuery;} | |
29 | void SetCalibData(Float_t *val) {for(Int_t i=0; i<kNAliases; i++) fCalibData[i] = val[i];} | |
30 | void SetCalibData(Int_t i, Float_t val) {fCalibData[i] = val;} | |
31 | // | |
32 | Int_t GetRun() const {return fRun;} | |
33 | Int_t GetStartTime() const {return fStartTime;} | |
34 | Int_t GetEndTime() const {return fEndTime;} | |
35 | Int_t GetStartTimeDCSQuery() const {return fStartTimeDCSQuery;} | |
36 | Int_t GetEndTimeDCSQuery() const {return fEndTimeDCSQuery;} | |
37 | Float_t GetCalibData() const {return *fCalibData;} | |
38 | Float_t GetCalibData(Int_t i) const {return fCalibData[i];} | |
39 | Float_t GetTimeStamp() const {return *fTimeStamp;} | |
40 | Float_t GetTimeStamp(Int_t i) const {return fTimeStamp[i];} | |
41 | ||
42 | Bool_t ProcessData(TMap& aliasMap); | |
43 | ||
44 | const char* GetAliasName(UInt_t pos) const | |
45 | {return pos<kNAliases ? fAliasNames[pos].Data() : 0;} | |
46 | ||
47 | const TGraph* GetGraph(UInt_t pos) const | |
48 | {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos)) : 0;} | |
49 | ||
50 | Double_t Eval(int pos, Double_t time) | |
51 | {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos))->Eval(time) : -1;} | |
52 | ||
53 | void Draw(const Option_t* /*option*/); | |
64a7c78d | 54 | |
55 | ||
56 | private: | |
e83c8d88 | 57 | void Init(); |
58 | void Introduce(UInt_t numAlias, const TObjArray* aliasArr); | |
59 | void CreateGraph(int i, int dim, const Double_t *x, const Double_t *y); | |
64a7c78d | 60 | |
e83c8d88 | 61 | Int_t fRun; // Run number |
62 | UInt_t fStartTime; // Start of run time | |
63 | UInt_t fEndTime; // End of run time | |
64 | Int_t fStartTimeDCSQuery; // start time DCSQuery | |
65 | Int_t fEndTimeDCSQuery; // end time DCSQuery | |
64a7c78d | 66 | |
e83c8d88 | 67 | TString fAliasNames[kNAliases];// Name of the aliases provided by the DCS |
68 | Double_t fCalibData[kNAliases]; // Array containing calibration data | |
69 | Float_t fTimeStamp[kNAliases]; // Array containing time stamps | |
c43818e0 | 70 | |
e83c8d88 | 71 | TClonesArray fGraphs; // Array containing PTM HV graphics |
64a7c78d | 72 | |
e83c8d88 | 73 | Bool_t fIsProcessed; // Flag set when data are processed |
64a7c78d | 74 | |
e83c8d88 | 75 | ClassDef(AliZDCDataDCS, 4); |
64a7c78d | 76 | }; |
77 | ||
78 | #endif |