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

Default LCIO implementation of the interface to store generic user data. More...

#include <LCGenericObjectImpl.h>

+ Inheritance diagram for IMPL::LCGenericObjectImpl:

Public Member Functions

 LCGenericObjectImpl ()
 Variable size c'tor. More...
 
 LCGenericObjectImpl (int nInt, int nFloat, int nDouble)
 Fixed size c'tor. More...
 
virtual ~LCGenericObjectImpl ()
 Destructor. More...
 
virtual int id () const
 Provide default implementation for id. More...
 
virtual int getNInt () const
 Number of integer values stored in this object. More...
 
virtual int getNFloat () const
 Number of float values stored in this object. More...
 
virtual int getNDouble () const
 Number of double values stored in this object. More...
 
virtual int getIntVal (int index) const
 Returns the integer value for the given index. More...
 
virtual float getFloatVal (int index) const
 Returns the float value for the given index. More...
 
virtual double getDoubleVal (int index) const
 Returns the double value for the given index. More...
 
virtual void setIntVal (unsigned index, int value)
 Sets the integer value at the given index. More...
 
virtual void setFloatVal (unsigned index, float value)
 Sets the float value at the given index. More...
 
virtual void setDoubleVal (unsigned index, double value)
 Sets the double value at the given index. More...
 
virtual bool isFixedSize () const
 True if objects of the implementation class have a fixed size, i.e getNInt, getNFloat and getNDouble will return values that are constant during the lifetime of the object. More...
 
virtual const std::string getTypeName () const
 The type name of the user class (typically the class name) More...
 
virtual const std::string getDataDescription () const
 The description string. More...
 
- Public Member Functions inherited from EVENT::LCGenericObject
virtual ~LCGenericObject ()
 Destructor. More...
 
- Public Member Functions inherited from EVENT::LCObject
virtual ~LCObject ()
 Destructor. More...
 
virtual LCObjectclone () const
 Returns an object id for internal (debugging) use in LCIO. More...
 
- Public Member Functions inherited from lcrtrel::LCRTRelations
template<class V >
V::ext_type ext ()
 Provides access to an extension object - the type and ownership is defined by the class V which should be a subtype of LCExtension, LCOwnedExtension, LCExtensionVector, LCExtensionList,... More...
 
template<class V >
const V::ext_type ext () const
 Provides access to an extension object - the type and ownership is defined by the class V which should be a subtype of LCExtension, LCOwnedExtension, LCExtensionVector, LCExtensionList,... More...
 
template<class V >
V::rel_type rel ()
 Provides read access to relations - the object types and their connectivity are defined by the class V which has to be a subtype of either LC1To1Relation, LC1ToNRelation or LCNToNRelation. More...
 
- Public Member Functions inherited from IMPL::AccessChecked
 AccessChecked ()
 
virtual ~AccessChecked ()
 
virtual int simpleUID () const
 

Protected Attributes

std::vector< int > _intVec {}
 
std::vector< float > _floatVec {}
 
std::vector< double > _doubleVec {}
 
bool _isFixedSize {false}
 
- Protected Attributes inherited from IMPL::AccessChecked
bool _readOnly {false}
 
int _id {-1}
 

Static Protected Attributes

static const std::string _typeName = "LCGenericObject"
 
static const std::string _dataDescription = ""
 
- Static Protected Attributes inherited from IMPL::AccessChecked
static std::atomic_int _lCObjectId
 

Additional Inherited Members

- Public Types inherited from EVENT::LCGenericObject
typedef LCGenericObject lcobject_type
 Useful typedef for template programming with LCIO. More...
 
- Public Types inherited from lcrtrel::LCRTRelations
typedef std::type_index ext_index
 
typedef std::shared_ptr< void > ext_type
 
typedef std::map< ext_index,
ext_type
ext_map
 
- Protected Member Functions inherited from IMPL::AccessChecked
virtual void setReadOnly (bool readOnly)
 
void checkAccess ()
 
void checkAccess (const char *what)
 

Detailed Description

Default LCIO implementation of the interface to store generic user data.

Author
gaede
Version
Id:
LCGenericObjectImpl.h,v 1.5 2006-08-04 16:52:46 gaede Exp

Definition at line 18 of file LCGenericObjectImpl.h.

Constructor & Destructor Documentation

IMPL::LCGenericObjectImpl::LCGenericObjectImpl ( )

Variable size c'tor.

Definition at line 14 of file LCGenericObjectImpl.cc.

IMPL::LCGenericObjectImpl::LCGenericObjectImpl ( int  nInt,
int  nFloat,
int  nDouble 
)

Fixed size c'tor.

Definition at line 20 of file LCGenericObjectImpl.cc.

References _doubleVec, _floatVec, _intVec, and std::vector< T >::resize().

virtual IMPL::LCGenericObjectImpl::~LCGenericObjectImpl ( )
inlinevirtual

Destructor.

Definition at line 31 of file LCGenericObjectImpl.h.

Member Function Documentation

const std::string IMPL::LCGenericObjectImpl::getDataDescription ( ) const
virtual

The description string.

A comma separated list of pairs of type identifier, one of 'i','f','d' followed by ':' and an attribute name, e.g. "i:cellId,f:offset,f:gain".

