CMS 3D CMS Logo

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 #include <atomic>
12 
17 
20 
22 
23 class HcalCalibrations;
25 class HcalTopology;
26 
28  public:
31 
32  const HcalTopology* getTopologyUsed() const;
33 
34  const HcalCalibrations& getHcalCalibrations(const HcalGenericDetId& fId) const;
38 
39  const HcalPedestal* getPedestal (const HcalGenericDetId& fId) const;
40  const HcalPedestalWidth* getPedestalWidth (const HcalGenericDetId& fId) const;
41  const HcalGain* getGain (const HcalGenericDetId& fId) const;
42  const HcalGainWidth* getGainWidth (const HcalGenericDetId& fId) const;
43  const HcalQIECoder* getHcalCoder (const HcalGenericDetId& fId) const;
44  const HcalQIEShape* getHcalShape (const HcalGenericDetId& fId) const;
45  const HcalQIEShape* getHcalShape (const HcalQIECoder *coder) const;
46  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  const HcalQIEType* getHcalQIEType (const HcalGenericDetId& fId) const;
60  const HcalTPParameters* getHcalTPParameters () const;
61  const HcalMCParam* getHcalMCParam (const HcalGenericDetId& fId) const;
62 
63  void setData (const HcalPedestals* fItem) {mPedestals = fItem; mCalibSet = nullptr;}
64  void setData (const HcalPedestalWidths* fItem) {mPedestalWidths = fItem; mCalibWidthSet = nullptr;}
65  void setData (const HcalGains* fItem) {mGains = fItem; mCalibSet = nullptr; }
66  void setData (const HcalGainWidths* fItem) {mGainWidths = fItem; mCalibWidthSet = nullptr; }
67  void setData (const HcalQIEData* fItem) {mQIEData = fItem; mCalibSet=nullptr; mCalibWidthSet=nullptr;}
68  void setData (const HcalQIETypes* fItem) {mQIETypes = fItem; mCalibSet = nullptr; }
69  void setData (const HcalChannelQuality* fItem) {mChannelQuality = fItem;}
70  void setData (const HcalElectronicsMap* fItem) {mElectronicsMap = fItem;}
71  void setData (const HcalFrontEndMap* fItem) {mFrontEndMap = fItem;}
72  void setData (const HcalRespCorrs* fItem) {mRespCorrs = fItem; mCalibSet = nullptr; }
73  void setData (const HcalTimeCorrs* fItem) {mTimeCorrs = fItem; mCalibSet = nullptr; }
74  void setData (const HcalZSThresholds* fItem) {mZSThresholds = fItem;}
75  void setData (const HcalL1TriggerObjects* fItem) {mL1TriggerObjects = fItem;}
76  void setData (const HcalLUTCorrs* fItem) {mLUTCorrs = fItem; mCalibSet = nullptr; }
77  void setData (const HcalPFCorrs* fItem) {mPFCorrs = fItem; }
78  void setData (const HcalLutMetadata* fItem) {mLutMetadata = fItem;}
79  void setData (const HcalSiPMParameters* fItem) {mSiPMParameters = fItem; mCalibSet = nullptr;}
80  void setData (const HcalSiPMCharacteristics* fItem) {mSiPMCharacteristics = fItem;}
81  void setData (const HcalTPChannelParameters* fItem) {mTPChannelParameters = fItem; mCalibSet = nullptr;}
82  void setData (const HcalTPParameters* fItem) {mTPParameters = fItem;}
83  void setData (const HcalMCParams* fItem) {mMCParams = fItem;}
84 
85  private:
86  bool makeHcalCalibration (const HcalGenericDetId& fId, HcalCalibrations* fObject,
87  bool pedestalInADC) const;
88  void buildCalibrations() const;
90  bool pedestalInADC) const;
91  void buildCalibWidths() const;
94  const HcalGains* mGains;
113  // bool mPedestalInADC;
114  mutable std::atomic<HcalCalibrationsSet const *> mCalibSet;
115  mutable std::atomic<HcalCalibrationWidthsSet const *> mCalibWidthSet;
116 };
117 
118 #endif
const HcalLUTCorrs * mLUTCorrs
const HcalQIETypes * mQIETypes
Definition: HcalDbService.h:97
const HcalGainWidth * getGainWidth(const HcalGenericDetId &fId) const
const HcalFrontEndMap * getHcalFrontEndMapping() const
const HcalSiPMParameters * mSiPMParameters
void setData(const HcalMCParams *fItem)
Definition: HcalDbService.h:83
const HcalMCParams * mMCParams
const HcalTPParameters * mTPParameters
std::atomic< HcalCalibrationWidthsSet const * > mCalibWidthSet
const HcalTPChannelParameter * getHcalTPChannelParameter(const HcalGenericDetId &fId) const
const HcalChannelStatus * getHcalChannelStatus(const HcalGenericDetId &fId) const
const HcalL1TriggerObjects * mL1TriggerObjects
const HcalPFCorrs * mPFCorrs
void setData(const HcalPedestalWidths *fItem)
Definition: HcalDbService.h:64
const HcalGains * mGains
Definition: HcalDbService.h:94
const HcalChannelQuality * mChannelQuality
Definition: HcalDbService.h:98
const HcalLutMetadata * mLutMetadata
const HcalTPChannelParameters * mTPChannelParameters
void setData(const HcalQIETypes *fItem)
Definition: HcalDbService.h:68
void setData(const HcalSiPMParameters *fItem)
Definition: HcalDbService.h:79
const HcalPedestalWidth * getPedestalWidth(const HcalGenericDetId &fId) const
const HcalRespCorr * getHcalRespCorr(const HcalGenericDetId &fId) const
void setData(const HcalElectronicsMap *fItem)
Definition: HcalDbService.h:70
const HcalLUTCorr * getHcalLUTCorr(const HcalGenericDetId &fId) const
void setData(const HcalGainWidths *fItem)
Definition: HcalDbService.h:66
const HcalTimeCorr * getHcalTimeCorr(const HcalGenericDetId &fId) const
void setData(const HcalPFCorrs *fItem)
Definition: HcalDbService.h:77
void buildCalibWidths() const
void setData(const HcalFrontEndMap *fItem)
Definition: HcalDbService.h:71
void setData(const HcalTimeCorrs *fItem)
Definition: HcalDbService.h:73
void setData(const HcalSiPMCharacteristics *fItem)
Definition: HcalDbService.h:80
void setData(const HcalTPParameters *fItem)
Definition: HcalDbService.h:82
void setData(const HcalZSThresholds *fItem)
Definition: HcalDbService.h:74
void setData(const HcalRespCorrs *fItem)
Definition: HcalDbService.h:72
const HcalL1TriggerObject * getHcalL1TriggerObject(const HcalGenericDetId &fId) const
bool makeHcalCalibration(const HcalGenericDetId &fId, HcalCalibrations *fObject, bool pedestalInADC) const
const HcalLutMetadata * getHcalLutMetadata() const
const HcalMCParam * getHcalMCParam(const HcalGenericDetId &fId) const
bool makeHcalCalibrationWidth(const HcalGenericDetId &fId, HcalCalibrationWidths *fObject, bool pedestalInADC) const
void setData(const HcalLutMetadata *fItem)
Definition: HcalDbService.h:78
const HcalPedestalWidths * mPedestalWidths
Definition: HcalDbService.h:93
const HcalRespCorrs * mRespCorrs
const HcalCalibrationWidths & getHcalCalibrationWidths(const HcalGenericDetId &fId) const
HcalDbService(const edm::ParameterSet &)
void setData(const HcalGains *fItem)
Definition: HcalDbService.h:65
const HcalZSThreshold * getHcalZSThreshold(const HcalGenericDetId &fId) const
const HcalElectronicsMap * mElectronicsMap
Definition: HcalDbService.h:99
const HcalGainWidths * mGainWidths
Definition: HcalDbService.h:95
const HcalCalibrationsSet * getHcalCalibrationsSet() const
const HcalTimeCorrs * mTimeCorrs
const HcalQIEType * getHcalQIEType(const HcalGenericDetId &fId) const
void setData(const HcalLUTCorrs *fItem)
Definition: HcalDbService.h:76
const HcalPFCorr * getHcalPFCorr(const HcalGenericDetId &fId) const
const HcalTopology * getTopologyUsed() const
const HcalZSThresholds * mZSThresholds
const HcalQIEData * mQIEData
Definition: HcalDbService.h:96
const HcalGain * getGain(const HcalGenericDetId &fId) const
const HcalTPParameters * getHcalTPParameters() const
const HcalSiPMCharacteristics * getHcalSiPMCharacteristics() const
void setData(const HcalPedestals *fItem)
Definition: HcalDbService.h:63
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
void setData(const HcalL1TriggerObjects *fItem)
Definition: HcalDbService.h:75
void buildCalibrations() const
void setData(const HcalChannelQuality *fItem)
Definition: HcalDbService.h:69
const HcalElectronicsMap * getHcalMapping() const
std::atomic< HcalCalibrationsSet const * > mCalibSet
const HcalFrontEndMap * mFrontEndMap
const HcalPedestals * mPedestals
Definition: HcalDbService.h:92
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
void setData(const HcalQIEData *fItem)
Definition: HcalDbService.h:67
const HcalPedestal * getPedestal(const HcalGenericDetId &fId) const
const HcalSiPMParameter * getHcalSiPMParameter(const HcalGenericDetId &fId) const
const HcalSiPMCharacteristics * mSiPMCharacteristics
void setData(const HcalTPChannelParameters *fItem)
Definition: HcalDbService.h:81
const HcalCalibrationWidthsSet * getHcalCalibrationWidthsSet() const