CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- 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 ()
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const
eventsetup::ComponentDescription
descriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set
< eventsetup::EventSetupRecordKey
findingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder ()
 

Protected Member Functions

std::auto_ptr
< CastorChannelQuality
produceChannelQuality (const CastorChannelQualityRcd &rcd)
 
std::auto_ptr
< CastorElectronicsMap
produceElectronicsMap (const CastorElectronicsMapRcd &rcd)
 
std::auto_ptr< CastorGainsproduceGains (const CastorGainsRcd &rcd)
 
std::auto_ptr< CastorGainWidthsproduceGainWidths (const CastorGainWidthsRcd &rcd)
 
std::auto_ptr< CastorPedestalsproducePedestals (const CastorPedestalsRcd &rcd)
 
std::auto_ptr
< CastorPedestalWidths
producePedestalWidths (const CastorPedestalWidthsRcd &rcd)
 
std::auto_ptr< CastorQIEDataproduceQIEData (const CastorQIEDataRcd &rcd)
 
std::auto_ptr< CastorRecoParamsproduceRecoParams (const CastorRecoParamsRcd &rcd)
 
std::auto_ptr
< CastorSaturationCorrs
produceSaturationCorrs (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::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_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
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- 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 convertSQLitetoXML_cfg::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 }
std::auto_ptr< CastorGainWidths > produceGainWidths(const CastorGainWidthsRcd &rcd)
T getUntrackedParameter(std::string const &, T const &) const
std::auto_ptr< CastorChannelQuality > produceChannelQuality(const CastorChannelQualityRcd &rcd)
std::auto_ptr< CastorSaturationCorrs > produceSaturationCorrs(const CastorSaturationCorrsRcd &rcd)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::auto_ptr< CastorRecoParams > produceRecoParams(const CastorRecoParamsRcd &rcd)
std::auto_ptr< CastorQIEData > produceQIEData(const CastorQIEDataRcd &rcd)
std::auto_ptr< CastorElectronicsMap > produceElectronicsMap(const CastorElectronicsMapRcd &rcd)
std::auto_ptr< CastorPedestalWidths > producePedestalWidths(const CastorPedestalWidthsRcd &rcd)
std::auto_ptr< CastorGains > produceGains(const CastorGainsRcd &rcd)
std::auto_ptr< CastorPedestals > producePedestals(const CastorPedestalsRcd &rcd)
CastorHardcodeCalibrations::~CastorHardcodeCalibrations ( )

Definition at line 120 of file CastorHardcodeCalibrations.cc.

121 {
122 }

Member Function Documentation

void CastorHardcodeCalibrations::produce ( )
inline
std::auto_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().

190  {
191  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceChannelQuality-> ...";
192  std::auto_ptr<CastorChannelQuality> result (new 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 }
tuple result
Definition: mps_fire.py:95
std::auto_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().

201  {
202  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceElectronicsMap-> ...";
203 
204  std::auto_ptr<CastorElectronicsMap> result (new CastorElectronicsMap ());
206  return result;
207 }
void makeHardcodeMap(CastorElectronicsMap &emap)
tuple result
Definition: mps_fire.py:95
std::auto_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().

157  {
158  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceGains-> ...";
159  std::auto_ptr<CastorGains> result (new 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 }
tuple result
Definition: mps_fire.py:95
CastorGain makeGain(HcalGenericDetId fId, bool fSmear=false)
std::auto_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().

168  {
169  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceGainWidths-> ...";
170  std::auto_ptr<CastorGainWidths> result (new 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 }
tuple result
Definition: mps_fire.py:95
CastorGainWidth makeGainWidth(HcalGenericDetId fId)
std::auto_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().

135  {
136  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::producePedestals-> ...";
137  std::auto_ptr<CastorPedestals> result (new 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 }
tuple result
Definition: mps_fire.py:95
CastorPedestal makePedestal(HcalGenericDetId fId, bool fSmear=false)
std::auto_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().

146  {
147  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::producePedestalWidths-> ...";
148  std::auto_ptr<CastorPedestalWidths> result (new 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)
tuple result
Definition: mps_fire.py:95
std::auto_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().

179  {
180  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceQIEData-> ...";
181  std::auto_ptr<CastorQIEData> result (new 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)
tuple result
Definition: mps_fire.py:95
std::auto_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().

209  {
210  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceRecoParams-> ...";
211  std::auto_ptr<CastorRecoParams> result (new 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 }
tuple result
Definition: mps_fire.py:95
CastorRecoParam makeRecoParam(HcalGenericDetId fId)
std::auto_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().

220  {
221  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceSaturationCorrs-> ...";
222  std::auto_ptr<CastorSaturationCorrs> result (new 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 }
tuple result
Definition: mps_fire.py:95
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().

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.