86 std::map<RPCAMCLink, std::vector<std::pair<int, rpctwinmux::RPCRecord> > > amc_bx_tmrecord;
91 event.bunchCrossing(),
96 std::map<int, FEDRawData> fed_data;
98 for (std::pair<
const int, std::vector<RPCAMCLink> >
const& fed_amcs :
fed_amcs_) {
100 unsigned int size(0);
109 std::memcpy(
data.data() +
size * 8, &block_header.getRecord(), 8);
113 data.resize((
size + fed_amcs.second.size()) * 8);
114 unsigned int block_content_size(0);
116 std::map<RPCAMCLink, std::vector<std::pair<int, rpctwinmux::RPCRecord> > >::const_iterator bx_tmrecord(
117 amc_bx_tmrecord.find(
amc));
118 unsigned int block_amc_size(3 + 2 * (bx_tmrecord == amc_bx_tmrecord.end() ? 0 : bx_tmrecord->second.size()));
119 block_content_size += block_amc_size;
121 true,
true,
true,
true,
true,
true,
true, block_amc_size, 0,
amc.getAMCNumber(), 0);
122 std::memcpy(
data.data() +
size * 8, &amc_content.getRecord(), 8);
127 data.resize((
size + block_content_size) * 8);
130 std::map<RPCAMCLink, std::vector<std::pair<int, rpctwinmux::RPCRecord> > >::const_iterator bx_tmrecord(
131 amc_bx_tmrecord.find(
amc));
132 unsigned int block_amc_size(3 + 2 * (bx_tmrecord == amc_bx_tmrecord.end() ? 0 : bx_tmrecord->second.size()));
136 event.bunchCrossing(),
138 event.eventAuxiliary().orbitNumber(),
141 std::memcpy(
data.data() +
size * 8, tm_header.getRecord(), 16);
144 if (bx_tmrecord != amc_bx_tmrecord.end()) {
145 for (std::vector<std::pair<int, rpctwinmux::RPCRecord> >::const_iterator tmrecord = bx_tmrecord->second.begin();
146 tmrecord != bx_tmrecord->second.end();
148 std::memcpy(
data.data() +
size * 8, tmrecord->second.getRecord(), 16);
154 std::memcpy(
data.data() +
size * 8, &tm_trailer.getRecord(), 8);
163 std::memcpy(
data.data() +
size * 8, &block_trailer.getRecord(), 8);