CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDbService.h
Go to the documentation of this file.
1 
2 //
3 // F.Ratnikov (UMd), Aug. 9, 2005
4 //
5 
6 #ifndef HcalDbService_h
7 #define HcalDbService_h
8 
9 #include <memory>
10 #include <map>
11 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
12 #include <atomic>
13 #endif
14 
21 
24 
26 
27 class HcalCalibrations;
29 class HcalTopology;
30 
32  public:
34 
35  const HcalTopology* getTopologyUsed() const;
36 
37  const HcalCalibrations& getHcalCalibrations(const HcalGenericDetId& fId) const;
39 
40  const HcalPedestal* getPedestal (const HcalGenericDetId& fId) const;
41  const HcalPedestalWidth* getPedestalWidth (const HcalGenericDetId& fId) const;
42  const HcalGain* getGain (const HcalGenericDetId& fId) const;
43  const HcalGainWidth* getGainWidth (const HcalGenericDetId& fId) const;
44  const HcalQIECoder* getHcalCoder (const HcalGenericDetId& fId) const;
45  const HcalQIEShape* getHcalShape (const HcalGenericDetId& fId) const;
46  const HcalQIEShape* getHcalShape (const HcalQIECoder *coder) const;
47  const HcalElectronicsMap* getHcalMapping () const;
48  const HcalRespCorr* getHcalRespCorr (const HcalGenericDetId& fId) const;
49  const HcalTimeCorr* getHcalTimeCorr (const HcalGenericDetId& fId) const;
52  const HcalZSThreshold* getHcalZSThreshold (const HcalGenericDetId& fId) const;
53  const HcalLUTCorr* getHcalLUTCorr (const HcalGenericDetId& fId) const;
54  const HcalPFCorr* getHcalPFCorr (const HcalGenericDetId& fId) const;
55  const HcalLutMetadata* getHcalLutMetadata () const;
56 
57  void setData (const HcalPedestals* fItem) {mPedestals = fItem; mCalibSet = nullptr;}
58  void setData (const HcalPedestalWidths* fItem) {mPedestalWidths = fItem; mCalibWidthSet = nullptr;}
59  void setData (const HcalGains* fItem) {mGains = fItem; mCalibSet = nullptr; }
60  void setData (const HcalGainWidths* fItem) {mGainWidths = fItem; mCalibWidthSet = nullptr; }
61  void setData (const HcalQIEData* fItem) {mQIEData = fItem; mCalibSet=nullptr; mCalibWidthSet=nullptr;}
62  void setData (const HcalChannelQuality* fItem) {mChannelQuality = fItem;}
63  void setData (const HcalElectronicsMap* fItem) {mElectronicsMap = fItem;}
64  void setData (const HcalRespCorrs* fItem) {mRespCorrs = fItem; mCalibSet = nullptr; }
65  void setData (const HcalTimeCorrs* fItem) {mTimeCorrs = fItem; mCalibSet = nullptr; }
66  void setData (const HcalZSThresholds* fItem) {mZSThresholds = fItem;}
67  void setData (const HcalL1TriggerObjects* fItem) {mL1TriggerObjects = fItem;}
68  void setData (const HcalLUTCorrs* fItem) {mLUTCorrs = fItem; mCalibSet = nullptr; }
69  void setData (const HcalPFCorrs* fItem) {mPFCorrs = fItem; }
70  void setData (const HcalLutMetadata* fItem) {mLutMetadata = fItem;}
71 
72  private:
73  bool makeHcalCalibration (const HcalGenericDetId& fId, HcalCalibrations* fObject,
74  bool pedestalInADC) const;
75  void buildCalibrations() const;
77  bool pedestalInADC) const;
78  void buildCalibWidths() const;
81  const HcalGains* mGains;
93  // bool mPedestalInADC;
94 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
95  mutable std::atomic<HcalCalibrationsSet*> mCalibSet;
96  mutable std::atomic<HcalCalibrationWidthsSet*> mCalibWidthSet;
97 #else
100  mutable bool mUpdateCalibrations, mUpdateCalibWidths;
101 #endif
102 };
103 
104 #endif
const HcalLUTCorrs * mLUTCorrs
Definition: HcalDbService.h:90
const HcalGainWidth * getGainWidth(const HcalGenericDetId &fId) const
const HcalChannelStatus * getHcalChannelStatus(const HcalGenericDetId &fId) const
const HcalL1TriggerObjects * mL1TriggerObjects
Definition: HcalDbService.h:88
const HcalPFCorrs * mPFCorrs
Definition: HcalDbService.h:91
void setData(const HcalPedestalWidths *fItem)
Definition: HcalDbService.h:58
const HcalGains * mGains
Definition: HcalDbService.h:81
const HcalChannelQuality * mChannelQuality
Definition: HcalDbService.h:84
const HcalLutMetadata * mLutMetadata
Definition: HcalDbService.h:92
const HcalPedestalWidth * getPedestalWidth(const HcalGenericDetId &fId) const
const HcalRespCorr * getHcalRespCorr(const HcalGenericDetId &fId) const
void setData(const HcalElectronicsMap *fItem)
Definition: HcalDbService.h:63
const HcalLUTCorr * getHcalLUTCorr(const HcalGenericDetId &fId) const
void setData(const HcalGainWidths *fItem)
Definition: HcalDbService.h:60
const HcalTimeCorr * getHcalTimeCorr(const HcalGenericDetId &fId) const
void setData(const HcalPFCorrs *fItem)
Definition: HcalDbService.h:69
void buildCalibWidths() const
void setData(const HcalTimeCorrs *fItem)
Definition: HcalDbService.h:65
void setData(const HcalZSThresholds *fItem)
Definition: HcalDbService.h:66
void setData(const HcalRespCorrs *fItem)
Definition: HcalDbService.h:64
const HcalL1TriggerObject * getHcalL1TriggerObject(const HcalGenericDetId &fId) const
bool makeHcalCalibration(const HcalGenericDetId &fId, HcalCalibrations *fObject, bool pedestalInADC) const
const HcalLutMetadata * getHcalLutMetadata() const
bool makeHcalCalibrationWidth(const HcalGenericDetId &fId, HcalCalibrationWidths *fObject, bool pedestalInADC) const
void setData(const HcalLutMetadata *fItem)
Definition: HcalDbService.h:70
const HcalPedestalWidths * mPedestalWidths
Definition: HcalDbService.h:80
const HcalRespCorrs * mRespCorrs
Definition: HcalDbService.h:86
const HcalCalibrationWidths & getHcalCalibrationWidths(const HcalGenericDetId &fId) const
HcalDbService(const edm::ParameterSet &)
void setData(const HcalGains *fItem)
Definition: HcalDbService.h:59
const HcalZSThreshold * getHcalZSThreshold(const HcalGenericDetId &fId) const
const HcalElectronicsMap * mElectronicsMap
Definition: HcalDbService.h:85
const HcalGainWidths * mGainWidths
Definition: HcalDbService.h:82
const HcalTimeCorrs * mTimeCorrs
Definition: HcalDbService.h:89
void setData(const HcalLUTCorrs *fItem)
Definition: HcalDbService.h:68
const HcalPFCorr * getHcalPFCorr(const HcalGenericDetId &fId) const
const HcalTopology * getTopologyUsed() const
const HcalZSThresholds * mZSThresholds
Definition: HcalDbService.h:87
const HcalQIEData * mQIEData
Definition: HcalDbService.h:83
const HcalGain * getGain(const HcalGenericDetId &fId) const
void setData(const HcalPedestals *fItem)
Definition: HcalDbService.h:57
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
void setData(const HcalL1TriggerObjects *fItem)
Definition: HcalDbService.h:67
void buildCalibrations() const
void setData(const HcalChannelQuality *fItem)
Definition: HcalDbService.h:62
const HcalElectronicsMap * getHcalMapping() const
const HcalPedestals * mPedestals
Definition: HcalDbService.h:79
std::atomic< HcalCalibrationsSet * > mCalibSet
Definition: HcalDbService.h:95
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
void setData(const HcalQIEData *fItem)
Definition: HcalDbService.h:61
std::atomic< HcalCalibrationWidthsSet * > mCalibWidthSet
Definition: HcalDbService.h:96
const HcalPedestal * getPedestal(const HcalGenericDetId &fId) const