]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ZDC/AliZDCDataDCS.h
ZDC Preprocessor 1st version implemented
[u/mrichter/AliRoot.git] / ZDC / AliZDCDataDCS.h
1 #ifndef AliZDCDataDCS_H
2 #define AliZDCDataDCS_H
3
4 #include <TMap.h>
5 #include <TClonesArray.h>
6 #include <TGraph.h>
7
8 class AliZDCDataDCS : public TObject {
9 public:
10         enum {kNAliases=26, kNGraphs=22};
11
12         AliZDCDataDCS();
13         AliZDCDataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime);
14         ~AliZDCDataDCS();
15
16         void SetRun(Int_t run) {fRun = run;}
17         void SetStartTime(Int_t startTime) {fStartTime = startTime;}
18         void SetEndTime(Int_t endTime) {fEndTime = endTime;}
19         Int_t GetRun() {return fRun;}
20         Int_t GetStartTime() {return fStartTime;}
21         Int_t GetEndTime() {return fEndTime;}
22
23         void ProcessData(TMap& aliasMap);
24
25         const char* GetAliasName(UInt_t pos)
26                         {return pos<kNAliases ? fAliasNames[pos].Data() : 0;}
27
28         const TGraph* GetGraph(UInt_t pos)
29                         {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos)) : 0;}
30
31         Double_t Eval(int pos, Double_t time)
32                         {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos))->Eval(time) : -1;}
33
34         void Draw(const Option_t* option);
35
36
37 private:
38         void Init();
39         void Introduce(UInt_t numAlias, const TObjArray* aliasArr);
40         void CreateGraph(int i, int dim, const Double_t *x, const Double_t *y);
41
42         Int_t fRun;
43         UInt_t fStartTime;
44         UInt_t fEndTime;
45
46         TString fAliasNames[kNAliases];
47         TClonesArray fGraphs;
48
49         Bool_t fIsProcessed;
50
51         ClassDef(AliZDCDataDCS, 1);
52 };
53
54 #endif