Implementation of the main event class. More...
#include <IMPL/LCEventImpl.h>
Public Member Functions | |
virtual | ~LCEventImpl () |
Copy contructor, creates a deep copy of the event. More... | |
virtual int | getRunNumber () const |
Return the run number off this event. | |
virtual int | getEventNumber () const |
Returns this event's number . | |
virtual const std::string & | getDetectorName () const |
Returns the name of the detector setup used in the simulation. | |
virtual EVENT::long64 | getTimeStamp () const |
Returns the time stamp of the event. | |
virtual double | getWeight () const |
Returns the event weight. | |
virtual const std::vector < std::string > * | getCollectionNames () const |
Returns the names of the collections in the event. | |
virtual EVENT::LCCollection * | getCollection (const std::string &name) const throw (EVENT::DataNotAvailableException, std::exception) |
Returns the collection for the given name. More... | |
virtual EVENT::LCCollection * | takeCollection (const std::string &name) const throw (EVENT::DataNotAvailableException, std::exception ) |
Returns the collection for the given name and transfers the ownership of the collection to the caller. More... | |
virtual void | addCollection (EVENT::LCCollection *col, const std::string &name) throw (EVENT::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) throw (EVENT::ReadOnlyException, std::exception) |
Removes (and deletes) the collection with name (if it exists in the event). More... | |
virtual const EVENT::LCParameters & | getParameters () const |
Returns the names of the relations in the event. More... | |
virtual EVENT::LCParameters & | parameters () |
Parameters defined for this run. | |
void | setRunNumber (int rn) |
Sets the run number. | |
void | setEventNumber (int en) |
Sets the event number. | |
void | setDetectorName (const std::string &dn) |
Sets the detector name. | |
void | setTimeStamp (EVENT::long64 ts) |
Sets the event time stamp. | |
void | setWeight (double w) |
Set the event weight. | |
![]() | |
virtual | ~LCEvent () |
Destructor. | |
![]() | |
virtual int | simpleUID () const |
Protected Member Functions | |
void | setAccessMode (int accessMode) |
bool | validateCollectionName (const char *name) |
Tests the validity of a collection name. More... | |
![]() | |
virtual void | setReadOnly (bool readOnly) |
void | checkAccess () throw ( EVENT::ReadOnlyException ) |
void | checkAccess (const char *what) throw ( EVENT::ReadOnlyException ) |
Protected Attributes | |
int | _runNumber |
int | _eventNumber |
EVENT::long64 | _timeStamp |
std::string | _detectorName |
LCCollectionMap | _colMap |
std::vector< std::string > | _colNames |
LCParametersImpl | _params |
LCCollectionSet | _notOwned |
![]() | |
bool | _readOnly |
int | _id |
Implementation of the main event class.
This is used by LCIO for reading events from file.
|
virtual |
Copy contructor, creates a deep copy of the event.
Not yet - needs pointer chasing ...Destructor.
|
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'.
EventException |
Implements EVENT::LCEvent.
Referenced by UTIL::LCStdHepRdr::updateNextEvent(), and UTIL::LCStdHepRdrNew::updateNextEvent().
|
virtual |
Returns the collection for the given name.
DataNotAvailableException |
Implements EVENT::LCEvent.
Referenced by HEPEVTIMPL::HEPEVT::fromHepEvt().
|
inlinevirtual |
Returns the names of the relations in the event.
Returns the relation for the given name.
DataNotAvailableException | Adds a relation with the given name. Throws an exception if the name already exists in the event. NB: Adding relations is allowed even when the event is 'read only'. |
EventException | Removes (and deletes) the relation 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. |
ReadOnlyExceptionParameters | defined for this event. |
Implements EVENT::LCEvent.
|
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.
ReadOnlyException |
Implements EVENT::LCEvent.
|
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!
DataNotAvailableException |
Implements EVENT::LCEvent.
References IMPL::LCCollectionVec::setTransient().
|
protected |
Tests the validity of a collection name.
LCIO only accepts collection names starting with (regular expression) [A-Za-z_] and continuing with A-Za-z0-9_.
SIO only accepts names starting with (regular expression) [A-Za-z_] and continuing with A-Za-z0-9_.