]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ACORDE/AliACORDEDataDCS.h
Update task for ITS tracking check and new macro for plots
[u/mrichter/AliRoot.git] / ACORDE / AliACORDEDataDCS.h
1 #ifndef AliACORDEDataDCS_H
2 #define AliACORDEDataDCS_H
3
4 #include <TMap.h>
5 #include <TClonesArray.h>
6 #include <TH2F.h>
7 #include <TGraph.h>
8 #include <TF1.h>
9
10 class AliACORDEDataDCS : public TObject {
11 public:
12         enum {kNAliases=60, kNHistos=60, kNGraphs=60, kNFunctions=2};
13         enum {kHvMin=0, kHvMax=20};
14
15         AliACORDEDataDCS();
16         AliACORDEDataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime);
17         AliACORDEDataDCS(const AliACORDEDataDCS & data);
18         AliACORDEDataDCS& operator=(const AliACORDEDataDCS & data);
19
20         ~AliACORDEDataDCS();
21
22         void SetRun(Int_t run) {fRun = run;}
23         void SetStartTime(Int_t startTime) {fStartTime = startTime;}
24         void SetEndTime(Int_t endTime) {fEndTime = endTime;}
25         Int_t GetRun() {return fRun;}
26         Int_t GetStartTime() {return fStartTime;}
27         Int_t GetEndTime() {return fEndTime;}
28
29         void ProcessData(TMap& aliasMap);
30
31         const char* GetAliasName(UInt_t pos)
32                         {return pos<kNAliases ? fAliasNames[pos].Data() : 0;}
33         const TH1F* GetHisto(UInt_t pos) 
34                         {return pos<kNHistos ? fHv[pos] : 0;}
35
36         Float_t GetMean(UInt_t pos) {return pos<kNHistos ? fMean[pos] : 0;}
37         Float_t GetWidth(UInt_t pos) {return pos<kNHistos ? fWidth[pos] : 0;}
38
39         const TGraph* GetGraph(UInt_t pos)
40                         {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos)) : 0;}
41
42         const TF1* GetFunction() {return fFunc;}
43
44         Double_t Eval(int pos, Double_t time)
45                         {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos))->Eval(time) : -1;}
46
47         void Draw(const Option_t* option);
48
49
50 private:
51         void Init();
52         void Introduce(UInt_t numAlias, const TObjArray* aliasArr);
53         void CreateGraph(int i, int dim, const Double_t *x, const Double_t *y);
54
55         Int_t fRun;
56         UInt_t fStartTime;
57         UInt_t fEndTime;
58
59         Float_t fMean[kNHistos];
60         Float_t fWidth[kNHistos];
61
62         TString fAliasNames[kNAliases];
63         TH1F *fHv[kNHistos];
64         TClonesArray fGraphs;
65         TF1 *fFunc;
66
67         Bool_t fIsProcessed;
68
69         ClassDef(AliACORDEDataDCS, 1);
70 };
71
72 #endif