13 unsigned int max_block_no = 0;
15 max_block_no = (
size - 1023) / 4096;
17 if (
block != max_block_no)
35 }
else if (
block == 0) {
53 return (
size - 1023) / 4096 + 1;
71 unsigned int board_id,
73 : data0_((
uint64_t(amc_no & AmcNo_mask) << AmcNo_shift) | (
uint64_t(lv1_id & LV1ID_mask) << LV1ID_shift) |
75 data1_((
uint64_t(or_n & OrN_mask) << OrN_shift) | (
uint64_t(board_id & BoardID_mask) << BoardID_shift) |
82 bool Trailer::check(
unsigned int crc,
unsigned int lv1_id,
unsigned int size,
bool mtf7_mode)
const {
85 <<
"\n\tLV1 ID " <<
getLV1ID() <<
", size " <<
getSize() <<
", CRC " << std::hex
86 << std::setw(8) << std::setfill(
'0') <<
getCRC() <<
std::dec <<
"\nBut expected:"
87 <<
"\n\tLV1 ID " << (lv1_id &
LV1ID_mask) <<
", size " <<
size <<
", CRC " << std::hex
88 << std::setw(8) << std::setfill(
'0') << crc;
95 std::string dstring(reinterpret_cast<const char *>(
start), reinterpret_cast<const char *>(
end) + 4);
106 const std::vector<uint64_t> &
load,
110 trailer_(0, lv1id,
load.
size() + 3) {
157 for (
unsigned int i = 0;
i <
payload_.size() - 3; ++
i)