ATLAS Offline Software
Loading...
Searching...
No Matches
EventID.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef EVENTINFO_EVENTID_H
6#define EVENTINFO_EVENTID_H
7
19
20//<<<<<< INCLUDES >>>>>>
21
22#include <iostream>
23#include <stdint.h>
24
25#include "GaudiKernel/EventIDBase.h"
26
34
35class EventID: public EventIDBase {
36public:
37 typedef EventIDBase::number_type number_type;
38
40
41 EventID();
42 EventID(number_type run_number,
43 uint64_t event_number);
44 EventID(number_type run_number,
45 uint64_t event_number,
46 number_type time_stamp);
47 EventID(number_type run_number,
48 uint64_t event_number,
49 number_type time_stamp,
50 number_type time_stamp_ns_offset,
51 number_type lumi_block,
52 number_type bunch_crossing_id);
53 EventID(number_type run_number,
54 uint64_t event_number,
55 number_type time_stamp,
56 number_type time_stamp_ns_offset,
57 number_type lumi_block,
58 number_type bunch_crossing_id,
63 // Use default copy constructor.
64 virtual ~EventID();
65
66 EventID(const EventID&) = default;
67 EventID(EventID&&) = default;
68 EventID& operator=(const EventID&) = default;
69 EventID& operator=(EventID&&) = default;
71
74 number_type detector_mask0(void) const;
75
78 number_type detector_mask1(void) const;
79
82 number_type detector_mask2(void) const;
83
86 number_type detector_mask3(void) const;
87
90 uint64_t detector_mask(void) const;
91
92
94 void set_detector_mask(number_type detectorMask0,
95 number_type detectorMask1,
96 number_type detectorMask2 = 0,
97 number_type detectorMask3 = 0);
98
100 friend std::ostream& operator << (std::ostream& os, const EventID& rhs);
101private:
107
113
118
123};
124
125
126//<<<<<< INLINE PUBLIC FUNCTIONS >>>>>>
127
128
129inline
132 return m_detector_mask0;
133}
134
135inline
138 return m_detector_mask1;
139}
140
141inline
144 return m_detector_mask2;
145}
146
147inline
150 return m_detector_mask3;
151}
152
153inline
154uint64_t
156 uint64_t result = m_detector_mask1;
157
158 result = result << 32;
160 return(result);
161}
162
163inline std::ostream& operator << (std::ostream& os, const EventID& rhs) {
164 os << "[Run,Evt,Lumi,Time,BunchCross,DetMask] = ["
165 << rhs.run_number()
166 << "," << rhs.event_number()
167 << "," << rhs.lumi_block()
168 << "," << rhs.time_stamp()
169 << ":" << rhs.time_stamp_ns_offset()
170 << "," << rhs.bunch_crossing_id()
171 << ",0x" << std::hex << rhs.detector_mask()
172 << ",0x" << std::hex << rhs.detector_mask2()
173 << ",0x" << std::hex << rhs.detector_mask3() << std::dec
174 << "]";
175 return os;
176}
177
178
179#endif // EVENTINFO_EVENTID_H
std::ostream & operator<<(std::ostream &os, const EventID &rhs)
Definition EventID.h:163
EventID & operator=(const EventID &)=default
friend std::ostream & operator<<(std::ostream &os, const EventID &rhs)
Extraction operators.
Definition EventID.h:163
number_type detector_mask3(void) const
detector mask1 - bit field indicating which TTC zones have been built into the event,...
Definition EventID.h:149
number_type detector_mask2(void) const
detector mask0 - bit field indicating which TTC zones have been built into the event,...
Definition EventID.h:143
number_type detector_mask1(void) const
detector mask1 - bit field indicating which TTC zones have been built into the event,...
Definition EventID.h:137
number_type m_detector_mask2
detector mask2 - additional trigger bits
Definition EventID.h:115
void set_detector_mask(number_type detectorMask0, number_type detectorMask1, number_type detectorMask2=0, number_type detectorMask3=0)
set detector mask
Definition EventID.cxx:70
uint64_t detector_mask(void) const
detector mask - as a 64 bit number - only provides access to the combined 64 bits det mask,...
Definition EventID.h:155
virtual ~EventID()
Definition EventID.cxx:64
EventIDBase::number_type number_type
Definition EventID.h:37
EventID(const EventID &)=default
EventID(EventID &&)=default
EventID()
Definition EventID.cxx:18
EventID & operator=(EventID &&)=default
number_type detector_mask0(void) const
detector mask0 - bit field indicating which TTC zones have been built into the event,...
Definition EventID.h:131
number_type m_detector_mask0
detector mask0 - bit field indicating which TTC zones have been built into the event,...
Definition EventID.h:104
number_type m_detector_mask3
detector mask3 - additional trigger bits
Definition EventID.h:120
number_type m_detector_mask1
detector mask1 - bit field indicating which TTC zones have been built into the event,...
Definition EventID.h:110