CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
CastorHardcodeCalibrations Class Reference

#include <CastorHardcodeCalibrations.h>

Inheritance diagram for CastorHardcodeCalibrations:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 CastorHardcodeCalibrations (const edm::ParameterSet &)
 
void produce ()
 
 ~CastorHardcodeCalibrations () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Protected Member Functions

std::unique_ptr< CastorChannelQualityproduceChannelQuality (const CastorChannelQualityRcd &rcd)
 
std::unique_ptr< CastorElectronicsMapproduceElectronicsMap (const CastorElectronicsMapRcd &rcd)
 
std::unique_ptr< CastorGainsproduceGains (const CastorGainsRcd &rcd)
 
std::unique_ptr< CastorGainWidthsproduceGainWidths (const CastorGainWidthsRcd &rcd)
 
std::unique_ptr< CastorPedestalsproducePedestals (const CastorPedestalsRcd &rcd)
 
std::unique_ptr< CastorPedestalWidthsproducePedestalWidths (const CastorPedestalWidthsRcd &rcd)
 
std::unique_ptr< CastorQIEDataproduceQIEData (const CastorQIEDataRcd &rcd)
 
std::unique_ptr< CastorRecoParamsproduceRecoParams (const CastorRecoParamsRcd &rcd)
 
std::unique_ptr< CastorSaturationCorrsproduceSaturationCorrs (const CastorSaturationCorrsRcd &rcd)
 
void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Protected Attributes

bool h2mode_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 23 of file CastorHardcodeCalibrations.h.

Constructor & Destructor Documentation

CastorHardcodeCalibrations::CastorHardcodeCalibrations ( const edm::ParameterSet iConfig)

Definition at line 72 of file CastorHardcodeCalibrations.cc.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor::all(), edm::ParameterSet::getUntrackedParameter(), summarizeEdmComparisonLogfiles::objectName, produceChannelQuality(), produceElectronicsMap(), produceGains(), produceGainWidths(), producePedestals(), producePedestalWidths(), produceQIEData(), produceRecoParams(), produceSaturationCorrs(), and DBConfiguration_cff::toGet.

