LCIO
02.17
|
Template class for fixed size LCGenericObject subclasses. More...
#include <LCFixedObject.h>
Public Member Functions | |
LCFixedObject (const LCFixedObject &)=default | |
default copy constructor - use with care More... | |
LCFixedObject & | operator= (const LCFixedObject &)=default |
default assignment operator - use with care More... | |
LCFixedObject () | |
Default c'tor. More... | |
LCFixedObject (LCObject *object) | |
C'tor to be used for elements of LCGenericObjects read from an LCIO file or the database. More... | |
IMPL::LCGenericObjectImpl * | obj () |
The LCGenericObjectImpl . More... | |
virtual | ~LCFixedObject () |
Clean up if we created a new LCGenericObjectImpl. More... | |
virtual int | id () const |
Return the id of the underlying LCGenericObjectImpl. More... | |
int | getNInt () const |
Number of integer values stored in this object. More... | |
int | getNFloat () const |
Number of float values stored in this object. More... | |
int | getNDouble () const |
Number of double values stored in this object. More... | |
int | getIntVal (int index) const |
Returns the integer value for the given index. More... | |
float | getFloatVal (int index) const |
Returns the float value for the given index. More... | |
double | getDoubleVal (int index) const |
Returns the double value for the given index. More... | |
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 | ~LCGenericObject () |
Destructor. 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 | ~LCObject () |
Destructor. More... | |
virtual LCObject * | clone () const |
Returns an object id for internal (debugging) use in LCIO. More... | |
![]() | |
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... | |
Protected Attributes | |
IMPL::LCGenericObjectImpl * | _obj {NULL} |
bool | _createdObject {false} |
Additional Inherited Members | |
![]() | |
typedef LCGenericObject | lcobject_type |
Useful typedef for template programming with LCIO. More... | |
![]() | |
typedef std::type_index | ext_index |
typedef std::shared_ptr< void > | ext_type |
typedef std::map< ext_index, ext_type > | ext_map |
Template class for fixed size LCGenericObject subclasses.
By inheriting from this class users can very easily implement their own objects.
It uses an instance of LCGenericObjectImpl that holds the data, thus there is no overhead when the data is read from a database or file for copying it to some local structure (Decorator pattern).
This is still an abstract class: subclasses have to implement LCGenericObject::getTypeName() and LCGenericObject::getDataDescription().
Definition at line 25 of file LCFixedObject.h.
|
default |
default copy constructor - use with care
|
inline |
Default c'tor.
Definition at line 37 of file LCFixedObject.h.
|
inline |
C'tor to be used for elements of LCGenericObjects read from an LCIO file or the database.
Subclasses should 'override' this, e.g.:
Myclass(LCObject* obj) : LCFixedObject(obj) {}
Definition at line 48 of file LCFixedObject.h.
|
inlinevirtual |
Clean up if we created a new LCGenericObjectImpl.
Definition at line 85 of file LCFixedObject.h.
|
inlinevirtual |
Returns the double value for the given index.
Implements EVENT::LCGenericObject.
Definition at line 106 of file LCFixedObject.h.
|
inlinevirtual |
Returns the float value for the given index.
Implements EVENT::LCGenericObject.
Definition at line 103 of file LCFixedObject.h.
|
inlinevirtual |
Returns the integer value for the given index.
Implements EVENT::LCGenericObject.
Definition at line 100 of file LCFixedObject.h.
|
inlinevirtual |
Number of double values stored in this object.
Implements EVENT::LCGenericObject.
Definition at line 98 of file LCFixedObject.h.
|
inlinevirtual |
Number of float values stored in this object.
Implements EVENT::LCGenericObject.
Definition at line 97 of file LCFixedObject.h.
|
inlinevirtual |
Number of integer values stored in this object.
Implements EVENT::LCGenericObject.
Definition at line 96 of file LCFixedObject.h.
|
inlinevirtual |
Return the id of the underlying LCGenericObjectImpl.
Reimplemented from EVENT::LCGenericObject.
Definition at line 91 of file LCFixedObject.h.
|
inlinevirtual |
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 109 of file LCFixedObject.h.
|
inline |
The LCGenericObjectImpl .
Sublcasses use this to access their data.
Definition at line 80 of file LCFixedObject.h.
Referenced by CalibrationConstant::CalibrationConstant(), CalibrationConstant::getCellID(), CalibrationConstant::getGain(), CalibrationConstant::getOffset(), and UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::LCFixedObject().
|
default |
default assignment operator - use with care
|
protected |
Definition at line 116 of file LCFixedObject.h.
Referenced by UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::~LCFixedObject().
|
protected |
Definition at line 115 of file LCFixedObject.h.
Referenced by UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::getDoubleVal(), UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::getFloatVal(), UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::getIntVal(), UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::id(), UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::LCFixedObject(), UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::obj(), and UTIL::LCFixedObject< int(ESI::SIZE), int(ESF::SIZE), int(ESD::SIZE)>::~LCFixedObject().