]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFLvHvDataPoints.h
Add survey measurement of Laser to the OCDB
[u/mrichter/AliRoot.git] / TOF / AliTOFLvHvDataPoints.h
CommitLineData
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
18#include "TObject.h"
19#include "TH1C.h"
20
21#include "AliTOFDCSmaps.h"
22
23class TMap;
24class TClonesArray;
25class TString;
26
27class AliTOFLvHvDataPoints : public TObject {
28public:
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;}
42 Int_t GetRun() const {return fRun;}
43 Int_t GetStartTime() const {return fStartTime;}
44 Int_t GetEndTime() const {return fEndTime;}
45 Int_t GetStartTimeDCSQuery() const {return fStartTimeDCSQuery;}
46 Int_t GetEndTimeDCSQuery() const {return fEndTimeDCSQuery;}
47
48 Bool_t ProcessData(TMap& aliasMap);
49
50 const char* GetAliasNameXLV(Int_t pos) const
51 {return pos<kNddl ? fAliasNamesXLVmap[pos].Data() : 0;}
52
53 const char* GetAliasNameXHV(Int_t pos1, Int_t pos2) const
54 {return pos1<kNsectors&&pos2<kNplates ? fAliasNamesXHVmap[pos1][pos2].Data() : 0;}
55
56 void Draw(const Option_t* /*option*/);
57 void DrawHVandLVMap(Int_t index);
58 void DrawHVMap(Int_t index);
59 void DrawLVMap(Int_t index);
60
61 void SetFDRFlag(Bool_t flag) {fFDR = flag;}
62 Bool_t GetFDRFlag() const {return fFDR;}
63
64 Int_t GetNumberOfHVandLVmaps() const { return fNumberOfHVandLVmaps; };
65 AliTOFDCSmaps * GetHVandLVmapAtSOR() { return fMap[0]; };
66 AliTOFDCSmaps * GetHVandLVmapAtEOR() ;
67 AliTOFDCSmaps * GetHVandLVmap(Int_t index) { if (index>=fNumberOfHVandLVmaps) return 0x0; else return fMap[index]; };
68 Int_t GetNumberOfLVmaps() const { return fNumberOfLVdataPoints; };
69 AliTOFDCSmaps * GetLVmap(Int_t index) { if (index>=fNumberOfLVdataPoints) return 0x0; else return fLVDataPoints[index]; };
70 Int_t GetNumberOfHVmaps() const { return fNumberOfHVdataPoints; };
71 AliTOFDCSmaps * GetHVmap(Int_t index) { if (index>=fNumberOfHVdataPoints) return 0x0; else return fHVDataPoints[index]; };
72
73private:
74 void Init();
75 void CreateHisto(int nbin);
76 void FillHVarrayPerDataPoint(Int_t sector, Int_t plate, UInt_t baseWord, Short_t *array);
77 void FillLVarrayPerDataPoint(Int_t nDDL, UInt_t baseWord, Short_t *array);
78 void GetStripsConnectedToFEAC(Int_t nDDL, Int_t nFEAC, Int_t *iStrip, Int_t &firstPadX, Int_t &lastPadX);
79
80 Bool_t ReadHVDataPoints(TMap& aliasMap);
81 Bool_t ReadLVDataPoints(TMap& aliasMap);
82
83 Bool_t MergeMaps();
84 Bool_t MergeHVmap();
85 Bool_t MergeLVmap();
86
87 Int_t InsertHVDataPoint(AliTOFDCSmaps *object);
88 Int_t FindHVdpIndex(Int_t z) const;
89 Int_t InsertLVDataPoint(AliTOFDCSmaps *object);
90 Int_t FindLVdpIndex(Int_t z) const;
91 Int_t fRun; // Run number
92 Int_t fStartTime; // start time
93 Int_t fEndTime; // end time
94 Int_t fStartTimeDCSQuery; // start time DCSQuery
95 Int_t fEndTimeDCSQuery; // end time DCSQuery
96
97 Bool_t fIsProcessed; // bool to know processing status
98 Bool_t fFDR; // bool to know whether we are in a FDR run
99
100 AliTOFDCSmaps *fLVDataPoints[kNmaxDataPoints]; // LV status map VS time
101 AliTOFDCSmaps *fHVDataPoints[kNmaxDataPoints]; // HV status map VS time
102 AliTOFDCSmaps *fMap[kNmaxDataPoints]; // LV&&HV status map VS time
103
104 Int_t fNumberOfLVdataPoints; // number of found LV status dps
105 Int_t fNumberOfHVdataPoints; // number of found HV status dps
106 Int_t fNumberOfHVandLVmaps; // number of found LV&&HV status maps
107
108 TString fAliasNamesXLVmap[kNddl]; // aliases for LV map
109 TString fAliasNamesXHVmap[kNsectors][kNplates]; // aliases for HV map
110
111 TH1C * fHisto; // histogram
112
113 ClassDef(AliTOFLvHvDataPoints, 1);
114};
115
116#endif