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

The main event interface. More...

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

Inheritance diagram for EVENT::LCEvent:
IMPL::LCEventImpl IOIMPL::LCEventIOImpl

Public Member Functions

virtual ~LCEvent ()
 Destructor.
 
virtual int getRunNumber () const =0
 Return the run number off this event.
 
virtual int getEventNumber () const =0
 Returns this event's number .
 
virtual const std::string & getDetectorName () const =0
 Returns the name of the detector setup used in the simulation.
 
virtual long64 getTimeStamp () const =0
 Returns the time stamp of the event. More...
 
virtual double getWeight () const =0
 Returns the event weight.
 
virtual const std::vector
< std::string > * 
getCollectionNames () const =0
 Returns the names of the collections in the event.
 
virtual LCCollectiongetCollection (const std::string &name) const =0 throw (DataNotAvailableException, std::exception )
 Returns the collection for the given name. More...
 
virtual LCCollectiontakeCollection (const std::string &name) const =0 throw (DataNotAvailableException, std::exception )
 Returns the collection for the given name and transfers the ownership of the collection to the caller. More...
 
virtual void addCollection (LCCollection *col, const std::string &name)=0 throw (EventException, std::exception )
 Adds a collection with the given name (has to be a valid C/C++ variable name). More...
 
virtual void removeCollection (const std::string &name)=0 throw (ReadOnlyException, std::exception )
 Removes (and deletes) the collection with name (if it exists in the event). More...
 
virtual const LCParametersgetParameters () const =0
 Parameters defined for this event.
 
virtual LCParametersparameters ()=0
 Parameters defined for this event.
 

Detailed Description

The main event interface.

Holds named collections with elements of type LCObject ('untyped'). Users have to cast to the corresponding types.

Author
gaede
Version
Id:
LCEvent.aid,v 1.14 2007-11-08 19:35:37 gaede Exp
See Also
LCCollection

Member Function Documentation

virtual void EVENT::LCEvent::addCollection ( LCCollection col,
const std::string &  name 
)
throw (EventException,
std::exception
)
pure virtual

Adds a collection with the given name (has to be a valid C/C++ variable name).

Throws an exception if the name already exists in the event. NB: Adding collections is allowed even when the event is 'read only'.

See Also
validateCollectionName
Exceptions
EventException

Implemented in IMPL::LCEventImpl.

virtual LCCollection* EVENT::LCEvent::getCollection ( const std::string &  name) const
throw (DataNotAvailableException,
std::exception
)
pure virtual

Returns the collection for the given name.

Exceptions
DataNotAvailableException

Implemented in IMPL::LCEventImpl.

Referenced by UTIL::LCTOOLS::dumpEvent(), UTIL::LCTOOLS::dumpEventDetailed(), and SIO::SIOWriter::setUpHandlers().

virtual long64 EVENT::LCEvent::getTimeStamp ( ) const
pure virtual

Returns the time stamp of the event.

Timestamp is a unique 64 bit integer.
Definition: ns since January 1, 1970, 00:00:00 GMT

Implemented in IMPL::LCEventImpl.

Referenced by UTIL::LCTOOLS::dumpEventDetailed().

virtual void EVENT::LCEvent::removeCollection ( const std::string &  name)
throw (ReadOnlyException,
std::exception
)
pure virtual

Removes (and deletes) the collection with name (if it exists in the event).

Throws an exception if the event is 'read only' as defined by the read mode in LCReader.

Exceptions
ReadOnlyException

Implemented in IMPL::LCEventImpl.

virtual LCCollection* EVENT::LCEvent::takeCollection ( const std::string &  name) const
throw (DataNotAvailableException,
std::exception
)
pure virtual

Returns the collection for the given name and transfers the ownership of the collection to the caller.

The caller is responsible for deleting the collection after the Event is deleted. The collection is still in the event but flagged as transient after the call returns.
This is usefull when you want to keep the collection for the next events.
Use with care!

Exceptions
DataNotAvailableException

Implemented in IMPL::LCEventImpl.


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