ATLAS Offline Software
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 
20 //<<<<<< INCLUDES >>>>>>
21 
22 #include <iostream>
23 #include <stdint.h>
24 
25 #include "GaudiKernel/EventIDBase.h"
26 
35 class EventID: public EventIDBase {
36 public:
38 
40 
41  EventID();
43  uint64_t event_number);
45  uint64_t event_number,
46  number_type time_stamp);
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);
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,
96  number_type detectorMask2 = 0,
98 
100  friend std::ostream& operator << (std::ostream& os, const EventID& rhs);
101 private:
105  0
106  };
107 
111  0
112  };
113 
116  0
117  };
118 
121  0
122  };
123 };
124 
125 
126 //<<<<<< INLINE PUBLIC FUNCTIONS >>>>>>
127 
128 
129 inline
132  return m_detector_mask0;
133 }
134 
135 inline
138  return m_detector_mask1;
139 }
140 
141 inline
144  return m_detector_mask2;
145 }
146 
147 inline
150  return m_detector_mask3;
151 }
152 
153 inline
154 uint64_t
157 
158  result = result << 32;
160  return(result);
161 }
162 
163 inline 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
EventID::EventID
EventID()
Definition: EventID.cxx:18
plotting.plot_kinematics.run_number
run_number
Definition: plot_kinematics.py:29
get_generator_info.result
result
Definition: get_generator_info.py:21
AtlasMcWeight::number_type
unsigned int number_type
Definition: AtlasMcWeight.h:20
EventID::m_detector_mask3
number_type m_detector_mask3
detector mask3 - additional trigger bits
Definition: EventID.h:120
xAOD::detectorMask1
setEventNumber setTimeStamp setBCID detectorMask1
Definition: EventInfo_v1.cxx:137
EventID::m_detector_mask2
number_type m_detector_mask2
detector mask2 - additional trigger bits
Definition: EventID.h:115
EventID::detector_mask2
number_type detector_mask2(void) const
detector mask0 - bit field indicating which TTC zones have been built into the event,...
Definition: EventID.h:143
EventID::detector_mask0
number_type detector_mask0(void) const
detector mask0 - bit field indicating which TTC zones have been built into the event,...
Definition: EventID.h:131
EventID::detector_mask
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
EventID::m_detector_mask0
number_type m_detector_mask0
detector mask0 - bit field indicating which TTC zones have been built into the event,...
Definition: EventID.h:104
EventID::number_type
EventIDBase::number_type number_type
Definition: EventID.h:37
EventID::detector_mask3
number_type detector_mask3(void) const
detector mask1 - bit field indicating which TTC zones have been built into the event,...
Definition: EventID.h:149
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
EventID::operator=
EventID & operator=(EventID &&)=default
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
EventID::operator<<
friend std::ostream & operator<<(std::ostream &os, const EventID &rhs)
Extraction operators.
Definition: EventID.h:163
EventID::~EventID
virtual ~EventID()
Definition: EventID.cxx:64
EventID::EventID
EventID(EventID &&)=default
EventID
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Definition: EventID.h:35
EventID::m_detector_mask1
number_type m_detector_mask1
detector mask1 - bit field indicating which TTC zones have been built into the event,...
Definition: EventID.h:110
EventID::EventID
EventID(const EventID &)=default
EventID::operator=
EventID & operator=(const EventID &)=default
xAOD::detectorMask3
setEventNumber setTimeStamp setBCID setDetectorMask1 detectorMask3
Definition: EventInfo_v1.cxx:141
EventID::detector_mask1
number_type detector_mask1(void) const
detector mask1 - bit field indicating which TTC zones have been built into the event,...
Definition: EventID.h:137
operator<<
std::ostream & operator<<(std::ostream &os, const EventID &rhs)
Definition: EventID.h:163
EventID::set_detector_mask
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