3 hisograms for online satellite monitoring added
[u/mrichter/AliRoot.git] / T0 / AliT0DataDCS.h
CommitLineData
d99eeddf 1#ifndef ALIT0DATADCS_H
2#define ALIT0DATADCS_H
dc7ca31d 3
9dcc11e4 4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
dc7ca31d 7#include <TMap.h>
d99eeddf 8//#include <TClonesArray.h>
9//#include <TGraph.h>
10#include <TObject.h>
11class TString;
9dcc11e4 12
13// AliT0DataDCS class
14// fetching T0 data points from DCS, calculating mean values for the run
15// and storing the result to Reference DB
dc7ca31d 16
17class AliT0DataDCS : public TObject {
18public:
19682e7d 19 enum {kNAliases=201, kHV=12, kLV=2, kCFD=12, kScalers=32, kTRM=20, kDRM=5, kAtten=1}; // 201 T0 aliases
dc7ca31d 20
21 AliT0DataDCS();
8eb4ac75 22 AliT0DataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime, UInt_t startTimeDCSQuery, UInt_t endTimeDCSQuery);
23 AliT0DataDCS(const AliT0DataDCS & data);
24 AliT0DataDCS& operator=(const AliT0DataDCS & data);
5bdebf6a 25 ~AliT0DataDCS();
dc7ca31d 26
27 void SetRun(Int_t run) {fRun = run;}
28 void SetStartTime(Int_t startTime) {fStartTime = startTime;}
29 void SetEndTime(Int_t endTime) {fEndTime = endTime;}
8eb4ac75 30 void SetStartTimeDCSQuery(Int_t startTimeDCSQuery) {fStartTimeDCSQuery = startTimeDCSQuery;}
31 void SetEndTimeDCSQuery(Int_t endTimeDCSQuery) {fEndTimeDCSQuery = endTimeDCSQuery;}
5bdebf6a 32
33
34 Int_t GetRun() const {return fRun;}
9dcc11e4 35 Int_t GetStartTime() const {return fStartTime;}
36 Int_t GetEndTime() const {return fEndTime;}
8eb4ac75 37 Int_t GetStartTimeDCSQuery() const {return fStartTimeDCSQuery;}
38 Int_t GetEndTimeDCSQuery() const {return fEndTimeDCSQuery;}
dc7ca31d 39
5bdebf6a 40 Int_t GetTVDCtop() const {return fTVDCtop;}
41 Int_t GetTVDCbottom() const {return fTVDCbottom;}
42
43 Float_t GetMeanPMTCurrentASide(Int_t pmt) const {return fHViA[pmt];}
44 Float_t GetMeanPMTVoltageASide(Int_t pmt) const {return fHVvA[pmt];}
45 Float_t GetMeanLVCurrentASide (Int_t index) const {return fLViA[index];}
46 Float_t GetMeanLVVoltageASide (Int_t index) const {return fLVvA[index];}
47
48 Float_t GetMeanPMTCurrentCSide(Int_t pmt) const {return fHViC[pmt];}
49 Float_t GetMeanPMTVoltageCSide(Int_t pmt) const {return fHVvC[pmt];}
50 Float_t GetMeanLVCurrentCSide (Int_t index) const {return fLViC[index];}
51 Float_t GetMeanLVVoltageCSide (Int_t index) const {return fLVvC[index];}
52
53 Float_t GetMeanCFDThresholdASide(Int_t pmt) const{return fCFDtA[pmt];}
54 Float_t GetMeanCFDWalkASide (Int_t pmt) const{return fCFDwA[pmt];}
55 Float_t GetMeanCFDThresholdCSide(Int_t pmt) const{return fCFDtC[pmt];}
56 Float_t GetMeanCFDWalkCSide (Int_t pmt) const{return fCFDwC[pmt];}
57
58 UInt_t GetMeanValueOfT0ScalerFromEntireRun(Int_t scaler) const{return fScalerMean[scaler];}
59 UInt_t GetMeanValueOfT0ScalerPerSecond (Int_t scaler) const{return fScalerSecMean[scaler];}
60
61 Float_t GetMeanTemperatureTRM (Int_t trm) const {return fTRM[trm];}
62 Float_t GetMeanTemperatureDRM (Int_t drm) const {return fDRM[drm];}
63 Float_t GetLaserAmplitude() const { return fAtten;}
64 Int_t GetMultDiscriminatorCentralASide() const {return fMPDcentA;}
65 Int_t GetMultDiscriminatorCentralCSide() const {return fMPDcentC;}
66 Int_t GetMultDiscriminatorSemiCentralASide() const {return fMPDsemiCentA;}
67 Int_t GetMultDiscriminatorSemiCentralCSide() const {return fMPDsemiCentC;}
68 Int_t GetMultDiscriminatorMode() const {return fMPDmode;}
69
70
91366e58 71 Bool_t ProcessData(TMap& aliasMap);
dc7ca31d 72
8eb4ac75 73 const char* GetAliasName(Int_t pos) const {return pos<kNAliases ? fAliasNames[pos].Data() : 0;}
5bdebf6a 74
75 void PrintT0Data() const;
d99eeddf 76
dc7ca31d 77private:
78 void Init();
8eb4ac75 79 void Introduce(UInt_t numAlias, const TObjArray* aliasArr)const;
5bdebf6a 80 void PrintfArray(const char *label, const Float_t *array, Int_t numElements) const;
dc7ca31d 81
955ef7d2 82 Int_t fRun; // Run number
83 UInt_t fStartTime; // Start time
84 UInt_t fEndTime; // End time
85 Int_t fStartTimeDCSQuery; // Begin time DCSQuery
86 Int_t fEndTimeDCSQuery; // End time DCSQuery
87 Float_t fHViA[kHV]; // Mean value of HV current in uA on A-side
88 Float_t fHVvA[kHV]; // Mean value of HV voltage in V on A-side
89 Float_t fLViA[kLV]; // Mean value of LV current in uA on A-side
90 Float_t fLVvA[kLV]; // Mean value of LV voltage in V on A-side
91 Float_t fHViC[kHV]; // Mean value of HV current in uA on C-side
92 Float_t fHVvC[kHV]; // Mean value of HV voltage in V on C-side
93 Float_t fLViC[kLV]; // Mean value of LV current in uA on C-side
94 Float_t fLVvC[kLV]; // Mean value of LV voltage in V on C-side
95 Float_t fCFDtA[kCFD]; // Mean threshold on CFD in V on A-side
96 Float_t fCFDwA[kCFD]; // Mean walk on CFD in V on A-side
97 Float_t fCFDtC[kCFD]; // Mean threshold on CFD in V on C-side
98 Float_t fCFDwC[kCFD]; // Mean walk on CFD in V on C-side
5bdebf6a 99 UInt_t fScalerMean[kScalers]; // Mean value of T0 scaler counts from the entire run
100 UInt_t fScalerSecMean[kScalers]; // Mean value of T0 scaler counts per second
955ef7d2 101 Float_t fTRM[kTRM]; // Mean temperature on TRM in degrees of Celsius
102 Float_t fDRM[kDRM]; // Mean temperature on DRM in degrees of Celsius
103 Float_t fAtten; // Laser amplitude in MIPs
104 Int_t fMPDcentA; // Multiplicity Discriminator central on A-side
105 Int_t fMPDcentC; // Multiplicity Discriminator central on C-side
106 Int_t fMPDsemiCentA; // Multiplicity Discriminator semi-central on A-side
107 Int_t fMPDsemiCentC; // Multiplicity Discriminator semi-central on C-side
108 Int_t fTVDCtop; // T0 Vertex Unit top
109 Int_t fTVDCbottom; // T0 Vertex Unit bottom
110 Int_t fMPDmode; // Multiplicity Discriminator on C-side only, A-side only, or both sides
9dcc11e4 111 TString fAliasNames[kNAliases]; // T0 data points aliases
112 Bool_t fIsProcessed; // status - was processing data successful
5bdebf6a 113 ClassDef(AliT0DataDCS, 2)
970bb0d0 114
115protected:
dc7ca31d 116};
117
118#endif