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 ()
 
 ~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
 
edm::FileInPath m_file
 
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
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 &)
 
- 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 45 of file SiStripThresholdFakeESSource.cc.

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

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

Definition at line 56 of file SiStripThresholdFakeESSource.cc.

56 {}

Member Function Documentation

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

Definition at line 65 of file SiStripThresholdFakeESSource.cc.

References DEFINE_FWK_EVENTSETUP_SOURCE, edm::FileInPath::fullPath(), LogDebug, m_cTh, m_file, 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().

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

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 58 of file SiStripThresholdFakeESSource.cc.

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

59 {
60  iValidity = edm::ValidityInterval{iov.beginOfTime(), iov.endOfTime()};
61 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
static const IOVSyncValue & beginOfTime()

Member Data Documentation

float SiStripThresholdFakeESSource::m_cTh
private

Definition at line 38 of file SiStripThresholdFakeESSource.cc.

Referenced by produce(), and SiStripThresholdFakeESSource().

edm::FileInPath SiStripThresholdFakeESSource::m_file
private

Definition at line 39 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().