LCIO
02.17
|
Helper class for setting and retrieving an std::map<string,int> as collection parameters. More...
#include <CollectionParameterMap.h>
Public Types | |
typedef std::map< std::string, int > | map_type |
Public Member Functions | |
CollectionParameterMap ()=default | |
CollectionParameterMap (const CollectionParameterMap &)=delete | |
CollectionParameterMap & | operator= (const CollectionParameterMap &)=delete |
CollectionParameterMap (const std::string &keyName, const std::string &valueName, EVENT::LCCollection *col) | |
Create CollectionParameterMap for given collection - read the collection parameters keyName and valueName if they exist. More... | |
CollectionParameterMap (const std::string &keyName, const std::string &valueName, const EVENT::LCCollection *col) | |
Create CollectionParameterMap for given collection - read the collection parameters keyName and valueName if they exist. More... | |
~CollectionParameterMap () | |
Update the collection parameters keyName and valueName when going out of scope. More... | |
map_type & | map () |
The std::map< std::string, int >. More... | |
Protected Member Functions | |
void | init (const EVENT::LCCollection *col) |
Protected Attributes | |
std::string | _keyName {} |
std::string | _valueName {} |
EVENT::LCCollection * | _col {NULL} |
map_type | _map {} |
Helper class for setting and retrieving an std::map<string,int> as collection parameters.
Depending on which constructor was used the collection parameters will be updated if an object of this class goes out of scope. The corresponding collection parameters will hold the current state of the map. If the a const LCCollection* was specified (read use case) no parameters will be updated.
Definition at line 23 of file CollectionParameterMap.h.
typedef std::map< std::string, int > UTIL::CollectionParameterMap::map_type |
Definition at line 30 of file CollectionParameterMap.h.
|
default |
|
delete |
UTIL::CollectionParameterMap::CollectionParameterMap | ( | const std::string & | keyName, |
const std::string & | valueName, | ||
EVENT::LCCollection * | col | ||
) |
Create CollectionParameterMap for given collection - read the collection parameters keyName and valueName if they exist.
Definition at line 12 of file CollectionParameterMap.cc.
References init().
UTIL::CollectionParameterMap::CollectionParameterMap | ( | const std::string & | keyName, |
const std::string & | valueName, | ||
const EVENT::LCCollection * | col | ||
) |
Create CollectionParameterMap for given collection - read the collection parameters keyName and valueName if they exist.
Definition at line 23 of file CollectionParameterMap.cc.
References init().
UTIL::CollectionParameterMap::~CollectionParameterMap | ( | ) |
Update the collection parameters keyName and valueName when going out of scope.
Definition at line 65 of file CollectionParameterMap.cc.
References _col, _keyName, _map, _valueName, std::map< K, T >::begin(), std::map< K, T >::end(), EVENT::LCCollection::parameters(), std::vector< T >::push_back(), and EVENT::LCParameters::setValues().
|
protected |
Definition at line 33 of file CollectionParameterMap.cc.
References _keyName, _map, _valueName, EVENT::LCParameters::getIntVals(), EVENT::LCCollection::getParameters(), EVENT::LCParameters::getStringVals(), std::map< K, T >::insert(), std::make_pair(), std::vector< T >::size(), and std::stringstream::str().
Referenced by CollectionParameterMap().
|
inline |
The std::map< std::string, int >.
Definition at line 48 of file CollectionParameterMap.h.
References _map.
Referenced by UTIL::PIDHandler::addAlgorithm(), UTIL::PIDHandler::getAlgorithmID(), and UTIL::PIDHandler::init().
|
delete |
|
protected |
Definition at line 58 of file CollectionParameterMap.h.
Referenced by ~CollectionParameterMap().
|
protected |
Definition at line 56 of file CollectionParameterMap.h.
Referenced by init(), and ~CollectionParameterMap().
|
protected |
Definition at line 59 of file CollectionParameterMap.h.
Referenced by init(), map(), and ~CollectionParameterMap().
|
protected |
Definition at line 57 of file CollectionParameterMap.h.
Referenced by init(), and ~CollectionParameterMap().