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::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

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
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
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)
 

Static Public Member Functions

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

Private Attributes

edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleRcdlorentzAngleToken_
 

Additional Inherited Members

- 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={})
 
void usesResources (std::vector< std::string > const &)
 
- 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

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.

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 }

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

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 93 of file SiStripLorentzAngleDepESProducer.cc.

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 }

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

◆ produce()

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

Definition at line 85 of file SiStripLorentzAngleDepESProducer.cc.

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 }

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

Member Data Documentation

◆ lorentzAngleToken_

edm::ESGetToken<SiStripLorentzAngle, SiStripLorentzAngleRcd> SiStripLorentzAngleDepESProducer::lorentzAngleToken_
private
edm::ESProductTag
Definition: ESProductTag.h:29
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
config_102169_raw_cff.latency
latency
Definition: config_102169_raw_cff.py:29
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripLatency::singleReadOutMode
int16_t singleReadOutMode() const
Definition: SiStripLatency.cc:122
get
#define get
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
SiStripLorentzAngleDepESProducer::lorentzAngleToken_
edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleRcd > lorentzAngleToken_
Definition: SiStripLorentzAngleDepESProducer.cc:46
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
Exception
Definition: hltDiff.cc:245
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
edm::errors::Configuration
Definition: EDMException.h:36