|
LCIO
02.17
|
Example for a simple calibration class based on the LCFixedObject template. More...
#include <CalibrationConstant.h>
Inheritance diagram for CalibrationConstant:Public Member Functions | |
| CalibrationConstant (int cellID, float offset, float gain) | |
| Convenient c'tor. More... | |
| CalibrationConstant (LCObject *o) | |
| 'Copy constructor' needed to interpret LCCollection read from file/database. More... | |
| virtual | ~CalibrationConstant () |
| Important for memory handling. More... | |
| int | getCellID () |
| float | getOffset () |
| float | getGain () |
| void | print (std::ostream &os) |
| const std::string | getTypeName () const |
| 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... | |
| const std::string | getDataDescription () const |
| The description string. More... | |
Public Member Functions inherited from UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE > | |
| 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... | |
Public Member Functions inherited from EVENT::LCGenericObject | |
| virtual | ~LCGenericObject () |
| Destructor. More... | |
Public Member Functions inherited from EVENT::LCObject | |
| virtual | ~LCObject () |
| Destructor. More... | |
| virtual LCObject * | clone () 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... | |
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 Attributes inherited from UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE > | |
| IMPL::LCGenericObjectImpl * | _obj {NULL} |
| bool | _createdObject {false} |
Example for a simple calibration class based on the LCFixedObject template.
LCFixedObject 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).
Definition at line 20 of file CalibrationConstant.h.
|
inline |
Convenient c'tor.
Definition at line 26 of file CalibrationConstant.h.
References UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::obj(), IMPL::LCGenericObjectImpl::setFloatVal(), and IMPL::LCGenericObjectImpl::setIntVal().
|
inline |
'Copy constructor' needed to interpret LCCollection read from file/database.
Definition at line 35 of file CalibrationConstant.h.
|
inlinevirtual |
Important for memory handling.
Definition at line 38 of file CalibrationConstant.h.
|
inline |
Definition at line 42 of file CalibrationConstant.h.
References IMPL::LCGenericObjectImpl::getIntVal(), and UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::obj().
|
inlinevirtual |
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 55 of file CalibrationConstant.h.
|
inline |
Definition at line 44 of file CalibrationConstant.h.
References IMPL::LCGenericObjectImpl::getFloatVal(), and UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::obj().
|
inline |
Definition at line 43 of file CalibrationConstant.h.
References IMPL::LCGenericObjectImpl::getFloatVal(), and UTIL::LCFixedObject< NINT, NFLOAT, NDOUBLE >::obj().
|
inlinevirtual |
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.
Implements EVENT::LCGenericObject.
Definition at line 51 of file CalibrationConstant.h.
| void CalibrationConstant::print | ( | std::ostream & | os | ) |
1.8.5