66 {
67 ATH_MSG_DEBUG(
"executing convert() from ROBFragment to xAOD::L1TopoRawData");
68
69 uint32_t rodId = rob->rob_source_id();
70
71 ATH_MSG_DEBUG(
"ROD sub-detector ID: 0x" << MSG::hex << rodId << MSG::dec);
72
73
74 bool error_rob(false);
75 bool error_rod(false);
76 try {
77 if (rob->check_rob()) {
79 }
80 } catch (std::exception const& ex) {
82 error_rob = true;
83 }
84 try {
85 if (rob->check_rod()) {
87 }
88 } catch (std::exception const& ex) {
90 error_rod = true;
91 }
92
93
95 MSG::hex << " \n"
96 << " rod_version 0x" << rob->rod_version() << " \n"
97 << " rod_run_no 0x" << MSG::dec
98 << rob->rod_run_no() << " \n"
99 << " rod_lvl1_id 0x" << MSG::hex
100 << rob->rod_lvl1_id() << " \n"
101 << " rod_bc_id 0x" << rob->rod_bc_id() << " \n"
102 << " rod_lvl1_trigger_type 0x" << rob->rod_lvl1_trigger_type()
103 << " \n"
104 << " nchildren 0x" << rob->nchildren() << " \n"
105 << MSG::dec);
106
107
109 const uint32_t nstatus = rob->rod_nstatus();
111 std::vector<uint32_t> vStatusWords;
112 vStatusWords.reserve(nstatus);
114 for (uint32_t i = 0;
i < nstatus; ++
i, ++it_status) {
115 vStatusWords.push_back(
static_cast<uint32_t>(*it_status));
117 << *it_status << MSG::dec);
118 }
119
120
121
122
123
124 bool error_status(false);
125 if (vStatusWords.size() == 0) {
127 }
128 if (vStatusWords.size() > 0 && vStatusWords.at(0) != 0) {
129 ATH_MSG_WARNING(
"Non-zero first status word, payload may not be valid");
130 error_status = true;
131 }
132
133
135 const uint32_t ndata = rob->rod_ndata();
137
139 std::vector<uint32_t> vDataWords;
140 vDataWords.reserve(ndata);
141 for (uint32_t i = 0;
i < ndata; ++
i, ++it_data) {
142 vDataWords.push_back(
static_cast<uint32_t>(*it_data));
144 << *it_data << MSG::dec);
145 }
146
147
149 if (error_status) {
151 }
152 if (error_rob) {
154 }
155 if (error_rod) {
157 }
158
159
160 container->push_back(std::make_unique<xAOD::L1TopoRawData>());
161 container->back()->initialize(vDataWords,vStatusWords,error,rodId);
162
163 return StatusCode::SUCCESS;
164
165}
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
const DataType * PointerType