CMS 3D CMS Logo

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

Public Member Functions

 EcalLaserCorrectionService (const edm::ParameterSet &)
 
std::shared_ptr< EcalLaserDbServiceproduce (const EcalLaserDbRecord &)
 
 ~EcalLaserCorrectionService () 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 ()(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, EcalLaserAPDPNRatiosRcd, EcalLinearCorrectionsRcd >
 

Private Attributes

edm::ESGetToken< EcalLaserAlphas, EcalLaserAlphasRcdalphaToken_
 
edm::ESGetToken< EcalLaserAPDPNRatiosRef, EcalLaserAPDPNRatiosRefRcdapdpnRefToken_
 
edm::ESGetToken< EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcdapdpnToken_
 
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 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 >
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 24 of file EcalLaserCorrectionService.cc.

Member Typedef Documentation

Definition at line 36 of file EcalLaserCorrectionService.cc.

Constructor & Destructor Documentation

EcalLaserCorrectionService::EcalLaserCorrectionService ( const edm::ParameterSet fConfig)

Definition at line 50 of file EcalLaserCorrectionService.cc.

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

51  : ESProducer()
52 // mDumpRequest (),
53 // mDumpStream(0)
54 {
55  //the following line is needed to tell the framework what
56  // data is being produced
57  // setWhatProduced (this, (dependsOn (&EcalLaserCorrectionService::apdpnCallback)));
58 
59  setWhatProduced(this)
60  .setConsumes(alphaToken_)
61  .setConsumes(apdpnRefToken_)
62  .setConsumes(apdpnToken_)
63  .setConsumes(linearToken_);
64 
65  //now do what ever other initialization is needed
66 
67  // mDumpRequest = fConfig.getUntrackedParameter <std::vector <std::string> > ("dump", std::vector<std::string>());
68  // if (!mDumpRequest.empty()) {
69  // std::string otputFile = fConfig.getUntrackedParameter <std::string> ("file", "");
70  // mDumpStream = otputFile.empty () ? &std::cout : new std::ofstream (otputFile.c_str());
71  // }
72 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
edm::ESGetToken< EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcd > apdpnToken_
edm::ESGetToken< EcalLaserAPDPNRatiosRef, EcalLaserAPDPNRatiosRefRcd > apdpnRefToken_
edm::ESGetToken< EcalLaserAlphas, EcalLaserAlphasRcd > alphaToken_
edm::ESGetToken< EcalLinearCorrections, EcalLinearCorrectionsRcd > linearToken_
EcalLaserCorrectionService::~EcalLaserCorrectionService ( )
override

Definition at line 74 of file EcalLaserCorrectionService.cc.

74  {
75  // do anything here that needs to be done at desctruction time
76  // (e.g. close files, deallocate resources etc.)
77  // if (mDumpStream != &std::cout) delete mDumpStream;
78 }

Member Function Documentation

std::shared_ptr< EcalLaserDbService > EcalLaserCorrectionService::produce ( const EcalLaserDbRecord record)

Definition at line 85 of file EcalLaserCorrectionService.cc.

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

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

85  {
86  auto host = holder_.makeOrGet([]() { return new HostType; });
87 
88  host->ifRecordChanges<EcalLinearCorrectionsRcd>(
89  record, [this, h = host.get()](auto const& rec) { h->setLinearCorrectionsData(&rec.get(linearToken_)); });
90 
91  host->ifRecordChanges<EcalLaserAPDPNRatiosRcd>(
92  record, [this, h = host.get()](auto const& rec) { h->setAPDPNData(&rec.get(apdpnToken_)); });
93 
94  host->ifRecordChanges<EcalLaserAPDPNRatiosRefRcd>(
95  record, [this, h = host.get()](auto const& rec) { h->setAPDPNRefData(&rec.get(apdpnRefToken_)); });
96 
97  host->ifRecordChanges<EcalLaserAlphasRcd>(
98  record, [this, h = host.get()](auto const& rec) { h->setAlphaData(&rec.get(alphaToken_)); });
99 
100  return host; // automatically converts to std::shared_ptr<EcalLaserDbService>
101 }
host
Definition: query.py:115
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
edm::ESGetToken< EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcd > apdpnToken_
JetCorrectorParameters::Record record
Definition: classes.h:7
edm::ESProductHost< EcalLaserDbService, EcalLaserAlphasRcd, EcalLaserAPDPNRatiosRefRcd, EcalLaserAPDPNRatiosRcd, EcalLinearCorrectionsRcd > HostType
edm::ReusableObjectHolder< HostType > holder_
edm::ESGetToken< EcalLaserAPDPNRatiosRef, EcalLaserAPDPNRatiosRefRcd > apdpnRefToken_
std::shared_ptr< T > makeOrGet(F iFunc)
If there isn&#39;t an object already available, creates a new one using iFunc.
edm::ESGetToken< EcalLaserAlphas, EcalLaserAlphasRcd > alphaToken_
edm::ESGetToken< EcalLinearCorrections, EcalLinearCorrectionsRcd > linearToken_

Member Data Documentation

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

Definition at line 41 of file EcalLaserCorrectionService.cc.

Referenced by EcalLaserCorrectionService(), and produce().

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

Definition at line 42 of file EcalLaserCorrectionService.cc.

Referenced by EcalLaserCorrectionService(), and produce().

edm::ESGetToken<EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcd> EcalLaserCorrectionService::apdpnToken_
private

Definition at line 43 of file EcalLaserCorrectionService.cc.

Referenced by EcalLaserCorrectionService(), and produce().

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

Definition at line 39 of file EcalLaserCorrectionService.cc.

Referenced by produce().

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

Definition at line 44 of file EcalLaserCorrectionService.cc.

Referenced by EcalLaserCorrectionService(), and produce().