RunHeaderConstructor.h
Go to the documentation of this file.
1 /*
2  * File: RunHeaderConstructor.h
3  * Author: denis
4  *
5  * Created on September 20, 2012, 2:18 PM
6  */
7 
8 #ifndef RUNHEADERCONSTRUCTOR_H
9 #define RUNHEADERCONSTRUCTOR_H
10 //#include "DAQDataFormats/../unittest/RawDAQDataConstructor.h"
11 #include "RawDAQDataConstructor.h"
12 #include "DAQDataFormats/RawRunHeader.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 RawRunHeader
24 #define LAST_CLASS_VERSION 0
25 #define CURRENT_FIELDS_SUB_NAMESPACE rawrunhdr
26 #include "DAQDataFormats/DataFormatLast.inc"
27 
28 namespace daqdataformats {
32  TEST_VALUE_RunType = 124,
35  TEST_VALUE_Subrun = 12,
60  TEST_VALUE_CRC = 154,
63  };// end of RunHeaderMASKS
64 
65 
67 public:
70  DEFINE_TESTVALUE_64 (UniversalEventStart);
71  DEFINE_TESTVALUE_64 (UniversalEventEnd);
72  DEFINE_TESTVALUE (CRC);
73  DEFINE_TESTVALUE (TriggerPrescaleListIDX);
74  DEFINE_TESTVALUE (TriggerListIDX);
75  DEFINE_TESTVALUE (ValidTriggerTypesHigh2);
76  DEFINE_TESTVALUE (ValidTriggerTypesHigh);
77  DEFINE_TESTVALUE (ValidTriggerTypesLow);
78  DEFINE_TESTVALUE (VTMod);
79  DEFINE_TESTVALUE (TriggerMC);
80  DEFINE_TESTVALUE (TriggerCtrlID);
82  DEFINE_TESTVALUE (RunSize);
83  DEFINE_TESTVALUE (UniversalEventEndHi);
84  DEFINE_TESTVALUE (UniversalEventEndLo);
85  DEFINE_TESTVALUE (UniversalEventStartHi);
86  DEFINE_TESTVALUE (UniversalEventStartLo);
87  DEFINE_TESTVALUE (TotalEvents);
88  DEFINE_TESTVALUE (RunEndTime);
89  DEFINE_TESTVALUE (SubRunEndTime);
90  DEFINE_TESTVALUE (SubRunStartTime);
91  DEFINE_TESTVALUE (RunStartTime);
92  DEFINE_TESTVALUE (DataLoggerID);
93  DEFINE_TESTVALUE (DataLoggerVersion);
94  DEFINE_TESTVALUE (RunControlID);
95  DEFINE_TESTVALUE (RunControlVersion);
96  DEFINE_TESTVALUE (ConfigurationBlockSet);
97  DEFINE_TESTVALUE (Subrun);
98  DEFINE_TESTVALUE (Partition);
99  DEFINE_TESTVALUE (ConfigIDX);
101  DEFINE_TESTVALUE (RunNumber);
102 
106 
108  const RawRunHeader* nano_ver = (const RawRunHeader*)inver;
109  return nano_ver->getVersion();
110  }
111 
112 private:
113 
114 };
115 
116 }}// end of namespaces
117 
118 
119 #endif /* RUNHEADERCONSTRUCTOR_H */
120 
bool fillDataFormat(daqdataformats::RawDAQData *) const
method to Fill the input dataformat
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
int32_t version_t
Definition: RawDAQData.h:72
Class to hold the data from the FEBs in correct formats.
#define CURRENT_FIELDS_SUB_NAMESPACE