]>
Commit | Line | Data |
---|---|---|
1 | #ifndef AliZDCDataDCS_H | |
2 | #define AliZDCDataDCS_H | |
3 | ||
4 | //////////////////////////////////////////////// | |
5 | // Class for ZDC DCS data // | |
6 | //////////////////////////////////////////////// | |
7 | ||
8 | ||
9 | #include <TMap.h> | |
10 | #include <TClonesArray.h> | |
11 | #include <TGraph.h> | |
12 | ||
13 | class AliZDCDataDCS : public TObject { | |
14 | public: | |
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*/); | |
54 | ||
55 | ||
56 | private: | |
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); | |
60 | ||
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 | |
66 | ||
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 | |
70 | ||
71 | TClonesArray fGraphs; // Array containing PTM HV graphics | |
72 | ||
73 | Bool_t fIsProcessed; // Flag set when data are processed | |
74 | ||
75 | ClassDef(AliZDCDataDCS, 4); | |
76 | }; | |
77 | ||
78 | #endif |