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

Implementation of Simple interface to store generic named parameters of type int, float and string. More...

#include <LCParametersImpl.h>

+ Inheritance diagram for IMPL::LCParametersImpl:

Public Member Functions

 LCParametersImpl ()
 
virtual ~LCParametersImpl ()
 Destructor. More...
 
virtual int getIntVal (const std::string &key) const
 Returns the first integer value for the given key. More...
 
virtual float getFloatVal (const std::string &key) const
 Returns the first float value for the given key. More...
 
virtual double getDoubleVal (const std::string &key) const
 Returns the first double value for the given key. More...
 
virtual const std::stringgetStringVal (const std::string &key) const
 Returns the first string value for the given key. More...
 
virtual EVENT::IntVecgetIntVals (const std::string &key, EVENT::IntVec &values) const
 Adds all integer values for the given key to values. More...
 
virtual EVENT::FloatVecgetFloatVals (const std::string &key, EVENT::FloatVec &values) const
 Adds all float values for the given key to values. More...
 
virtual EVENT::DoubleVecgetDoubleVals (const std::string &key, EVENT::DoubleVec &values) const
 Adds all double values for the given key to values. More...
 
virtual EVENT::StringVecgetStringVals (const std::string &key, EVENT::StringVec &values) const
 Adds all string values for the given key to values. More...
 
virtual const EVENT::StringVecgetIntKeys (EVENT::StringVec &keys) const
 Returns a list of all keys of integer parameters. More...
 
virtual const EVENT::StringVecgetFloatKeys (EVENT::StringVec &keys) const
 Returns a list of all keys of float parameters. More...
 
virtual const EVENT::StringVecgetDoubleKeys (EVENT::StringVec &keys) const
 Returns a list of all keys of double parameters. More...
 
virtual const EVENT::StringVecgetStringKeys (EVENT::StringVec &keys) const
 Returns a list of all keys of string parameters. More...
 
virtual int getNInt (const std::string &key) const
 The number of integer values stored for this key. More...
 
virtual int getNFloat (const std::string &key) const
 The number of float values stored for this key. More...
 
virtual int getNDouble (const std::string &key) const
 The number of double values stored for this key. More...
 
virtual int getNString (const std::string &key) const
 The number of string values stored for this key. More...
 
virtual void setValue (const std::string &key, int value)
 Set integer value for the given key. More...
 
virtual void setValue (const std::string &key, float value)
 Set float value for the given key. More...
 
virtual void setValue (const std::string &key, double value)
 Set double value for the given key. More...
 
virtual void setValue (const std::string &key, const std::string &value)
 Set string value for the given key. More...
 
virtual void setValues (const std::string &key, const EVENT::IntVec &values)
 Set integer values for the given key. More...
 
virtual void setValues (const std::string &key, const EVENT::FloatVec &values)
 Set float values for the given key. More...
 
virtual void setValues (const std::string &key, const EVENT::DoubleVec &values)
 Set double values for the given key. More...
 
virtual void setValues (const std::string &key, const EVENT::StringVec &values)
 Set string values for the given key. More...
 
- Public Member Functions inherited from EVENT::LCParameters
virtual ~LCParameters ()
 Destructor. More...
 
- Public Member Functions inherited from IMPL::AccessChecked
 AccessChecked ()
 
virtual ~AccessChecked ()
 
virtual int simpleUID () const
 

Protected Attributes

IntMap _intMap {}
 
FloatMap _floatMap {}
 
DoubleMap _doubleMap {}
 
StringMap _stringMap {}
 
- Protected Attributes inherited from IMPL::AccessChecked
bool _readOnly {false}
 
int _id {-1}
 

Friends

class LCRunHeaderImpl
 
class LCEventImpl
 
class LCCollectionVec
 

Additional Inherited Members

- Protected Member Functions inherited from IMPL::AccessChecked
virtual void setReadOnly (bool readOnly)
 
void checkAccess ()
 
void checkAccess (const char *what)
 
- Static Protected Attributes inherited from IMPL::AccessChecked
static std::atomic_int _lCObjectId
 

Detailed Description

