RawEventHeader.cpp
Go to the documentation of this file.
1 #include "DAQDataFormats/RawEventHeader.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 RawEventHeader
14 #define LAST_CLASS_VERSION 1
15 #define CURRENT_FIELDS_SUB_NAMESPACE raweventhdr
16 #include "DAQDataFormats/DataFormatLast.inc"
17 
18 namespace daqdataformats{
19 
20 //------------------------Constructors------------------------------------------
21 /// After this constructor the buffer pointer is set to the internal source
23  PREVIOUS_VERSION_CLASS_NAME(version)
24 {
25  INITIALIZE_DEBUGGING_VARIABLES;
26  /// Apply the default constructor
27  defaultConstructorFixedSize();
28 }
29 
30 //------------------------------------------------------------------------------
32  PREVIOUS_VERSION_CLASS_NAME(copy_in)
33 {
34  INITIALIZE_DEBUGGING_VARIABLES;
35  lastOperationsInDeepCopy(copy_in);
36 }
37 
38 //------------------------------------------------------------------------------
40  PREVIOUS_VERSION_CLASS_NAME(version)
41 {
42  INITIALIZE_DEBUGGING_VARIABLES;
43  /// Use default Shallow copy constructor
44  copy(buffer);
45 }
46 
47 //------------------------------------------------------------------------------
49 
50 
51 //------------------------------------------------------------------------------
52 /// All binding routines
53 #define STANDARD_ROUTINES \
54  BIND_GET_AND_SET(MarkerLeft , version0, uint32_t);\
55  BIND_GET_AND_SET(MarkerRight , version0, uint32_t);\
56  BIND_GET_AND_SET(Version , version0, uint32_t);\
57  BIND_GET_AND_SET(DataLoggerID , version0, uint32_t);\
58  BIND_GET_AND_SET(RunNumber , version0, uint32_t);\
59  BIND_GET_AND_SET(RunType , version0, uint32_t);\
60  BIND_GET_AND_SET(ConfigIDX , version0, uint32_t);\
61  BIND_GET_AND_SET(Partition , version0, uint32_t);\
62  BIND_GET_AND_SET(Subrun , version0, uint32_t);\
63  BIND_GET_AND_SET(EventNumberLo , version0, uint32_t);\
64  BIND_GET_AND_SET(EventNumberHi , version0, uint32_t);\
65  BIND_GET_AND_SET(EventType , version0, uint32_t);\
66  BIND_GET_AND_SET(EventSize , version0, uint32_t);\
67  BIND_GET_AND_SET(DataBlockNumber , version0, uint32_t);\
68  BIND_GET_AND_SET(MonteCarloFlag , version0, bool);\
69  BIND_GET_AND_SET(TriggerFilled , version1, uint32_t);\
70  BIND_GET_AND_SET(TailFilled , version1, uint32_t);\
71  BIND_IS_AND_SET (CRCCalculationUsed, version0);\
72  BIND_IS_AND_SET (EventIncomplete, version0);\
73  BIND_CUSTOM_FUNCTION(addEventSize , version0, ,bool , const uint32_t);\
74  BIND_CUSTOM_FUNCTION(advanceEventNumber , version0, ,bool, ); \
75  BIND_CUSTOM_FUNCTION(advanceDataBlockNumber, version0, ,bool, ); \
76  BIND_GET_AND_SET(EventNumber, version0, uint64_t);\
77  BIND_GET(TailVersion, version0, version_t);\
78  BIND_STADARD_FUNCTIONS \
79  BIND_STADARD_FUNCTION(sizeofdata);
80 
81 #include "DAQDataFormats/setFunctionPointers_template.inc"
82 
83 
84 }// end of namespaces
::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
Class to hold the data from the FEBs in correct formats.
RawEventHeader(const version_t version=CURRENT_FIELDS_SUB_NAMESPACE::RAWEVENTHEADER_LATEST_VERSION)
Constructor.