44 auto l1topoContainer = std::make_unique<xAOD::L1TopoRawDataContainer> ();
45 auto l1topoAuxContainer = std::make_unique<xAOD::L1TopoRawDataAuxContainer> ();
46 l1topoContainer->setStore(l1topoAuxContainer.get());
49 for (
const ROBF* rob : vrobf) {
54 ATH_CHECK(l1topo_cont.
record(std::move(l1topoContainer),std::move(l1topoAuxContainer)));
55 ATH_MSG_DEBUG(
"Recorded L1TopoRawDataContainer with key " << l1topo_cont.
key());
57 return StatusCode::SUCCESS;
69 ATH_MSG_DEBUG(
"executing convert() from ROBFragment to xAOD::L1TopoRawData");
71 uint32_t rodId = rob->rob_source_id();
73 ATH_MSG_DEBUG(
"ROD sub-detector ID: 0x" << MSG::hex << rodId << MSG::dec);
76 bool error_rob(
false);
77 bool error_rod(
false);
79 if (rob->check_rob()) {
82 }
catch (std::exception
const& ex) {
87 if (rob->check_rod()) {
90 }
catch (std::exception
const& ex) {
98 <<
" rod_version 0x" << rob->rod_version() <<
" \n"
99 <<
" rod_run_no 0x" << MSG::dec
100 << rob->rod_run_no() <<
" \n"
101 <<
" rod_lvl1_id 0x" << MSG::hex
102 << rob->rod_lvl1_id() <<
" \n"
103 <<
" rod_bc_id 0x" << rob->rod_bc_id() <<
" \n"
104 <<
" rod_lvl1_trigger_type 0x" << rob->rod_lvl1_trigger_type()
106 <<
" nchildren 0x" << rob->nchildren() <<
" \n"
111 const uint32_t nstatus = rob->rod_nstatus();
113 std::vector<uint32_t> vStatusWords;
114 vStatusWords.reserve(nstatus);
116 for (uint32_t i = 0; i < nstatus; ++i, ++it_status) {
117 vStatusWords.push_back(
static_cast<uint32_t
>(*it_status));
119 << *it_status << MSG::dec);
126 bool error_status(
false);
127 if (vStatusWords.size() == 0) {
130 if (vStatusWords.size() > 0 && vStatusWords.at(0) != 0) {
131 ATH_MSG_WARNING(
"Non-zero first status word, payload may not be valid");
137 const uint32_t ndata = rob->rod_ndata();
141 std::vector<uint32_t> vDataWords;
142 vDataWords.reserve(ndata);
143 for (uint32_t i = 0; i < ndata; ++i, ++it_data) {
144 vDataWords.push_back(
static_cast<uint32_t
>(*it_data));
146 << *it_data << MSG::dec);
162 container->push_back(std::make_unique<xAOD::L1TopoRawData>());
163 container->back()->initialize(vDataWords,vStatusWords,
error,rodId);
165 return StatusCode::SUCCESS;