DataBlockHeaderConstructor.h
Go to the documentation of this file.
1 /*
2  * File: DataBlockHeaderConstructor.h
3  * Author: denis
4  *
5  * Created on September 20, 2012, 2:18 PM
6  */
7 
8 #ifndef DATABLOCKHEADERCONSTRUCTOR_H
9 #define DATABLOCKHEADERCONSTRUCTOR_H
10 //#include "DAQDataFormats/../unittest/RawDAQDataConstructor.h"
11 #include "RawDAQDataConstructor.h"
12 #include "DAQDataFormats/RawDataBlockHeader.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 RawDataBlockHeader
24 #define LAST_CLASS_VERSION 0
25 #define CURRENT_FIELDS_SUB_NAMESPACE datablockheader
26 #include "DAQDataFormats/DataFormatLast.inc"
27 
28 namespace daqdataformats {
41  };// end of DataBlockHeaderMASKS
42 
44 public:
47  DEFINE_TESTVALUE (TrigNumLo);
48  DEFINE_TESTVALUE (TrigNumHi);
49  DEFINE_TESTVALUE_CUSTOM (NumMicroBlocks, uint16_t);
50  DEFINE_TESTVALUE_CUSTOM (BuffId, uint16_t);
51  DEFINE_TESTVALUE (DataSize);
52  DEFINE_TESTVALUE_BOOL (MonteCarloFlag);
53  DEFINE_TESTVALUE_IS (CRCCalculationUsed);
54  DEFINE_TESTVALUE_IS (ConnectionInitialization);
55  DEFINE_TESTVALUE_IS (CloseConnection);
56  DEFINE_TESTVALUE_IS (MissingData);
60 
62  const RawDataBlockHeader* nano_ver = (const RawDataBlockHeader*)inver;
63  return nano_ver->getVersion();
64  }
65 
66 private:
67 
68 };
69 
70 }}// end of namespaces
71 
72 
73 #endif /* DATABLOCKHEADERCONSTRUCTOR_H */
74 
version_t getVersion(const daqdataformats::RawDAQData *inver) const
Get version of the input dataformat.
daqdataformats::RawDAQData * getEmptyDataFormat(const daqdataformats::version_t) const
method to create an empty dataformat with a given version
daqdataformats::RawDAQData * getFilledDataFormat(const daqdataformats::version_t) const
#define CURRENT_FIELDS_SUB_NAMESPACE
bool fillDataFormat(daqdataformats::RawDAQData *) const
method to Fill the input dataformat
int32_t version_t
Definition: RawDAQData.h:72
Class to hold the data from the FEBs in correct formats.