LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LCCollectionVec.h
Go to the documentation of this file.
1 #ifndef EVENT_LCCOLLECTIONVEC_H
2 #define EVENT_LCCOLLECTIONVEC_H 1
3 
4 #include <string>
5 #include <vector>
6 
7 #include "EVENT/LCCollection.h"
8 #include "EVENT/LCObject.h"
9 #include "AccessChecked.h"
10 #include "LCParametersImpl.h"
11 
12 //#include "LCIO.h"
13 
14 namespace IMPL {
15 
16 
26  , public AccessChecked {
27 
28 
29  public:
34  LCCollectionVec() : _typeName("UNKNOWN" ), _flag(0) { }
35 
36  public:
37 
39  LCCollectionVec( const std::string& type ) ;
40 
41  /* Coppy constructor creating a deep copy of an LCCollection.
42  */
43  // LCCollectionVec( const EVENT::LCCollection& col ) ;
44 
45 
48  virtual ~LCCollectionVec() ;
49 
52  virtual int getNumberOfElements() const ;
53 
56  virtual const std::string & getTypeName() const ;
57 
60  virtual EVENT::LCObject * getElementAt(int index) const ;
61 
76  virtual int getFlag() const ;
77 
78 
82  virtual bool isTransient() const ;
83 
84 
88  void setTransient(bool val=true) ;
89 
94  virtual bool isDefault() const ;
95 
99  void setDefault(bool val=true) ;
100 
101 
107  virtual bool isSubset() const ;
108 
115  void setSubset(bool val=true) ;
116 
117 
120  void setFlag(int flag) ;
121 
122 
128  virtual void addElement(EVENT::LCObject * obj) ;
129 
135  virtual void removeElementAt(int i) ;
136 
139  virtual const EVENT::LCParameters & getParameters() const { return _params ; }
140 
143  virtual EVENT::LCParameters & parameters() { return _params ; }
144 
145 
146  protected:
147  void setReadOnly(bool readOnly) ;
148 
150  int _flag ;
152 
153 }; // class
154 } // namespace IMPL
155 #endif /* ifndef EVENT_LCCOLLECTIONVEC_H */
The generic object that is held in an LCCollection.
Definition: LCObject.h:30
virtual EVENT::LCParameters & parameters()
Parameters defined for this run.
virtual int getNumberOfElements() const
Returns the number of entries in the collection.
void setSubset(bool val=true)
Sets the subset flag for this collection.
virtual EVENT::LCObject * getElementAt(int index) const
Returns pointer to element at index - no range check !.
void setDefault(bool val=true)
Sets the default flag for this collection.
Implementation of the LCCollection using (inheriting from) an STL vector of LCObjects.
LCCollectionVec()
Default Constructor - don&#39;t use - only public for auto-generated streamers in the ROOT dictionary !! ...
virtual const EVENT::LCParameters & getParameters() const
Parameters defined for this run.
virtual bool isDefault() const
True if collection is the default collection for the given type.
void setTransient(bool val=true)
Sets the transient flag for this collection.
void setFlag(int flag)
Sets the flag word for this collection.
STL class.
void setReadOnly(bool readOnly)
virtual ~LCCollectionVec()
Destructor.
Implementation of Simple interface to store generic named parameters of type int, float and string...
virtual const std::string & getTypeName() const
Returns the type name of the collection - valid names are defined in LCIO.
Simple interface to store generic named parameters of type int, float and string. ...
Definition: LCParameters.h:28
virtual bool isSubset() const
True if the collection holds a subset of objects from other collections.
virtual void addElement(EVENT::LCObject *obj)
Adds the given element to (end of) the collection.
The generic collection used in LCIO.
Definition: LCCollection.h:29
virtual int getFlag() const
Returns flag word for collection.
virtual void removeElementAt(int i)
Removes the i-th element from the collection.
Controls access to objects.
Definition: AccessChecked.h:18
virtual bool isTransient() const
True if collection is transient, i.e.
LCParametersImpl _params