CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
EcalSeverityLevelESProducer Class Reference
Inheritance diagram for EcalSeverityLevelESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef std::shared_ptr< EcalSeverityLevelAlgoReturnType
 
- 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
 

Public Member Functions

 EcalSeverityLevelESProducer (const edm::ParameterSet &iConfig)
 
ReturnType produce (const EcalSeverityLevelAlgoRcd &iRecord)
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ~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)
 

Private Types

using HostType = edm::ESProductHost< EcalSeverityLevelAlgo, EcalChannelStatusRcd >
 

Private Member Functions

void setupChannelStatus (const EcalChannelStatusRcd &, EcalSeverityLevelAlgo *)
 

Private Attributes

edm::ReusableObjectHolder< HostTypeholder_
 
edm::ParameterSet pset_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- 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 >
ESConsumesCollector 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 &)
 

Detailed Description

Definition at line 21 of file EcalSeverityLevelESProducer.cc.

Member Typedef Documentation

Definition at line 36 of file EcalSeverityLevelESProducer.cc.

Definition at line 26 of file EcalSeverityLevelESProducer.cc.

Constructor & Destructor Documentation

EcalSeverityLevelESProducer::EcalSeverityLevelESProducer ( const edm::ParameterSet iConfig)

Definition at line 42 of file EcalSeverityLevelESProducer.cc.

References edm::ESProducer::setWhatProduced().

42  :
43  pset_(iConfig) {
44 
45  //the following line is needed to tell the framework what
46  // data is being produced
47  setWhatProduced(this);
48 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:116

Member Function Documentation

EcalSeverityLevelESProducer::ReturnType EcalSeverityLevelESProducer::produce ( const EcalSeverityLevelAlgoRcd iRecord)

Definition at line 51 of file EcalSeverityLevelESProducer.cc.

References h, holder_, query::host, pset_, and setupChannelStatus().

51  {
52 
53  auto host = holder_.makeOrGet([this]() {
54  return new HostType(pset_);
55  });
56 
57  host->ifRecordChanges<EcalChannelStatusRcd>(iRecord,
58  [this,h=host.get()](auto const& rec) {
59  setupChannelStatus(rec, h);
60  });
61 
62  return host;
63 }
host
Definition: query.py:115
edm::ESProductHost< EcalSeverityLevelAlgo, EcalChannelStatusRcd > HostType
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
edm::ReusableObjectHolder< HostType > holder_
void setupChannelStatus(const EcalChannelStatusRcd &, EcalSeverityLevelAlgo *)
void EcalSeverityLevelESProducer::setupChannelStatus ( const EcalChannelStatusRcd chs,
EcalSeverityLevelAlgo algo 
)
private

Definition at line 66 of file EcalSeverityLevelESProducer.cc.

References DEFINE_FWK_EVENTSETUP_MODULE, edm::eventsetup::EventSetupRecord::get(), h, edm::ESHandle< T >::product(), and EcalSeverityLevelAlgo::setChannelStatus().

Referenced by produce().

67  {
69  chs.get (h);
70  algo->setChannelStatus(*h.product());
71 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void setChannelStatus(const EcalChannelStatus &chs)
Set the ChannelStatus record.
T const * product() const
Definition: ESHandle.h:84
bool get(HolderT &iHolder) const

Member Data Documentation

edm::ReusableObjectHolder<HostType> EcalSeverityLevelESProducer::holder_
private

Definition at line 38 of file EcalSeverityLevelESProducer.cc.

Referenced by produce().

edm::ParameterSet EcalSeverityLevelESProducer::pset_
private

Definition at line 39 of file EcalSeverityLevelESProducer.cc.

Referenced by produce().