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
 
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)
 

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 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

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

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

Definition at line 39 of file SiStripLorentzAngleDepESProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 51 of file SiStripLorentzAngleDepESProducer.cc.

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

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

Member Function Documentation

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

Definition at line 95 of file SiStripLorentzAngleDepESProducer.cc.

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

95  {
97  {
99  latency.add<std::string>("record", "SiStripLatencyRcd");
100  latency.addUntracked<std::string>("label", "");
101 
102  desc.add<edm::ParameterSetDescription>("LatencyRecord", latency);
103  }
104 
105  {
107  peak.add<std::string>("record", "SiStripLorentzAngleRcd");
108  peak.addUntracked<std::string>("label", "peak");
109 
110  desc.add<edm::ParameterSetDescription>("LorentzAnglePeakMode", peak);
111  }
112 
113  {
115  deconv.add<std::string>("record", "SiStripLorentzAngleRcd");
116  deconv.addUntracked<std::string>("label", "deconvolution");
117 
118  desc.add<edm::ParameterSetDescription>("LorentzAngleDeconvMode", deconv);
119  }
120 
121  descriptions.addDefault(desc);
122 }
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 87 of file SiStripLorentzAngleDepESProducer.cc.

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

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

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

Member Data Documentation

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