All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Event.h
Go to the documentation of this file.
1 // $Id: Event.h,v 1.5 2006/11/30 14:51:54 mato Exp $
2 #ifndef GAUDIEXAMPLES_EVENT_H
3 #define GAUDIEXAMPLES_EVENT_H 1
4 
5 // Include files
6 #include "GaudiKernel/Kernel.h"
7 #include "GaudiKernel/Time.h"
10 #include <iostream>
11 #include <iomanip>
12 
22 static const CLID CLID_Event = 110;
23 
24 class Event : public DataObject {
25 
26 public:
28  Event() : DataObject() { }
30  virtual ~Event() { }
31 
33  virtual const CLID& clID() const { return classID(); }
34  static const CLID& classID() { return CLID_Event; }
35 
37  long event () const { return m_event; }
39  void setEvent (long value) { m_event = value; }
40 
42  long run () const { return m_run; }
44  void setRun (long value) { m_run = value; }
45 
47  const Gaudi::Time& time () const { return m_time; }
49  void setTime (const Gaudi::Time& value) { m_time = value; }
50 
52  friend std::ostream& operator<< ( std::ostream& s, const Event& obj ) {
53  return obj.fillStream(s);
54  }
56  virtual inline std::ostream& fillStream( std::ostream& s ) const;
57 
58 private:
60  long m_event;
62  long m_run;
65 };
66 
68 inline std::ostream& Event::fillStream( std::ostream& s ) const {
69  return s
70  << "class Event :"
71  << "\n Event number = "
72  << std::setw(12)
73  << m_event
74  << "\n Run number = "
75  << std::setw(12)
76  << m_run
77  << "\n Time = " << m_time;
78 }
79 
80 
81 #endif // GAUDIEXAMPLES_EVENT_H
long event() const
Retrieve event number.
Definition: Event.h:37
Essential information of the event used in examples It can be identified by "/Event".
Definition: Event.h:24
Gaudi::Time m_time
Time stamp.
Definition: Event.h:64
Event()
Constructors.
Definition: Event.h:28
friend std::ostream & operator<<(std::ostream &s, const Event &obj)
Output operator (ASCII)
Definition: Event.h:52
void setRun(long value)
Update run number.
Definition: Event.h:44
long m_event
Event number.
Definition: Event.h:60
long run() const
Retrieve run number.
Definition: Event.h:42
void setTime(const Gaudi::Time &value)
Update reference to event time stamp.
Definition: Event.h:49
virtual std::ostream & fillStream(std::ostream &s) const
Fill the output stream (ASCII)
Definition: Event.h:68
long m_run
Run number.
Definition: Event.h:62
Based on seal::Time.
Definition: Time.h:214
unsigned int CLID
Class ID definition.
Definition: ClassID.h:9
const Gaudi::Time & time() const
Retrieve reference to event time stamp.
Definition: Event.h:47
static const CLID & classID()
Definition: Event.h:34
void setEvent(long value)
Update event number.
Definition: Event.h:39
string s
Definition: gaudirun.py:210
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
virtual ~Event()
Destructor.
Definition: Event.h:30
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: Event.h:33