CMS 3D CMS Logo

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

Public Member Functions

 EcalLaserCorrectionServiceMC (const edm::ParameterSet &)
 
std::shared_ptr< EcalLaserDbServiceproduce (const EcalLaserDbRecordMC &)
 
 ~EcalLaserCorrectionServiceMC () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename Record >
void updateFromMayConsumes (unsigned int iIndex, const Record &iRecord)
 
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)
 

Private Types

using HostType = edm::ESProductHost< EcalLaserDbService, EcalLaserAlphasRcd, EcalLaserAPDPNRatiosRefRcd, EcalLaserAPDPNRatiosMCRcd, EcalLinearCorrectionsRcd >
 

Private Attributes

edm::ESGetToken< EcalLaserAlphas, EcalLaserAlphasRcdalphaToken_
 
edm::ESGetToken< EcalLaserAPDPNRatiosRef, EcalLaserAPDPNRatiosRefRcdapdpnRefToken_
 
edm::ESGetToken< EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosMCRcdapdpnToken_
 
edm::ReusableObjectHolder< HostTypeholder_
 
edm::ESGetToken< EcalLinearCorrections, EcalLinearCorrectionsRcdlinearToken_
 

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 > >>
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &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 >
ESConsumesCollectorT< TRecord > 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 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)
 

Detailed Description

Definition at line 25 of file EcalLaserCorrectionServiceMC.cc.

Member Typedef Documentation

◆ HostType

Definition at line 37 of file EcalLaserCorrectionServiceMC.cc.

Constructor & Destructor Documentation

◆ EcalLaserCorrectionServiceMC()

EcalLaserCorrectionServiceMC::EcalLaserCorrectionServiceMC ( const edm::ParameterSet fConfig)

Definition at line 48 of file EcalLaserCorrectionServiceMC.cc.

48  : ESProducer() {
49  // the following line is needed to tell the framework what
50  // data is being produced
51  // setWhatProduced (this, (dependsOn (&EcalLaserCorrectionServiceMC::apdpnCallback)));
52 
53  setWhatProduced(this)
54  .setConsumes(alphaToken_)
55  .setConsumes(apdpnRefToken_)
56  .setConsumes(apdpnToken_)
57  .setConsumes(linearToken_);
58 
59  //now do what ever other initialization is needed
60 }

References alphaToken_, apdpnRefToken_, apdpnToken_, linearToken_, and edm::ESProducer::setWhatProduced().

◆ ~EcalLaserCorrectionServiceMC()

EcalLaserCorrectionServiceMC::~EcalLaserCorrectionServiceMC ( )
override

Definition at line 62 of file EcalLaserCorrectionServiceMC.cc.

62 {}

Member Function Documentation

◆ produce()

std::shared_ptr< EcalLaserDbService > EcalLaserCorrectionServiceMC::produce ( const EcalLaserDbRecordMC record)

Definition at line 69 of file EcalLaserCorrectionServiceMC.cc.

69  {
70  auto host = holder_.makeOrGet([]() { return new HostType; });
71 
72  host->ifRecordChanges<EcalLinearCorrectionsRcd>(
73  record, [this, h = host.get()](auto const& rec) { h->setLinearCorrectionsData(&rec.get(linearToken_)); });
74 
75  host->ifRecordChanges<EcalLaserAPDPNRatiosMCRcd>(
76  record, [this, h = host.get()](auto const& rec) { h->setAPDPNData(&rec.get(apdpnToken_)); });
77 
78  host->ifRecordChanges<EcalLaserAPDPNRatiosRefRcd>(
79  record, [this, h = host.get()](auto const& rec) { h->setAPDPNRefData(&rec.get(apdpnRefToken_)); });
80 
81  host->ifRecordChanges<EcalLaserAlphasRcd>(
82  record, [this, h = host.get()](auto const& rec) { h->setAlphaData(&rec.get(alphaToken_)); });
83 
84  return host; // automatically converts to std::shared_ptr<EcalLaserDbService>
85 }

