RawMicroBlockHeader.cpp
Go to the documentation of this file.
1 #include "DAQDataFormats/RawMicroBlockHeader.h"
2 #include "DAQDataFormats/DataFormatException.h"
3 
4 /// It is requred to
5 /// 1. include DAQDataFormats/DataFormatFirst.inc
6 /// 2. define CURRENT_CLASS
7 /// 3. define CURRENT_CLASS_VERSION for version of the class
8 /// OR define LAST_CLASS_VERSION for the main structure of the class
9 /// 4. (optional) define CURRENT_FIELDS_SUB_NAMESPACE
10 /// 5. include DAQDataFormats/DataFormatLast.inc
11 /// before the declaration of the DataFormat version class in the header.
12 #include "DAQDataFormats/DataFormatFirst.inc"
13 #define CURRENT_CLASS RawMicroBlockHeader
14 #define LAST_CLASS_VERSION 1
15 #define CURRENT_FIELDS_SUB_NAMESPACE microblock
16 #include "DAQDataFormats/DataFormatLast.inc"
17 
18 namespace daqdataformats{
19 
20 //------------------------------------------------------------
21 // Default constructor
23  PREVIOUS_VERSION_CLASS_NAME(version)
24 {
25  INITIALIZE_DEBUGGING_VARIABLES;
26  PRINT_ON_DEBUG(__PRETTY_FUNCTION__);
27  /// Apply the default constructor
28  defaultConstructorFixedSize();
29 }
30 
31 
32 //------------------------------------------------------------------------------
34  PREVIOUS_VERSION_CLASS_NAME(copy_in._version)
35 {
36  INITIALIZE_DEBUGGING_VARIABLES;
37  PRINT_ON_DEBUG(__PRETTY_FUNCTION__);
38  copy(copy_in);
39 }
40 
41 //------------------------------------------------------------------------------
43  PREVIOUS_VERSION_CLASS_NAME(version)
44 {
45  INITIALIZE_DEBUGGING_VARIABLES;
46  PRINT_ON_DEBUG(__PRETTY_FUNCTION__);
47  copy(buffer);
48 }
49 
50 //------------------------------------------------------------
51 // Destructor
53 
54 /// All binding routines
55 #define STANDARD_ROUTINES \
56  BIND_GET_AND_SET(DestBuffID , version0, uint32_t);\
57  BIND_GET_AND_SET(Partition , version0, uint32_t);\
58  BIND_GET_AND_SET(Version , version0, uint32_t);\
59  BIND_GET_AND_SET(V0 , version0, uint32_t);\
60  BIND_GET_AND_SET(V1 , version0, uint32_t);\
61  BIND_STADARD_FUNCTION(sizeofdata); \
62  BIND_STADARD_FUNCTION(readData); \
63  BIND_STADARD_FUNCTION(setBufferSource);
64 
65 #include "DAQDataFormats/setFunctionPointers_template.inc"
66 
67 
68 
69 }// end ofa namespace
RawMicroBlockHeader(const version_t version=microblock::RAWMICROBLOCK_LATEST_VERSION)
::xsd::cxx::tree::buffer< char > buffer
Definition: Database.h:179
const XML_Char * version
Definition: expat.h:187
int32_t version_t
Definition: RawDAQData.h:72
#define PRINT_ON_DEBUG(x)
Definition: RawDAQData.h:35
Class to hold the data from the FEBs in correct formats.