AliRoot Core  ee782a0 (ee782a0)
AliMUONPadStatusMaker.h
Go to the documentation of this file.
1 #ifndef ALIMUONPADSTATUSMAKER_H
2 #define ALIMUONPADSTATUSMAKER_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 
13 // Author Laurent Aphecetche
14 
15 #ifndef ROOT_TObject
16 # include "TObject.h"
17 #endif
18 #ifndef ROOT_TVector2
19 # include "TVector2.h"
20 #endif
21 
22 class TExMap;
24 class AliMUONRecoParam;
25 class AliMUONVCalibParam;
27 class AliMUONVStore;
28 
29 using std::ostream;
30 
31 class AliMUONPadStatusMaker : public TObject
32 {
33 public:
35  virtual ~AliMUONPadStatusMaker();
36 
39 
44  AliMUONVStore* StatusStore() const { return fStatus; }
45 
46  AliMUONVCalibParam* PadStatus(Int_t detElemId, Int_t manuId) const;
47 
48  Int_t PadStatus(Int_t detElemId, Int_t manuId, Int_t manuChannel) const;
49 
51 
52  AliMUONVCalibParam* Neighbours(Int_t detElemId, Int_t manuId) const;
53 
54  static TString AsString(Int_t status);
55 
56  static TString AsCondition(Int_t status);
57 
59  Double_t HVLimit(Int_t chamberId) const;
60 
62  TVector2 PedMeanLimits() const { return fPedMeanLimits; }
64  TVector2 PedSigmaLimits() const { return fPedSigmaLimits; }
65 
67  void SetHVLimit(Int_t chamberId, Double_t hv);
68 
70  void SetPedMeanLimits(float low, float high) { fPedMeanLimits.Set(low,high); }
72  void SetPedSigmaLimits(float low, float high) { fPedSigmaLimits.Set(low,high); }
73 
75  void SetManuOccupancyLimits(float low, float high) { fManuOccupancyLimits.Set(low,high); }
77  TVector2 ManuOccupancyLimits() const { return fManuOccupancyLimits; }
78 
80  void SetBuspatchOccupancyLimits(float low, float high) { fBuspatchOccupancyLimits.Set(low,high); }
83 
85  void SetDEOccupancyLimits(float low, float high) { fDEOccupancyLimits.Set(low,high); }
87  TVector2 DEOccupancyLimits() const { return fDEOccupancyLimits; }
88 
89  void SetLimits(const AliMUONRecoParam& recoParams);
90 
91  void Report(UInt_t mask);
92 
93  static Float_t SwitchValue(const TObjArray& dcsArray);
94 
95  Int_t LVStatus(Int_t detElemId, Int_t manuId) const;
96 
97  Int_t HVStatus(Int_t detElemId, Int_t manuId) const;
98 
99  Int_t OccupancyStatus(Int_t detElemId, Int_t manuId) const;
100 
101  static void DecodeStatus(Int_t status, Int_t& pedStatus, Int_t& hvStatus,
102  Int_t& lvStatus, Int_t& otherStatus);
103  static Int_t BuildStatus(Int_t pedStatus, Int_t hvStatus,
104  Int_t lvStatus, Int_t otherStatus);
105 private:
110 
111 
112  AliMUONVCalibParam* ComputeStatus(Int_t detElemId, Int_t manuId) const;
113 
114  Bool_t HVSt12Status(Int_t detElemId, Int_t sector,
115  Bool_t& hvChannelTooLow,
116  Bool_t& hvChannelTooHigh,
117  Bool_t& hvChannelON) const;
118 
119 
120  Bool_t HVSt345Status(Int_t detElemId, Int_t pcbIndex,
121  Bool_t& hvChannelTooLow,
122  Bool_t& hvChannelTooHigh,
123  Bool_t& hvChannelON,
124  Bool_t& hvSwitchON) const;
125 
127  TExMap* InternalHV() const;
128  TExMap* InternalLV() const;
129  void SetHVStatus(Int_t detElemId, Int_t index, Int_t status) const;
130  Int_t CheckConfigConsistencyWithPedestalInformation(Int_t detElemId,Int_t manuId) const;
131 
132  AliMUONVStore* Pedestals() const;
133  AliMUONVStore* Config() const;
134 
135 public:
138  {
139  kMissing = (1<<7)
140  };
141 
144  {
145  kPedOK = 0,
146  kPedMeanZero = (1<<1),
147  kPedMeanTooLow = (1<<2),
148  kPedMeanTooHigh = (1<<3),
149  kPedSigmaTooLow = (1<<4),
151 
152  kPedMissing = kMissing // please always use last bit for meaning "missing"
153  };
154 
157  {
158  kLVOK = 0,
159  kLVTooLow = (1<<3),
160 
161  kLVMissing = kMissing // please always use last bit for meaning "missing"
162  };
163 
165  enum EHVError
166  {
167  kHVOK = 0,
168  kHVError = (1<<0),
169  kHVTooLow = (1<<1),
170  kHVTooHigh = (1<<2), // no longer to be used
171  kHVChannelOFF = (1<<3),
172  kHVSwitchOFF = (1<<4),
173 
174  kHVMissing = kMissing // please always use last bit for meaning "missing"
175  };
176 
179  {
187 
188  };
189 
190 private:
191 
193 
194  Double_t fHVLimit[10];
195 
196  TVector2 fPedMeanLimits;
197  TVector2 fPedSigmaLimits;
198 
202 
204 
205  mutable TExMap* fLV;
206  mutable TExMap* fHV;
207 
210 
212 
213  ClassDef(AliMUONPadStatusMaker,0) // Creates pad statuses from ped,lv,hv
214 };
215 
216 #endif
EPedestalStatus
Pedestal status.
TVector2 BuspatchOccupancyLimits() const
Get bus patch occupancy limits.
AliMUONVCalibParam * Neighbours(Int_t detElemId, Int_t manuId) const
AliMUONVStore * fPedestals
! pedestal values
void SetDEOccupancyLimits(float low, float high)
Set Low and High DE occupancy limits.
const AliMUONCalibrationData & fkCalibrationData
! helper class to get data access (not owner)
TVector2 fManuOccupancyLimits
! Low and High manu occupancy limits
static Float_t SwitchValue(const TObjArray &dcsArray)
static TString AsString(Int_t status)
Bool_t HVSt345Status(Int_t detElemId, Int_t pcbIndex, Bool_t &hvChannelTooLow, Bool_t &hvChannelTooHigh, Bool_t &hvChannelON, Bool_t &hvSwitchON) const
#define TObjArray
TExMap * fLV
! cache of lv statuses
Int_t LVStatus(Int_t detElemId, Int_t manuId) const
void SetBuspatchOccupancyLimits(float low, float high)
Set Low and High bus patch occupancy limits.
static Int_t BuildStatus(Int_t pedStatus, Int_t hvStatus, Int_t lvStatus, Int_t otherStatus)
Double_t fHVLimit[10]
! Low thresholds for HV
AliMUONPadStatusMaker(const AliMUONCalibrationData &calibData)
AliMUONPadStatusMaker & operator=(const AliMUONPadStatusMaker &)
Not implemented.
void SetHVLimit(Int_t chamberId, Double_t hv)
Set HV limit.
TVector2 fDEOccupancyLimits
! Low and High DE occupancy limits
Class with MUON reconstruction parameters.
static void DecodeStatus(Int_t status, Int_t &pedStatus, Int_t &hvStatus, Int_t &lvStatus, Int_t &otherStatus)
void SetManuOccupancyLimits(float low, float high)
Set Low and High manu occupancy limits.
TVector2 DEOccupancyLimits() const
Get DE occupancy limits.
Container of calibration values for a given number of channels.
TVector2 ManuOccupancyLimits() const
Get manu occupancy limits.
AliMUONVCalibParam * PadStatus(Int_t detElemId, Int_t manuId) const
TVector2 PedMeanLimits() const
Return Low and High threshold for pedestal mean.
TVector2 PedSigmaLimits() const
Return Low and High threshold for pedestal sigma.
TVector2 fBuspatchOccupancyLimits
! Low and High buspatch occupancy limits
Double_t HVLimit(Int_t chamberId) const
Return HV threshold.
void SetHVStatus(Int_t detElemId, Int_t index, Int_t status) const
static TString AsCondition(Int_t status)
Bool_t HVSt12Status(Int_t detElemId, Int_t sector, Bool_t &hvChannelTooLow, Bool_t &hvChannelTooHigh, Bool_t &hvChannelON) const
AliMUONVStore * Config() const
AliMUONVStore * StatusStore() const
Int_t OccupancyStatus(Int_t detElemId, Int_t manuId) const
Int_t CheckConfigConsistencyWithPedestalInformation(Int_t detElemId, Int_t manuId) const
AliMUONCalibrationData * calibData
TVector2 fPedMeanLimits
! Low and High threshold for pedestal mean
Single entry point to access MUON calibration data.
AliMUONVStore * fStatus
! statuses of the pads
AliMUONVStore * Pedestals() const
TExMap * fHV
! cache of hv statuses
AliMUONVTrackerData * fTrackerData
! to get occupancies...
AliMUONVTrackerData * InternalTrackerData() const
Int_t HVStatus(Int_t detElemId, Int_t manuId) const
void SetPedSigmaLimits(float low, float high)
Set Low and High threshold for pedestal sigma.
AliMUONVCalibParam * ComputeStatus(Int_t detElemId, Int_t manuId) const
void SetPedMeanLimits(float low, float high)
Set Low and High threshold for pedestal mean.
Base class for MUON data stores.
Definition: AliMUONVStore.h:22
AliMUONVStore * fConfig
! readout configuration
const AliMUONCalibrationData & CalibrationData() const
Get the reference to the calibrationdata object we use.
Base class for MUON data that can be presented at different levels in the hierarchy of the MUON syste...
AliMUONVStore * NeighboursStore() const
TVector2 fPedSigmaLimits
! Low and High threshold for pedestal sigma
Make a 2DStore of pad statuses, using different sources of information.
void SetLimits(const AliMUONRecoParam &recoParams)