References alphaToken_, apdpnRefToken_, apdpnToken_, holder_, query::host, linearToken_, edm::ReusableObjectHolder< T, Deleter >::makeOrGet(), and GlobalPosition_Frontier_DevDB_cff::record.

Member Data Documentation

◆ alphaToken_

edm::ESGetToken<EcalLaserAlphas, EcalLaserAlphasRcd> EcalLaserCorrectionServiceMC::alphaToken_
private

Definition at line 42 of file EcalLaserCorrectionServiceMC.cc.

Referenced by EcalLaserCorrectionServiceMC(), and produce().

◆ apdpnRefToken_

edm::ESGetToken<EcalLaserAPDPNRatiosRef, EcalLaserAPDPNRatiosRefRcd> EcalLaserCorrectionServiceMC::apdpnRefToken_
private

Definition at line 43 of file EcalLaserCorrectionServiceMC.cc.

Referenced by EcalLaserCorrectionServiceMC(), and produce().

◆ apdpnToken_

edm::ESGetToken<EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosMCRcd> EcalLaserCorrectionServiceMC::apdpnToken_
private

Definition at line 44 of file EcalLaserCorrectionServiceMC.cc.

Referenced by EcalLaserCorrectionServiceMC(), and produce().

◆ holder_

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

Definition at line 40 of file EcalLaserCorrectionServiceMC.cc.

Referenced by produce().

◆ linearToken_

edm::ESGetToken<EcalLinearCorrections, EcalLinearCorrectionsRcd> EcalLaserCorrectionServiceMC::linearToken_
private

Definition at line 45 of file EcalLaserCorrectionServiceMC.cc.

Referenced by EcalLaserCorrectionServiceMC(), and produce().

EcalLaserCorrectionServiceMC::HostType
edm::ESProductHost< EcalLaserDbService, EcalLaserAlphasRcd, EcalLaserAPDPNRatiosRefRcd, EcalLaserAPDPNRatiosMCRcd, EcalLinearCorrectionsRcd > HostType
Definition: EcalLaserCorrectionServiceMC.cc:37
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
GlobalPosition_Frontier_DevDB_cff.record
record
Definition: GlobalPosition_Frontier_DevDB_cff.py:10
EcalLaserAPDPNRatiosRefRcd
Definition: EcalLaserAPDPNRatiosRefRcd.h:24
EcalLaserCorrectionServiceMC::alphaToken_
edm::ESGetToken< EcalLaserAlphas, EcalLaserAlphasRcd > alphaToken_
Definition: EcalLaserCorrectionServiceMC.cc:42
query.host
host
Definition: query.py:115
edm::ReusableObjectHolder::makeOrGet
std::shared_ptr< T > makeOrGet(F iFunc)
If there isn't an object already available, creates a new one using iFunc.
Definition: ReusableObjectHolder.h:126
edm::ESProducer::ESProducer
ESProducer()
Definition: ESProducer.cc:30
EcalLaserCorrectionServiceMC::apdpnRefToken_
edm::ESGetToken< EcalLaserAPDPNRatiosRef, EcalLaserAPDPNRatiosRefRcd > apdpnRefToken_
Definition: EcalLaserCorrectionServiceMC.cc:43
h
EcalLaserAPDPNRatiosMCRcd
Definition: EcalLaserAPDPNRatiosMCRcd.h:24
EcalLaserCorrectionServiceMC::linearToken_
edm::ESGetToken< EcalLinearCorrections, EcalLinearCorrectionsRcd > linearToken_
Definition: EcalLaserCorrectionServiceMC.cc:45
EcalLaserAlphasRcd
Definition: EcalLaserAlphasRcd.h:24
EcalLinearCorrectionsRcd
Definition: EcalLinearCorrectionsRcd.h:5
EcalLaserCorrectionServiceMC::holder_
edm::ReusableObjectHolder< HostType > holder_
Definition: EcalLaserCorrectionServiceMC.cc:40
EcalLaserCorrectionServiceMC::apdpnToken_
edm::ESGetToken< EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosMCRcd > apdpnToken_
Definition: EcalLaserCorrectionServiceMC.cc:44