CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
CastorHardcodeCalibrations Class Reference
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 ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
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
bool concurrentFinder () const
 
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
 EventSetupRecordIntervalFinder (const EventSetupRecordIntervalFinder &)=delete
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
bool nonconcurrentAndIOVNeedsUpdate (const eventsetup::EventSetupRecordKey &key, const IOVSyncValue &syncValue) const
 
const EventSetupRecordIntervalFinderoperator= (const EventSetupRecordIntervalFinder &)=delete
 
void resetInterval (const eventsetup::EventSetupRecordKey &)
 
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
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 >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- 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 EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Protected Attributes

bool h2mode_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 

Detailed Description

Definition at line 39 of file CastorHardcodeCalibrations.cc.

Constructor & Destructor Documentation

◆ CastorHardcodeCalibrations()

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

Definition at line 104 of file CastorHardcodeCalibrations.cc.

References python.cmstools::all(), edm::ParameterSet::getUntrackedParameter(), summarizeEdmComparisonLogfiles::objectName, produceChannelQuality(), produceElectronicsMap(), produceGains(), produceGainWidths(), producePedestals(), producePedestalWidths(), produceQIEData(), produceRecoParams(), produceSaturationCorrs(), and GlobalPosition_Frontier_DevDB_cff::toGet.

106 {
107  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::CastorHardcodeCalibrations->...";
108  //parsing record parameters
109  h2mode_ = iConfig.getUntrackedParameter<bool>("H2Mode", false);
110  std::vector<std::string> toGet = iConfig.getUntrackedParameter<std::vector<std::string> >("toGet");
111  for (std::vector<std::string>::iterator objectName = toGet.begin(); objectName != toGet.end(); ++objectName) {
112  bool all = *objectName == "all";
113  if ((*objectName == "Pedestals") || all) {
115  findingRecord<CastorPedestalsRcd>();
116  }
117  if ((*objectName == "PedestalWidths") || all) {
119  findingRecord<CastorPedestalWidthsRcd>();
120  }
121  if ((*objectName == "Gains") || all) {
123  findingRecord<CastorGainsRcd>();
124  }
125  if ((*objectName == "GainWidths") || all) {
127  findingRecord<CastorGainWidthsRcd>();
128  }
129  if ((*objectName == "QIEData") || all) {
131  findingRecord<CastorQIEDataRcd>();
132  }
133  if ((*objectName == "ChannelQuality") || (*objectName == "channelQuality") || all) {
135  findingRecord<CastorChannelQualityRcd>();
136  }
137  if ((*objectName == "ElectronicsMap") || (*objectName == "electronicsMap") || all) {
139  findingRecord<CastorElectronicsMapRcd>();
140  }
141  if ((*objectName == "RecoParams") || all) {
143  findingRecord<CastorRecoParamsRcd>();
144  }
145  if ((*objectName == "SaturationCorrs") || all) {
147  findingRecord<CastorSaturationCorrsRcd>();
148  }
149  }
150 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
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)
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< CastorGainWidths > produceGainWidths(const CastorGainWidthsRcd &rcd)
std::unique_ptr< CastorElectronicsMap > produceElectronicsMap(const CastorElectronicsMapRcd &rcd)
Log< level::Info, false > LogInfo
std::unique_ptr< CastorGains > produceGains(const CastorGainsRcd &rcd)

◆ ~CastorHardcodeCalibrations()

CastorHardcodeCalibrations::~CastorHardcodeCalibrations ( )
override

Definition at line 152 of file CastorHardcodeCalibrations.cc.

152 {}

Member Function Documentation

◆ produce()

void CastorHardcodeCalibrations::produce ( )
inline

Definition at line 44 of file CastorHardcodeCalibrations.cc.

44 {};

◆ produceChannelQuality()

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

Definition at line 221 of file CastorHardcodeCalibrations.cc.

References hgcalTBTopologyTester_cfi::cells, CastorChannelStatus::GOOD, B2GTnPMonitor_cfi::item, and mps_fire::result.

Referenced by CastorHardcodeCalibrations().

222  {
223  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceChannelQuality-> ...";
224  auto result = std::make_unique<CastorChannelQuality>();
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 }
Log< level::Info, false > LogInfo

◆ produceElectronicsMap()

std::unique_ptr< CastorElectronicsMap > CastorHardcodeCalibrations::produceElectronicsMap ( const CastorElectronicsMapRcd rcd)
protected

Definition at line 233 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations().

234  {
235  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceElectronicsMap-> ...";
236 
237  auto result = std::make_unique<CastorElectronicsMap>();
239  return result;
240 }
void makeHardcodeMap(CastorElectronicsMap &emap)
Log< level::Info, false > LogInfo

◆ produceGains()

std::unique_ptr< CastorGains > CastorHardcodeCalibrations::produceGains ( const CastorGainsRcd rcd)
protected

Definition at line 188 of file CastorHardcodeCalibrations.cc.

References hgcalTBTopologyTester_cfi::cells, B2GTnPMonitor_cfi::item, CastorDbHardcode::makeGain(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations().

188  {
189  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceGains-> ...";
190  auto result = std::make_unique<CastorGains>();
191  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
192  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
194  result->addValues(item);
195  }
196  return result;
197 }
Log< level::Info, false > LogInfo
CastorGain makeGain(HcalGenericDetId fId, bool fSmear=false)

