CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiStripConfObjectGenerator Class Reference

#include <SiStripConfObjectGenerator.h>

Inheritance diagram for SiStripConfObjectGenerator:
SiStripCondObjBuilderBase< SiStripConfObject >

Public Member Functions

void getObj (SiStripConfObject *&obj)
 
 SiStripConfObjectGenerator (const edm::ParameterSet &, const edm::ActivityRegistry &)
 
 ~SiStripConfObjectGenerator ()
 
- Public Member Functions inherited from SiStripCondObjBuilderBase< SiStripConfObject >
virtual bool checkForCompatibility (std::string ss)
 
virtual void getMetaDataString (std::stringstream &ss)
 
virtual void initialize ()
 
 SiStripCondObjBuilderBase (const edm::ParameterSet &pset)
 
virtual ~SiStripCondObjBuilderBase ()
 

Private Member Functions

void createObject ()
 

Private Attributes

std::vector< edm::ParameterSetparameters_
 

Additional Inherited Members

- Protected Attributes inherited from SiStripCondObjBuilderBase< SiStripConfObject >
edm::ParameterSet _pset
 
SiStripConfObjectobj_
 

Detailed Description

Fake generator for configuration parameters stored in the SiStripConfObject object.

Definition at line 15 of file SiStripConfObjectGenerator.h.

Constructor & Destructor Documentation

SiStripConfObjectGenerator::SiStripConfObjectGenerator ( const edm::ParameterSet iConfig,
const edm::ActivityRegistry aReg 
)
explicit

Definition at line 4 of file SiStripConfObjectGenerator.cc.

4  :
6 {
7  edm::LogInfo("SiStripConfObjectGenerator") << "[SiStripConfObjectGenerator::SiStripConfObjectGenerator]";
8 }
SiStripCondObjBuilderBase(const edm::ParameterSet &pset)
SiStripConfObjectGenerator::~SiStripConfObjectGenerator ( )

Definition at line 10 of file SiStripConfObjectGenerator.cc.

11 {
12  edm::LogInfo("SiStripConfObjectGenerator") << "[SiStripConfObjectGenerator::~SiStripConfObjectGenerator]";
13 }

Member Function Documentation

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 Vispa.Views.LineDecayView.LineDecayContainer::dropEvent(), and getObj().

16 {
17  parameters_ = _pset.getParameter<std::vector<edm::ParameterSet> >("Parameters");
18  std::vector<edm::ParameterSet>::const_iterator parIt = parameters_.begin();
19  obj_ = new SiStripConfObject();
20  for( ; parIt != parameters_.end(); ++parIt ) {
21  if( parIt->getParameter<std::string>("ParameterType") == "int" ) {
22  obj_->put(parIt->getParameter<std::string>("ParameterName"), parIt->getParameter<int32_t>("ParameterValue"));
23  }
24  else if( parIt->getParameter<std::string>("ParameterType") == "double" ) {
25  obj_->put(parIt->getParameter<std::string>("ParameterName"), parIt->getParameter<double>("ParameterValue"));
26  }
27  if( parIt->getParameter<std::string>("ParameterType") == "string" ) {
28  obj_->put(parIt->getParameter<std::string>("ParameterName"), parIt->getParameter<std::string>("ParameterValue"));
29  }
30  }
31 }
T getParameter(std::string const &) const
std::vector< edm::ParameterSet > parameters_
bool put(const std::string &name, const valueType &inputValue)
void SiStripConfObjectGenerator::getObj ( SiStripConfObject *&  obj)
inlinevirtual

Member Data Documentation

std::vector<edm::ParameterSet> SiStripConfObjectGenerator::parameters_
private