Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

IMPL::LCEventImpl Class Reference

#include <LCEventImpl.h>

Inheritance diagram for IMPL::LCEventImpl:

EVENT::LCEvent IMPL::AccessChecked IOIMPL::LCEventIOImpl List of all members.

Public Member Functions

 LCEventImpl ()
virtual ~LCEventImpl ()
virtual int getRunNumber () const
virtual int getEventNumber () const
virtual const std::string & getDetectorName () const
virtual EVENT::long64 getTimeStamp () const
virtual const std::vector<
std::string > * 
getCollectionNames () const
virtual EVENT::LCCollectiongetCollection (const std::string &name) const throw (EVENT::DataNotAvailableException, std::exception)
virtual EVENT::LCCollectiontakeCollection (const std::string &name) const throw (EVENT::DataNotAvailableException, std::exception )
virtual void addCollection (EVENT::LCCollection *col, const std::string &name) throw (EVENT::EventException, std::exception)
virtual void removeCollection (const std::string &name) throw (EVENT::ReadOnlyException, std::exception)
virtual const EVENT::LCParametersgetParameters () const
virtual EVENT::LCParametersparameters ()
void setRunNumber (int rn)
void setEventNumber (int en)
void setDetectorName (const std::string &dn)
void setTimeStamp (EVENT::long64 ts)
virtual void addCollection (LCCollection *col, const std::string &name)=0 throw (EventException, std::exception )
virtual int simpleUID () const

Protected Member Functions

void setAccessMode (int accessMode)
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

Detailed Description

Implementation of the main event class. This is used by LCIO for reading events from file.

Author:
gaede
Version:
Mar 5, 2003
See also:
LCEvent

LCCollection

Definition at line 31 of file LCEventImpl.h.


Constructor & Destructor Documentation

IMPL::LCEventImpl::LCEventImpl  ) 
 

Definition at line 13 of file LCEventImpl.cc.

IMPL::LCEventImpl::~LCEventImpl  )  [virtual]
 

Destructor.

Definition at line 39 of file LCEventImpl.cc.

References _colMap, and _notOwned.


Member Function Documentation

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

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

Exceptions:
EventException 

Referenced by tpc_tracking::Event::addCollection(), tpc_tracking::CustomLCIOCollection< lcio::MCParticle >::derived_write(), and marlin::SimpleFastMCProcessor::processEvent().

void IMPL::LCEventImpl::addCollection EVENT::LCCollection col,
const std::string &  name
throw (EVENT::EventException, std::exception) [virtual]
 

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

Exceptions:
EventException 

Definition at line 121 of file LCEventImpl.cc.

Referenced by marlin::StdHepReader::readDataSource(), and SIO::SIOEventHandler::xfer().

void IMPL::AccessChecked::checkAccess const char *  what  )  throw ( EVENT::ReadOnlyException ) [protected, inherited]
 

Definition at line 20 of file AccessChecked.cc.

void IMPL::AccessChecked::checkAccess  )  throw ( EVENT::ReadOnlyException ) [protected, inherited]
 

Definition at line 16 of file AccessChecked.cc.

