38 {
40 ATH_MSG_ERROR(
"Conversion from BS to xAOD RoI requested but RoI WriteHandleKey is empty");
41 return StatusCode::FAILURE;
42 }
43
44
46 auto cont = std::make_unique<xAOD::MuonRoIContainer>();
47 auto auxcont = std::make_unique<xAOD::MuonRoIAuxContainer>();
48 cont->setStore(auxcont.get());
49 ATH_CHECK(handle.record(std::move(cont), std::move(auxcont)));
51
52
53 const eformat::helper::SourceIdentifier sid(
m_robIds.value().at(0));
54 auto it = std::find_if(vrobf.begin(), vrobf.end(), [&sid](
const ROBF* rob){return rob->rob_source_id() == sid.code();});
55 if (it == vrobf.end()) {
56 ATH_MSG_DEBUG(
"No MUCTPI ROB fragment with ID 0x" << std::hex << sid.code() << std::dec
57 << " was found, MuonRoIContainer will be empty");
58 return StatusCode::SUCCESS;
59 }
60
61
63 const uint32_t ndata = rob->rod_ndata();
65 ATH_MSG_DEBUG(
"Starting to decode " << ndata <<
" ROD words");
66 for (
const uint32_t word : std::span{
data, ndata}) {
67 ATH_MSG_DEBUG(
"Muon RoI raw word: 0x" << std::hex << word << std::dec);
68
69
71 handle->back()->initialize(word, 99, 99, "DummyThreshold", 99);
72 }
73
75 return StatusCode::SUCCESS;
76}
#define ATH_CHECK
Evaluate an expression and check for errors.
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment ROBF
char data[hepevt_bytes_allocation_ATLAS]
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())