LCIO  "2.7.4"
 All Classes Namespaces Functions Variables Typedefs Friends Pages
LCEvent.h
1 // -*- C++ -*-
2 // AID-GENERATED
3 // =========================================================================
4 // This class was generated by AID - Abstract Interface Definition
5 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
6 // =========================================================================
7 #ifndef EVENT_LCEVENT_H
8 #define EVENT_LCEVENT_H 1
9 
10 #include <string>
11 #include <vector>
12 
13 #include "EVENT/LCParameters.h"
14 #include "Exceptions.h"
15 #include "LCIOTypes.h"
16 
17 namespace EVENT {
18 
19 class LCCollection;
20 
30 class LCEvent {
31 
32 public:
34  virtual ~LCEvent() { /* nop */; }
35 
38  virtual int getRunNumber() const = 0;
39 
42  virtual int getEventNumber() const = 0;
43 
46  virtual const std::string & getDetectorName() const = 0;
47 
52  virtual long64 getTimeStamp() const = 0;
53 
56  virtual double getWeight() const = 0;
57 
60  virtual const std::vector<std::string> * getCollectionNames() const = 0;
61 
66  virtual LCCollection * getCollection(const std::string & name) const throw (DataNotAvailableException, std::exception ) = 0;
67 
76  virtual LCCollection * takeCollection(const std::string & name) const throw (DataNotAvailableException, std::exception ) = 0;
77 
85  virtual void addCollection(LCCollection * col, const std::string & name) throw (EventException, std::exception ) = 0;
86 
92  virtual void removeCollection(const std::string & name) throw (ReadOnlyException, std::exception ) = 0;
93 
96  virtual const LCParameters & getParameters() const = 0;
97 
100  virtual LCParameters & parameters() = 0;
101 
102 // //fg20040528: added relations to the event
103 // /** Returns the names of the relations in the event.
104 // */
105 // public const String[]* getRelationNames() const ;
106 // /** Returns the relation for the given name.
107 // *
108 // * @throws DataNotAvailableException
109 // */
110 // public LCRelation* getRelation(const String& name) const throws DataNotAvailableException ;
111 // /** Adds a relation with the given name. Throws an exception if the name already
112 // * exists in the event. NB: Adding relations is allowed even when the event is 'read only'.
113 // *
114 // *@throws EventException
115 // */
116 // public void addRelation(LCRelation* col ,const String& name ) throws EventException ;
117 // /** Removes (and deletes) the relation with name (if it exists in the event).
118 // * Throws an exception if the event is 'read only' as defined by the read mode in LCReader.
119 // *
120 // *@throws ReadOnlyException
121 // */
122 // public void removeRelation(const String& name ) throws ReadOnlyException ;
123 }; // class
124 } // namespace EVENT
125 #endif /* ifndef EVENT_LCEVENT_H */
virtual const LCParameters & getParameters() const =0
Parameters defined for this event.
virtual double getWeight() const =0
Returns the event weight.
virtual LCCollection * takeCollection(const std::string &name) const =0
Returns the collection for the given name and transfers the ownership of the collection to the caller...
virtual int getRunNumber() const =0
Return the run number off this event.
virtual const std::vector< std::string > * getCollectionNames() const =0
Returns the names of the collections in the event.
virtual long64 getTimeStamp() const =0
Returns the time stamp of the event.
long long long64
64 bit signed integer,e.g.to be used for timestamps
Definition: LCIOTypes.h:14
virtual LCParameters & parameters()=0
Parameters defined for this event.
EventException used for errors accessing the event data.
Definition: Exceptions.h:44
virtual LCCollection * getCollection(const std::string &name) const =0
Returns the collection for the given name.
Simple interface to store generic named parameters of type int, float and string. ...
Definition: LCParameters.h:28
virtual const std::string & getDetectorName() const =0
Returns the name of the detector setup used in the simulation.
virtual void removeCollection(const std::string &name)=0
Removes (and deletes) the collection with name (if it exists in the event).
The main event interface.
Definition: LCEvent.h:30
EventException used for data not available.
Definition: Exceptions.h:60
The generic collection used in LCIO.
Definition: LCCollection.h:29
virtual int getEventNumber() const =0
Returns this event's number .
virtual void addCollection(LCCollection *col, const std::string &name)=0
Adds a collection with the given name (has to be a valid C/C++ variable name).
virtual ~LCEvent()
Destructor.
Definition: LCEvent.h:34
EventException used for signaling a 'read only exception'.
Definition: Exceptions.h:74