92 xpu::scoped_timer t_(fles::to_string(subsystem));
99 auto& digisOut = std::get<0>(out);
100 auto& monitorOut = std::get<1>(out);
101 auto& auxOut = std::get<2>(out);
105 std::vector<std::vector<Digi>> msDigis(numMs);
106 monitorOut.msMonitor.resize(numMs);
107 auxOut.msAux.resize(numMs);
109 xpu::t_add_bytes(msData.monitor.sizeBytesIn);
111 xpu::push_timer(
"Unpack");
112 xpu::t_add_bytes(msData.monitor.sizeBytesIn);
114 for (
size_t i = 0; i < numMs; i++) {
115 auto& msDesc = msData.msDesc[i];
118 if (algo ==
fAlgos.end()) {
119 if (!
Contains(legalEqIds, msDesc.eq_id)) {
120 L_(error) <<
"Invalid equip id " << std::hex <<
int{msDesc.eq_id} << std::dec <<
" for subsystem "
122 monitorOut.errInvalidEqId++;
125 L_(error) <<
"Invalid system version " << std::hex <<
int{msDesc.sys_ver} << std::dec <<
" for subsystem "
127 monitorOut.errInvalidSysVer++;
132 auto result = (*algo->second)(msData.msContent[i], msData.msDesc[i], ts.start_time());
133 msDigis[i] = std::move(std::get<0>(result));
134 monitorOut.msMonitor[i] = std::move(std::get<1>(result));
135 auxOut.msAux[i] = std::move(std::get<2>(result));
139 xpu::push_timer(
"Resize");
140 size_t nDigisTotal = 0;
141 for (
const auto& digis : msDigis) {
142 nDigisTotal += digis.size();
144 digisOut.resize(nDigisTotal);
145 monitorOut.sizeBytesOut = nDigisTotal *
sizeof(Digi);
148 xpu::push_timer(
"Merge");
149 xpu::t_add_bytes(monitorOut.sizeBytesOut);
151 for (
size_t i = 0; i < numMs; i++) {
153 for (
size_t x = 0;
x < i;
x++)
154 offset += msDigis[
x].
size();
155 std::copy(msDigis[i].begin(), msDigis[i].end(), digisOut.begin() + offset);
159 xpu::push_timer(
"Sort");
160 xpu::t_add_bytes(monitorOut.sizeBytesOut);