]>
Commit | Line | Data |
---|---|---|
76b6018a | 1 | #ifndef AliVZERODataDCS_H |
2 | #define AliVZERODataDCS_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | #include "TObject.h" | |
8 | #include "TString.h" | |
9 | ||
10 | #include <TClonesArray.h> | |
11 | #include <TH1F.h> | |
12 | ||
13 | class TMap; | |
14 | class TH2F; | |
15 | class TGraph; | |
16 | class TF1; | |
17 | ||
18 | // AliVZERODataDCS class | |
19 | // main aim is to process DCS data | |
20 | // in order to obtain the data to be stored in the OCDB | |
21 | ||
22 | class AliVZERODataDCS : public TObject { | |
23 | public: | |
24 | enum {kNAliases=64,kNGraphs=64}; | |
25 | enum {kHvMin=0, kHvMax=2000}; | |
26 | ||
27 | AliVZERODataDCS(); | |
28 | AliVZERODataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime); | |
29 | ~AliVZERODataDCS(); | |
30 | ||
31 | void SetRun(Int_t run) {fRun = run;} | |
32 | void SetStartTime(Int_t startTime) {fStartTime = startTime;} | |
33 | void SetEndTime(Int_t endTime) {fEndTime = endTime;} | |
34 | Int_t GetRun() const {return fRun;} | |
35 | Int_t GetStartTime() const {return fStartTime;} | |
36 | Int_t GetEndTime() const {return fEndTime;} | |
37 | ||
38 | void ProcessData(TMap& aliasMap); | |
39 | ||
40 | const char* GetAliasName(Int_t pos) const | |
41 | {return pos<kNAliases ? fAliasNames[pos].Data() : 0;} | |
42 | ||
43 | void Draw(const Option_t* option); | |
44 | ||
080c32e6 | 45 | Float_t* GetMeanHV() const {return (float*)fMeanHV;} |
76b6018a | 46 | Float_t* GetWidthHV() const {return (float*)fWidthHV;} |
47 | ||
080c32e6 | 48 | // Getter of Offline Channel number as used in aliroot (defined by aliroot |
49 | // numbering convention) from DCS Channel number | |
50 | ||
51 | Int_t GetOfflineChannel(Int_t channel) const | |
52 | { Int_t fOfflineChannel[64] = {32, 33, 34, 35, 36, 37, 38, 39, | |
53 | 40, 41, 42, 43, 44, 45, 46, 47, | |
54 | 48, 49, 50, 51, 52, 53, 54, 55, | |
55 | 56, 57, 58, 59, 60, 61, 62, 63, | |
56 | 0, 1, 2, 3, 4, 5, 6, 7, | |
57 | 8, 9, 10, 11, 12, 13, 14, 15, | |
58 | 16, 17, 18, 19, 20, 21, 22, 23, | |
59 | 24, 25, 26, 27, 28, 29, 30, 31}; | |
60 | return fOfflineChannel[channel]; } | |
61 | ||
76b6018a | 62 | private: |
c61a7285 | 63 | AliVZERODataDCS(const AliVZERODataDCS&); // Not implemented |
64 | AliVZERODataDCS& operator=(const AliVZERODataDCS&); // Not implemented | |
65 | ||
76b6018a | 66 | void Init(); |
67 | void Introduce(UInt_t numAlias, const TObjArray* aliasArr) const; | |
68 | void CreateGraph(int i, int dim, const Double_t *x, const Double_t *y); | |
69 | ||
70 | Int_t fRun; // Run number | |
71 | Int_t fStartTime; // start time | |
72 | Int_t fEndTime; // end time | |
73 | ||
74 | ||
75 | TString fAliasNames[kNAliases]; // aliases for DCS data | |
76 | TClonesArray fGraphs; // Array containing graphics | |
77 | TH1F *fHv[kNAliases]; | |
78 | Float_t fMeanHV[kNAliases]; | |
79 | Float_t fWidthHV[kNAliases]; | |
80 | ||
81 | Bool_t fIsProcessed; // bool to know processing status | |
82 | ||
83 | ClassDef(AliVZERODataDCS, 2); | |
84 | }; | |
85 | ||
86 | #endif |