6 #define EVT_WGT "_weight"
12 using namespace EVENT ;
17 LCEventImpl::LCEventImpl() :
21 _detectorName(
"unknown") {
56 return w == 0 ? 1. : w ;
74 LCCollectionMap::iterator it =
_colMap.
find( name ) ;
79 ss <<
"LCEventImpl::getCollection: collection not in event:" << name ;
177 bool readOnly = ( accessMode == LCIO::READ_ONLY ) ;
200 if( !isalpha( (
int)*name ) && *name !=
'_' )
203 for( name += 1; *name !=
'\0'; name++ ){
206 if( !isalnum( (
int)*name ) && *name !=
'_' )
void setTimeStamp(EVENT::long64 ts)
Sets the event time stamp.
void setWeight(double w)
Set the event weight.
Implementation of the LCCollection using (inheriting from) an STL vector of LCObjects.
virtual EVENT::long64 getTimeStamp() const
Returns the time stamp of the event.
virtual const std::string & getDetectorName() const
Returns the name of the detector setup used in the simulation.
virtual const std::vector< std::string > * getCollectionNames() const
Returns the names of the collections in the event.
virtual double getWeight() const
Returns the event weight.
virtual int getRunNumber() const
Return the run number off this event.
void setTransient(bool val=true)
Sets the transient flag for this collection.
long long long64
64 bit signed integer,e.g.to be used for timestamps
virtual void addCollection(EVENT::LCCollection *col, const std::string &name)
Adds a collection with the given name (has to be a valid C/C++ variable name).
void setEventNumber(int en)
Sets the event number.
virtual int getEventNumber() const
Returns this event's number .
EventException used for errors accessing the event data.
virtual float getFloatVal(const std::string &key) const
Returns the first float value for the given key.
virtual EVENT::LCCollection * getCollection(const std::string &name) const
Returns the collection for the given name.
virtual ~LCEventImpl()
Copy contructor, creates a deep copy of the event.
void setRunNumber(int rn)
Sets the run number.
bool validateCollectionName(const char *name)
Tests the validity of a collection name.
virtual void setReadOnly(bool readOnly)
EventException used for data not available.
LCCollectionSet _notOwned
The generic collection used in LCIO.
void setDetectorName(const std::string &dn)
Sets the detector name.
virtual EVENT::LCCollection * takeCollection(const std::string &name) const
Returns the collection for the given name and transfers the ownership of the collection to the caller...
virtual void removeCollection(const std::string &name)
Removes (and deletes) the collection with name (if it exists in the event).
std::string _detectorName
Controls access to objects.
virtual void setValue(const std::string &key, int value)
Set integer value for the given key.
std::vector< std::string > _colNames
void setAccessMode(int accessMode)