The generic collection used in LCIO. More...
#include <pre-generated/EVENT/LCCollection.h>
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 LCObject * | getElementAt (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 LCParameters & | getParameters () const =0 |
Parameters defined for this collection. | |
virtual LCParameters & | parameters ()=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 |
The generic collection used in LCIO.
Holds arbitrary objects of type LCObject.
|
pure virtual |
Adds the given element to (end of) the collection.
Throws an exception if the collection (event) is 'read only'.
ReadOnlyException |
Implemented in IMPL::LCCollectionVec.
|
pure virtual |
Returns flag word for collection.
Bits 16-31 are reserved for LCIO Depending on the object type stored they have a special meaning, e.g. for SimCalorimeterHits:
CHBIT_LONG = 31 - store position
CHBIT_BARREL = 30 - endcap or barrel
CHBIT_ID1 = 29 - cellid1 is sored
CHBIT_PDG = 28 - store pdg of secondaries
Bit 16 is used to flag collection as transient
Bit 17 is used to flag collection as default
Bit 18 is used to flag collection as subset
Bits 0-15 are subdetector/user specific.
Implemented in IMPL::LCCollectionVec.
Referenced by SIO::SIOVertexHandler::init(), SIO::SIOLCGenericObjectHandler::init(), SIO::SIOObjectHandler::init(), UTIL::LCTOOLS::printCalorimeterHits(), UTIL::LCTOOLS::printClusters(), UTIL::LCTOOLS::printLCFloatVecs(), UTIL::LCTOOLS::printLCGenericObjects(), UTIL::LCTOOLS::printLCIntVecs(), UTIL::LCTOOLS::printLCStrVecs(), UTIL::LCTOOLS::printMCParticles(), UTIL::LCTOOLS::printRawCalorimeterHits(), UTIL::LCTOOLS::printReconstructedParticles(), UTIL::LCTOOLS::printRelation(), UTIL::LCTOOLS::printSimCalorimeterHits(), UTIL::LCTOOLS::printSimTrackerHits(), UTIL::LCTOOLS::printTPCHits(), UTIL::LCTOOLS::printTrackerData(), UTIL::LCTOOLS::printTrackerHitPlane(), UTIL::LCTOOLS::printTrackerHits(), UTIL::LCTOOLS::printTrackerHitZCylinder(), UTIL::LCTOOLS::printTrackerPulse(), UTIL::LCTOOLS::printTrackerRawData(), UTIL::LCTOOLS::printTracks(), and UTIL::CellIDEncoder< T >::setCellIDFlag().
|
pure virtual |
Returns the number of elements in the collection.
Same as size().
Implemented in IMPL::LCCollectionVec.
Referenced by UTIL::LCTOOLS::dumpEvent(), HEPEVTIMPL::HEPEVT::fromHepEvt(), SIO::SIOVertexHandler::init(), SIO::SIOLCGenericObjectHandler::init(), UTIL::LCIterator< T >::LCIterator(), UTIL::LCTOOLS::printCalorimeterHits(), UTIL::LCTOOLS::printClusters(), UTIL::LCTOOLS::printLCFloatVecs(), UTIL::LCTOOLS::printLCGenericObjects(), UTIL::LCTOOLS::printLCIntVecs(), UTIL::LCTOOLS::printLCStrVecs(), UTIL::LCTOOLS::printMCParticles(), UTIL::LCTOOLS::printRawCalorimeterHits(), UTIL::LCTOOLS::printReconstructedParticles(), UTIL::LCTOOLS::printRelation(), UTIL::LCTOOLS::printSimCalorimeterHits(), UTIL::LCTOOLS::printSimTrackerHits(), UTIL::LCTOOLS::printTPCHits(), UTIL::LCTOOLS::printTrackerData(), UTIL::LCTOOLS::printTrackerHitPlane(), UTIL::LCTOOLS::printTrackerHits(), UTIL::LCTOOLS::printTrackerHitZCylinder(), UTIL::LCTOOLS::printTrackerPulse(), UTIL::LCTOOLS::printTrackerRawData(), UTIL::LCTOOLS::printTracks(), and UTIL::LCTOOLS::printVertices().
|
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.
|
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.
|
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().
|
pure virtual |
Parameters defined for this collection.
Can be used to modify the collection paramters.
Implemented in IMPL::LCCollectionVec.
Referenced by UTIL::CellIDEncoder< T >::CellIDEncoder(), SIO::SIOVertexHandler::init(), SIO::SIOLCGenericObjectHandler::init(), SIO::SIOObjectHandler::init(), UTIL::CollectionParameterMap::~CollectionParameterMap(), and UTIL::PIDHandler::~PIDHandler().
|
pure virtual |
Removes the i-th element from the collection.
Throws an exception if the collection (event) is 'read only'.
ReadOnlyException |
Implemented in IMPL::LCCollectionVec.
|
pure virtual |
Set the flag word.
This is allowed in 'read only' mode.
Implemented in IMPL::LCCollectionVec.
Referenced by SIO::SIOVertexHandler::init(), SIO::SIOLCGenericObjectHandler::init(), SIO::SIOObjectHandler::init(), and UTIL::CellIDEncoder< T >::setCellIDFlag().