9#include <rawdata/dataobjects/RawCOPPERFormat.h>
16RawCOPPERFormat::RawCOPPERFormat()
26 unsigned int checksum = 0;
27 for (
int i = 0; i < nwords; i++) {
28 checksum = checksum ^ buf[ i ];
38 switch (finesse_num) {
56 sprintf(err_buf,
"[FATAL] Specifined FINESSE number( = %d ) is invalid. Exiting...\n%s %s %d\n", finesse_num,
57 __FILE__, __PRETTY_FUNCTION__, __LINE__);
58 printf(
"%s", err_buf); fflush(stdout);
67 switch (finesse_num) {
85 sprintf(err_buf,
"[FATAL] Specifined FINESSE number( = %d ) is invalid. Exiting...\n%s %s %d\n", finesse_num,
86 __FILE__, __PRETTY_FUNCTION__, __LINE__);
87 printf(
"%s", err_buf); fflush(stdout);
96 switch (finesse_num) {
114 sprintf(err_buf,
"[FATAL] Specifined FINESSE number( = %d ) is invalid. Exiting...\n%s %s %d\n", finesse_num,
115 __FILE__, __PRETTY_FUNCTION__, __LINE__);
116 printf(
"%s", err_buf); fflush(stdout);
126 "[FATAL] This function is not supported in the version of RawCOPPER format that you're using. n=%d : %s %s %d: Exiting...\n",
127 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
128 printf(
"%s\n", err_buf); fflush(stdout);
138 "[FATAL] This function is not supported in the version of RawCOPPER format that you're using. n=%d : %s %s %d: Exiting...\n",
139 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
140 printf(
"%s\n", err_buf); fflush(stdout);
149 "[FATAL] This function is not supported in the version of RawCOPPER format that you're using. n=%d fin=%d : %s %s %d: Exiting...\n",
150 n, finesse_num, __FILE__, __PRETTY_FUNCTION__, __LINE__);
151 printf(
"%s\n", err_buf); fflush(stdout);
157 int*
const(& )[MAX_PCIE40_CH],
158 int const(& )[MAX_PCIE40_CH],
163 "[FATAL] This function is not supported in the version of RawCOPPER format that you're using. : %s %s %d: Exiting...\n", __FILE__,
164 __PRETTY_FUNCTION__, __LINE__);
165 printf(
"%s\n", err_buf); fflush(stdout);
171 std::vector<std::vector<unsigned int> >& )
175 "[FATAL] This function is not supported in the version of RawCOPPER format that you're using. : %s %s %d: Exiting...\n", __FILE__,
176 __PRETTY_FUNCTION__, __LINE__);
177 printf(
"%s\n", err_buf); fflush(stdout);
185 if (node_name == NULL || node_id == 0 || bufsize < 20) {
188 "[FATAL] Null pointer or strange node_id(%.8x)in an argument of this function. Exiting... : \n%s %s %d\n",
190 __FILE__, __PRETTY_FUNCTION__, __LINE__);
191 printf(
"%s", err_buf); fflush(stdout);
194 sprintf(node_name,
"cpr%u",
195 (10 * (node_id >> 28) + (node_id >> 24)) * 1000 +
196 (node_id & COPPERID_MASK));
202 if (node_name == NULL || node_id == 0 || bufsize < 20) {
205 "[FATAL] Null pointer or strange node_id(%.8x)in an argument of this function. Exiting... : \n%s %s %d\n",
207 __FILE__, __PRETTY_FUNCTION__, __LINE__);
208 printf(
"%s", err_buf); fflush(stdout);
211 sprintf(node_name,
"cpr%u",
212 (10 * (node_id >> 28) + (node_id >> 24)) * 1000 +
213 (node_id & COPPERID_MASK));
221 "[FATAL] This function is not supported in the version of RawCOPPER format that you're using. n=%d fin=%d : %s %s %d: Exiting...\n",
222 n, finesse_num, __FILE__, __PRETTY_FUNCTION__, __LINE__);
223 printf(
"%s\n", err_buf); fflush(stdout);
struct to contain header information used by RawCOPPERFormat::Packer()
virtual int * Get3rdFINESSEBuffer(int n)
get FINESSE buffer pointer for slot C
virtual int GetOffset2ndFINESSE(int n)
get # of offset words for FINESSE slot B buffer position
virtual int * Get2ndFINESSEBuffer(int n)
get FINESSE buffer pointer for slot B
virtual int GetOffset4thFINESSE(int n)
get # of offset words for FINESSE slot D buffer position
virtual int GetOffset3rdFINESSE(int n)
get # of offset words for FINESSE slot C buffer position
virtual int * Get4thFINESSEBuffer(int n)
get FINESSE buffer pointer for slot D
virtual int * Get1stFINESSEBuffer(int n)
get FINESSE buffer pointer for slot A
Abstract base class for different kinds of events.