1 #ifndef ALITOFLVHVDATAPOINTS_H
2 #define ALITOFLVHVDATAPOINTS_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 /////////////////////////////////////////////////////////
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. //
16 /////////////////////////////////////////////////////////
27 class AliTOFLvHvDataPoints : public TObject {
29 enum {kNsectors=18, kNplates=5, kNddl=72, kNpads=18*91*96, kNmaxDataPoints=77777};
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();
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;}
42 void SetNSecondsBeforeEOR(Int_t nSecondsBeforeEOR) {fNSecondsBeforeEOR = nSecondsBeforeEOR;}
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;}
48 Int_t GetNSecondsBeforeEOR() const {return fNSecondsBeforeEOR;}
49 Bool_t ProcessData(TMap& aliasMap);
52 const char* GetAliasNameXLV(Int_t pos) const
53 {return pos<kNddl ? fAliasNamesXLVmap[pos].Data() : 0;}
55 const char* GetAliasNameXHV(Int_t pos1, Int_t pos2) const
56 {return pos1<kNsectors&&pos2<kNplates ? fAliasNamesXHVmap[pos1][pos2].Data() : 0;}
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);
63 void SetFDRFlag(Bool_t flag) {fFDR = flag;}
64 Bool_t GetFDRFlag() const {return fFDR;}
66 Int_t GetNumberOfHVandLVmaps() const { return fNumberOfHVandLVmaps; };
67 AliTOFDCSmaps * GetHVandLVmapAtSOR() const { return fMap[0]; };
68 AliTOFDCSmaps * GetHVandLVmapAtEOR() ;
69 AliTOFDCSmaps * GetHVandLVmap(Int_t index) const { if (index>=fNumberOfHVandLVmaps) return 0x0; else return fMap[index]; };
70 Int_t GetNumberOfLVmaps() const { return fNumberOfLVdataPoints; };
71 AliTOFDCSmaps * GetLVmap(Int_t index) const { if (index>=fNumberOfLVdataPoints) return 0x0; else return fLVDataPoints[index]; };
72 Int_t GetNumberOfHVmaps() const { return fNumberOfHVdataPoints; };
73 AliTOFDCSmaps * GetHVmap(Int_t index) const { if (index>=fNumberOfHVdataPoints) return 0x0; else return fHVDataPoints[index]; };
77 void CreateHisto(int nbin);
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;
82 Bool_t ReadHVDataPoints(TMap& aliasMap);
83 Bool_t ReadLVDataPoints(TMap& aliasMap);
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
99 Bool_t fIsProcessed; // bool to know processing status
100 Bool_t fFDR; // bool to know whether we are in a FDR run
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
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
110 TString fAliasNamesXLVmap[kNddl]; // aliases for LV map
111 TString fAliasNamesXHVmap[kNsectors][kNplates]; // aliases for HV map
113 AliTOFDCSmaps *fStartingLVmap; // starting value for LV map
114 AliTOFDCSmaps *fStartingHVmap; // starting value for HV map
116 TH1C * fHisto; // histogram
118 Int_t fNSecondsBeforeEOR; // time window to choose if a run ended correctly or not [s]
120 ClassDef(AliTOFLvHvDataPoints, 3);