CMS 3D CMS Logo

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

Public Types

typedef std::unique_ptr< SiStripThresholdReturnType
 
- 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
 

Public Member Functions

ReturnType produce (const SiStripThresholdRcd &)
 
void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &iov, edm::ValidityInterval &iValidity) override
 
 SiStripThresholdFakeESSource (const edm::ParameterSet &)
 
 ~SiStripThresholdFakeESSource () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~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)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Private Attributes

float m_cTh
 
float m_hTh
 
float m_lTh
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
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 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 &)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Detailed Description

Description: "fake" SiStripThreshold ESProducer - fixed values from configuration for all thresholds (low, high and cluster)

Implementation: Port of SiStripThresholdGenerator and templated fake ESSource to an edm::ESProducer

Definition at line 25 of file SiStripThresholdFakeESSource.cc.

Member Typedef Documentation

Definition at line 32 of file SiStripThresholdFakeESSource.cc.

Constructor & Destructor Documentation

SiStripThresholdFakeESSource::SiStripThresholdFakeESSource ( const edm::ParameterSet iConfig)

Definition at line 44 of file SiStripThresholdFakeESSource.cc.

References edm::ParameterSet::getParameter(), m_cTh, m_hTh, m_lTh, and edm::ESProducer::setWhatProduced().

45 {
46  setWhatProduced(this);
47  findingRecord<SiStripThresholdRcd>();
48 
49  m_lTh = iConfig.getParameter<double>("LowTh");
50  m_hTh = iConfig.getParameter<double>("HighTh");
51  m_cTh = iConfig.getParameter<double>("ClusTh");
52 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
SiStripThresholdFakeESSource::~SiStripThresholdFakeESSource ( )
override

Definition at line 54 of file SiStripThresholdFakeESSource.cc.

54 {}

Member Function Documentation

SiStripThresholdFakeESSource::ReturnType SiStripThresholdFakeESSource::produce ( const SiStripThresholdRcd iRecord)

Definition at line 63 of file SiStripThresholdFakeESSource.cc.

References DEFINE_FWK_EVENTSETUP_SOURCE, LogDebug, m_cTh, m_hTh, m_lTh, matplotRender::reader, digitizers_cfi::strip, and electronIdCutBased_cfi::threshold.

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

64 {
65  using namespace edm::es;
66 
67  auto threshold = std::make_unique<SiStripThreshold>();
68 
70  for ( const auto& elm : reader->getAllData() ) {
71  //Generate Thresholds for det detid
72  SiStripThreshold::Container theSiStripVector;
73  uint16_t strip=0;
74 
75  threshold->setData(strip, m_lTh, m_hTh, m_cTh, theSiStripVector);
76  LogDebug("SiStripThresholdFakeESSource::produce") << "detid: " << elm.first << " \t"
77  << "firstStrip: " << strip << " \t" << theSiStripVector.back().getFirstStrip() << " \t"
78  << "lTh: " << m_lTh << " \t" << theSiStripVector.back().getLth() << " \t"
79  << "hTh: " << m_hTh << " \t" << theSiStripVector.back().getHth() << " \t"
80  << "FirstStrip_and_Hth: " << theSiStripVector.back().FirstStrip_and_Hth << " \t";
81 
82  if ( ! threshold->put(elm.first, theSiStripVector) ) {
83  edm::LogError("SiStripThresholdFakeESSource::produce ") << " detid already exists";
84  }
85  }
86 
87  return threshold;
88 }
#define LogDebug(id)
std::vector< Data > Container
void SiStripThresholdFakeESSource::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue iov,
edm::ValidityInterval iValidity 
)
overridevirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 56 of file SiStripThresholdFakeESSource.cc.

References edm::IOVSyncValue::beginOfTime(), and edm::IOVSyncValue::endOfTime().

57 {
58  iValidity = edm::ValidityInterval{iov.beginOfTime(), iov.endOfTime()};
59 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88

Member Data Documentation

float SiStripThresholdFakeESSource::m_cTh
private

Definition at line 38 of file SiStripThresholdFakeESSource.cc.

Referenced by produce(), and SiStripThresholdFakeESSource().

float SiStripThresholdFakeESSource::m_hTh
private

Definition at line 37 of file SiStripThresholdFakeESSource.cc.

Referenced by produce(), and SiStripThresholdFakeESSource().

float SiStripThresholdFakeESSource::m_lTh
private

Definition at line 36 of file SiStripThresholdFakeESSource.cc.

Referenced by produce(), and SiStripThresholdFakeESSource().