BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/EventModel/EventModel/EventHeader.h
Go to the documentation of this file.
1#ifndef Event_EVENTHeader_H
2#define Event_EVENTHeader_H
3
4#include <iostream>
5#include "GaudiKernel/Kernel.h"
6#include "GaudiKernel/StreamBuffer.h"
7#include "GaudiKernel/DataObject.h"
8#include "EventModel/EventModel.h"
9
10extern const CLID& CLID_EventHeader;
11
12/** class EventHeader
13* brief Essential header information of the event.
14* It can be identified by "/Event" on the TDS.
15*
16* It contains:
17* - run number
18* - event number
19**/
20
21namespace Event{
22
23class EventHeader : public DataObject {
24
25public:
26
28 : DataObject(), m_event(-1), m_run(-1) {}
29
30 virtual ~EventHeader() {}
31
32 /// Retrieve reference to class definition structure
33 virtual const CLID& clID() const { return EventHeader::classID(); }
34 static const CLID& classID() { return CLID_EventHeader; }
35
36 /// Retrieve event number
37 int eventNumber () const { return m_event; }
38 /// Update event number
39 void setEventNumber (int value) { m_event = value; }
40
41 /// Retrieve run number
42 int runNumber () const { return m_run; }
43 /// Update run number
44 void setRunNumber (int value) { m_run = value; }
45
46 unsigned int time() const { return m_time; }
47
48 void setTime(int value) { m_time = value; }
49
50/// Retrieve EventTag
51 unsigned int eventTag(){return m_EventTag; }
52 /// Update EventTag
53 void setEventTag(unsigned int value){ m_EventTag=value;}
54
55 /// Retrieve flags
56 unsigned int flag1() { return m_flag1; };
57 unsigned int flag2() { return m_flag2; };
58 /// Update flags
59 void setFlag1(unsigned int value) { m_flag1 = value; }
60 void setFlag2(unsigned int value) { m_flag2 = value; }
61
62private:
63 /// Event number
64 int m_event;
65
66 /// Run number
67 int m_run;
68
69 unsigned int m_time;
70
71 // EventTag
72 unsigned int m_EventTag ;
73
74 // flag1-HV, bit(11):has-MDC-HV, bit(8-10):MDC-HV-status
75 // bit(7):has-TOF-HV, bit(4-6):TOF-HV-status
76 // bit(3):has-MUC-HV, bit(0-2):MUC-HV-status
77 unsigned int m_flag1;
78
79 // flag2
80 unsigned int m_flag2;
81};
82
83} // namespace Event
84#endif // Event_EVENTHeader_H
85
const CLID & CLID_EventHeader
Definition: EventModel.cxx:196
const CLID & CLID_EventHeader
Definition: EventModel.cxx:196
void setFlag1(unsigned int value)
Update flags.
void setEventNumber(int value)
Update event number.
virtual const CLID & clID() const
Retrieve reference to class definition structure.
void setEventTag(unsigned int value)
Update EventTag.