23 <<
"Using unsafe getSpigotData without length controls. Not recommended! Replace with new getSpigotData call";
28 const uint16_t*
base = ((
const uint16_t*)
this) +
sizeof(
HcalDCCHeader) /
sizeof(uint16_t);
30 for (
i = 0;
i <= nspigot;
i++) {
34 if ((
offset + len +
sizeof(
HcalDCCHeader) /
sizeof(uint16_t)) < (validSize /
sizeof(uint16_t))) {
49 for (
int i = 0;
i < 18;
i++)
63 unsigned char LRB_error_word) {
70 spigotInfo[spigot_id] |= (LRB_error_word << 16) | ((
data.getErrorsWord() & 0xFF) << 24);
73 dcch0 |= (1 << (spigot_id + 14));
75 unsigned int lenSoFar = 0;
76 for (
unsigned int i = 0;
i < spigot_id;
i++)
78 unsigned short* startingPoint =
79 ((
unsigned short*)
this) +
sizeof(
HcalDCCHeader) /
sizeof(
unsigned short) + lenSoFar * 2;
80 memcpy(startingPoint,
data.getRawData(),
sizeof(
unsigned short) *
data.getRawLength());
82 lenSoFar +=
data.getRawLength() / 2;
83 uint32_t* trailer = ((uint32_t*)
this) +
sizeof(
HcalDCCHeader) /
sizeof(uint32_t) + lenSoFar;
86 trailer[0] = 0xA0000000u | len64;
void adoptData(const unsigned short *data, int length)
char data[epos_bytes_allocation]
Log< level::Warning, false > LogWarning