10#include <rawdata/dataobjects/RawCOPPERFormat_latest.h>
33 for (
int i = 0; i < 4; i++) {
42#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
43void RawCOPPERFormat_latest::CheckB2LFEEHeaderVersion(
int n)
48 for (
int i = 0; i < 4; i++) {
51 if ((temp_buf[ 3 ] & 0x40000000) == 0) {
55 printf(
"[DEBUG] \033[31m");
56 printf(
"[DEBUG] ===Firmware ver. ERROR===\n ");
57 printf(
"[DEBUG] FTSW and b2tt firmwares was updated on Nov.22, 2013 and the header format attached by B2link was changed in the new firmwares.\n");
58 printf(
"[DEBUG] If you are going to take data now, Please update the firmware.\n");
59 printf(
"[DEBUG] For details, please see Nakao-san's e-mail [b2link_ml:0111] Re: [daq2ml:0159] beta version of trigger timing receiver firmware (b2tt) on bdaq SVN\n");
60 printf(
"[DEBUG] Or if you are going to read data taken before the update, please use basf2 software before svn rev. 7419\n");
61 printf(
"[DEBUG] About the format please see Nakao-san's B2GM slides(p. 13 and 15) http://kds.kek.jp/getFile.py/access?contribId=143&sessionId=38&resId=0&materialId=slides&confId=13911.\n");
62 printf(
"[DEBUG] Sorry for inconvenience.\n");
63 printf(
"[DEBUG] \033[0m");
66 sprintf(err_buf,
"FTSW and b2tt firmwares are old. Exiting...\n %s %s %d\n",
67 __FILE__, __PRETTY_FUNCTION__, __LINE__);
68 printf(
"%s\n", err_buf); fflush(stdout);
81 sprintf(err_buf,
"RawCOPPERFormat_latest contains no FINESSE data. Exiting...\n %s %s %d\n",
82 __FILE__, __PRETTY_FUNCTION__, __LINE__);
83 printf(
"%s\n", err_buf); fflush(stdout);
95 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
96 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
97 printf(
"[DEBUG] %s\n", err_buf);
105 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
106 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
107 printf(
"[DEBUG] %s\n", err_buf);
115 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
116 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
117 printf(
"[DEBUG] %s\n", err_buf);
125 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
126 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
127 printf(
"[DEBUG] %s\n", err_buf);
136 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
137 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
138 printf(
"[DEBUG] %s\n", err_buf);
146 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
147 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
148 printf(
"[DEBUG] %s\n", err_buf);
156 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
157 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
158 printf(
"[DEBUG] %s\n", err_buf);
166 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
167 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
168 printf(
"[DEBUG] %s\n", err_buf);
177 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
178 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
179 printf(
"[DEBUG] %s\n", err_buf);
187 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
188 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
189 printf(
"[DEBUG] %s\n", err_buf);
197 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
198 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
199 printf(
"[DEBUG] %s\n", err_buf);
207 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
208 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
209 printf(
"[DEBUG] %s\n", err_buf);
217 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
218 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
219 printf(
"[DEBUG] %s\n", err_buf);
228 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
229 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
230 printf(
"[DEBUG] %s\n", err_buf);
239 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
240 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
241 printf(
"[DEBUG] %s\n", err_buf);
249 sprintf(err_buf,
"[FATAL] This function is not supported.(block %d) Exiting...: \n%s %s %d\n",
250 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
251 printf(
"[DEBUG] %s\n", err_buf);
257 std::vector<std::vector<unsigned int>>& summary_table)
264 std::vector<std::vector<unsigned int>> temp;
265 for (
int i = 0; i < MAX_PCIE40_CH; i++) {
269 for (
unsigned j = 0; j < summary_table.size(); ++j) {
270 if (input_val[i] == summary_table.at(j).at(2)) {
271 summary_table.at(j).at(1)++;
276 if (same_flag == 0) {
277 summary_table.push_back({
static_cast<unsigned int>(i), 1, input_val[i] });
281 sort(summary_table.begin(), summary_table.end(), [](
const std::vector<unsigned int>& alpha,
282 const std::vector<unsigned int>& beta) {return alpha.at(1) < beta.at(1);});
int * GetFINESSEBuffer(int n, int finesse_num) OVERRIDE_CPP17
Get a pointer to a FINESSE buffer.
int GetFINESSENwords(int n, int finesse_num) OVERRIDE_CPP17
Get the size of a finesse buffer.
Abstract base class for different kinds of events.