LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
EVENT::LCGenericObject Class Referenceabstract

Simple interface to store generic user data. More...

#include <LCGenericObject.h>

+ Inheritance diagram for EVENT::LCGenericObject:

Public Types

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
 

Public Member Functions

virtual ~LCGenericObject ()
 Destructor. More...
 
virtual int getNInt () const =0
 Number of integer values stored in this object. More...
 
virtual int getNFloat () const =0
 Number of float values stored in this object. More...
 
virtual int getNDouble () const =0
 Number of double values stored in this object. More...
 
virtual int getIntVal (int index) const =0
 Returns the integer value for the given index. More...
 
virtual float getFloatVal (int index) const =0
 Returns the float value for the given index. More...
 
virtual double getDoubleVal (int index) const =0
 Returns the double value for the given index. More...
 
virtual bool isFixedSize () const =0
 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 =0
 The type name of the user class (typically the class name) This type name is stored as a collection parameter "TypeName" with every collection of LCGenericObject subclasses. More...
 
virtual const std::string getDataDescription () const =0
 The description string. More...
 
virtual int id () const
 Provide default implementation for id. 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...
 

Detailed Description

Simple interface to store generic user data.

To store your own classes they have to implement this interface.

2005-02-11, gaede: Changed the return value of getTypeName() and getDataDescription() from const std::string& to const std::string to make the implementation easier

Author
gaede
Version
Id:
LCGenericObject.aid,v 1.7 2006-08-04 16:52:44 gaede Exp

Definition at line 27 of file LCGenericObject.h.

Member Typedef Documentation

Useful typedef for template programming with LCIO.

Definition at line 35 of file LCGenericObject.h.

Constructor & Destructor Documentation

virtual EVENT::LCGenericObject::~LCGenericObject ( )
inlinevirtual

Destructor.

Definition at line 31 of file LCGenericObject.h.

Member Function Documentation

virtual const std::string EVENT::LCGenericObject::getDataDescription ( ) const
pure 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".

Implemented in UTIL::EventSummary, IMPL::LCGenericObjectImpl, and CalibrationConstant.

Referenced by UTIL::operator<<().

virtual double EVENT::LCGenericObject::getDoubleVal ( int  index) const
pure virtual
virtual float EVENT::LCGenericObject::getFloatVal ( int  index) const
pure virtual
virtual int EVENT::LCGenericObject::getIntVal ( int  index) const
pure virtual
virtual int EVENT::LCGenericObject::getNDouble ( ) const
pure virtual
virtual int EVENT::LCGenericObject::getNFloat ( ) const
pure virtual
virtual int EVENT::LCGenericObject::getNInt ( ) const
pure virtual
virtual const std::string EVENT::LCGenericObject::getTypeName ( ) const
pure virtual

The type name of the user class (typically the class name) This type name is stored as a collection parameter "TypeName" with every collection of LCGenericObject subclasses.


Implemented in UTIL::EventSummary, IMPL::LCGenericObjectImpl, and CalibrationConstant.

Referenced by UTIL::operator<<().

virtual int EVENT::LCGenericObject::id ( ) const
inlinevirtual

Provide default implementation for id.

Implements EVENT::LCObject.

Reimplemented in UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >, UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>, and IMPL::LCGenericObjectImpl.

Definition at line 83 of file LCGenericObject.h.

Referenced by UTIL::operator<<().

virtual bool EVENT::LCGenericObject::isFixedSize ( ) const
pure 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.

Implemented in UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >, UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>, and IMPL::LCGenericObjectImpl.


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