Implementation of Simple interface to store generic named parameters of type int, float and string.

It can be used to store (user) meta data that is run, event or collection dependent.

Author
gaede
Version
Jun 23, 2004
See Also
LCRunHeader.parameters()
LCEvent.parameters()
LCCollection.parameters()

Definition at line 36 of file LCParametersImpl.h.

Constructor & Destructor Documentation

IMPL::LCParametersImpl::LCParametersImpl ( )

Definition at line 10 of file LCParametersImpl.cc.

virtual IMPL::LCParametersImpl::~LCParametersImpl ( )
inlinevirtual

Destructor.

Definition at line 47 of file LCParametersImpl.h.

Member Function Documentation

const StringVec & IMPL::LCParametersImpl::getDoubleKeys ( EVENT::StringVec keys) const
virtual

Returns a list of all keys of double parameters.

Implements EVENT::LCParameters.

Definition at line 123 of file LCParametersImpl.cc.

References std::vector< T >::push_back().

double IMPL::LCParametersImpl::getDoubleVal ( const std::string key) const
virtual

Returns the first double value for the given key.

Implements EVENT::LCParameters.

Definition at line 36 of file LCParametersImpl.cc.

DoubleVec & IMPL::LCParametersImpl::getDoubleVals ( const std::string key,
EVENT::DoubleVec values 
) const
virtual

Adds all double values for the given key to values.

Returns a reference to values for convenience.

Implements EVENT::LCParameters.

Definition at line 81 of file LCParametersImpl.cc.

References std::vector< T >::end(), and std::vector< T >::insert().

const StringVec & IMPL::LCParametersImpl::getFloatKeys ( EVENT::StringVec keys) const
virtual

Returns a list of all keys of float parameters.

Implements EVENT::LCParameters.

Definition at line 113 of file LCParametersImpl.cc.

References std::vector< T >::push_back().

float IMPL::LCParametersImpl::getFloatVal ( const std::string key) const
virtual

Returns the first float value for the given key.

Implements EVENT::LCParameters.

Definition at line 25 of file LCParametersImpl.cc.

Referenced by IMPL::LCEventImpl::getWeight().

FloatVec & IMPL::LCParametersImpl::getFloatVals ( const std::string key,
EVENT::FloatVec values 
) const
virtual

Adds all float values for the given key to values.

Returns a reference to values for convenience.

Implements EVENT::LCParameters.

Definition at line 71 of file LCParametersImpl.cc.

References std::vector< T >::end(), and std::vector< T >::insert().

const StringVec & IMPL::LCParametersImpl::getIntKeys ( EVENT::StringVec keys) const
virtual

Returns a list of all keys of integer parameters.

Implements EVENT::LCParameters.

Definition at line 102 of file LCParametersImpl.cc.

References std::vector< T >::push_back().

int IMPL::LCParametersImpl::getIntVal ( const std::string key) const
virtual

Returns the first integer value for the given key.

Implements EVENT::LCParameters.

Definition at line 14 of file LCParametersImpl.cc.

IntVec & IMPL::LCParametersImpl::getIntVals ( const std::string key,
EVENT::IntVec values 
) const
virtual

Adds all integer values for the given key to values.

Returns a reference to values for convenience.

Implements EVENT::LCParameters.

Definition at line 60 of file LCParametersImpl.cc.

References std::vector< T >::end(), and std::vector< T >::insert().

int IMPL::LCParametersImpl::getNDouble ( const std::string key) const
virtual

The number of double values stored for this key.

Implements EVENT::LCParameters.

Definition at line 163 of file LCParametersImpl.cc.

int IMPL::LCParametersImpl::getNFloat ( const std::string key) const
virtual

The number of float values stored for this key.

Implements EVENT::LCParameters.

Definition at line 153 of file LCParametersImpl.cc.

References std::string::find().

int IMPL::LCParametersImpl::getNInt ( const std::string key) const
virtual

The number of integer values stored for this key.

Implements EVENT::LCParameters.

Definition at line 143 of file LCParametersImpl.cc.

References std::vector< T >::size().

int IMPL::LCParametersImpl::getNString ( const std::string key) const
virtual

