LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LCGenericObjectImpl.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef EVENT_LCGENERICOBJECTIMPL_H
3 #define EVENT_LCGENERICOBJECTIMPL_H 1
4 
6 #include "AccessChecked.h"
7 #include <vector>
8 
9 namespace IMPL {
10 
19 
20 public:
21 
25 
28  LCGenericObjectImpl(int nInt, int nFloat, int nDouble) ;
29 
31  virtual ~LCGenericObjectImpl() { /* nop */; }
32 
33  virtual int id() const { return simpleUID() ; }
34 
37  virtual int getNInt() const;
38 
41  virtual int getNFloat() const;
42 
45  virtual int getNDouble() const;
46 
49  virtual int getIntVal(int index) const;
50 
53  virtual float getFloatVal(int index) const;
54 
57  virtual double getDoubleVal(int index) const;
58 
59 
60 
63  virtual void setIntVal(unsigned index, int value) ;
64 
67  virtual void setFloatVal(unsigned index, float value) ;
68 
71  virtual void setDoubleVal(unsigned index, double value) ;
72 
77  virtual bool isFixedSize() const;
78 
81  virtual const std::string getTypeName() const ;
82 
87  virtual const std::string getDataDescription() const ;
88 
89 
90 protected:
91 
95  bool _isFixedSize{false} ;
96 
97  static const std::string _typeName ;
99 
100 }; // class
101 } // namespace EVENT
102 #endif /* ifndef EVENT_LCGENERICOBJECTIMPL_H */
virtual void setFloatVal(unsigned index, float value)
Sets the float value at the given index.
virtual int getNFloat() const
Number of float values stored in this object.
virtual int id() const
Provide default implementation for id.
virtual int getNDouble() const
Number of double values stored in this object.
virtual int getIntVal(int index) const
Returns the integer value for the given index.
virtual float getFloatVal(int index) const
Returns the float value for the given index.
STL class.
virtual double getDoubleVal(int index) const
Returns the double value for the given index.
virtual ~LCGenericObjectImpl()
Destructor.
virtual void setIntVal(unsigned index, int value)
Sets the integer value at the given index.
static const std::string _dataDescription
virtual bool isFixedSize() const
True if objects of the implementation class have a fixed size, i.e getNInt, getNFloat and getNDouble ...
Default LCIO implementation of the interface to store generic user data.
virtual const std::string getTypeName() const
The type name of the user class (typically the class name)
Simple interface to store generic user data.
LCGenericObjectImpl()
Variable size c&#39;tor.
virtual int simpleUID() const
Definition: AccessChecked.h:26
virtual int getNInt() const
Number of integer values stored in this object.
virtual const std::string getDataDescription() const
The description string.
std::vector< double > _doubleVec
std::vector< float > _floatVec
static const std::string _typeName
Controls access to objects.
Definition: AccessChecked.h:18
virtual void setDoubleVal(unsigned index, double value)
Sets the double value at the given index.