CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
SiStripLorentzAngleRcd
lorentzAngleToken_
 

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 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={})
 
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 ( const edm::ParameterSet iConfig)

Definition at line 49 of file SiStripLorentzAngleDepESProducer.cc.

References edm::errors::Configuration, Exception, edm::ParameterSet::getParameter(), lorentzAngleToken_, edm::ESProducer::setWhatProduced(), 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:163
Log< level::Info, false > LogInfo
edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleRcd > lorentzAngleToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

Member Function Documentation

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, beam_dqm_sourceclient-live_cfg::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)
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 }
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Log< level::Info, false > LogInfo
edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleRcd > lorentzAngleToken_

Member Data Documentation

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