74 {
75  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::CastorHardcodeCalibrations->...";
76  //parsing record parameters
77  h2mode_ = iConfig.getUntrackedParameter<bool>("H2Mode", false);
78  std::vector<std::string> toGet = iConfig.getUntrackedParameter<std::vector<std::string> >("toGet");
79  for (std::vector<std::string>::iterator objectName = toGet.begin(); objectName != toGet.end(); ++objectName) {
80  bool all = *objectName == "all";
81  if ((*objectName == "Pedestals") || all) {
83  findingRecord<CastorPedestalsRcd>();
84  }
85  if ((*objectName == "PedestalWidths") || all) {
87  findingRecord<CastorPedestalWidthsRcd>();
88  }
89  if ((*objectName == "Gains") || all) {
91  findingRecord<CastorGainsRcd>();
92  }
93  if ((*objectName == "GainWidths") || all) {
95  findingRecord<CastorGainWidthsRcd>();
96  }
97  if ((*objectName == "QIEData") || all) {
99  findingRecord<CastorQIEDataRcd>();
100  }
101  if ((*objectName == "ChannelQuality") || (*objectName == "channelQuality") || all) {
103  findingRecord<CastorChannelQualityRcd>();
104  }
105  if ((*objectName == "ElectronicsMap") || (*objectName == "electronicsMap") || all) {
107  findingRecord<CastorElectronicsMapRcd>();
108  }
109  if ((*objectName == "RecoParams") || all) {
111  findingRecord<CastorRecoParamsRcd>();
112  }
113  if ((*objectName == "SaturationCorrs") || all) {
115  findingRecord<CastorSaturationCorrsRcd>();
116  }
117  }
118 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< CastorQIEData > produceQIEData(const CastorQIEDataRcd &rcd)
std::unique_ptr< CastorRecoParams > produceRecoParams(const CastorRecoParamsRcd &rcd)
std::unique_ptr< CastorChannelQuality > produceChannelQuality(const CastorChannelQualityRcd &rcd)
std::unique_ptr< CastorPedestalWidths > producePedestalWidths(const CastorPedestalWidthsRcd &rcd)
std::unique_ptr< CastorPedestals > producePedestals(const CastorPedestalsRcd &rcd)
std::unique_ptr< CastorSaturationCorrs > produceSaturationCorrs(const CastorSaturationCorrsRcd &rcd)
std::unique_ptr< CastorGainWidths > produceGainWidths(const CastorGainWidthsRcd &rcd)
std::unique_ptr< CastorElectronicsMap > produceElectronicsMap(const CastorElectronicsMapRcd &rcd)
std::unique_ptr< CastorGains > produceGains(const CastorGainsRcd &rcd)
CastorHardcodeCalibrations::~CastorHardcodeCalibrations ( )
override

Definition at line 120 of file CastorHardcodeCalibrations.cc.

120 {}

Member Function Documentation

void CastorHardcodeCalibrations::produce ( )
inline
std::unique_ptr< CastorChannelQuality > CastorHardcodeCalibrations::produceChannelQuality ( const CastorChannelQualityRcd rcd)
protected

Definition at line 189 of file CastorHardcodeCalibrations.cc.

References postprocess-scan-build::cells, CastorChannelStatus::GOOD, DetId::rawId(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations(), and produce().

190  {
191  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceChannelQuality-> ...";
192  auto result = std::make_unique<CastorChannelQuality>();
193  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
194  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
195  CastorChannelStatus item(cell->rawId(), CastorChannelStatus::GOOD);
196  result->addValues(item);
197  }
198  return result;
199 }
std::unique_ptr< CastorElectronicsMap > CastorHardcodeCalibrations::produceElectronicsMap ( const CastorElectronicsMapRcd rcd)
protected

Definition at line 201 of file CastorHardcodeCalibrations.cc.

References CastorDbHardcode::makeHardcodeMap(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations(), and produce().

202  {
203  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceElectronicsMap-> ...";
204 
205  auto result = std::make_unique<CastorElectronicsMap>();
207  return result;
208 }
void makeHardcodeMap(CastorElectronicsMap &emap)
std::unique_ptr< CastorGains > CastorHardcodeCalibrations::produceGains ( const CastorGainsRcd rcd)
protected

Definition at line 156 of file CastorHardcodeCalibrations.cc.

References postprocess-scan-build::cells, CastorDbHardcode::makeGain(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations(), and produce().

156  {
157  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceGains-> ...";
158  auto result = std::make_unique<CastorGains>();
159  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
160  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
162  result->addValues(item);
163  }
164  return result;
165 }
CastorGain makeGain(HcalGenericDetId fId, bool fSmear=false)
std::unique_ptr< CastorGainWidths > CastorHardcodeCalibrations::produceGainWidths ( const CastorGainWidthsRcd rcd)
protected

Definition at line 167 of file CastorHardcodeCalibrations.cc.

References postprocess-scan-build::cells, CastorDbHardcode::makeGainWidth(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations(), and produce().

167  {
168  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceGainWidths-> ...";
169  auto result = std::make_unique<CastorGainWidths>();
170  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
171  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
173  result->addValues(item);
174  }
175  return result;
176 }
CastorGainWidth makeGainWidth(HcalGenericDetId fId)
std::unique_ptr< CastorPedestals > CastorHardcodeCalibrations::producePedestals ( const CastorPedestalsRcd rcd)
protected

Definition at line 134 of file CastorHardcodeCalibrations.cc.

References postprocess-scan-build::cells, CastorDbHardcode::makePedestal(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations(), and produce().

134  {
135  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::producePedestals-> ...";
136  auto result = std::make_unique<CastorPedestals>(false);
137  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
138  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
140  result->addValues(item);
141  }
142  return result;
143 }
CastorPedestal makePedestal(HcalGenericDetId fId, bool fSmear=false)
std::unique_ptr< CastorPedestalWidths > CastorHardcodeCalibrations::producePedestalWidths ( const CastorPedestalWidthsRcd rcd)
protected

Definition at line 145 of file CastorHardcodeCalibrations.cc.

References postprocess-scan-build::cells, CastorDbHardcode::makePedestalWidth(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations(), and produce().

145  {
146  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::producePedestalWidths-> ...";
147  auto result = std::make_unique<CastorPedestalWidths>(false);
148  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
149  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
151  result->addValues(item);
152  }
153  return result;
154 }
CastorPedestalWidth makePedestalWidth(HcalGenericDetId fId)
std::unique_ptr< CastorQIEData > CastorHardcodeCalibrations::produceQIEData ( const CastorQIEDataRcd rcd)
protected

Definition at line 178 of file CastorHardcodeCalibrations.cc.

References postprocess-scan-build::cells, CastorDbHardcode::makeQIECoder(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations(), and produce().

178  {
179  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceQIEData-> ...";
180  auto result = std::make_unique<CastorQIEData>();
181  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
182  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
184  result->addCoder(coder);
185  }
186  return result;
187 }
CastorQIECoder makeQIECoder(HcalGenericDetId fId)
std::unique_ptr< CastorRecoParams > CastorHardcodeCalibrations::produceRecoParams ( const CastorRecoParamsRcd rcd)
protected

Definition at line 210 of file CastorHardcodeCalibrations.cc.

References postprocess-scan-build::cells, CastorDbHardcode::makeRecoParam(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations(), and produce().

210  {
211  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceRecoParams-> ...";
212  auto result = std::make_unique<CastorRecoParams>();
213  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
214  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
216  result->addValues(item);
217  }
218  return result;
219 }
CastorRecoParam makeRecoParam(HcalGenericDetId fId)
std::unique_ptr< CastorSaturationCorrs > CastorHardcodeCalibrations::produceSaturationCorrs ( const CastorSaturationCorrsRcd rcd)
protected

Definition at line 221 of file CastorHardcodeCalibrations.cc.

References postprocess-scan-build::cells, CastorDbHardcode::makeSaturationCorr(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations(), and produce().

222  {
223  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceSaturationCorrs-> ...";
224  auto result = std::make_unique<CastorSaturationCorrs>();
225  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
226  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
228  result->addValues(item);
229  }
230  return result;
231 }
CastorSaturationCorr makeSaturationCorr(HcalGenericDetId fId)
void CastorHardcodeCalibrations::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey iKey,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oInterval 
)
overrideprotectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 125 of file CastorHardcodeCalibrations.cc.

References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), edm::IOVSyncValue::eventID(), edm::eventsetup::EventSetupRecordKey::name(), record, AlCaHLTBitMon_QueryRunRegistry::string, edm::IOVSyncValue::time(), and edm::Timestamp::value().

Referenced by produce().

127  {
128  std::string record = iKey.name();
129  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::setIntervalFor-> key: " << record << " time: " << iTime.eventID()
130  << '/' << iTime.time().value();
132 }
const EventID & eventID() const
Definition: IOVSyncValue.h:40
JetCorrectorParameters::Record record
Definition: classes.h:7
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
const Timestamp & time() const
Definition: IOVSyncValue.h:42
TimeValue_t value() const
Definition: Timestamp.h:56

Member Data Documentation

bool CastorHardcodeCalibrations::h2mode_
protected

Definition at line 44 of file CastorHardcodeCalibrations.h.