Marlin  01.17.01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
marlin::CMProcessor Class Reference

This singleton class contains an instance of every available marlin processor type. More...

#include <CMProcessor.h>

Public Member Functions

 ~CMProcessor ()
 
ProcessorgetProc (const std::string &type)
 returns the instance of the processor with the given type More...
 
ssMap getProcDesc ()
 returns a map with the processor descriptions More...
 
std::shared_ptr< StringParametersgetSParams (const std::string &type)
 returns the parameters for the processor of the given type More...
 
std::shared_ptr< StringParametersmergeParams (const std::string &type, std::shared_ptr< StringParameters > sp)
 merges the given parameters with the default ones from the processor with the given type More...
 
ProcessorParametergetParam (const std::string &type, const std::string &key)
 returns the parameter with the given key of the processor with the given type More...
 
const std::string getParamD (const std::string &type, const std::string &key)
 returns the description of the parameter with the given key for the processor with the given type More...
 
const std::string getParamT (const std::string &type, const std::string &key)
 returns the type of the parameter with the given key for the processor with the given type More...
 
int getParamSetSize (const std::string &type, const std::string &key)
 returns the set_size of the parameter with the given key for the processor with the given type More...
 
bool isParamVec (const std::string &type, const std::string &key)
 returns true if the parameter with the given key for the processor with the given type is a vector More...
 
bool isParamOpt (const std::string &type, const std::string &key)
 returns true if the parameter with the given key for the processor with the given type is optional More...
 
bool isInstalled (const std::string &type)
 returns true if the processor with the given type is installed More...
 
void tokenize (const std::string str, StringVec &tokens, const std::string &delimiters=" ")
 

Static Public Member Functions

static CMProcessorinstance ()
 return the instance of this class More...
 

Private Member Functions

 CMProcessor ()
 

Private Attributes

ProcessorMap _mProcs {}
 
ssMap _mpDescriptions {}
 
sbMap _mpStatus {}
 
sSPMap _mpSParameters {}
 
sSet _mpTypes {}
 

Static Private Attributes

static CMProcessor_me = NULL
 

Detailed Description

This singleton class contains an instance of every available marlin processor type.

Author
Jan Engels, DESY
Version
Id:
CMProcessor.h,v 1.8 2007-01-11 16:56:37 engels Exp

Definition at line 21 of file CMProcessor.h.

Constructor & Destructor Documentation

marlin::CMProcessor::~CMProcessor ( )

Definition at line 83 of file CMProcessor.cc.

marlin::CMProcessor::CMProcessor ( )
private

Member Function Documentation

ProcessorParameter * marlin::CMProcessor::getParam ( const std::string type,
const std::string key 
)

returns the parameter with the given key of the processor with the given type

Definition at line 152 of file CMProcessor.cc.

References std::end().

Referenced by marlin::CCProcessor::writeToXML().

const string marlin::CMProcessor::getParamD ( const std::string type,
const std::string key 
)

returns the description of the parameter with the given key for the processor with the given type

Definition at line 165 of file CMProcessor.cc.

References marlin::ProcessorParameter::description().

Referenced by Dialog::setupViews(), Dialog::updateParam(), NParamVecSet::updateTable(), and marlin::CCProcessor::writeToXML().

int marlin::CMProcessor::getParamSetSize ( const std::string type,
const std::string key 
)

returns the set_size of the parameter with the given key for the processor with the given type

Definition at line 181 of file CMProcessor.cc.

References marlin::ProcessorParameter::setSize().

Referenced by NParamVecSet::addValSet(), NParamVecSet::remValSet(), NParamVecSetD::setModelData(), Dialog::setupViews(), Dialog::updateParam(), NParamVecSet::updateTable(), and marlin::CCProcessor::writeToXML().

const string marlin::CMProcessor::getParamT ( const std::string type,
const std::string key 
)

returns the type of the parameter with the given key for the processor with the given type

Definition at line 173 of file CMProcessor.cc.

References marlin::ProcessorParameter::type().

Processor * marlin::CMProcessor::getProc ( const std::string type)

returns the instance of the processor with the given type

Definition at line 92 of file CMProcessor.cc.

Referenced by marlin::CCProcessor::setMarlinProc().

ssMap marlin::CMProcessor::getProcDesc ( )
inline

returns a map with the processor descriptions

Definition at line 34 of file CMProcessor.h.

References _mpDescriptions.

Referenced by APDialog::APDialog().

std::shared_ptr< StringParameters > marlin::CMProcessor::getSParams ( const std::string type)

returns the parameters for the processor of the given type

Definition at line 99 of file CMProcessor.cc.

CMProcessor * marlin::CMProcessor::instance ( )
static
bool marlin::CMProcessor::isInstalled ( const std::string type)

returns true if the processor with the given type is installed

Definition at line 85 of file CMProcessor.cc.

Referenced by APDialog::APDialog().

bool marlin::CMProcessor::isParamOpt ( const std::string type,
const std::string key 
)

returns true if the parameter with the given key for the processor with the given type is optional

Definition at line 189 of file CMProcessor.cc.

References marlin::ProcessorParameter::isOptional().

Referenced by NParamVecSet::remValSet(), Dialog::setupViews(), and Dialog::updateParam().

bool marlin::CMProcessor::isParamVec ( const std::string type,
const std::string key 
)

returns true if the parameter with the given key for the processor with the given type is a vector

Definition at line 198 of file CMProcessor.cc.

References marlin::ProcessorParameter::type().

Referenced by Dialog::setupViews().

std::shared_ptr< StringParameters > marlin::CMProcessor::mergeParams ( const std::string type,
std::shared_ptr< StringParameters sp 
)

merges the given parameters with the default ones from the processor with the given type

Definition at line 106 of file CMProcessor.cc.

References std::vector< T >::push_back(), and std::vector< T >::size().

void marlin::CMProcessor::tokenize ( const std::string  str,
StringVec tokens,
const std::string delimiters = " " 
)

Member Data Documentation

CMProcessor * marlin::CMProcessor::_me = NULL
staticprivate

Definition at line 77 of file CMProcessor.h.

ssMap marlin::CMProcessor::_mpDescriptions {}
private

Definition at line 79 of file CMProcessor.h.

Referenced by getProcDesc().

ProcessorMap marlin::CMProcessor::_mProcs {}
private

Definition at line 78 of file CMProcessor.h.

sSPMap marlin::CMProcessor::_mpSParameters {}
private

Definition at line 81 of file CMProcessor.h.

sbMap marlin::CMProcessor::_mpStatus {}
private

Definition at line 80 of file CMProcessor.h.

sSet marlin::CMProcessor::_mpTypes {}
private

Definition at line 83 of file CMProcessor.h.


The documentation for this class was generated from the following files: