68 {
69 ATH_MSG_DEBUG(
"executing convert() from ROBFragment to xAOD::L1TopoRawData");
70
71 uint32_t rodId = rob->rob_source_id();
72
73 ATH_MSG_DEBUG(
"ROD sub-detector ID: 0x" << MSG::hex << rodId << MSG::dec);
74
75
76 bool error_rob(false);
77 bool error_rod(false);
78 try {
79 if (rob->check_rob()) {
81 }
82 } catch (std::exception const& ex) {
84 error_rob = true;
85 }
86 try {
87 if (rob->check_rod()) {
89 }
90 } catch (std::exception const& ex) {
92 error_rod = true;
93 }
94
95
97 MSG::hex << " \n"
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()
105 << " \n"
106 << " nchildren 0x" << rob->nchildren() << " \n"
107 << MSG::dec);
108
109
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);
120 }
121
122
123
124
125
126 bool error_status(false);
127 if (vStatusWords.size() == 0) {
129 }
130 if (vStatusWords.size() > 0 && vStatusWords.at(0) != 0) {
131 ATH_MSG_WARNING(
"Non-zero first status word, payload may not be valid");
132 error_status = true;
133 }
134
135
137 const uint32_t ndata = rob->rod_ndata();
139
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);
147 }
148
149
151 if (error_status) {
153 }
154 if (error_rob) {
156 }
157 if (error_rod) {
159 }
160
161
162 container->push_back(std::make_unique<xAOD::L1TopoRawData>());
163 container->back()->initialize(vDataWords,vStatusWords,error,rodId);
164
165 return StatusCode::SUCCESS;
166
167}
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
const DataType * PointerType
const SG::AuxVectorData * container() const
Return the container holding this element.