CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SiStripBackPlaneCorrectionDepESProducer Class Reference

#include <CalibTracker/SiStripESProducers/plugins/real/SiStripBackPlaneCorrectionDepESProducer.cc>

Inheritance diagram for SiStripBackPlaneCorrectionDepESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

std::shared_ptr< SiStripBackPlaneCorrectionproduce (const SiStripBackPlaneCorrectionDepRcd &)
 
 SiStripBackPlaneCorrectionDepESProducer (const edm::ParameterSet &)
 
 ~SiStripBackPlaneCorrectionDepESProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Attributes

edm::ParameterSet getDeconv
 
edm::ParameterSet getLatency
 
edm::ParameterSet getPeak
 
edm::ParameterSet pset_
 
std::shared_ptr< SiStripBackPlaneCorrectionsiStripBPC_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- 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 eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

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

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

Definition at line 21 of file SiStripBackPlaneCorrectionDepESProducer.h.

Constructor & Destructor Documentation

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

Definition at line 22 of file SiStripBackPlaneCorrectionDepESProducer.cc.

References edm::ESProducer::setWhatProduced().

22  :
23  pset_(iConfig),
24  getLatency(iConfig.getParameter<edm::ParameterSet>("LatencyRecord")),
25  getPeak(iConfig.getParameter<edm::ParameterSet>("BackPlaneCorrectionPeakMode")),
26  getDeconv(iConfig.getParameter<edm::ParameterSet>("BackPlaneCorrectionDeconvMode"))
27 {
28  setWhatProduced(this);
29 
30  edm::LogInfo("SiStripBackPlaneCorrectionDepESProducer") << "ctor" << std::endl;
31 
32 }
T getParameter(std::string const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
SiStripBackPlaneCorrectionDepESProducer::~SiStripBackPlaneCorrectionDepESProducer ( )
inlineoverride

Definition at line 24 of file SiStripBackPlaneCorrectionDepESProducer.h.

References produce().

24 {};

Member Function Documentation

std::shared_ptr< SiStripBackPlaneCorrection > SiStripBackPlaneCorrectionDepESProducer::produce ( const SiStripBackPlaneCorrectionDepRcd iRecord)

Definition at line 35 of file SiStripBackPlaneCorrectionDepESProducer.cc.

References getDeconv, getLatency, edm::ParameterSet::getParameter(), getPeak, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), edm::ParameterSet::getUntrackedParameter(), hcaltpdigi_cfi::latency, edm::ESHandle< T >::product(), siStripBPC_, and AlCaHLTBitMon_QueryRunRegistry::string.

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

36 {
37 
38  edm::LogInfo("SiStripBackPlaneCorrectionDepESProducer") << "Producer called" << std::endl;
39 
40  std::string latencyRecordName = getLatency.getParameter<std::string>("record");
42  bool peakMode = false;
43 
44  if( latencyRecordName == "SiStripLatencyRcd" ) {
46  iRecord.getRecord<SiStripLatencyRcd>().get( latencyLabel, latency);
47  if(latency -> singleReadOutMode() == 1) peakMode = true;
48  } else edm::LogError("SiStripBackPlaneCorrectionDepESProducer") << "[SiStripBackPlaneCorrectionDepESProducer::produce] No Latency Record found " << std::endl;
49 
50  std::string backPlaneCorrectionRecordName;
51  std::string backPlaneCorrectionLabel;
52 
53  if (peakMode){
54  backPlaneCorrectionRecordName = getPeak.getParameter<std::string>("record");
55  backPlaneCorrectionLabel = getPeak.getUntrackedParameter<std::string>("label");
56  } else {
57  backPlaneCorrectionRecordName = getDeconv.getParameter<std::string>("record");
58  backPlaneCorrectionLabel = getDeconv.getUntrackedParameter<std::string>("label");
59  }
60 
61  if ( backPlaneCorrectionRecordName == "SiStripBackPlaneCorrectionRcd"){
62  edm::ESHandle<SiStripBackPlaneCorrection> siStripBackPlaneCorrection;
63  iRecord.getRecord<SiStripBackPlaneCorrectionRcd>().get(backPlaneCorrectionLabel, siStripBackPlaneCorrection);
64  siStripBPC_.reset(new SiStripBackPlaneCorrection(*(siStripBackPlaneCorrection.product())));
65  } else edm::LogError("SiStripBackPlaneCorrectionDepESProducer") << "[SiStripBackPlaneCorrectionDepESProducer::produce] No Lorentz Angle Record found " << std::endl;
66 
67 
68  return siStripBPC_;
69 
70 
71 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::shared_ptr< SiStripBackPlaneCorrection > siStripBPC_
latency
hardware algo
T const * product() const
Definition: ESHandle.h:86

Member Data Documentation

edm::ParameterSet SiStripBackPlaneCorrectionDepESProducer::getDeconv
private

Definition at line 37 of file SiStripBackPlaneCorrectionDepESProducer.h.

Referenced by produce().

edm::ParameterSet SiStripBackPlaneCorrectionDepESProducer::getLatency
private

Definition at line 35 of file SiStripBackPlaneCorrectionDepESProducer.h.

Referenced by produce().

edm::ParameterSet SiStripBackPlaneCorrectionDepESProducer::getPeak
private

Definition at line 36 of file SiStripBackPlaneCorrectionDepESProducer.h.

Referenced by produce().

edm::ParameterSet SiStripBackPlaneCorrectionDepESProducer::pset_
private

Definition at line 30 of file SiStripBackPlaneCorrectionDepESProducer.h.

std::shared_ptr<SiStripBackPlaneCorrection> SiStripBackPlaneCorrectionDepESProducer::siStripBPC_
private

Definition at line 39 of file SiStripBackPlaneCorrectionDepESProducer.h.

Referenced by produce().