CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
SiStripLorentzAngleDepESProducer Class Reference
Inheritance diagram for SiStripLorentzAngleDepESProducer:
edm::ESProducer edm::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

Public Member Functions

std::shared_ptr< SiStripLorentzAngle const > produce (const SiStripLorentzAngleDepRcd &)
 
 SiStripLorentzAngleDepESProducer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
 ESProducer (ESProducer &&)=delete
 
ESResolverIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProduceroperator= (const ESProducer &)=delete
 
ESProduceroperator= (ESProducer &&)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESResolverIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProductResolverFactoryProducer
 ESProductResolverFactoryProducer ()
 
 ESProductResolverFactoryProducer (const ESProductResolverFactoryProducer &)=delete
 
const ESProductResolverFactoryProduceroperator= (const ESProductResolverFactoryProducer &)=delete
 
 ~ESProductResolverFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
void createKeyedResolvers (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
const ComponentDescriptiondescription () const
 
 ESProductResolverProvider ()
 
 ESProductResolverProvider (const ESProductResolverProvider &)=delete
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedResolverskeyedResolvers (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const ESProductResolverProvideroperator= (const ESProductResolverProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~ESProductResolverProvider () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
static void prevalidate (ConfigurationDescriptions &)
 

Private Attributes

edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleRcdlorentzAngleToken_
 

Additional Inherited Members

- Protected Types inherited from edm::ESProductResolverFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::ESProductResolverProvider
using KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >>
 
- Protected Member Functions inherited from edm::ESProducer
ESConsumesInfoconsumesInfoPushBackNew ()
 
unsigned int consumesInfoSize () const
 
template<typename CallbackT , typename TList , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
 
template<typename CallbackT , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
 
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 TDecorator >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProductResolverFactoryProducer
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::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedResolversVector registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolverProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 37 of file SiStripLorentzAngleDepESProducer.cc.

Constructor & Destructor Documentation

◆ SiStripLorentzAngleDepESProducer()

SiStripLorentzAngleDepESProducer::SiStripLorentzAngleDepESProducer ( const edm::ParameterSet iConfig)

Definition at line 49 of file SiStripLorentzAngleDepESProducer.cc.

References edm::errors::Configuration, Exception, edm::ParameterSet::getParameter(), lorentzAngleToken_, edm::ESProducer::setWhatProduced(), SiStripLatency::singleReadOutMode(), and AlCaHLTBitMon_QueryRunRegistry::string.

49  {
50  auto const getLatency = iConfig.getParameter<edm::ParameterSet>("LatencyRecord");
51  // How useful the "record" parameter really is?
52  if (getLatency.getParameter<std::string>("record") != "SiStripLatencyRcd") {
54  "[SiStripLorentzAngleDepESProducer::ctor] No Latency Record found ");
55  }
56 
57  auto const getPeak = iConfig.getParameter<edm::ParameterSet>("LorentzAnglePeakMode");
58  if (getPeak.getParameter<std::string>("record") != "SiStripLorentzAngleRcd") {
60  "[SiStripLorentzAngleDepESProducer::ctor] No Lorentz Angle Record found ");
61  }
62 
63  auto const getDeconv = iConfig.getParameter<edm::ParameterSet>("LorentzAngleDeconvMode");
64  // How useful the "record" parameter really is?
65  if (getDeconv.getParameter<std::string>("record") != "SiStripLorentzAngleRcd") {
67  "[SiStripLorentzAngleDepESProducer::ctor] No Lorentz Angle Record found ");
68  }
69 
70  auto const peakLabel{getPeak.getUntrackedParameter<std::string>("label")};
71  auto const deconvLabel{getDeconv.getUntrackedParameter<std::string>("label")};
72  setWhatProduced(this).setMayConsume(
74  [peakLabel, deconvLabel](auto const& get, edm::ESTransientHandle<SiStripLatency> iLatency) {
75  if (iLatency->singleReadOutMode() == 1) {
76  return get("", peakLabel);
77  }
78  return get("", deconvLabel);
79  },
80  edm::ESProductTag<SiStripLatency, SiStripLatencyRcd>("", getLatency.getUntrackedParameter<std::string>("label")));
81 
82  edm::LogInfo("SiStripLorentzAngleDepESProducer") << "ctor" << std::endl;
83 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
Log< level::Info, false > LogInfo
int16_t singleReadOutMode() const
edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleRcd > lorentzAngleToken_

Member Function Documentation

◆ fillDescriptions()

void SiStripLorentzAngleDepESProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 93 of file SiStripLorentzAngleDepESProducer.cc.

References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::addDefault(), edm::ParameterSetDescription::addUntracked(), submitPVResolutionJobs::desc, config_102169_raw_cff::latency, and AlCaHLTBitMon_QueryRunRegistry::string.

93  {
95  {
97  latency.add<std::string>("record", "SiStripLatencyRcd");
98  latency.addUntracked<std::string>("label", "");
99 
100  desc.add<edm::ParameterSetDescription>("LatencyRecord", latency);
101  }
102 
103  {
105  peak.add<std::string>("record", "SiStripLorentzAngleRcd");
106  peak.addUntracked<std::string>("label", "peak");
107 
108  desc.add<edm::ParameterSetDescription>("LorentzAnglePeakMode", peak);
109  }
110 
111  {
113  deconv.add<std::string>("record", "SiStripLorentzAngleRcd");
114  deconv.addUntracked<std::string>("label", "deconvolution");
115 
116  desc.add<edm::ParameterSetDescription>("LorentzAngleDeconvMode", deconv);
117  }
118 
119  descriptions.addDefault(desc);
120 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void addDefault(ParameterSetDescription const &psetDescription)
ParameterDescriptionBase * add(U const &iLabel, T const &value)

◆ produce()

std::shared_ptr< SiStripLorentzAngle const > SiStripLorentzAngleDepESProducer::produce ( const SiStripLorentzAngleDepRcd iRecord)

Definition at line 85 of file SiStripLorentzAngleDepESProducer.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), and lorentzAngleToken_.

86  {
87  edm::LogInfo("SiStripLorentzAngleDepESProducer") << "Producer called" << std::endl;
88 
89  //tell shared_ptr not to delete the product since it is already owned by the record
90  return std::shared_ptr<SiStripLorentzAngle const>(&iRecord.get(lorentzAngleToken_), [](auto) {});
91 }
Log< level::Info, false > LogInfo
edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleRcd > lorentzAngleToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const

Member Data Documentation

◆ lorentzAngleToken_

edm::ESGetToken<SiStripLorentzAngle, SiStripLorentzAngleRcd> SiStripLorentzAngleDepESProducer::lorentzAngleToken_
private