]> git.uio.no Git - u/mrichter/AliRoot.git/blob - SHUTTLE/TestShuttle/AliTestDataDCS.h
Function Bool_t GetHLTStatus added to preprocessor. It returns the status of HLT
[u/mrichter/AliRoot.git] / SHUTTLE / TestShuttle / AliTestDataDCS.h
1 #ifndef AliTestDataDCS_H
2 #define AliTestDataDCS_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 AliTestDataDCS : public TObject {
11 public:
12         enum {kNAliases=6, kNHistos=3, kNGraphs=3, kNFunctions=2};
13         enum {kHvMin=0, kHvMax=20};
14
15         AliTestDataDCS();
16         AliTestDataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime);
17         ~AliTestDataDCS();
18
19         void SetRun(Int_t run) {fRun = run;}
20         void SetStartTime(Int_t startTime) {fStartTime = startTime;}
21         void SetEndTime(Int_t endTime) {fEndTime = endTime;}
22         Int_t GetRun() {return fRun;}
23         Int_t GetStartTime() {return fStartTime;}
24         Int_t GetEndTime() {return fEndTime;}
25
26         void ProcessData(TMap& aliasMap);
27
28         const char* GetAliasName(UInt_t pos)
29                         {return pos<kNAliases ? fAliasNames[pos].Data() : 0;}
30         const TH1F* GetHisto(UInt_t pos) 
31                         {return pos<kNHistos ? fHv[pos] : 0;}
32
33         Float_t GetMean(UInt_t pos) {return pos<kNHistos ? fMean[pos] : 0;}
34         Float_t GetWidth(UInt_t pos) {return pos<kNHistos ? fWidth[pos] : 0;}
35
36         const TGraph* GetGraph(UInt_t pos)
37                         {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos)) : 0;}
38
39         const TF1* GetFunction() {return fFunc;}
40
41         Double_t Eval(int pos, Double_t time)
42                         {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos))->Eval(time) : -1;}
43
44         void Draw(const Option_t* option);
45
46
47 private:
48         void Init();
49         void Introduce(UInt_t numAlias, const TObjArray* aliasArr);
50         void CreateGraph(int i, int dim, const Double_t *x, const Double_t *y);
51
52         Int_t fRun;
53         UInt_t fStartTime;
54         UInt_t fEndTime;
55
56         Float_t fMean[kNHistos];
57         Float_t fWidth[kNHistos];
58
59         TString fAliasNames[kNAliases];
60         TH1F *fHv[kNHistos];
61         TClonesArray fGraphs;
62         TF1 *fFunc;
63
64         Bool_t fIsProcessed;
65
66         ClassDef(AliTestDataDCS, 2);
67 };
68
69 #endif