◆ produceGainWidths()

std::unique_ptr< CastorGainWidths > CastorHardcodeCalibrations::produceGainWidths ( const CastorGainWidthsRcd rcd)
protected

Definition at line 199 of file CastorHardcodeCalibrations.cc.

References hgcalTBTopologyTester_cfi::cells, B2GTnPMonitor_cfi::item, CastorDbHardcode::makeGainWidth(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations().

199  {
200  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceGainWidths-> ...";
201  auto result = std::make_unique<CastorGainWidths>();
202  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
203  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
205  result->addValues(item);
206  }
207  return result;
208 }
CastorGainWidth makeGainWidth(HcalGenericDetId fId)
Log< level::Info, false > LogInfo

◆ producePedestals()

std::unique_ptr< CastorPedestals > CastorHardcodeCalibrations::producePedestals ( const CastorPedestalsRcd rcd)
protected

Definition at line 166 of file CastorHardcodeCalibrations.cc.

References hgcalTBTopologyTester_cfi::cells, B2GTnPMonitor_cfi::item, CastorDbHardcode::makePedestal(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations().

166  {
167  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::producePedestals-> ...";
168  auto result = std::make_unique<CastorPedestals>(false);
169  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
170  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
172  result->addValues(item);
173  }
174  return result;
175 }
Log< level::Info, false > LogInfo
CastorPedestal makePedestal(HcalGenericDetId fId, bool fSmear=false)

◆ producePedestalWidths()

std::unique_ptr< CastorPedestalWidths > CastorHardcodeCalibrations::producePedestalWidths ( const CastorPedestalWidthsRcd rcd)
protected

Definition at line 177 of file CastorHardcodeCalibrations.cc.

References hgcalTBTopologyTester_cfi::cells, B2GTnPMonitor_cfi::item, CastorDbHardcode::makePedestalWidth(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations().

177  {
178  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::producePedestalWidths-> ...";
179  auto result = std::make_unique<CastorPedestalWidths>(false);
180  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
181  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
183  result->addValues(item);
184  }
185  return result;
186 }
CastorPedestalWidth makePedestalWidth(HcalGenericDetId fId)
Log< level::Info, false > LogInfo

◆ produceQIEData()

std::unique_ptr< CastorQIEData > CastorHardcodeCalibrations::produceQIEData ( const CastorQIEDataRcd rcd)
protected

Definition at line 210 of file CastorHardcodeCalibrations.cc.

References hgcalTBTopologyTester_cfi::cells, CastorDbHardcode::makeQIECoder(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations().

210  {
211  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceQIEData-> ...";
212  auto result = std::make_unique<CastorQIEData>();
213  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
214  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
216  result->addCoder(coder);
217  }
218  return result;
219 }
CastorQIECoder makeQIECoder(HcalGenericDetId fId)
Log< level::Info, false > LogInfo

◆ produceRecoParams()

std::unique_ptr< CastorRecoParams > CastorHardcodeCalibrations::produceRecoParams ( const CastorRecoParamsRcd rcd)
protected

Definition at line 242 of file CastorHardcodeCalibrations.cc.

References hgcalTBTopologyTester_cfi::cells, B2GTnPMonitor_cfi::item, CastorDbHardcode::makeRecoParam(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations().

242  {
243  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceRecoParams-> ...";
244  auto result = std::make_unique<CastorRecoParams>();
245  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
246  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
248  result->addValues(item);
249  }
250  return result;
251 }
CastorRecoParam makeRecoParam(HcalGenericDetId fId)
Log< level::Info, false > LogInfo

◆ produceSaturationCorrs()

std::unique_ptr< CastorSaturationCorrs > CastorHardcodeCalibrations::produceSaturationCorrs ( const CastorSaturationCorrsRcd rcd)
protected

Definition at line 253 of file CastorHardcodeCalibrations.cc.

References hgcalTBTopologyTester_cfi::cells, B2GTnPMonitor_cfi::item, CastorDbHardcode::makeSaturationCorr(), and mps_fire::result.

Referenced by CastorHardcodeCalibrations().

254  {
255  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceSaturationCorrs-> ...";
256  auto result = std::make_unique<CastorSaturationCorrs>();
257  std::vector<HcalGenericDetId> cells = allCells(h2mode_);
258  for (std::vector<HcalGenericDetId>::const_iterator cell = cells.begin(); cell != cells.end(); ++cell) {
260  result->addValues(item);
261  }
262  return result;
263 }
CastorSaturationCorr makeSaturationCorr(HcalGenericDetId fId)
Log< level::Info, false > LogInfo

◆ setIntervalFor()

void CastorHardcodeCalibrations::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey iKey,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oInterval 
)
overrideprotectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 157 of file CastorHardcodeCalibrations.cc.

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

159  {
160  std::string record = iKey.name();
161  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::setIntervalFor-> key: " << record << " time: " << iTime.eventID()
162  << '/' << iTime.time().value();
164 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:17
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
Log< level::Info, false > LogInfo
TimeValue_t value() const
Definition: Timestamp.h:38
const EventID & eventID() const
Definition: IOVSyncValue.h:40
const Timestamp & time() const
Definition: IOVSyncValue.h:42

Member Data Documentation

◆ h2mode_

bool CastorHardcodeCalibrations::h2mode_
protected

Definition at line 60 of file CastorHardcodeCalibrations.cc.