Referenced by IMPL::TrackerRawDataImpl::adcValues(), IMPL::ReconstructedParticleImpl::addCluster(), IMPL::ClusterImpl::addCluster(), IMPL::MCParticleImpl::addDaughter(), IMPL::SimCalorimeterHitImpl::addMCParticleContribution(), IMPL::VertexImpl::addParameter(), IMPL::ParticleIDImpl::addParameter(), IMPL::MCParticleImpl::addParent(), IMPL::ReconstructedParticleImpl::addParticle(), IMPL::ReconstructedParticleImpl::addParticleID(), IMPL::ClusterImpl::addParticleID(), IMPL::TrackImpl::addTrack(), IMPL::ReconstructedParticleImpl::addTrack(), IMPL::TrackerDataImpl::chargeValues(), IMPL::TrackerHitImpl::rawHits(), IMPL::TrackerRawDataImpl::setADCValues(), IMPL::VertexImpl::setAlgorithmType(), IMPL::ParticleIDImpl::setAlgorithmType(), IMPL::RawCalorimeterHitImpl::setAmplitude(), IMPL::VertexImpl::setAssociatedParticle(), IMPL::TPCHitImpl::setCellID(), IMPL::SimTrackerHitImpl::setCellID(), IMPL::TrackerRawDataImpl::setCellID0(), IMPL::TrackerPulseImpl::setCellID0(), IMPL::TrackerDataImpl::setCellID0(), IMPL::SimCalorimeterHitImpl::setCellID0(), IMPL::RawCalorimeterHitImpl::setCellID0(), IMPL::CalorimeterHitImpl::setCellID0(), IMPL::TrackerRawDataImpl::setCellID1(), IMPL::TrackerPulseImpl::setCellID1(), IMPL::TrackerDataImpl::setCellID1(), IMPL::SimCalorimeterHitImpl::setCellID1(), IMPL::RawCalorimeterHitImpl::setCellID1(), IMPL::CalorimeterHitImpl::setCellID1(), IMPL::TrackerPulseImpl::setCharge(), IMPL::TPCHitImpl::setCharge(), IMPL::ReconstructedParticleImpl::setCharge(), IMPL::MCParticleImpl::setCharge(), IMPL::TrackerDataImpl::setChargeValues(), IMPL::VertexImpl::setChi2(), IMPL::TrackImpl::setChi2(), IMPL::VertexImpl::setCovMatrix(), IMPL::TrackImpl::setCovMatrix(), IMPL::TrackerHitImpl::setCovMatrix(), IMPL::ReconstructedParticleImpl::setCovMatrix(), IMPL::TrackImpl::setD0(), IMPL::TrackImpl::setdEdx(), IMPL::TrackerHitImpl::setdEdx(), IMPL::SimTrackerHitImpl::setdEdx(), IMPL::TrackImpl::setdEdxError(), IMPL::LCRunHeaderImpl::setDescription(), IMPL::LCRunHeaderImpl::setDetectorName(), setDetectorName(), IMPL::ClusterImpl::setDirectionError(), IMPL::MCParticleImpl::setEndpoint(), IMPL::SimCalorimeterHitImpl::setEnergy(), IMPL::ReconstructedParticleImpl::setEnergy(), IMPL::ClusterImpl::setEnergy(), IMPL::CalorimeterHitImpl::setEnergy(), setEventNumber(), IMPL::MCParticleImpl::setGeneratorStatus(), IMPL::ReconstructedParticleImpl::setGoodnessOfPID(), IMPL::ClusterImpl::setIPhi(), IMPL::TrackImpl::setIsReferencePointPCA(), IMPL::ClusterImpl::setITheta(), IMPL::ParticleIDImpl::setLikelihood(), IMPL::ReconstructedParticleImpl::setMass(), IMPL::MCParticleImpl::setMass(), IMPL::SimTrackerHitImpl::setMCParticle(), IMPL::SimTrackerHitImpl::setMomentum(), IMPL::ReconstructedParticleImpl::setMomentum(), IMPL::MCParticleImpl::setMomentum(), IMPL::TrackImpl::setNdf(), IMPL::TrackImpl::setOmega(), IMPL::ReconstructedParticleImpl::setParticleIDUsed(), IMPL::SimTrackerHitImpl::setPathLength(), IMPL::ParticleIDImpl::setPDG(), IMPL::MCParticleImpl::setPDG(), IMPL::TrackImpl::setPhi(), IMPL::VertexImpl::setPosition(), IMPL::TrackerHitImpl::setPosition(), IMPL::SimTrackerHitImpl::setPosition(), IMPL::SimCalorimeterHitImpl::setPosition(), IMPL::ClusterImpl::setPosition(), IMPL::CalorimeterHitImpl::setPosition(), IMPL::ClusterImpl::setPositionError(), IMPL::VertexImpl::setPrimary(), IMPL::VertexImpl::setProbability(), IMPL::TrackerPulseImpl::setQuality(), IMPL::TPCHitImpl::setQuality(), IMPL::TrackerPulseImpl::setQualityBit(), IMPL::TrackImpl::setRadiusOfInnermostHit(), IMPL::TPCHitImpl::setRawData(), IMPL::CalorimeterHitImpl::setRawHit(), IMPL::TrackImpl::setReferencePoint(), IMPL::ReconstructedParticleImpl::setReferencePoint(), IMPL::LCRunHeaderImpl::setRunNumber(), setRunNumber(), IMPL::ClusterImpl::setShape(), IMPL::MCParticleImpl::setSimulatorStatus(), IMPL::ReconstructedParticleImpl::setStartVertex(), IMPL::TrackImpl::setTanLambda(), IMPL::TrackerRawDataImpl::setTime(), IMPL::TrackerPulseImpl::setTime(), IMPL::TrackerHitImpl::setTime(), IMPL::TrackerDataImpl::setTime(), IMPL::TPCHitImpl::setTime(), IMPL::SimTrackerHitImpl::setTime(), IMPL::MCParticleImpl::setTime(), IMPL::CalorimeterHitImpl::setTime(), IMPL::RawCalorimeterHitImpl::setTimeStamp(), setTimeStamp(), IMPL::TrackerPulseImpl::setTrackerData(), IMPL::TrackImpl::setType(), IMPL::TrackerHitImpl::setType(), IMPL::ReconstructedParticleImpl::setType(), IMPL::ParticleIDImpl::setType(), IMPL::ClusterImpl::setType(), IMPL::CalorimeterHitImpl::setType(), IMPL::TrackImpl::setTypeBit(), IMPL::ClusterImpl::setTypeBit(), IMPL::LCParametersImpl::setValue(), IMPL::LCParametersImpl::setValues(), IMPL::MCParticleImpl::setVertex(), IMPL::TrackImpl::setZ0(), IMPL::ClusterImpl::subdetectorEnergies(), and IMPL::TrackImpl::subdetectorHitNumbers().

