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

SiStripConfObjectcreateObject ()
 

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

SiStripConfObject * SiStripConfObjectGenerator::createObject ( )
private

Definition at line 15 of file SiStripConfObjectGenerator.cc.

References SiStripCondObjBuilderBase< SiStripConfObject >::_pset, edm::ParameterSet::getParameter(), getGTfromDQMFile::obj, parameters_, SiStripConfObject::put(), and AlCaHLTBitMon_QueryRunRegistry::string.

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();
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  else if( parIt->getParameter<std::string>("ParameterType") == "string" ) {
28  obj->put(parIt->getParameter<std::string>("ParameterName"), parIt->getParameter<std::string>("ParameterValue"));
29  }
30  else if( parIt->getParameter<std::string>("ParameterType") == "bool" ) {
31  obj->put(parIt->getParameter<std::string>("ParameterName"), parIt->getParameter<bool>("ParameterValue"));
32  }
33  else if( parIt->getParameter<std::string>("ParameterType") == "vint32" ) {
34  obj->put(parIt->getParameter<std::string>("ParameterName"), parIt->getParameter<std::vector<int> >("ParameterValue"));
35  }
36  else if( parIt->getParameter<std::string>("ParameterType") == "vstring" ) {
37  obj->put(parIt->getParameter<std::string>("ParameterName"), parIt->getParameter<std::vector<std::string> >("ParameterValue"));
38  }
39  }
40  return obj;
41 }
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

Returns the CondObj

Reimplemented from SiStripCondObjBuilderBase< SiStripConfObject >.

Definition at line 21 of file SiStripConfObjectGenerator.h.

References createObject().

21 {obj=createObject();}

Member Data Documentation

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