LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
UTIL::CollectionParameterMap Class Reference

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
 
CollectionParameterMapoperator= (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_typemap ()
 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 {}
 

Detailed Description

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.

See Also
LCCollection::getParameters()
LCParameters
Author
F.Gaede, DESY
Version
Id:
CollectionParameterMap.h,v 1.1 2008-05-30 13:26:16 gaede Exp

Definition at line 23 of file CollectionParameterMap.h.

Member Typedef Documentation

Definition at line 30 of file CollectionParameterMap.h.

Constructor & Destructor Documentation

UTIL::CollectionParameterMap::CollectionParameterMap ( )
default
UTIL::CollectionParameterMap::CollectionParameterMap ( const CollectionParameterMap )
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().

Member Function Documentation

void UTIL::CollectionParameterMap::init ( const EVENT::LCCollection col)
protected
map_type& UTIL::CollectionParameterMap::map ( )
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().

CollectionParameterMap& UTIL::CollectionParameterMap::operator= ( const CollectionParameterMap )
delete

Member Data Documentation

EVENT::LCCollection* UTIL::CollectionParameterMap::_col {NULL}
protected

Definition at line 58 of file CollectionParameterMap.h.

Referenced by ~CollectionParameterMap().

std::string UTIL::CollectionParameterMap::_keyName {}
protected

Definition at line 56 of file CollectionParameterMap.h.

Referenced by init(), and ~CollectionParameterMap().

map_type UTIL::CollectionParameterMap::_map {}
protected

Definition at line 59 of file CollectionParameterMap.h.

Referenced by init(), map(), and ~CollectionParameterMap().

std::string UTIL::CollectionParameterMap::_valueName {}
protected

Definition at line 57 of file CollectionParameterMap.h.

Referenced by init(), and ~CollectionParameterMap().


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