test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
SiStripConfObjectFakeESSource Class Reference
Inheritance diagram for SiStripConfObjectFakeESSource:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef std::shared_ptr
< SiStripConfObject
ReturnType
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey,
edm::propagate_const
< std::shared_ptr< DataProxy > > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 

Public Member Functions

ReturnType produce (const SiStripConfObjectRcd &)
 
void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &iov, edm::ValidityInterval &iValidity)
 
 SiStripConfObjectFakeESSource (const edm::ParameterSet &)
 
 ~SiStripConfObjectFakeESSource ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()(false)
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer () noexcept(false)
 
- 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::ComponentDescription
descriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set
< eventsetup::EventSetupRecordKey
findingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Private Attributes

edm::FileInPath m_file
 
std::vector< edm::ParameterSetm_parameters
 

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())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 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" SiStripConfObject ESProducer - fixed value from configuration for conf object

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

Definition at line 25 of file SiStripConfObjectFakeESSource.cc.

Member Typedef Documentation

Definition at line 32 of file SiStripConfObjectFakeESSource.cc.

Constructor & Destructor Documentation

SiStripConfObjectFakeESSource::SiStripConfObjectFakeESSource ( const edm::ParameterSet iConfig)

Definition at line 42 of file SiStripConfObjectFakeESSource.cc.

References edm::ParameterSet::getParameter(), m_file, m_parameters, and edm::ESProducer::setWhatProduced().

43 {
44  setWhatProduced(this);
45  findingRecord<SiStripConfObjectRcd>();
46 
47  m_parameters = iConfig.getParameter<std::vector<edm::ParameterSet>>("Parameters");
48  m_file = iConfig.getParameter<edm::FileInPath>("file");
49 }
T getParameter(std::string const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::vector< edm::ParameterSet > m_parameters
SiStripConfObjectFakeESSource::~SiStripConfObjectFakeESSource ( )

Definition at line 51 of file SiStripConfObjectFakeESSource.cc.

51 {}

Member Function Documentation

SiStripConfObjectFakeESSource::ReturnType SiStripConfObjectFakeESSource::produce ( const SiStripConfObjectRcd iRecord)

Definition at line 60 of file SiStripConfObjectFakeESSource.cc.

References DEFINE_FWK_EVENTSETUP_SOURCE, m_parameters, and AlCaHLTBitMon_QueryRunRegistry::string.

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

61 {
62  using namespace edm::es;
63 
64  std::shared_ptr<SiStripConfObject> confObject{new SiStripConfObject};
65 
66  for ( const auto& param : m_parameters ) {
67  const std::string paramType{param.getParameter<std::string>("ParameterType")};
68  const std::string paramName{param.getParameter<std::string>("ParameterName")};
69  if( paramType == "int" ) {
70  confObject->put(paramName, param.getParameter<int32_t>("ParameterValue"));
71  }
72  else if( paramType == "double" ) {
73  confObject->put(paramName, param.getParameter<double>("ParameterValue"));
74  }
75  else if( paramType == "string" ) {
76  confObject->put(paramName, param.getParameter<std::string>("ParameterValue"));
77  }
78  else if( paramType == "bool" ) {
79  confObject->put(paramName, param.getParameter<bool>("ParameterValue"));
80  }
81  else if( paramType == "vint32" ) {
82  confObject->put(paramName, param.getParameter<std::vector<int> >("ParameterValue"));
83  }
84  else if( paramType == "vstring" ) {
85  confObject->put(paramName, param.getParameter<std::vector<std::string> >("ParameterValue"));
86  }
87  }
88 
89  return confObject;
90 }
std::vector< edm::ParameterSet > m_parameters
void SiStripConfObjectFakeESSource::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue iov,
edm::ValidityInterval iValidity 
)
virtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 53 of file SiStripConfObjectFakeESSource.cc.

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

54 {
55  iValidity = edm::ValidityInterval{iov.beginOfTime(), iov.endOfTime()};
56 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
static const IOVSyncValue & beginOfTime()

Member Data Documentation

edm::FileInPath SiStripConfObjectFakeESSource::m_file
private

Definition at line 37 of file SiStripConfObjectFakeESSource.cc.

Referenced by SiStripConfObjectFakeESSource().

std::vector<edm::ParameterSet> SiStripConfObjectFakeESSource::m_parameters
private

Definition at line 36 of file SiStripConfObjectFakeESSource.cc.

Referenced by produce(), and SiStripConfObjectFakeESSource().