LCCollection * IMPL::LCEventImpl::getCollection const std::string &  name  )  const throw (EVENT::DataNotAvailableException, std::exception) [virtual]
 

Returns the collection for the given name.

Exceptions:
DataNotAvailableException 

Implements EVENT::LCEvent.

Definition at line 89 of file LCEventImpl.cc.

const std::vector< std::string > * IMPL::LCEventImpl::getCollectionNames  )  const [virtual]
 

Returns the names of the collections in the event.

Implements EVENT::LCEvent.

Definition at line 74 of file LCEventImpl.cc.

References _colMap, and _colNames.

const std::string & IMPL::LCEventImpl::getDetectorName  )  const [virtual]
 

Returns the name of the detector setup used in the simulation.

Implements EVENT::LCEvent.

Definition at line 64 of file LCEventImpl.cc.

int IMPL::LCEventImpl::getEventNumber  )  const [virtual]
 

Returns this event's number .

Implements EVENT::LCEvent.

Definition at line 59 of file LCEventImpl.cc.

virtual const EVENT::LCParameters& IMPL::LCEventImpl::getParameters  )  const [inline, virtual]
 

Parameters defined for this event.

Implements EVENT::LCEvent.

Definition at line 125 of file LCEventImpl.h.

int IMPL::LCEventImpl::getRunNumber  )  const [virtual]
 

Return the run number off this event.

Implements EVENT::LCEvent.

Definition at line 54 of file LCEventImpl.cc.

long64 IMPL::LCEventImpl::getTimeStamp  )  const [virtual]
 

Returns the time stamp of the event.

Implements EVENT::LCEvent.

Definition at line 69 of file LCEventImpl.cc.

References EVENT::long64.

virtual EVENT::LCParameters& IMPL::LCEventImpl::parameters  )  [inline, virtual]
 

Parameters defined for this run.

Implements EVENT::LCEvent.

Definition at line 129 of file LCEventImpl.h.

void IMPL::LCEventImpl::removeCollection const std::string &  name  )  throw (EVENT::ReadOnlyException, std::exception) [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 

Implements EVENT::LCEvent.

Definition at line 141 of file LCEventImpl.cc.

void IMPL::LCEventImpl::setAccessMode int  accessMode  )  [protected]
 

