LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
CalibrationConstant Class Reference

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...
 
LCFixedObjectoperator= (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::LCGenericObjectImplobj ()
 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 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...
 

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}
 

Detailed Description

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.

Constructor & Destructor Documentation

CalibrationConstant::CalibrationConstant ( int  cellID,
float  offset,
float  gain 
)
inline
CalibrationConstant::CalibrationConstant ( LCObject *  o)
inline

'Copy constructor' needed to interpret LCCollection read from file/database.

Definition at line 35 of file CalibrationConstant.h.

virtual CalibrationConstant::~CalibrationConstant ( )
inlinevirtual

Important for memory handling.

Definition at line 38 of file CalibrationConstant.h.

Member Function Documentation

int CalibrationConstant::getCellID ( )
inline
const std::string CalibrationConstant::getDataDescription ( ) const
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.

float CalibrationConstant::getGain ( )
inline
float CalibrationConstant::getOffset ( )
inline
const std::string CalibrationConstant::getTypeName ( ) const
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)

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