LCIO  "2.7.4"
 All Classes Namespaces Functions Variables Typedefs Friends Pages
Public Member Functions | Static Public Attributes | List of all members
EVENT::LCCollection Class Referenceabstract

The generic collection used in LCIO. More...

#include <pre-generated/EVENT/LCCollection.h>

Inheritance diagram for EVENT::LCCollection:
IMPL::LCCollectionVec IOIMPL::LCCollectionIOVec

Public Member Functions

virtual ~LCCollection ()
 Destructor.
 
virtual int getNumberOfElements () const =0
 Returns the number of elements in the collection. More...
 
virtual const std::string & getTypeName () const =0
 Returns the type name of the collection - valid names are defined in LCIO.
 
virtual LCObjectgetElementAt (int index) const =0
 Returns pointer to element at index - no range check, use getNumberOfEntries().
 
virtual int getFlag () const =0
 Returns flag word for collection. More...
 
virtual bool isTransient () const =0
 True if collection is transient, i.e. More...
 
virtual bool isDefault () const =0
 True if collection is the default collection for the given type. More...
 
virtual bool isSubset () const =0
 True if the collection holds a subset of objects from other collections. More...
 
virtual void addElement (LCObject *obj)=0 throw (ReadOnlyException, std::exception )
 Adds the given element to (end of) the collection. More...
 
virtual void removeElementAt (int i)=0 throw (ReadOnlyException, std::exception )
 Removes the i-th element from the collection. More...
 
virtual void setFlag (int flag)=0
 Set the flag word. More...
 
virtual const LCParametersgetParameters () const =0
 Parameters defined for this collection.
 
virtual LCParametersparameters ()=0
 Parameters defined for this collection. More...
 

Static Public Attributes

static const int BITTransient = 16
 Transient bit in flag word.
 
static const int BITDefault = 17
 
static const int BITSubset = 18
 

Detailed Description

The generic collection used in LCIO.

Holds arbitrary objects of type LCObject.

Author
gaede
Version
Id:
LCCollection.aid,v 1.11 2005-03-02 16:22:58 gaede Exp
See Also
LCObject
LCIO

Member Function Documentation

virtual void EVENT::LCCollection::addElement ( LCObject obj)
throw (ReadOnlyException,
std::exception
)
pure virtual

Adds the given element to (end of) the collection.

Throws an exception if the collection (event) is 'read only'.

Exceptions
ReadOnlyException

Implemented in IMPL::LCCollectionVec.

virtual int EVENT::LCCollection::getFlag ( ) const
pure virtual
virtual int EVENT::LCCollection::getNumberOfElements ( ) const
pure virtual
virtual bool EVENT::LCCollection::isDefault ( ) const
pure virtual

True if collection is the default collection for the given type.

This implies that the collection is complete and unambigous. Convenient method that checks bit BITDefault of the flag word.

Implemented in IMPL::LCCollectionVec.

virtual bool EVENT::LCCollection::isSubset ( ) const
pure virtual

True if the collection holds a subset of objects from other collections.

If the collection is not transient only the pointers/references to the original objects will be stored. Convenient method that checks bit BITSubset of the flag word.

Implemented in IMPL::LCCollectionVec.

virtual bool EVENT::LCCollection::isTransient ( ) const
pure virtual

True if collection is transient, i.e.

will not be written to any LCIO file. Convenient method that checks bit BITTransient of the flag word.

Implemented in IMPL::LCCollectionVec.

Referenced by SIO::SIOWriter::setUpHandlers().

virtual LCParameters& EVENT::LCCollection::parameters ( )
pure virtual
virtual void EVENT::LCCollection::removeElementAt ( int  i)
throw (ReadOnlyException,
std::exception
)
pure virtual

Removes the i-th element from the collection.

Throws an exception if the collection (event) is 'read only'.

Exceptions
ReadOnlyException

Implemented in IMPL::LCCollectionVec.

virtual void EVENT::LCCollection::setFlag ( int  flag)
pure virtual

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