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