110{
111 ByteStreamAddress *pRE_Addr{nullptr};
112 pRE_Addr = dynamic_cast<ByteStreamAddress*>(pAddr);
113 if (!pRE_Addr) {
115 return StatusCode::FAILURE;
116 }
117
119
120
124 return StatusCode::FAILURE;
125 }
126
127
129
130
132 if (
re->version() < 0x03010000) {
134 } else {
136 }
137
138
140 uint32_t bc_time_ns =
re->bc_time_nanoseconds();
141
142 if (bc_time_ns > 1000000000) {
143 if (runNumber < 20920) {
144
146 bc_time_ns = bc_time_sec;
147 bc_time_sec= temp;
148 ATH_MSG_DEBUG(
"bc_time second/nanosecond swapped, sec/ns = " << bc_time_sec <<
" " << bc_time_ns);
149 }
150 else {
151
152 ATH_MSG_WARNING(
"bc_time nanosecond number larger than 1e9, it is " << bc_time_ns <<
", reset it to 1 sec");
153 bc_time_ns = 1000000000;
154 }
155 }
156
157
159
160
162
163 unsigned int detMask0 = 0xFFFFFFFF, detMask1 = 0xFFFFFFFF, detMask2 = 0xFFFFFFFF, detMask3 = 0xFFFFFFFF;
164
167 if (!
status.isSuccess()) {
169 }
170 else {
171 const ByteStreamMetadata*
metadata = *(metadatacont->
begin());
173 detMask0 = (
unsigned int)(detectorMask & 0x00000000FFFFFFFF);
174 detMask1 = (
unsigned int)(detectorMask >> 32);
176 detMask2 = (
unsigned int)(detectorMask2 & 0x00000000FFFFFFFF);
177 detMask3 = (
unsigned int)(detectorMask2 >> 32);
178 }
179
180
184
193
194
195
199
200
204 }
207 }
210 }
212
213
215
218
219
221
222
223 uint32_t level1TriggerType =
re->lvl1_trigger_type();
224
225
226 std::vector<xAOD::EventInfo::StreamTag> streamTags;
227 std::vector<eformat::helper::StreamTag> onl_streamTags;
228 re->stream_tag(buffer);
229 eformat::helper::decode(
re->nstream_tag(), buffer, onl_streamTags);
230 for (const eformat::helper::StreamTag& onl_streamTag : onl_streamTags) {
231 std::set<uint32_t> tmp_off_dets = std::set<uint32_t>();
232 if (!onl_streamTag.dets.empty()) {
233 std::set<eformat::SubDetector> tmp_onl_dets = onl_streamTag.dets;
234 for (const eformat::SubDetector& subdet : tmp_onl_dets) {
235 tmp_off_dets.insert((uint32_t) subdet);
236 }
237 }
238 streamTags.push_back(xAOD::EventInfo::StreamTag(onl_streamTag.name
239 , onl_streamTag.type
240 , onl_streamTag.obeys_lumiblock
241 , onl_streamTag.robs
242 , tmp_off_dets)
243 );
244 }
245
250
251
254
255 ATH_MSG_DEBUG(
" New xAOD::EventAuxInfo made, run/event= " << runNumber
256 << " " << eventNumber
257 <<
" Time stamp = " <<
ascTime(bc_time_sec)
258 );
259
260 return StatusCode::SUCCESS;
261}
const boost::regex re(r_e)
#define ATH_MSG_WARNING(x)
ByteStreamMetadataContainer
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
std::string ascTime(unsigned int t)
convert timestamp to ascii time.
void setStore(const SG::IConstAuxStore *store)
Set the store associated with this object.
void setBCID(uint32_t value)
Set the bunch crossing ID of the event.
void setDetectorMask(uint32_t mask0, uint32_t mask1)
Set the bit fields indicating with TTC timezones were present.
void setTimeStampNSOffset(uint32_t value)
Set the nanosecond offset wrt. the time stamp.
void setMCEventNumber(uint64_t value)
Set the MC generator's event number.
@ Core
Core flags describing the event.
void setStreamTags(const std::vector< StreamTag > &value)
Set the streams that the event was put in.
void setTimeStamp(uint32_t value)
Set the POSIX time of the event.
void setLevel1TriggerType(uint16_t value)
Set the Level-1 trigger type.
bool setEventFlags(EventFlagSubDet subDet, uint32_t flags)
Set the event flags for a particular sub-detector.
void setDetectorMaskExt(uint32_t mask2, uint32_t mask3)
Set the bit fields indicating with TTC timezones were present.
void setEventNumber(uint64_t value)
Set the current event's event number.
void setEventTypeBitmask(uint32_t value)
Set the event type bitmask.
void setMCChannelNumber(uint32_t value)
Set the MC generator's channel number.
void setExtendedLevel1ID(uint32_t value)
Set the extended Level-1 identifier.
void setMCEventWeights(const std::vector< float > &value)
Set the weights of all the MC events used in the simulation.
void setRunNumber(uint32_t value)
Set the current event's run number.
@ IS_CALIBRATION
true: calibration, false: physics
@ IS_SIMULATION
true: simulation, false: data
@ IS_TESTBEAM
true: testbeam, false: full detector
void setStatusElement(uint32_t value)
Set the trigger status element.
void setLumiBlock(uint32_t value)
Set the current event's luminosity block number.
::StatusCode StatusCode
StatusCode definition for legacy code.
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
EventInfo_v1 EventInfo
Definition of the latest event info version.
EventAuxInfo_v3 EventAuxInfo
Definition of the latest event auxiliary info version.