Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

LCGenericObject.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // AID-GENERATED
00003 // =========================================================================
00004 // This class was generated by AID - Abstract Interface Definition          
00005 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it. 
00006 // =========================================================================
00007 #ifndef EVENT_LCGENERICOBJECT_H
00008 #define EVENT_LCGENERICOBJECT_H 1
00009 
00010 #include <string>
00011 
00012 #include "EVENT/LCObject.h"
00013 
00014 namespace EVENT {
00015 
00016 /** Simple interface to store generic user data.
00017  * To store your own classes they have to implement
00018  * this interface.
00019  *           
00020  * 2005-02-11, gaede: Changed the return value of getTypeName() and getDataDescription()
00021  * from const std::string& to const std::string to  make the implementation easier
00022  *       
00023  * @author gaede 
00024  * @version $Id: LCGenericObject.aid,v 1.7 2006/08/04 16:52:44 gaede Exp $
00025  */
00026 
00027 class LCGenericObject : public LCObject {
00028 
00029 public: 
00030     /// Destructor.
00031     virtual ~LCGenericObject() { /* nop */; }
00032 
00033 
00034     /** Useful typedef for template programming with LCIO */
00035     typedef LCGenericObject lcobject_type ;
00036 
00037     /** Number of integer values stored in this object.
00038      */
00039     virtual int getNInt() const = 0;
00040 
00041     /** Number of float values stored in this object.
00042      */
00043     virtual int getNFloat() const = 0;
00044 
00045     /** Number of double values stored in this object.
00046      */
00047     virtual int getNDouble() const = 0;
00048 
00049     /** Returns the integer value for the given index.
00050      */
00051     virtual int getIntVal(int index) const = 0;
00052 
00053     /** Returns the float value for the given index.
00054      */
00055     virtual float getFloatVal(int index) const = 0;
00056 
00057     /** Returns the double value for the given index.
00058      */
00059     virtual double getDoubleVal(int index) const = 0;
00060 
00061     /** True if objects of the implementation class have a fixed size, i.e
00062      * getNInt, getNFloat and getNDouble will return values that are constant during 
00063      * the lifetime of the object.
00064      */
00065     virtual bool isFixedSize() const = 0;
00066 
00067     /** The type name of the user class (typically the class name)
00068      * This type name is stored as a collection parameter "TypeName" 
00069      * with every collection of LCGenericObject subclasses.<br>
00070      * 
00071      */
00072     virtual const std::string getTypeName() const = 0;
00073 
00074     /** The description string. A comma separated list of pairs of
00075      *  type identifier, one of 'i','f','d' followed by ':' 
00076      *  and an attribute name, e.g. "i:cellId,f:offset,f:gain".
00077      */
00078     virtual const std::string getDataDescription() const = 0;
00079 
00080 
00081         /** Provide default implementation for id
00082          */
00083         virtual int id() const {  return 0 ; }  
00084     }; // class
00085 } // namespace EVENT
00086 #endif /* ifndef EVENT_LCGENERICOBJECT_H */

Generated on Sun Jun 3 06:31:59 2007 for A TPC Tracking Environment by  doxygen 1.3.9.1