The number of string values stored for this key.

Implements EVENT::LCParameters.

Definition at line 173 of file LCParametersImpl.cc.

const StringVec & IMPL::LCParametersImpl::getStringKeys ( EVENT::StringVec keys) const
virtual

Returns a list of all keys of string parameters.

Implements EVENT::LCParameters.

Definition at line 133 of file LCParametersImpl.cc.

References std::vector< T >::push_back().

const std::string & IMPL::LCParametersImpl::getStringVal ( const std::string key) const
virtual

Returns the first string value for the given key.

Implements EVENT::LCParameters.

Definition at line 47 of file LCParametersImpl.cc.

StringVec & IMPL::LCParametersImpl::getStringVals ( const std::string key,
EVENT::StringVec values 
) const
virtual

Adds all string values for the given key to values.

Returns a reference to values for convenience.

Implements EVENT::LCParameters.

Definition at line 91 of file LCParametersImpl.cc.

References std::string::begin(), std::vector< T >::end(), and std::vector< T >::insert().

void IMPL::LCParametersImpl::setValue ( const std::string key,
int  value 
)
virtual

Set integer value for the given key.

Implements EVENT::LCParameters.

Definition at line 183 of file LCParametersImpl.cc.

Referenced by IMPL::LCEventImpl::setWeight().

void IMPL::LCParametersImpl::setValue ( const std::string key,
float  value 
)
virtual

Set float value for the given key.

Implements EVENT::LCParameters.

Definition at line 190 of file LCParametersImpl.cc.

void IMPL::LCParametersImpl::setValue ( const std::string key,
double  value 
)
virtual

Set double value for the given key.

Implements EVENT::LCParameters.

Definition at line 197 of file LCParametersImpl.cc.

void IMPL::LCParametersImpl::setValue ( const std::string key,
const std::string value 
)
virtual

Set string value for the given key.

Implements EVENT::LCParameters.

Definition at line 204 of file LCParametersImpl.cc.

void IMPL::LCParametersImpl::setValues ( const std::string key,
const EVENT::IntVec values 
)
virtual

Set integer values for the given key.

Implements EVENT::LCParameters.

Definition at line 214 of file LCParametersImpl.cc.

References std::vector< T >::begin(), and std::vector< T >::end().

void IMPL::LCParametersImpl::setValues ( const std::string key,
const EVENT::FloatVec values 
)
virtual

Set float values for the given key.

Implements EVENT::LCParameters.

Definition at line 224 of file LCParametersImpl.cc.

References std::vector< T >::begin(), and std::vector< T >::end().

void IMPL::LCParametersImpl::setValues ( const std::string key,
const EVENT::DoubleVec values 
)
virtual

Set double values for the given key.

Implements EVENT::LCParameters.

Definition at line 234 of file LCParametersImpl.cc.

References std::vector< T >::begin(), and std::vector< T >::end().

void IMPL::LCParametersImpl::setValues ( const std::string key,
const EVENT::StringVec values 
)
virtual

Set string values for the given key.

Implements EVENT::LCParameters.

Definition at line 244 of file LCParametersImpl.cc.

References std::vector< T >::begin(), and std::vector< T >::end().

Friends And Related Function Documentation

friend class LCCollectionVec
friend

Definition at line 40 of file LCParametersImpl.h.

friend class LCEventImpl
friend

Definition at line 39 of file LCParametersImpl.h.

friend class LCRunHeaderImpl
friend

Definition at line 38 of file LCParametersImpl.h.

Member Data Documentation

DoubleMap IMPL::LCParametersImpl::_doubleMap {}
mutableprotected

Definition at line 154 of file LCParametersImpl.h.

FloatMap IMPL::LCParametersImpl::_floatMap {}
mutableprotected

Definition at line 153 of file LCParametersImpl.h.

IntMap IMPL::LCParametersImpl::_intMap {}
mutableprotected

Definition at line 152 of file LCParametersImpl.h.

StringMap IMPL::LCParametersImpl::_stringMap {}
mutableprotected

Definition at line 155 of file LCParametersImpl.h.


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