1 /****************************************************
3 Pointer to the DCS objects
4 Author: Pedro Gonzalez (CIEMAT, Madrid)
5 Last updated: March 21 th 2010
6 Fixing coding violatgion
7 Mario Rodriguez (FCFM-BUAP, Puebla MX)
9 *****************************************************/
10 #ifndef AliACORDEDATADCS_H
11 #define AliACORDEDATADCS_H
13 #include <TClonesArray.h>
16 class AliACORDEDataDCS : public TObject {
18 enum {kNAliases=60, kNHistos=60, kNGraphs=60, kNFunctions=2};
19 enum {kHvMin=0, kHvMax=20};
22 AliACORDEDataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime);
23 AliACORDEDataDCS(const AliACORDEDataDCS & data);
24 AliACORDEDataDCS& operator=(const AliACORDEDataDCS & data);
28 void SetRun(Int_t run) {fRun = run;}
29 void SetStartTime(Int_t startTime) {fStartTime = startTime;}
30 void SetEndTime(Int_t endTime) {fEndTime = endTime;}
31 Int_t GetRun() const {return fRun;}
32 Int_t GetStartTime() const {return fStartTime;}
33 Int_t GetEndTime() const {return fEndTime;}
35 void ProcessData(TMap& aliasMap);
37 const char* GetAliasName(UInt_t pos)
38 {return pos<kNAliases ? fAliasNames[pos].Data() : 0;}
39 TH1F* GetHisto(UInt_t pos) const {return pos<kNHistos ? fHv[pos] : 0;}
41 Float_t GetMean(UInt_t pos) const {return pos<kNHistos ? fMean[pos] : 0;}
42 Float_t GetWidth(UInt_t pos) const {return pos<kNHistos ? fWidth[pos] : 0;}
44 const TGraph* GetGraph(UInt_t pos) {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos)) : 0;}
46 const TF1* GetFunction() const {return fFunc;}
48 Double_t Eval(int pos, Double_t time)
49 {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos))->Eval(time) : -1;}
51 void Draw(const Option_t* option);
56 void Introduce(UInt_t numAlias, const TObjArray* aliasArr);
57 void CreateGraph(int i, int dim, const Double_t *x, const Double_t *y);
59 Int_t fRun; // # of Run
60 UInt_t fStartTime; // Start time of the Run
61 UInt_t fEndTime; // End time of the Run
63 Float_t fMean[kNHistos]; // Mean of hits distribution for ACORDE
64 Float_t fWidth[kNHistos]; // Width of the hits dist. for ACORDE
66 TString fAliasNames[kNAliases]; // Alias names for ACORDE Data Points
67 TH1F *fHv[kNHistos]; // High Voltage values
68 TClonesArray fGraphs; // Clones of plots for ACORDE
69 TF1 *fFunc; // Funtion for ACORDE DP
71 Bool_t fIsProcessed; // Boolean flag to know if the vent was processed
73 ClassDef(AliACORDEDataDCS, 1);