]>
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: | |
c0aec6f6 | 15 | enum {kNAliases=28, kNGraphs=24}; |
64a7c78d | 16 | |
17 | AliZDCDataDCS(); | |
18 | AliZDCDataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime); | |
19 | ~AliZDCDataDCS(); | |
20 | ||
21 | void SetRun(Int_t run) {fRun = run;} | |
22 | void SetStartTime(Int_t startTime) {fStartTime = startTime;} | |
23 | void SetEndTime(Int_t endTime) {fEndTime = endTime;} | |
92339a90 | 24 | void SetCalibData(Float_t *val) |
25 | {for(Int_t i=0; i<kNGraphs; i++) fCalibData[i] = val[i];} | |
26 | void SetCalibData(Int_t i, Float_t val) {fCalibData[i] = val;} | |
27 | // | |
33b91e54 | 28 | Int_t GetRun() {return fRun;} |
29 | Int_t GetStartTime() {return fStartTime;} | |
30 | Int_t GetEndTime() {return fEndTime;} | |
92339a90 | 31 | Float_t GetCalibData() {return *fCalibData;} |
32 | Float_t GetCalibData(Int_t i) {return fCalibData[i];} | |
64a7c78d | 33 | |
92339a90 | 34 | void ProcessData(TMap& aliasMap); |
64a7c78d | 35 | |
36 | const char* GetAliasName(UInt_t pos) | |
37 | {return pos<kNAliases ? fAliasNames[pos].Data() : 0;} | |
38 | ||
39 | const TGraph* GetGraph(UInt_t pos) | |
40 | {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos)) : 0;} | |
41 | ||
42 | Double_t Eval(int pos, Double_t time) | |
43 | {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos))->Eval(time) : -1;} | |
44 | ||
45 | void Draw(const Option_t* option); | |
46 | ||
47 | ||
48 | private: | |
49 | void Init(); | |
50 | void Introduce(UInt_t numAlias, const TObjArray* aliasArr); | |
51 | void CreateGraph(int i, int dim, const Double_t *x, const Double_t *y); | |
52 | ||
5a8e8156 | 53 | Int_t fRun; // Run number |
54 | UInt_t fStartTime; // Start of run time | |
55 | UInt_t fEndTime; // End of run time | |
64a7c78d | 56 | |
5a8e8156 | 57 | TString fAliasNames[kNAliases]; // Name of the aliases provided by the DCS |
58 | TClonesArray fGraphs; // Array containing PTM HV graphics | |
31af5828 | 59 | |
d856510e | 60 | Float_t fCalibData[kNGraphs]; // Array containing calibration data |
64a7c78d | 61 | |
5a8e8156 | 62 | Bool_t fIsProcessed; // Flag set when data are processed |
64a7c78d | 63 | |
31af5828 | 64 | ClassDef(AliZDCDataDCS, 2); |
64a7c78d | 65 | }; |
66 | ||
67 | #endif |