RawMicroBlockHeader.h
Go to the documentation of this file.
1 #ifndef RAWMICROBLOCKHEADER_H
2 #define RAWMICROBLOCKHEADER_H
3 #include "DAQDataFormats/RawMicroBlockHeaderV1.h"
4 #include "DAQDataFormats/FunctionBind.h"
5 
6 /// It is requred to
7 /// 1. include DAQDataFormats/DataFormatFirst.inc
8 /// 2. define CURRENT_CLASS
9 /// 3. define CURRENT_CLASS_VERSION for version of the class
10 /// OR define LAST_CLASS_VERSION for the main structure of the class
11 /// 4. (optional) define CURRENT_FIELDS_SUB_NAMESPACE
12 /// 5. include DAQDataFormats/DataFormatLast.inc
13 /// before the declaration of the DataFormat version class in the header.
14 #include "DAQDataFormats/DataFormatFirst.inc"
15 #define CURRENT_CLASS RawMicroBlockHeader
16 #define LAST_CLASS_VERSION 1
17 #define CURRENT_FIELDS_SUB_NAMESPACE microblock
18 #include "DAQDataFormats/DataFormatLast.inc"
19 
20 namespace daqdataformats {
21 
22  namespace microblock {
24  }
25 
26  class RawMicroBlockHeader: public PREVIOUS_VERSION_CLASS_NAME {
27 
28  public:
29 
30  // Constructors
32  RawMicroBlockHeader(const RawMicroBlockHeader& copy_in); //! Deep copy constructor
33  RawMicroBlockHeader(const void*, const version_t version = rawdaqdataformat::DAQDATAFORMAT_UNKNOWN_VERSION); //! Shallow copy constructor
34  /// Destructor
36 
39 
40  IMPLEMENT_GET_AND_SET_MAIN(DestBuffID, uint32_t)
41  IMPLEMENT_GET_AND_SET_MAIN(Partition, uint32_t)
42  IMPLEMENT_GET_MAIN (Version, uint32_t)
43 
45  protected:
46  IMPLEMENT_GET_AND_SET_MAIN(V0, uint32_t)
47  IMPLEMENT_GET_AND_SET_MAIN(V1, uint32_t)
48  IMPLEMENT_SET_MAIN(Version, uint32_t)
49 
50  bool setFunctionPointers();
51 
52  };
53 
54 
55 } // END NAMESPCE daqdataformats
56 #endif /* RAWMICROBLOCKHEADER_H */
#define IMPLEMENT_SET_MAIN(FUNC, UNITS)
Definition: Macros.h:210
static const version_t RAWMICROBLOCK_LATEST_VERSION
#define LAST_CLASS_VERSION
#define IMPLEMENT_MAIN_STANDARD
Definition: Macros.h:230
#define IMPLEMENT_MAIN_setBufferSource
Definition: Macros.h:228
const XML_Char * version
Definition: expat.h:187
#define IMPLEMENT_FIGUREOUT_VERSION_STATIC(CLASS)
This should be in the header.
Definition: Macros.h:295
int32_t version_t
Definition: RawDAQData.h:72
#define IMPLEMENT_GET_AND_SET_MAIN(FUNC, UNITS)
Definition: Macros.h:217
static const version_t DAQDATAFORMAT_UNKNOWN_VERSION
Definition: RawDAQData.h:81
Class to hold the data from the FEBs in correct formats.
#define IMPLEMENT_GET_MAIN(FUNC, UNITS)
Definition: Macros.h:208