]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFDataDCS.h
Typo fixed. Cut changed in ESD QA (A. Dainese)
[u/mrichter/AliRoot.git] / TOF / AliTOFDataDCS.h
1 #ifndef AliTOFDataDCS_H
2 #define AliTOFDataDCS_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 #include "TObject.h" 
10 //#include "TString.h"
11
12 class TMap;
13 class TClonesArray;
14 //class TH2F;
15 //class TGraph;
16 //class TF1;
17 class TString;
18 class AliTOFFormatDCS;
19
20 // AliTOFDataDCS class
21 // main aim is to process DCS data
22 // in order to obtain the data to be stored in the OCDB
23
24 class AliTOFDataDCS : public TObject {
25 public:
26   enum {kNAliases=360, kNHV=90};
27   
28   AliTOFDataDCS();
29   AliTOFDataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime);
30   AliTOFDataDCS(const AliTOFDataDCS & data);
31   AliTOFDataDCS& operator=(const AliTOFDataDCS & data);
32   ~AliTOFDataDCS();
33   
34   void SetRun(Int_t run) {fRun = run;}
35   void SetStartTime(Int_t startTime) {fStartTime = startTime;}
36   void SetEndTime(Int_t endTime) {fEndTime = endTime;}
37   Int_t GetRun() const {return fRun;}
38   Int_t GetStartTime() const {return fStartTime;}
39   Int_t GetEndTime() const {return fEndTime;}
40   
41   Bool_t ProcessData(TMap& aliasMap);
42   
43   const char* GetAliasName(Int_t pos) const 
44     {return pos<kNAliases ? fAliasNames[pos].Data() : 0;}
45   
46   void Draw(const Option_t* /*option*/);
47   
48   AliTOFFormatDCS* GetHVvp(Int_t pos) const
49     {return pos<kNHV ? fHVvp[pos] : 0;}
50   AliTOFFormatDCS* GetHVvn(Int_t pos) const 
51     {return pos<kNHV ? fHVvn[pos] : 0;}
52   AliTOFFormatDCS* GetHVip(Int_t pos) const 
53     {return pos<kNHV ? fHVip[pos] : 0;}
54   AliTOFFormatDCS* GetHVin(Int_t pos) const 
55     {return pos<kNHV ? fHVin[pos] : 0;}
56
57   void SetFDRFlag(Bool_t flag) {fFDR = flag;}
58   Bool_t GetFDRFlag() const {return fFDR;}
59
60 private:
61   void Init();
62   void Introduce(UInt_t numAlias, const TObjArray* aliasArr) const;
63   void CreateHisto(int nbin);
64   
65   Int_t fRun;       // Run number
66   Int_t fStartTime; // start time
67   Int_t fEndTime;   // end time  
68   
69   TString fAliasNames[kNAliases];        // aliases for DCS data
70   AliTOFFormatDCS *fHVvp[kNHV];          // HV voltages, positive ch
71   AliTOFFormatDCS *fHVvn[kNHV];          // HV voltages, negative ch
72   AliTOFFormatDCS *fHVip[kNHV];          // HV currents, positive ch
73   AliTOFFormatDCS *fHVin[kNHV];          // HV currents, negative ch
74   
75   Bool_t fIsProcessed;                   // bool to know processing status
76   Bool_t fFDR;                   // bool to know whether we are in a FDR run
77   
78   ClassDef(AliTOFDataDCS, 4);
79 };
80
81 #endif