CMS 3D CMS Logo

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

Public Member Functions

std::shared_ptr< SiStripBackPlaneCorrection const > produce (const SiStripBackPlaneCorrectionDepRcd &)
 
 SiStripBackPlaneCorrectionDepESProducer (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< SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionRcdbackPlaneCorrectionToken_
 

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 39 of file SiStripBackPlaneCorrectionDepESProducer.cc.

Constructor & Destructor Documentation

◆ SiStripBackPlaneCorrectionDepESProducer()

SiStripBackPlaneCorrectionDepESProducer::SiStripBackPlaneCorrectionDepESProducer ( const edm::ParameterSet iConfig)

Definition at line 51 of file SiStripBackPlaneCorrectionDepESProducer.cc.

51  {
52  edm::LogInfo("SiStripBackPlaneCorrectionDepESProducer") << "ctor" << std::endl;
53 
54  auto getLatency = iConfig.getParameter<edm::ParameterSet>("LatencyRecord");
55  // How useful the "record" parameter really is?
56  if (getLatency.getParameter<std::string>("record") != "SiStripLatencyRcd") {
58  "[SiStripBackPlaneCorrectionDepESProducer::ctor] No Latency Record found ");
59  }
60 
61  auto getPeak = iConfig.getParameter<edm::ParameterSet>("BackPlaneCorrectionPeakMode");
62  if (getPeak.getParameter<std::string>("record") != "SiStripBackPlaneCorrectionRcd") {
64  "[SiStripBackPlaneCorrectionDepESProducer::ctor] No Lorentz Angle Record found ");
65  }
66 
67  auto getDeconv = iConfig.getParameter<edm::ParameterSet>("BackPlaneCorrectionDeconvMode");
68  // How useful the "record" parameter really is?
69  if (getDeconv.getParameter<std::string>("record") != "SiStripBackPlaneCorrectionRcd") {
71  "[SiStripBackPlaneCorrectionDepESProducer::ctor] No Lorentz Angle Record found ");
72  }
73 
74  auto peakLabel{getPeak.getUntrackedParameter<std::string>("label")};
75  auto deconvLabel{getDeconv.getUntrackedParameter<std::string>("label")};
76 
77  setWhatProduced(this).setMayConsume(
79  [peakLabel, deconvLabel](auto const& get, edm::ESTransientHandle<SiStripLatency> iLatency) {
80  if (iLatency->singleReadOutMode() == 1) {
81  return get("", peakLabel);
82  }
83  return get("", deconvLabel);
84  },
85  edm::ESProductTag<SiStripLatency, SiStripLatencyRcd>("", getLatency.getUntrackedParameter<std::string>("label")));
86 }

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

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 96 of file SiStripBackPlaneCorrectionDepESProducer.cc.

96  {
98  {
100  latency.add<std::string>("record", "SiStripLatencyRcd");
101  latency.addUntracked<std::string>("label", "");
102 
103  desc.add<edm::ParameterSetDescription>("LatencyRecord", latency);
104  }
105 
106  {
108  peak.add<std::string>("record", "SiStripBackPlaneCorrectionRcd");
109  peak.addUntracked<std::string>("label", "peak");
110 
111  desc.add<edm::ParameterSetDescription>("BackPlaneCorrectionPeakMode", peak);
112  }
113 
114  {
116  deconv.add<std::string>("record", "SiStripBackPlaneCorrectionRcd");
117  deconv.addUntracked<std::string>("label", "deconvolution");
118 
119  desc.add<edm::ParameterSetDescription>("BackPlaneCorrectionDeconvMode", deconv);
120  }
121 
122  descriptions.addDefault(desc);
123 }

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< SiStripBackPlaneCorrection const > SiStripBackPlaneCorrectionDepESProducer::produce ( const SiStripBackPlaneCorrectionDepRcd iRecord)

Definition at line 88 of file SiStripBackPlaneCorrectionDepESProducer.cc.

89  {
90  edm::LogInfo("SiStripBackPlaneCorrectionDepESProducer") << "Producer called" << std::endl;
91 
92  //tell shared_ptr not to delete the product since it is already owned by the record
93  return std::shared_ptr<SiStripBackPlaneCorrection const>(&iRecord.get(backPlaneCorrectionToken_), [](auto) {});
94 }

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

Member Data Documentation

◆ backPlaneCorrectionToken_

edm::ESGetToken<SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionRcd> SiStripBackPlaneCorrectionDepESProducer::backPlaneCorrectionToken_
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
SiStripBackPlaneCorrectionDepESProducer::backPlaneCorrectionToken_
edm::ESGetToken< SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionRcd > backPlaneCorrectionToken_
Definition: SiStripBackPlaneCorrectionDepESProducer.cc:48
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
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
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
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