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

IOIMPL::LCEventIOImpl Class Reference

#include <LCEventIOImpl.h>

Inheritance diagram for IOIMPL::LCEventIOImpl:

IMPL::LCEventImpl EVENT::LCEvent IMPL::AccessChecked List of all members.

Public Member Functions

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 addCollection (LCCollection *col, const std::string &name)=0 throw (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 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

Friends

class SIO::SIOReader
class SIO::SIOEventHeaderHandler
class SIO::SIOEventHandler

Detailed Description

Adding stuff needed for io (friend declarations, etc.)

Author:
gaede
Version:
Mar 6, 2003

Definition at line 22 of file LCEventIOImpl.h.


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, 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 

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(), IMPL::LCEventImpl::setDetectorName(), IMPL::ClusterImpl::setDirectionError(), IMPL::MCParticleImpl::setEndpoint(), IMPL::SimCalorimeterHitImpl::setEnergy(), IMPL::ReconstructedParticleImpl::setEnergy(), IMPL::ClusterImpl::setEnergy(), IMPL::CalorimeterHitImpl::setEnergy(), IMPL::LCEventImpl::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(), IMPL::LCEventImpl::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(), IMPL::LCEventImpl::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, inherited]
 

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, inherited]
 

Returns the names of the collections in the event.

Implements EVENT::LCEvent.

Definition at line 74 of file LCEventImpl.cc.

References IMPL::LCEventImpl::_colMap, and IMPL::LCEventImpl::_colNames.

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

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, inherited]
 

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, inherited]
 

Parameters defined for this event.

Implements EVENT::LCEvent.

Definition at line 125 of file LCEventImpl.h.

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

Return the run number off this event.

Implements EVENT::LCEvent.

Definition at line 54 of file LCEventImpl.cc.

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

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, inherited]
 

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, inherited]
 

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, inherited]
 

Definition at line 176 of file LCEventImpl.cc.

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

void IMPL::LCEventImpl::setDetectorName const std::string &  dn  )  [inherited]
 

Sets the detector name.

Definition at line 163 of file LCEventImpl.cc.

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

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

void IMPL::LCEventImpl::setEventNumber int  en  )  [inherited]
 

Sets the event number.

Definition at line 157 of file LCEventImpl.cc.

References IMPL::LCEventImpl::_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 IMPL::LCEventImpl::setAccessMode(), and IMPL::LCCollectionVec::setReadOnly().

void IMPL::LCEventImpl::setRunNumber int  rn  )  [inherited]
 

Sets the run number.

Definition at line 151 of file LCEventImpl.cc.

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

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

void IMPL::LCEventImpl::setTimeStamp EVENT::long64  ts  )  [inherited]
 

Sets the event time stamp.

Definition at line 169 of file LCEventImpl.cc.

References IMPL::LCEventImpl::_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, inherited]
 

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().


Friends And Related Function Documentation

friend class SIO::SIOEventHandler [friend]
 

Definition at line 27 of file LCEventIOImpl.h.

friend class SIO::SIOEventHeaderHandler [friend]
 

Definition at line 26 of file LCEventIOImpl.h.

friend class SIO::SIOReader [friend]
 

Definition at line 25 of file LCEventIOImpl.h.


Member Data Documentation

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

Definition at line 163 of file LCEventImpl.h.

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

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

Definition at line 164 of file LCEventImpl.h.

Referenced by IMPL::LCEventImpl::getCollectionNames().

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

Definition at line 160 of file LCEventImpl.h.

Referenced by IMPL::LCEventImpl::setDetectorName().

int IMPL::LCEventImpl::_eventNumber [protected, inherited]
 

Definition at line 158 of file LCEventImpl.h.

Referenced by IMPL::LCEventImpl::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, inherited]
 

Definition at line 169 of file LCEventImpl.h.

Referenced by IMPL::LCEventImpl::~LCEventImpl().

LCParametersImpl IMPL::LCEventImpl::_params [protected, inherited]
 

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, inherited]
 

Definition at line 157 of file LCEventImpl.h.

Referenced by IMPL::LCEventImpl::setRunNumber().

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

Definition at line 159 of file LCEventImpl.h.

Referenced by IMPL::LCEventImpl::setTimeStamp().


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