111 const EventContext& ctx = Gaudi::Hive::currentContext();
112 SlotData& slot = *
m_slots.get(ctx);
117 uint64_t event = evtInfo->eventNumber();
118 uint32_t run_no = evtInfo->runNumber();
119 uint32_t bc_time_sec = evtInfo->timeStamp();
120 uint32_t bc_time_ns = evtInfo->timeStampNSOffset();
122 uint32_t lvl1_id = evtInfo->extendedLevel1ID();
126 uint8_t lvl1_type = evtInfo->level1TriggerType();
128 uint16_t lumi_block = evtInfo->lumiBlock();
132 eformat::helper::SourceIdentifier sid = eformat::helper::SourceIdentifier(eformat::FULL_SD_EVENT, nevt);
133 RawEventWrite*
re =
setRawEvent (std::make_unique<RawEventWrite>(sid.code(), bc_time_sec, bc_time_ns, global_id,
run_type, run_no, lumi_block, lvl1_id, bc_id, lvl1_type));
136 std::vector<eformat::helper::StreamTag> on_streamTags;
137 for (
const auto& sTag : evtInfo->streamTags()) {
138 on_streamTags.emplace_back(sTag.name(), sTag.type(), sTag.obeysLumiblock(), sTag.robs(), detsOnline(sTag.dets()));
140 uint32_t nStreamTagWords = eformat::helper::size_word(on_streamTags);
141 slot.m_tagBuff.resize (nStreamTagWords);
143 re->stream_tag(nStreamTagWords, slot.m_tagBuff.data());
147 return StatusCode::SUCCESS;
152 if (
m_evtStore->retrieve(trigDecision,
"xTrigDecision") != StatusCode::SUCCESS) {
153 ATH_MSG_WARNING(
"Property " <<
m_fillTriggerBits.name() <<
" set to True but failed to retrieve xAOD::TrigDecision. Leaving empty trigger bits in the event header.");
154 return StatusCode::SUCCESS;
158 const std::vector<uint32_t> &tbp = trigDecision->tbp();
159 const std::vector<uint32_t> &
tap = trigDecision->tap();
160 const std::vector<uint32_t> &tav = trigDecision->tav();
161 const size_t l1TotSize = tbp.size() +
tap.size() + tav.size();
163 slot.m_l1Buff.resize (l1TotSize);
166 slot.m_l1Buff[l1Size++] =
tb;
169 slot.m_l1Buff[l1Size++] =
tb;
172 slot.m_l1Buff[l1Size++] =
tb;
174 re->lvl1_trigger_info(l1TotSize, slot.m_l1Buff.data());
178 const std::vector<uint32_t>& lvl2PP = trigDecision->lvl2PassedPhysics();
179 if (lvl2PP.size() > 0) {
180 slot.m_l2Buff = lvl2PP;
181 re->lvl2_trigger_info(lvl2PP.size(), slot.m_l2Buff.data());
185 const std::vector<uint32_t>& efPP = trigDecision->efPassedPhysics();
186 if (efPP.size() > 0) {
187 slot.m_efBuff = efPP;
188 re->event_filter_info(efPP.size(), slot.m_efBuff.data());
191 return(StatusCode::SUCCESS);