RawEventHeader.h
Go to the documentation of this file.
1 #ifndef RAWEVENTHEADER_H
2 #define RAWEVENTHEADER_H
3 #include "DAQDataFormats/RawEventHeaderV1.h"
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 
22  }
23 
24  class RawEventHeader: public PREVIOUS_VERSION_CLASS_NAME{
25  public:
26 
28  RawEventHeader(const RawEventHeader& copy_in); //!< Copyin Constructor
29  RawEventHeader(const void* buffer, const version_t version = rawdaqdataformat::DAQDATAFORMAT_UNKNOWN_VERSION); //!< Constructor with data intialization
30  ~RawEventHeader(); //!< Destructor
31 
33 
34  IMPLEMENT_GET_MAIN(MarkerLeft , uint32_t)
35  IMPLEMENT_GET_MAIN(MarkerRight , uint32_t)
36  IMPLEMENT_GET_MAIN(Version , uint32_t)
37  IMPLEMENT_GET_AND_SET_MAIN(DataLoggerID , uint32_t)
38  IMPLEMENT_GET_AND_SET_MAIN(RunNumber , uint32_t)
40  IMPLEMENT_GET_AND_SET_MAIN(ConfigIDX , uint32_t)
41  IMPLEMENT_GET_AND_SET_MAIN(Partition , uint32_t)
42  IMPLEMENT_GET_AND_SET_MAIN(Subrun , uint32_t)
43  IMPLEMENT_GET_AND_SET_MAIN(EventNumberLo , uint32_t)
44  IMPLEMENT_GET_AND_SET_MAIN(EventNumberHi , uint32_t)
45  IMPLEMENT_GET_AND_SET_MAIN(EventType , uint32_t)
46  IMPLEMENT_GET_AND_SET_MAIN(EventSize , uint32_t)
47  IMPLEMENT_GET_AND_SET_MAIN(DataBlockNumber , uint32_t)
48  IMPLEMENT_GET_AND_SET_MAIN(TriggerFilled , uint32_t)
49  IMPLEMENT_GET_AND_SET_MAIN(TailFilled , uint32_t)
50 
51  IMPLEMENT_GET_AND_SET_MAIN(MonteCarloFlag, bool);
52  IMPLEMENT_IS_AND_SET_MAIN (CRCCalculationUsed);
53  IMPLEMENT_IS_AND_SET_MAIN (EventIncomplete);
54 
55  IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_1PAR(addEventSize , ,bool , const uint32_t)
56  IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_0PAR(advanceEventNumber , ,bool)
57  IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_0PAR(advanceDataBlockNumber, ,bool)
58 
59  IMPLEMENT_GET_AND_SET_MAIN(EventNumber, uint64_t)
60 
62 
63  protected:
64 
65  bool setFunctionPointers();
66 
67  IMPLEMENT_SET_MAIN(MarkerLeft , uint32_t)
68  IMPLEMENT_SET_MAIN(MarkerRight , uint32_t)
69  IMPLEMENT_SET_MAIN(Version , uint32_t)
70 
71 
72  };
73 
74 
75 } // END NAMESPACE daqdataformats
76 
77 
78 
79 
80 
81 #endif /* RAWEVENTHEADER_H */
#define LAST_CLASS_VERSION
#define IMPLEMENT_SET_MAIN(FUNC, UNITS)
Definition: Macros.h:210
#define CURRENT_FIELDS_SUB_NAMESPACE
#define IMPLEMENT_MAIN_STANDARD
Definition: Macros.h:230
::xsd::cxx::tree::buffer< char > buffer
Definition: Database.h:179
#define IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_0PAR(FUNC, CONSTNESS, OUTPUT)
Definition: Macros.h:181
#define IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_1PAR(FUNC, CONSTNESS, OUTPUT, INP1)
Definition: Macros.h:183
static const version_t RAWEVENTHEADER_LATEST_VERSION
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 CURRENT_CLASS
#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_IS_AND_SET_MAIN(FUNC)
Definition: Macros.h:220
#define IMPLEMENT_GET_MAIN(FUNC, UNITS)
Definition: Macros.h:208