CMS 3D CMS Logo

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

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

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

Public Member Functions

std::unique_ptr< SiStripLorentzAngleproduce (const SiStripLorentzAngleDepRcd &)
 
 SiStripLorentzAngleDepESProducer (const edm::ParameterSet &)
 
 ~SiStripLorentzAngleDepESProducer () 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_
 

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 SiStripLorentzAngleDepESProducer.h.

Constructor & Destructor Documentation

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

Definition at line 24 of file SiStripLorentzAngleDepESProducer.cc.

References edm::ESProducer::setWhatProduced().

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

Definition at line 24 of file SiStripLorentzAngleDepESProducer.h.

References produce().

24 {};

Member Function Documentation

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

Definition at line 37 of file SiStripLorentzAngleDepESProducer.cc.

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

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

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

Member Data Documentation

edm::ParameterSet SiStripLorentzAngleDepESProducer::getDeconv
private

Definition at line 37 of file SiStripLorentzAngleDepESProducer.h.

Referenced by produce().

edm::ParameterSet SiStripLorentzAngleDepESProducer::getLatency
private

Definition at line 35 of file SiStripLorentzAngleDepESProducer.h.

Referenced by produce().

edm::ParameterSet SiStripLorentzAngleDepESProducer::getPeak
private

Definition at line 36 of file SiStripLorentzAngleDepESProducer.h.

Referenced by produce().

edm::ParameterSet SiStripLorentzAngleDepESProducer::pset_
private

Definition at line 30 of file SiStripLorentzAngleDepESProducer.h.