ATLAS Offline Software
EventID.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 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();
66 
69  number_type detector_mask0(void) const;
70 
73  number_type detector_mask1(void) const;
74 
77  number_type detector_mask2(void) const;
78 
81  number_type detector_mask3(void) const;
82 
85  uint64_t detector_mask(void) const;
86 
87 
89  void set_detector_mask(number_type detectorMask0,
91  number_type detectorMask2 = 0,
93 
95  friend std::ostream& operator << (std::ostream& os, const EventID& rhs);
96 private:
100  0
101  };
102 
106  0
107  };
108 
111  0
112  };
113 
116  0
117  };
118 };
119 
120 
121 //<<<<<< INLINE PUBLIC FUNCTIONS >>>>>>
122 
123 
124 inline
127  return m_detector_mask0;
128 }
129 
130 inline
133  return m_detector_mask1;
134 }
135 
136 inline
139  return m_detector_mask2;
140 }
141 
142 inline
145  return m_detector_mask3;
146 }
147 
148 inline
149 uint64_t
152 
153  result = result << 32;
155  return(result);
156 }
157 
158 inline std::ostream& operator << (std::ostream& os, const EventID& rhs) {
159  os << "[Run,Evt,Lumi,Time,BunchCross,DetMask] = ["
160  << rhs.run_number()
161  << "," << rhs.event_number()
162  << "," << rhs.lumi_block()
163  << "," << rhs.time_stamp()
164  << ":" << rhs.time_stamp_ns_offset()
165  << "," << rhs.bunch_crossing_id()
166  << ",0x" << std::hex << rhs.detector_mask()
167  << ",0x" << std::hex << rhs.detector_mask2()
168  << ",0x" << std::hex << rhs.detector_mask3() << std::dec
169  << "]";
170  return os;
171 }
172 
173 
174 #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:115
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:110
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:138
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:126
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:150
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:99
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:144
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
EventID::operator<<
friend std::ostream & operator<<(std::ostream &os, const EventID &rhs)
Extraction operators.
Definition: EventID.h:158
EventID::~EventID
virtual ~EventID()
Definition: EventID.cxx:64
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:105
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:132
operator<<
std::ostream & operator<<(std::ostream &os, const EventID &rhs)
Definition: EventID.h:158
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