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 ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()(false)
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer () noexcept(false)
 
- 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)
 
virtual void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- 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())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 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 71 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.

73 {
74  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::CastorHardcodeCalibrations->...";
75  //parsing record parameters
76  h2mode_=iConfig.getUntrackedParameter<bool>("H2Mode",false);
77  std::vector <std::string> toGet = iConfig.getUntrackedParameter <std::vector <std::string> > ("toGet");
78  for(std::vector <std::string>::iterator objectName = toGet.begin(); objectName != toGet.end(); ++objectName ) {
79  bool all = *objectName == "all";
80  if ((*objectName == "Pedestals") || all) {
82  findingRecord <CastorPedestalsRcd> ();
83  }
84  if ((*objectName == "PedestalWidths") || all) {
86  findingRecord <CastorPedestalWidthsRcd> ();
87  }
88  if ((*objectName == "Gains") || all) {
90  findingRecord <CastorGainsRcd> ();
91  }
92  if ((*objectName == "GainWidths") || all) {
94  findingRecord <CastorGainWidthsRcd> ();
95  }
96  if ((*objectName == "QIEData") || all) {
98  findingRecord <CastorQIEDataRcd> ();
99  }
100  if ((*objectName == "ChannelQuality") || (*objectName == "channelQuality") || all) {
102  findingRecord <CastorChannelQualityRcd> ();
103  }
104  if ((*objectName == "ElectronicsMap") || (*objectName == "electronicsMap") || all) {
106  findingRecord <CastorElectronicsMapRcd> ();
107  }
108  if ((*objectName == "RecoParams") || all) {
110  findingRecord <CastorRecoParamsRcd> ();
111  }
112  if ((*objectName == "SaturationCorrs") || all) {
114  findingRecord <CastorSaturationCorrsRcd> ();
115  }
116  }
117 }
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)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
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 ( )

Definition at line 120 of file CastorHardcodeCalibrations.cc.

121 {
122 }

Member Function Documentation

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

Definition at line 190 of file CastorHardcodeCalibrations.cc.

References 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) {
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().

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

Definition at line 157 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations(), and produce().

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

Definition at line 168 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations(), and produce().

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

Definition at line 135 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations(), and produce().

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

Definition at line 146 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations(), and produce().

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

Definition at line 179 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations(), and produce().

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

Definition at line 209 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations(), and produce().

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

Definition at line 220 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations(), and produce().

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

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 129 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().

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

Member Data Documentation

bool CastorHardcodeCalibrations::h2mode_
protected

Definition at line 46 of file CastorHardcodeCalibrations.h.