]>
Commit | Line | Data |
---|---|---|
1 | /**************************************************** | |
2 | AliACORDEDataDCS class | |
3 | Pointer to the DCS objects | |
4 | Author: Pedro Gonzalez (CIEMAT, Madrid) | |
5 | Last update: June 13th 2014 from Mario RodrÃguez Cahuantzi (CINVESTAV, mrodriguez@fis.cinvestav.mx) | |
6 | ==> wrong ACORDE aliases for AMANDA fixed (https://alice.its.cern.ch/jira/browse/ALIROOT-5479) | |
7 | -- old alias: ACO_HV_MODULE[0..59]_VMON | |
8 | -- new alias: ACO_HV_MODULE[0..59]_INSIDE_VMON ()/ ACO_HV_MODULE[0..59]_OUTSIDE_VMON | |
9 | Last updated: March 21 th 2010 | |
10 | Fixing coding violatgion | |
11 | Mario Rodriguez (FCFM-BUAP, Puebla MX) | |
12 | ||
13 | *****************************************************/ | |
14 | #ifndef AliACORDEDATADCS_H | |
15 | #define AliACORDEDATADCS_H | |
16 | ||
17 | #include <TClonesArray.h> | |
18 | #include <TGraph.h> | |
19 | #include <TMap.h> | |
20 | class AliACORDEDataDCS : public TObject { | |
21 | public: | |
22 | enum {kNAliases=120, kNHistos=120, kNGraphs=120, kNFunctions=2}; | |
23 | enum {kHvMin=0, kHvMax=20}; | |
24 | ||
25 | AliACORDEDataDCS(); | |
26 | AliACORDEDataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime); | |
27 | AliACORDEDataDCS(const AliACORDEDataDCS & data); | |
28 | AliACORDEDataDCS& operator=(const AliACORDEDataDCS & data); | |
29 | ||
30 | ~AliACORDEDataDCS(); | |
31 | ||
32 | void SetRun(Int_t run) {fRun = run;} | |
33 | void SetStartTime(Int_t startTime) {fStartTime = startTime;} | |
34 | void SetEndTime(Int_t endTime) {fEndTime = endTime;} | |
35 | Int_t GetRun() const {return fRun;} | |
36 | Int_t GetStartTime() const {return fStartTime;} | |
37 | Int_t GetEndTime() const {return fEndTime;} | |
38 | ||
39 | void ProcessData(TMap& aliasMap); | |
40 | ||
41 | const char* GetAliasName(UInt_t pos) | |
42 | {return pos<kNAliases ? fAliasNames[pos].Data() : 0;} | |
43 | TH1F* GetHisto(UInt_t pos) const {return pos<kNHistos ? fHv[pos] : 0;} | |
44 | ||
45 | Float_t GetMean(UInt_t pos) const {return pos<kNHistos ? fMean[pos] : 0;} | |
46 | Float_t GetWidth(UInt_t pos) const {return pos<kNHistos ? fWidth[pos] : 0;} | |
47 | ||
48 | const TGraph* GetGraph(UInt_t pos) {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos)) : 0;} | |
49 | ||
50 | const TF1* GetFunction() const {return fFunc;} | |
51 | ||
52 | Double_t Eval(int pos, Double_t time) | |
53 | {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos))->Eval(time) : -1;} | |
54 | ||
55 | void Draw(const Option_t* option); | |
56 | ||
57 | ||
58 | private: | |
59 | void Init(); | |
60 | void Introduce(UInt_t numAlias, const TObjArray* aliasArr); | |
61 | void CreateGraph(int i, int dim, const Double_t *x, const Double_t *y); | |
62 | ||
63 | Int_t fRun; // # of Run | |
64 | UInt_t fStartTime; // Start time of the Run | |
65 | UInt_t fEndTime; // End time of the Run | |
66 | ||
67 | Float_t fMean[kNHistos]; // Mean of hits distribution for ACORDE | |
68 | Float_t fWidth[kNHistos]; // Width of the hits dist. for ACORDE | |
69 | ||
70 | TString fAliasNames[kNAliases]; // Alias names for ACORDE Data Points | |
71 | TH1F *fHv[kNHistos]; // High Voltage values | |
72 | TClonesArray fGraphs; // Clones of plots for ACORDE | |
73 | TF1 *fFunc; // Funtion for ACORDE DP | |
74 | ||
75 | Bool_t fIsProcessed; // Boolean flag to know if the vent was processed | |
76 | ||
77 | ClassDef(AliACORDEDataDCS, 1); | |
78 | }; | |
79 | ||
80 | #endif |