]>
Commit | Line | Data |
---|---|---|
ea932f75 | 1 | #ifndef ALITOFLVHVDATAPOINTS_H |
2 | #define ALITOFLVHVDATAPOINTS_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 | ///////////////////////////////////////////////////////// | |
10 | // // | |
11 | // AliTOFLvHvDataPoints class // | |
12 | // main aim to introduce // | |
13 | // the aliases for the TOF LV and HV DCS data points // | |
14 | // to be then stored in the OCDB, and to process them. // | |
15 | // // | |
16 | ///////////////////////////////////////////////////////// | |
17 | ||
b7a60cff | 18 | #include "TObject.h" |
ea932f75 | 19 | |
20 | class TMap; | |
21 | class TClonesArray; | |
22 | class TString; | |
b7a60cff | 23 | class TH1C; |
24 | ||
25 | class AliTOFDCSmaps; | |
ea932f75 | 26 | |
27 | class AliTOFLvHvDataPoints : public TObject { | |
28 | public: | |
29 | enum {kNsectors=18, kNplates=5, kNddl=72, kNpads=18*91*96, kNmaxDataPoints=77777}; | |
30 | ||
31 | AliTOFLvHvDataPoints(); | |
32 | AliTOFLvHvDataPoints(Int_t nRun, UInt_t startTime, UInt_t endTime, UInt_t startTimeDCSQuery, UInt_t endTimeDCSQuery ); | |
33 | AliTOFLvHvDataPoints(const AliTOFLvHvDataPoints & data); | |
34 | AliTOFLvHvDataPoints& operator=(const AliTOFLvHvDataPoints & data); | |
35 | ~AliTOFLvHvDataPoints(); | |
36 | ||
37 | void SetRun(Int_t run) {fRun = run;} | |
38 | void SetStartTime(Int_t startTime) {fStartTime = startTime;} | |
39 | void SetEndTime(Int_t endTime) {fEndTime = endTime;} | |
40 | void SetStartTimeDCSQuery(Int_t startTimeDCSQuery) {fStartTimeDCSQuery = startTimeDCSQuery;} | |
41 | void SetEndTimeDCSQuery(Int_t endTimeDCSQuery) {fEndTimeDCSQuery = endTimeDCSQuery;} | |
38ef64f3 | 42 | void SetNSecondsBeforeEOR(Int_t nSecondsBeforeEOR) {fNSecondsBeforeEOR = nSecondsBeforeEOR;} |
ea932f75 | 43 | Int_t GetRun() const {return fRun;} |
44 | Int_t GetStartTime() const {return fStartTime;} | |
45 | Int_t GetEndTime() const {return fEndTime;} | |
46 | Int_t GetStartTimeDCSQuery() const {return fStartTimeDCSQuery;} | |
47 | Int_t GetEndTimeDCSQuery() const {return fEndTimeDCSQuery;} | |
38ef64f3 | 48 | Int_t GetNSecondsBeforeEOR() const {return fNSecondsBeforeEOR;} |
ea932f75 | 49 | Bool_t ProcessData(TMap& aliasMap); |
38ef64f3 | 50 | |
ea932f75 | 51 | |
52 | const char* GetAliasNameXLV(Int_t pos) const | |
53 | {return pos<kNddl ? fAliasNamesXLVmap[pos].Data() : 0;} | |
54 | ||
55 | const char* GetAliasNameXHV(Int_t pos1, Int_t pos2) const | |
56 | {return pos1<kNsectors&&pos2<kNplates ? fAliasNamesXHVmap[pos1][pos2].Data() : 0;} | |
57 | ||
58 | void Draw(const Option_t* /*option*/); | |
59 | void DrawHVandLVMap(Int_t index); | |
60 | void DrawHVMap(Int_t index); | |
61 | void DrawLVMap(Int_t index); | |
62 | ||
63 | void SetFDRFlag(Bool_t flag) {fFDR = flag;} | |
64 | Bool_t GetFDRFlag() const {return fFDR;} | |
65 | ||
66 | Int_t GetNumberOfHVandLVmaps() const { return fNumberOfHVandLVmaps; }; | |
b7a60cff | 67 | AliTOFDCSmaps * GetHVandLVmapAtSOR() const { return fMap[0]; }; |
ea932f75 | 68 | AliTOFDCSmaps * GetHVandLVmapAtEOR() ; |
b7a60cff | 69 | AliTOFDCSmaps * GetHVandLVmap(Int_t index) const { if (index>=fNumberOfHVandLVmaps) return 0x0; else return fMap[index]; }; |
ea932f75 | 70 | Int_t GetNumberOfLVmaps() const { return fNumberOfLVdataPoints; }; |
b7a60cff | 71 | AliTOFDCSmaps * GetLVmap(Int_t index) const { if (index>=fNumberOfLVdataPoints) return 0x0; else return fLVDataPoints[index]; }; |
ea932f75 | 72 | Int_t GetNumberOfHVmaps() const { return fNumberOfHVdataPoints; }; |
b7a60cff | 73 | AliTOFDCSmaps * GetHVmap(Int_t index) const { if (index>=fNumberOfHVdataPoints) return 0x0; else return fHVDataPoints[index]; }; |
ea932f75 | 74 | |
75 | private: | |
76 | void Init(); | |
77 | void CreateHisto(int nbin); | |
b7a60cff | 78 | void FillHVarrayPerDataPoint(Int_t sector, Int_t plate, UInt_t baseWord, Short_t *array) const; |
79 | void FillLVarrayPerDataPoint(Int_t nDDL, UInt_t baseWord, Short_t *array) const; | |
80 | void GetStripsConnectedToFEAC(Int_t nDDL, Int_t nFEAC, Int_t *iStrip, Int_t &firstPadX, Int_t &lastPadX) const; | |
ea932f75 | 81 | |
82 | Bool_t ReadHVDataPoints(TMap& aliasMap); | |
83 | Bool_t ReadLVDataPoints(TMap& aliasMap); | |
84 | ||
85 | Bool_t MergeMaps(); | |
86 | Bool_t MergeHVmap(); | |
87 | Bool_t MergeLVmap(); | |
88 | ||
89 | Int_t InsertHVDataPoint(AliTOFDCSmaps *object); | |
90 | Int_t FindHVdpIndex(Int_t z) const; | |
91 | Int_t InsertLVDataPoint(AliTOFDCSmaps *object); | |
92 | Int_t FindLVdpIndex(Int_t z) const; | |
93 | Int_t fRun; // Run number | |
94 | Int_t fStartTime; // start time | |
95 | Int_t fEndTime; // end time | |
96 | Int_t fStartTimeDCSQuery; // start time DCSQuery | |
97 | Int_t fEndTimeDCSQuery; // end time DCSQuery | |
98 | ||
99 | Bool_t fIsProcessed; // bool to know processing status | |
100 | Bool_t fFDR; // bool to know whether we are in a FDR run | |
101 | ||
102 | AliTOFDCSmaps *fLVDataPoints[kNmaxDataPoints]; // LV status map VS time | |
103 | AliTOFDCSmaps *fHVDataPoints[kNmaxDataPoints]; // HV status map VS time | |
104 | AliTOFDCSmaps *fMap[kNmaxDataPoints]; // LV&&HV status map VS time | |
105 | ||
106 | Int_t fNumberOfLVdataPoints; // number of found LV status dps | |
107 | Int_t fNumberOfHVdataPoints; // number of found HV status dps | |
108 | Int_t fNumberOfHVandLVmaps; // number of found LV&&HV status maps | |
109 | ||
110 | TString fAliasNamesXLVmap[kNddl]; // aliases for LV map | |
111 | TString fAliasNamesXHVmap[kNsectors][kNplates]; // aliases for HV map | |
b7a60cff | 112 | |
113 | AliTOFDCSmaps *fStartingLVmap; // starting value for LV map | |
114 | AliTOFDCSmaps *fStartingHVmap; // starting value for HV map | |
ea932f75 | 115 | |
116 | TH1C * fHisto; // histogram | |
117 | ||
38ef64f3 | 118 | Int_t fNSecondsBeforeEOR; // time window to choose if a run ended correctly or not [s] |
119 | ||
120 | ClassDef(AliTOFLvHvDataPoints, 3); | |
ea932f75 | 121 | }; |
122 | ||
123 | #endif |