00001 // -*- C++ -*- 00002 // AID-GENERATED 00003 // ========================================================================= 00004 // This class was generated by AID - Abstract Interface Definition 00005 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it. 00006 // ========================================================================= 00007 #ifndef EVENT_LCEVENT_H 00008 #define EVENT_LCEVENT_H 1 00009 00010 #include <string> 00011 #include <vector> 00012 00013 #include "Exceptions.h" 00014 #include "LCIOTypes.h" 00015 00016 namespace EVENT { 00017 00018 class LCCollection; 00019 class LCParameters; 00020 00021 /**The main event interface. Holds named collections 00022 * with elements of type LCObject ('untyped'). Users have to cast to 00023 * the corresponding types. 00024 * 00025 * @author gaede 00026 * @version $Id: LCEvent.aid,v 1.12 2005/03/07 11:36:18 gaede Exp $ 00027 * @see LCCollection 00028 */ 00029 00030 class LCEvent { 00031 00032 public: 00033 /// Destructor. 00034 virtual ~LCEvent() { /* nop */; } 00035 00036 /** Return the run number off this event. 00037 */ 00038 virtual int getRunNumber() const = 0; 00039 00040 /** Returns this event's number . 00041 */ 00042 virtual int getEventNumber() const = 0; 00043 00044 /** Returns the name of the detector setup used in the simulation. 00045 */ 00046 virtual const std::string & getDetectorName() const = 0; 00047 00048 /** Returns the time stamp of the event. 00049 * Timestamp is a unique 64 bit integer.<br> 00050 * Definition: ns since January 1, 1970, 00:00:00 GMT 00051 */ 00052 virtual long64 getTimeStamp() const = 0; 00053 00054 /** Returns the names of the collections in the event. 00055 */ 00056 virtual const std::vector<std::string> * getCollectionNames() const = 0; 00057 00058 /** Returns the collection for the given name. 00059 * 00060 * @throws DataNotAvailableException 00061 */ 00062 virtual LCCollection * getCollection(const std::string & name) const throw (DataNotAvailableException, std::exception ) = 0; 00063 00064 /** Returns the collection for the given name and transfers the ownership of the collection 00065 * to the caller. The caller is responsible for deleting the collection _after_ the Event is 00066 * deleted. The collection is still in the event but flagged as transient 00067 * after the call returns.<br> 00068 * This is usefull when you want to keep the collection for the next events.<br> 00069 * Use with care! 00070 * @throws DataNotAvailableException 00071 */ 00072 virtual LCCollection * takeCollection(const std::string & name) const throw (DataNotAvailableException, std::exception ) = 0; 00073 00074 /** Adds a collection with the given name. Throws an exception if the name already 00075 * exists in the event. NB: Adding collections is allowed even when the event is 'read only'. 00076 * 00077 *@throws EventException 00078 */ 00079 virtual void addCollection(LCCollection * col, const std::string & name) throw (EventException, std::exception ) = 0; 00080 00081 /** Removes (and deletes) the collection with name (if it exists in the event). 00082 * Throws an exception if the event is 'read only' as defined by the read mode in LCReader. 00083 * 00084 *@throws ReadOnlyException 00085 */ 00086 virtual void removeCollection(const std::string & name) throw (ReadOnlyException, std::exception ) = 0; 00087 00088 /** Parameters defined for this event. 00089 */ 00090 virtual const LCParameters & getParameters() const = 0; 00091 00092 /** Parameters defined for this event. 00093 */ 00094 virtual LCParameters & parameters() = 0; 00095 00096 // //fg20040528: added relations to the event 00097 // /** Returns the names of the relations in the event. 00098 // */ 00099 // public const String[]* getRelationNames() const ; 00100 // /** Returns the relation for the given name. 00101 // * 00102 // * @throws DataNotAvailableException 00103 // */ 00104 // public LCRelation* getRelation(const String& name) const throws DataNotAvailableException ; 00105 // /** Adds a relation with the given name. Throws an exception if the name already 00106 // * exists in the event. NB: Adding relations is allowed even when the event is 'read only'. 00107 // * 00108 // *@throws EventException 00109 // */ 00110 // public void addRelation(LCRelation* col ,const String& name ) throws EventException ; 00111 // /** Removes (and deletes) the relation with name (if it exists in the event). 00112 // * Throws an exception if the event is 'read only' as defined by the read mode in LCReader. 00113 // * 00114 // *@throws ReadOnlyException 00115 // */ 00116 // public void removeRelation(const String& name ) throws ReadOnlyException ; 00117 }; // class 00118 } // namespace EVENT 00119 #endif /* ifndef EVENT_LCEVENT_H */
1.3.9.1