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, boost::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 72 of file CastorHardcodeCalibrations.cc.

References cond::ecalcond::all, edm::ParameterSet::getUntrackedParameter(), summarizeEdmComparisonLogfiles::objectName, produceChannelQuality(), produceElectronicsMap(), produceGains(), produceGainWidths(), producePedestals(), producePedestalWidths(), produceQIEData(), produceRecoParams(), produceSaturationCorrs(), and convertSQLitetoXML_cfg::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 }
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 121 of file CastorHardcodeCalibrations.cc.

122 {
123 }

Member Function Documentation

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

Definition at line 191 of file CastorHardcodeCalibrations.cc.

References CastorChannelStatus::GOOD, DetId::rawId(), and query::result.

Referenced by CastorHardcodeCalibrations().

191  {
192  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceChannelQuality-> ...";
193  std::auto_ptr<CastorChannelQuality> result (new CastorChannelQuality ());
194  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
195  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
197  result->addValues(item);
198  }
199  return result;
200 }
tuple result
Definition: query.py:137
std::auto_ptr< CastorElectronicsMap > CastorHardcodeCalibrations::produceElectronicsMap ( const CastorElectronicsMapRcd rcd)
protected

Definition at line 202 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations().

202  {
203  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceElectronicsMap-> ...";
204 
205  std::auto_ptr<CastorElectronicsMap> result (new CastorElectronicsMap ());
207  return result;
208 }
void makeHardcodeMap(CastorElectronicsMap &emap)
tuple result
Definition: query.py:137
std::auto_ptr< CastorGains > CastorHardcodeCalibrations::produceGains ( const CastorGainsRcd rcd)
protected

Definition at line 158 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations().

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

Definition at line 169 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations().

169  {
170  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceGainWidths-> ...";
171  std::auto_ptr<CastorGainWidths> result (new CastorGainWidths ());
172  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
173  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
175  result->addValues(item);
176  }
177  return result;
178 }
tuple result
Definition: query.py:137
CastorGainWidth makeGainWidth(HcalGenericDetId fId)
std::auto_ptr< CastorPedestals > CastorHardcodeCalibrations::producePedestals ( const CastorPedestalsRcd rcd)
protected

Definition at line 136 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations().

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

Definition at line 147 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations().

147  {
148  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::producePedestalWidths-> ...";
149  std::auto_ptr<CastorPedestalWidths> result (new CastorPedestalWidths (false));
150  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
151  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
153  result->addValues(item);
154  }
155  return result;
156 }
CastorPedestalWidth makePedestalWidth(HcalGenericDetId fId)
tuple result
Definition: query.py:137
std::auto_ptr< CastorQIEData > CastorHardcodeCalibrations::produceQIEData ( const CastorQIEDataRcd rcd)
protected

Definition at line 180 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations().

180  {
181  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceQIEData-> ...";
182  std::auto_ptr<CastorQIEData> result (new CastorQIEData ());
183  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
184  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
186  result->addCoder(coder);
187  }
188  return result;
189 }
CastorQIECoder makeQIECoder(HcalGenericDetId fId)
tuple result
Definition: query.py:137
std::auto_ptr< CastorRecoParams > CastorHardcodeCalibrations::produceRecoParams ( const CastorRecoParamsRcd rcd)
protected

Definition at line 210 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations().

210  {
211  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceRecoParams-> ...";
212  std::auto_ptr<CastorRecoParams> result (new 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)
tuple result
Definition: query.py:137
std::auto_ptr< CastorSaturationCorrs > CastorHardcodeCalibrations::produceSaturationCorrs ( const CastorSaturationCorrsRcd rcd)
protected

Definition at line 221 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations().

221  {
222  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceSaturationCorrs-> ...";
223  std::auto_ptr<CastorSaturationCorrs> result (new CastorSaturationCorrs ());
224  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
225  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
227  result->addValues(item);
228  }
229  return result;
230 }
tuple result
Definition: query.py:137
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 130 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().

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

Member Data Documentation

bool CastorHardcodeCalibrations::h2mode_
protected

Definition at line 46 of file CastorHardcodeCalibrations.h.