Implements EVENT::LCGenericObject.

Definition at line 76 of file LCGenericObjectImpl.cc.

References _dataDescription.

double IMPL::LCGenericObjectImpl::getDoubleVal ( int  index) const
virtual

Returns the double value for the given index.

Implements EVENT::LCGenericObject.

Definition at line 46 of file LCGenericObjectImpl.cc.

References _doubleVec.

Referenced by UTIL::EventSummary::getD(), and UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::getDoubleVal().

float IMPL::LCGenericObjectImpl::getFloatVal ( int  index) const
virtual
int IMPL::LCGenericObjectImpl::getIntVal ( int  index) const
virtual

Returns the integer value for the given index.

Implements EVENT::LCGenericObject.

Definition at line 38 of file LCGenericObjectImpl.cc.

References _intVec.

Referenced by CalibrationConstant::getCellID(), UTIL::EventSummary::getI(), and UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::getIntVal().

int IMPL::LCGenericObjectImpl::getNDouble ( ) const
virtual

Number of double values stored in this object.

Implements EVENT::LCGenericObject.

Definition at line 34 of file LCGenericObjectImpl.cc.

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

Referenced by UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::LCFixedObject().

int IMPL::LCGenericObjectImpl::getNFloat ( ) const
virtual

Number of float values stored in this object.

Implements EVENT::LCGenericObject.

Definition at line 30 of file LCGenericObjectImpl.cc.

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

Referenced by UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::LCFixedObject().

int IMPL::LCGenericObjectImpl::getNInt ( ) const
virtual

Number of integer values stored in this object.

Implements EVENT::LCGenericObject.

Definition at line 27 of file LCGenericObjectImpl.cc.

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

Referenced by UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::LCFixedObject().

const std::string IMPL::LCGenericObjectImpl::getTypeName ( ) const
virtual

The type name of the user class (typically the class name)

Implements EVENT::LCGenericObject.

Definition at line 72 of file LCGenericObjectImpl.cc.

References _typeName.

virtual int IMPL::LCGenericObjectImpl::id ( ) const
inlinevirtual

Provide default implementation for id.

Reimplemented from EVENT::LCGenericObject.

Definition at line 33 of file LCGenericObjectImpl.h.

References IMPL::AccessChecked::simpleUID().

Referenced by UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::id().

bool IMPL::LCGenericObjectImpl::isFixedSize ( ) const
virtual

True if objects of the implementation class have a fixed size, i.e getNInt, getNFloat and getNDouble will return values that are constant during the lifetime of the object.

Implements EVENT::LCGenericObject.

Definition at line 50 of file LCGenericObjectImpl.cc.

References _isFixedSize.

void IMPL::LCGenericObjectImpl::setDoubleVal ( unsigned  index,
double  value 
)
virtual

Sets the double value at the given index.

Definition at line 66 of file LCGenericObjectImpl.cc.

References _doubleVec, _isFixedSize, std::vector< T >::resize(), and std::vector< T >::size().

Referenced by UTIL::EventSummary::setD().

void IMPL::LCGenericObjectImpl::setFloatVal ( unsigned  index,
float  value 
)
virtual

Sets the float value at the given index.

Definition at line 60 of file LCGenericObjectImpl.cc.

References _floatVec, _isFixedSize, std::vector< T >::resize(), and std::vector< T >::size().

Referenced by CalibrationConstant::CalibrationConstant(), and UTIL::EventSummary::setF().

void IMPL::LCGenericObjectImpl::setIntVal ( unsigned  index,
int  value 
)
virtual

Sets the integer value at the given index.

Definition at line 54 of file LCGenericObjectImpl.cc.

References _intVec, _isFixedSize, std::vector< T >::resize(), and std::vector< T >::size().

Referenced by CalibrationConstant::CalibrationConstant(), and UTIL::EventSummary::setI().

Member Data Documentation

const std::string IMPL::LCGenericObjectImpl::_dataDescription = ""
staticprotected

Definition at line 98 of file LCGenericObjectImpl.h.

Referenced by getDataDescription().

std::vector<double> IMPL::LCGenericObjectImpl::_doubleVec {}
protected

Definition at line 94 of file LCGenericObjectImpl.h.

Referenced by getDoubleVal(), getNDouble(), LCGenericObjectImpl(), and setDoubleVal().

std::vector<float> IMPL::LCGenericObjectImpl::_floatVec {}
protected

Definition at line 93 of file LCGenericObjectImpl.h.

Referenced by getFloatVal(), getNFloat(), LCGenericObjectImpl(), and setFloatVal().

std::vector<int> IMPL::LCGenericObjectImpl::_intVec {}
protected

Definition at line 92 of file LCGenericObjectImpl.h.

Referenced by getIntVal(), getNInt(), LCGenericObjectImpl(), and setIntVal().

bool IMPL::LCGenericObjectImpl::_isFixedSize {false}
protected
const std::string IMPL::LCGenericObjectImpl::_typeName = "LCGenericObject"
staticprotected

Definition at line 97 of file LCGenericObjectImpl.h.

Referenced by getTypeName().


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