| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Event.h
Go to the documentation of this file.
1 #ifndef GAUDIEXAMPLES_EVENT_H
2 #define GAUDIEXAMPLES_EVENT_H 1
3
4 // Include files
5 #include "GaudiKernel/Kernel.h"
6 #include "GaudiKernel/Time.h"
7 #include "GaudiKernel/StreamBuffer.h"
8 #include "GaudiKernel/DataObject.h"
9 #include <iostream>
10 #include <iomanip>
11
21 static const CLID CLID_Event = 110;
22
23 class Event : public DataObject {
24
25 public:
27 Event(): DataObject(), m_event(0), m_run(0) { }
29 virtual ~Event() { }
30
32 virtual const CLID& clID() const { return classID(); }
33 static const CLID& classID() { return CLID_Event; }
34
36 long event () const { return m_event; }
38 void setEvent (long value) { m_event = value; }
39
41 long run () const { return m_run; }
43 void setRun (long value) { m_run = value; }
44
46 const Gaudi::Time& time () const { return m_time; }
48 void setTime (const Gaudi::Time& value) { m_time = value; }
49
51 friend std::ostream& operator<< ( std::ostream& s, const Event& obj ) {
52 return obj.fillStream(s);
53 }
55 virtual inline std::ostream& fillStream( std::ostream& s ) const;
56
57 private:
59 long m_event;
61 long m_run;
63 Gaudi::Time m_time;
64 };
65
67 inline std::ostream& Event::fillStream( std::ostream& s ) const {
68 return s
69 << "class Event :"
70 << "\n Event number = "
71 << std::setw(12)
72 << m_event
73 << "\n Run number = "
74 << std::setw(12)
75 << m_run
76 << "\n Time = " << m_time;
77 }
78
79
80 #endif // GAUDIEXAMPLES_EVENT_H
Event::event
long event() const
Retrieve event number.
Definition: Event.h:36
Kernel.h
Event
Essential information of the event used in examples It can be identified by "/Event".
Definition: Event.h:23
Event::m_time
Gaudi::Time m_time
Time stamp.
Definition: Event.h:63
Event::Event
Event()
Constructors.
Definition: Event.h:27
Event::operator<<
friend std::ostream & operator<<(std::ostream &s, const Event &obj)
Output operator (ASCII)
Definition: Event.h:51
Event::setRun
void setRun(long value)
Update run number.
Definition: Event.h:43
Event::m_event
long m_event
Event number.
Definition: Event.h:59
StreamBuffer.h
Event::run
long run() const
Retrieve run number.
Definition: Event.h:41
std::setw
T setw(T...args)
Event::setTime
void setTime(const Gaudi::Time &value)
Update reference to event time stamp.
Definition: Event.h:48
Event::fillStream
virtual std::ostream & fillStream(std::ostream &s) const
Fill the output stream (ASCII)
Definition: Event.h:67
Event::m_run
long m_run
Run number.
Definition: Event.h:61
Gaudi::Time
Based on seal::Time.
Definition: Time.h:213
dump_component_properties.value
list value
Definition: dump_component_properties.py:12
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
Time.h
Event::time
const Gaudi::Time & time() const
Retrieve reference to event time stamp.
Definition: Event.h:46
Event::classID
static const CLID & classID()
Definition: Event.h:33
Event::setEvent
void setEvent(long value)
Update event number.
Definition: Event.h:38
gaudirun.s
string s
Definition: gaudirun.py:245
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
std::ostream
STL class.
Event::~Event
virtual ~Event()
Destructor.
Definition: Event.h:29
Event::clID
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: Event.h:32
DataObject.h