AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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) 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 
126  void SetHVStatus(Int_t detElemId, Int_t index, Int_t status) const;
127 
128  Int_t CheckConfigConsistencyWithPedestalInformation(Int_t detElemId,Int_t manuId) const;
129 
130 private:
133  {
134  kMissing = (1<<7)
135  };
136 
139  {
140  kPedOK = 0,
141  kPedMeanZero = (1<<1),
142  kPedMeanTooLow = (1<<2),
143  kPedMeanTooHigh = (1<<3),
144  kPedSigmaTooLow = (1<<4),
146 
147  kPedMissing = kMissing // please always use last bit for meaning "missing"
148  };
149 
152  {
153  kLVOK = 0,
154  kLVTooLow = (1<<3),
155 
156  kLVMissing = kMissing // please always use last bit for meaning "missing"
157  };
158 
160  enum EHVError
161  {
162  kHVOK = 0,
163  kHVError = (1<<0),
164  kHVTooLow = (1<<1),
165  kHVTooHigh = (1<<2), // no longer to be used
166  kHVChannelOFF = (1<<3),
167  kHVSwitchOFF = (1<<4),
168 
169  kHVMissing = kMissing // please always use last bit for meaning "missing"
170  };
171 
174  {
182 
183  };
184 
186 
187  Double_t fHVLimit[10];
188 
189  TVector2 fPedMeanLimits;
190  TVector2 fPedSigmaLimits;
191 
195 
197 
198  mutable TExMap* fHV;
199 
202 
204 
205  ClassDef(AliMUONPadStatusMaker,0) // Creates pad statuses from ped,lv,hv
206 };
207 
208 #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
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 * 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
TExMap * fHV
! cache of hv statuses
AliMUONVTrackerData * fTrackerData
! to get occupancies...
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
Int_t LVStatus(Int_t detElemId) 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)