25 for (
i = 0;
i <= nspigot;
i++) {
29 if ((offset + len +
sizeof(
CastorCTDCHeader) /
sizeof(uint16_t)) < (validSize /
sizeof(uint16_t))) {
44 for (
int i = 0;
i < 3;
i++)
57 unsigned char LRB_error_word) {
67 ctdch0 |= (1 << (spigot_id + 14));
69 unsigned int lenSoFar = 0;
70 for (
unsigned int i = 0;
i < spigot_id;
i++)
72 unsigned short* startingPoint =
73 ((
unsigned short*)
this) +
sizeof(
CastorCTDCHeader) /
sizeof(
unsigned short) + lenSoFar * 2;
77 uint32_t* trailer = ((uint32_t*)
this) +
sizeof(
CastorCTDCHeader) /
sizeof(uint32_t) + lenSoFar;
80 trailer[0] = 0xA0000000u | len64;
84 unsigned int spigot_id = 2;
92 ctdch0 |= (1 << (spigot_id + 14));
94 unsigned int lenSoFar = 0;
95 for (
unsigned int i = 0;
i < spigot_id;
i++)
97 unsigned short* startingPoint =
98 ((
unsigned short*)
this) +
sizeof(
CastorCTDCHeader) /
sizeof(
unsigned short) + lenSoFar * 2;
102 uint32_t* trailer = ((uint32_t*)
this) +
sizeof(
CastorCTDCHeader) /
sizeof(uint32_t) + lenSoFar;
105 trailer[0] = 0xA0000000u | len64;
void adoptData(const unsigned short *data, int length)
const int getRawLength() const
Get the length of the raw data.
unsigned int getErrorsWord() const
Get the errors word.
unsigned int getErrorsWord() const
Get the errors word.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
const unsigned short * getRawData() const
Get a pointer to the raw data.
const int getRawLength() const
Get the length of the raw data.
const unsigned short * getRawData() const
Get a pointer to the raw data.
char data[epos_bytes_allocation]