Belle II Software development
RawFTSWFormat.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <rawdata/dataobjects/RawFTSWFormat.h>
10
11
12using namespace std;
13using namespace Belle2;
14
16{
17}
18
20{
21}
22
23// This function is only available in RawFTSW ver.1 (for DESY test)
25{
26 char err_buf[500];
27 sprintf(err_buf,
28 "[FATAL] This function is not supported in the version of RawFTSW format that you're using. n=%d : %s %s %d: Exiting...\n",
29 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
30 printf("%s\n", err_buf); fflush(stdout);
31 B2FATAL(err_buf);
32 return -1;
33}
34
35// This function is only available in RawFTSW ver.2
37{
38 char err_buf[500];
39 sprintf(err_buf,
40 "[FATAL] This function is not supported in the version of RawFTSW format that you're using. n=%d : %s %s %d: Exiting...\n",
41 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
42 printf("%s\n", err_buf); fflush(stdout);
43 B2FATAL(err_buf);
44 return -1;
45}
46
47
48
50{
51 char err_buf[500];
52 sprintf(err_buf,
53 "[FATAL] This function is not supported in the version of RawFTSW format that you're using. n=%d : %s %s %d: Exiting...\n",
54 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
55 printf("%s\n", err_buf); fflush(stdout);
56 B2FATAL(err_buf);
57 return -1;
58
59}
60
62{
63 char err_buf[500];
64 sprintf(err_buf,
65 "[FATAL] This function is not supported in the version of RawFTSW format that you're using. n=%d : %s %s %d: Exiting...\n",
66 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
67 printf("%s\n", err_buf); fflush(stdout);
68 B2FATAL(err_buf);
69 return -1;
70}
71
73{
74 char err_buf[500];
75 sprintf(err_buf,
76 "[FATAL] This function is not supported in the version of RawFTSW format that you're using. n=%d : %s %s %d: Exiting...\n",
77 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
78 printf("%s\n", err_buf); fflush(stdout);
79 B2FATAL(err_buf);
80 return -1;
81}
82
84{
85 char err_buf[500];
86 sprintf(err_buf,
87 "[FATAL] This function is not supported in the version of RawFTSW format that you're using. n=%d : %s %s %d: Exiting...\n",
88 n, __FILE__, __PRETTY_FUNCTION__, __LINE__);
89 printf("%s\n", err_buf); fflush(stdout);
90 B2FATAL(err_buf);
91 return -1;
92}
93
94// The parameter n is unused: let's disable the compiler warning for this function.
95#pragma GCC diagnostic push
96#pragma GCC diagnostic ignored "-Wunused-parameter"
97
98void RawFTSWFormat::GetPCTimeVal(int n, struct timeval* tv)
99{
100 // According to Nakao-san's comment at DAQ meeting on Feb.28, 2020. If one calls this function for older data, just returning 0 values is fine.
101 // No need to either end up with FATAL message or issue any WARNING messages (Actually, WARNING messages would be issued in every event when implemented.)
102 tv->tv_sec = 0;
103 tv->tv_usec = 0;
104
105 return;
106}
107
108#pragma GCC diagnostic pop
virtual int GetIsHER(int n)
HER injection = 1 or LER injection = 0.
virtual void GetPCTimeVal(int n, struct timeval *tv)
Get stored information of getimeofday in a PC.
virtual unsigned int GetFrameCount(int n)
Get a frame count.
virtual unsigned int GetTimeSinceLastInjection(int n)
Get time since the last injection.
RawFTSWFormat()
Default constructor.
virtual int Get15bitTLUTag(int n)
DESY test only (ver.1)
virtual ~RawFTSWFormat()
Constructor using existing pointer to raw data buffer.
virtual unsigned int GetTimeSincePrevTrigger(int n)
Get time since the previous trigger.
virtual unsigned int GetBunchNumber(int n)
Get a bunch number.
Abstract base class for different kinds of events.
STL namespace.