EventHeaderConstructor.h
Go to the documentation of this file.
1 /*
2  * File: EventHeaderConstructor.h
3  * Author: denis
4  *
5  * Created on September 20, 2012, 2:18 PM
6  */
7 
8 #ifndef EVENTHEADERCONSTRUCTOR_H
9 #define EVENTHEADERCONSTRUCTOR_H
10 //#include "DAQDataFormats/../unittest/RawDAQDataConstructor.h"
11 #include "RawDAQDataConstructor.h"
12 #include "DAQDataFormats/RawEventHeader.h"
13 
14 /// It is requred to
15 /// 1. include DAQDataFormats/DataFormatFirst.inc
16 /// 2. define CURRENT_CLASS
17 /// 3. define CURRENT_CLASS_VERSION for version of the class
18 /// OR define LAST_CLASS_VERSION for the main structure of the class
19 /// 4. (optional) define CURRENT_FIELDS_SUB_NAMESPACE
20 /// 5. include DAQDataFormats/DataFormatLast.inc
21 /// before the declaration of the DataFormat version class in the header.
22 #include "DAQDataFormats/DataFormatFirst.inc"
23 #define CURRENT_CLASS RawEventHeader
24 #define LAST_CLASS_VERSION 1
25 #define CURRENT_FIELDS_SUB_NAMESPACE raweventhdr
26 #include "DAQDataFormats/DataFormatLast.inc"
27 
28 namespace daqdataformats {
33  TEST_VALUE_RunType = 125,
36  TEST_VALUE_Subrun = 12,
48  };// end of EventHeaderMASKS
50 public:
53  DEFINE_TESTVALUE (DataLoggerID);
54  DEFINE_TESTVALUE (RunNumber);
56  DEFINE_TESTVALUE (ConfigIDX);
57  DEFINE_TESTVALUE (Partition);
58  DEFINE_TESTVALUE (Subrun);
59  DEFINE_TESTVALUE (EventNumberLo);
60  DEFINE_TESTVALUE (EventNumberHi);
61  DEFINE_TESTVALUE (EventType);
62  DEFINE_TESTVALUE (EventSize);
63  DEFINE_TESTVALUE (DataBlockNumber);
64  DEFINE_TESTVALUE (TriggerFilled);
65  DEFINE_TESTVALUE (TailFilled);
66  DEFINE_TESTVALUE_BOOL (MonteCarloFlag);
67  DEFINE_TESTVALUE_IS (CRCCalculationUsed);
68  DEFINE_TESTVALUE_IS (EventIncomplete);
69  DEFINE_TESTVALUE_64 (EventNumber);
70 
74 
76  const RawEventHeader* nano_ver = (const RawEventHeader*)inver;
77  return nano_ver->getVersion();
78  }
79 
80 private:
81 
82 };
83 
84 }}// end of namespaces
85 
86 
87 #endif /* EVENTHEADERCONSTRUCTOR_H */
88 
daqdataformats::RawDAQData * getEmptyDataFormat(const daqdataformats::version_t) const
method to create an empty dataformat with a given version
version_t getVersion(const daqdataformats::RawDAQData *inver) const
Get version of the input dataformat.
daqdataformats::RawDAQData * getFilledDataFormat(const daqdataformats::version_t) const
bool fillDataFormat(daqdataformats::RawDAQData *) const
method to Fill the input dataformat
int32_t version_t
Definition: RawDAQData.h:72
#define CURRENT_FIELDS_SUB_NAMESPACE
Class to hold the data from the FEBs in correct formats.