Definition at line 176 of file LCEventImpl.cc.

References _colMap, and IMPL::AccessChecked::setReadOnly().

void IMPL::LCEventImpl::setDetectorName const std::string &  dn  ) 
 

Sets the detector name.

Definition at line 163 of file LCEventImpl.cc.

References _detectorName, and IMPL::AccessChecked::checkAccess().

Referenced by SIO::SIOEventHandler::xfer().

void IMPL::LCEventImpl::setEventNumber int  en  ) 
 

Sets the event number.

Definition at line 157 of file LCEventImpl.cc.

References _eventNumber, and IMPL::AccessChecked::checkAccess().

Referenced by marlin::StdHepReader::readDataSource().

void IMPL::AccessChecked::setReadOnly bool  readOnly  )  [protected, virtual, inherited]
 

Reimplemented in IMPL::LCCollectionVec, and IMPL::LCRunHeaderImpl.

Definition at line 14 of file AccessChecked.cc.

References IMPL::AccessChecked::_readOnly.

Referenced by setAccessMode(), and IMPL::LCCollectionVec::setReadOnly().

void IMPL::LCEventImpl::setRunNumber int  rn  ) 
 

Sets the run number.

Definition at line 151 of file LCEventImpl.cc.

References _runNumber, and IMPL::AccessChecked::checkAccess().

Referenced by marlin::StdHepReader::readDataSource().

void IMPL::LCEventImpl::setTimeStamp EVENT::long64  ts  ) 
 

Sets the event time stamp.

Definition at line 169 of file LCEventImpl.cc.

References _timeStamp, and IMPL::AccessChecked::checkAccess().

virtual int IMPL::AccessChecked::simpleUID  )  const [inline, virtual, inherited]
 

Definition at line 24 of file AccessChecked.h.

LCCollection * IMPL::LCEventImpl::takeCollection const std::string &  name  )  const throw (EVENT::DataNotAvailableException, std::exception ) [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 

Implements EVENT::LCEvent.

Definition at line 106 of file LCEventImpl.cc.

References IMPL::LCCollectionVec::setTransient().


Member Data Documentation

LCCollectionMap IMPL::LCEventImpl::_colMap [mutable, protected]
 

Definition at line 163 of file LCEventImpl.h.

Referenced by getCollectionNames(), setAccessMode(), and ~LCEventImpl().

std::vector<std::string> IMPL::LCEventImpl::_colNames [mutable, protected]
 

Definition at line 164 of file LCEventImpl.h.

Referenced by getCollectionNames().

std::string IMPL::LCEventImpl::_detectorName [protected]
 

Definition at line 160 of file LCEventImpl.h.

Referenced by setDetectorName().

int IMPL::LCEventImpl::_eventNumber [protected]
 

Definition at line 158 of file LCEventImpl.h.

Referenced by setEventNumber().

int IMPL::AccessChecked::_id [protected, inherited]
 

Definition at line 34 of file AccessChecked.h.

Referenced by IMPL::AccessChecked::AccessChecked().

LCCollectionSet IMPL::LCEventImpl::_notOwned [mutable, protected]
 

Definition at line 169 of file LCEventImpl.h.

Referenced by ~LCEventImpl().

LCParametersImpl IMPL::LCEventImpl::_params [protected]
 

Definition at line 166 of file LCEventImpl.h.

bool IMPL::AccessChecked::_readOnly [protected, inherited]
 

Definition at line 33 of file AccessChecked.h.

Referenced by IMPL::AccessChecked::setReadOnly().

int IMPL::LCEventImpl::_runNumber [protected]
 

Definition at line 157 of file LCEventImpl.h.

Referenced by setRunNumber().

EVENT::long64 IMPL::LCEventImpl::_timeStamp [protected]
 

Definition at line 159 of file LCEventImpl.h.

Referenced by setTimeStamp().


The documentation for this class was generated from the following files:
Generated on Sun Jun 3 06:32:25 2007 for A TPC Tracking Environment by  doxygen 1.3.9.1