#include <SiStripConfObjectGenerator.h>
Public Member Functions | |
void | getObj (SiStripConfObject *&obj) |
SiStripConfObjectGenerator (const edm::ParameterSet &, const edm::ActivityRegistry &) | |
~SiStripConfObjectGenerator () | |
Private Member Functions | |
void | createObject () |
Private Attributes | |
std::vector< edm::ParameterSet > | parameters_ |
Fake generator for configuration parameters stored in the SiStripConfObject object.
Definition at line 15 of file SiStripConfObjectGenerator.h.
SiStripConfObjectGenerator::SiStripConfObjectGenerator | ( | const edm::ParameterSet & | iConfig, |
const edm::ActivityRegistry & | aReg | ||
) | [explicit] |
Definition at line 4 of file SiStripConfObjectGenerator.cc.
: SiStripCondObjBuilderBase<SiStripConfObject>::SiStripCondObjBuilderBase(iConfig) { edm::LogInfo("SiStripConfObjectGenerator") << "[SiStripConfObjectGenerator::SiStripConfObjectGenerator]"; }
SiStripConfObjectGenerator::~SiStripConfObjectGenerator | ( | ) |
Definition at line 10 of file SiStripConfObjectGenerator.cc.
{ edm::LogInfo("SiStripConfObjectGenerator") << "[SiStripConfObjectGenerator::~SiStripConfObjectGenerator]"; }
void SiStripConfObjectGenerator::createObject | ( | ) | [private] |
Definition at line 15 of file SiStripConfObjectGenerator.cc.
References SiStripCondObjBuilderBase< SiStripConfObject >::_pset, edm::ParameterSet::getParameter(), SiStripCondObjBuilderBase< SiStripConfObject >::obj_, parameters_, and SiStripConfObject::put().
Referenced by getObj().
{ parameters_ = _pset.getParameter<std::vector<edm::ParameterSet> >("Parameters"); std::vector<edm::ParameterSet>::const_iterator parIt = parameters_.begin(); obj_ = new SiStripConfObject(); for( ; parIt != parameters_.end(); ++parIt ) { if( parIt->getParameter<std::string>("ParameterType") == "int" ) { obj_->put(parIt->getParameter<std::string>("ParameterName"), parIt->getParameter<int32_t>("ParameterValue")); } else if( parIt->getParameter<std::string>("ParameterType") == "double" ) { obj_->put(parIt->getParameter<std::string>("ParameterName"), parIt->getParameter<double>("ParameterValue")); } if( parIt->getParameter<std::string>("ParameterType") == "string" ) { obj_->put(parIt->getParameter<std::string>("ParameterName"), parIt->getParameter<std::string>("ParameterValue")); } } }
void SiStripConfObjectGenerator::getObj | ( | SiStripConfObject *& | obj | ) | [inline, virtual] |
Returns the CondObj
Reimplemented from SiStripCondObjBuilderBase< SiStripConfObject >.
Definition at line 21 of file SiStripConfObjectGenerator.h.
References createObject(), and SiStripCondObjBuilderBase< SiStripConfObject >::obj_.
{createObject(); obj=obj_;}
std::vector<edm::ParameterSet> SiStripConfObjectGenerator::parameters_ [private] |
Definition at line 27 of file SiStripConfObjectGenerator.h.
Referenced by createObject().