RawRunHeader.h
Go to the documentation of this file.
1 #ifndef RAWRUNHEADER_H
2 #define RAWRUNHEADER_H
3 
4 #include "DAQDataFormats/RawRunHeaderV0.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 RawRunHeader
16 #define LAST_CLASS_VERSION 0
17 #define CURRENT_FIELDS_SUB_NAMESPACE rawrunhdr
18 #include "DAQDataFormats/DataFormatLast.inc"
19 
20 namespace daqdataformats {
21 
24  }
25 
26  class RawRunHeader: public PREVIOUS_VERSION_CLASS_NAME {
27 
28  public:
29 
31  RawRunHeader(const RawRunHeader& copy_in); //!< Copyin Constructor
32  RawRunHeader(const void* buffer, const version_t version = rawdaqdataformat::DAQDATAFORMAT_UNKNOWN_VERSION); //!< Constructor with data intialization
33  ~RawRunHeader(); //!< Destructor
34 
36 
37  IMPLEMENT_GET_MAIN (MarkerHi , uint32_t)
38  IMPLEMENT_GET_MAIN (MarkerLo , uint32_t)
39  IMPLEMENT_GET_MAIN (Reserved1 , uint32_t)
40  IMPLEMENT_GET_MAIN (Reserved2 , uint32_t)
41  IMPLEMENT_GET_MAIN (Version , uint32_t)
42  IMPLEMENT_GET_AND_SET_MAIN(RunNumber , uint32_t)
44  IMPLEMENT_GET_AND_SET_MAIN(ConfigIDX , uint32_t)
45  IMPLEMENT_GET_AND_SET_MAIN(Partition , uint32_t)
46  IMPLEMENT_GET_AND_SET_MAIN(Subrun , uint32_t)
47  IMPLEMENT_GET_AND_SET_MAIN(ConfigurationBlockSet , uint32_t)
48  IMPLEMENT_GET_AND_SET_MAIN(RunControlVersion , uint32_t)
49  IMPLEMENT_GET_AND_SET_MAIN(RunControlID , uint32_t)
50  IMPLEMENT_GET_AND_SET_MAIN(DataLoggerVersion , uint32_t)
51  IMPLEMENT_GET_AND_SET_MAIN(DataLoggerID , uint32_t)
52  IMPLEMENT_GET_AND_SET_MAIN(RunStartTime , uint32_t)
53  IMPLEMENT_GET_AND_SET_MAIN(SubRunStartTime , uint32_t)
54  IMPLEMENT_GET_AND_SET_MAIN(SubRunEndTime , uint32_t)
55  IMPLEMENT_GET_AND_SET_MAIN(RunEndTime , uint32_t)
56  IMPLEMENT_GET_AND_SET_MAIN(TotalEvents , uint32_t)
57  IMPLEMENT_GET_AND_SET_MAIN(UniversalEventStartLo , uint32_t)
58  IMPLEMENT_GET_AND_SET_MAIN(UniversalEventStartHi , uint32_t)
59  IMPLEMENT_GET_AND_SET_MAIN(UniversalEventEndLo , uint32_t)
60  IMPLEMENT_GET_AND_SET_MAIN(UniversalEventEndHi , uint32_t)
61  IMPLEMENT_GET_AND_SET_MAIN(RunSize , uint32_t)
63  IMPLEMENT_GET_AND_SET_MAIN(TriggerCtrlID , uint32_t)
64  IMPLEMENT_GET_AND_SET_MAIN(TriggerMC , uint32_t)
65  IMPLEMENT_GET_AND_SET_MAIN(VTMod , uint32_t)
66  IMPLEMENT_GET_AND_SET_MAIN(ValidTriggerTypesLow , uint32_t)
67  IMPLEMENT_GET_AND_SET_MAIN(ValidTriggerTypesHigh , uint32_t)
68  IMPLEMENT_GET_AND_SET_MAIN(ValidTriggerTypesHigh2, uint32_t)
69  IMPLEMENT_GET_AND_SET_MAIN(TriggerListIDX , uint32_t)
70  IMPLEMENT_GET_AND_SET_MAIN(TriggerPrescaleListIDX, uint32_t)
71  IMPLEMENT_GET_AND_SET_MAIN(CRC , uint32_t)
72 
73  IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_0PAR(getUniversalEventStart, const,uint64_t)
74  IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_1PAR(setUniversalEventStart, ,bool , const uint64_t)
75  IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_0PAR(getUniversalEventEnd , const,uint64_t)
76  IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_1PAR(setUniversalEventEnd , ,bool , const uint64_t)
77 
80  IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_0PAR(advanceEventNumber , ,bool)
81 
82  IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_1PAR(addValidTriggerTypesLow , ,bool , const uint32_t)
83  IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_1PAR(addValidTriggerTypesHigh , ,bool , const uint32_t)
84  IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_1PAR(addValidTriggerTypesHigh2, ,bool , const uint32_t)
85  IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_1PAR(addRunSize , ,bool , const uint32_t)
86 
88 
89  protected:
90  bool setFunctionPointers();
91 
92  IMPLEMENT_SET_MAIN (MarkerHi , uint32_t)
93  IMPLEMENT_SET_MAIN (MarkerLo , uint32_t)
94  IMPLEMENT_SET_MAIN (Reserved1 , uint32_t)
95  IMPLEMENT_SET_MAIN (Reserved2 , uint32_t)
96  IMPLEMENT_SET_MAIN (Version , uint32_t)
97 
98 
99  };
100 
101 
102 } // END NAMESPACE daqdataformats
103 #endif /* RAWRUNHEADER_H */
#define IMPLEMENT_SET_MAIN(FUNC, UNITS)
Definition: Macros.h:210
#define LAST_CLASS_VERSION
Definition: RawRunHeader.h:16
static const version_t RAWRUNHEADER_LATEST_VERSION
Definition: RawRunHeader.h:23
#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 CURRENT_CLASS
Definition: RawRunHeader.h:15
#define IMPLEMENT_FUNCTION_RETURNING_FUNCTION_POINTER_1PAR(FUNC, CONSTNESS, OUTPUT, INP1)
Definition: Macros.h:183
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_FIELDS_SUB_NAMESPACE
Definition: RawRunHeader.h:17
#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
procfile close()