1 #ifndef ALITPCDATADCS_H
2 #define ALITPCDATADCS_H
5 #include <TClonesArray.h>
11 // This is an example of a container class
12 // of the data retreieved from the DCS archive DB.
13 // It is called by the detector's Preprocessor and
14 // it is stored in the CDB.
17 class AliTPCDataDCS : public TObject {
19 enum {kNAliases=6, kNHistos=3, kNGraphs=3, kNFunctions=2};
20 enum {kHvMin=0, kHvMax=500};
23 AliTPCDataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime);
26 void SetRun(Int_t run) {fRun = run;}
27 void SetStartTime(Int_t startTime) {fStartTime = startTime;}
28 void SetEndTime(Int_t endTime) {fEndTime = endTime;}
29 Int_t GetRun() {return fRun;}
30 Int_t GetStartTime() {return fStartTime;}
31 Int_t GetEndTime() {return fEndTime;}
33 void ProcessData(TMap& aliasMap);
35 const char* GetAliasName(UInt_t pos)
36 {return pos<kNAliases ? fAliasNames[pos].Data() : 0;}
37 const TH1F* GetHisto(UInt_t pos)
38 {return pos<kNHistos ? fHv[pos] : 0;}
40 Float_t GetMean(UInt_t pos) {return pos<kNHistos ? fMean[pos] : 0;}
41 Float_t GetWidth(UInt_t pos) {return pos<kNHistos ? fWidth[pos] : 0;}
43 const TGraph* GetGraph(UInt_t pos)
44 {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos)) : 0;}
46 const TF1* GetFunction() {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);
58 void Introduce(UInt_t numAlias, const TObjArray* aliasArr);
59 void CreateGraph(int i, int dim, const Double_t *x, const Double_t *y);
61 Int_t fRun; // run number
62 UInt_t fStartTime; // run start time
63 UInt_t fEndTime; // run end time
65 Float_t fMean[kNHistos]; // array of histos' mean values
66 Float_t fWidth[kNHistos]; // array of histos' widths
68 TString fAliasNames[kNAliases]; // array of DCS alias names
69 TH1F *fHv[kNHistos]; // array of histos
70 TClonesArray fGraphs; // array of TGraphs
71 TF1 *fFunc; // fit function
73 Bool_t fIsProcessed; // End-of-process flag
75 ClassDef(AliTPCDataDCS, 2);