NanoSliceConstructor.h
Go to the documentation of this file.
1 /*
2  * File: NanoSliceConstructor.h
3  * Author: denis
4  *
5  * Created on September 20, 2012, 2:18 PM
6  */
7 
8 #ifndef NANOSLICECONSTRUCTOR_H
9 #define NANOSLICECONSTRUCTOR_H
10 
11 #include "DAQDataFormats/RawNanoSlice.h"
12 #include "RawDAQDataConstructor.h"
14 
15 /// It is requred to
16 /// 1. include DAQDataFormats/DataFormatFirst.inc
17 /// 2. define CURRENT_CLASS
18 /// 3. define CURRENT_CLASS_VERSION for version of the class
19 /// OR define LAST_CLASS_VERSION for the main structure of the class
20 /// 4. (optional) define CURRENT_FIELDS_SUB_NAMESPACE
21 /// 5. include DAQDataFormats/DataFormatLast.inc
22 /// before the declaration of the DataFormat version class in the header.
23 #include "DAQDataFormats/DataFormatFirst.inc"
24 #define CURRENT_CLASS RawNanoSlice
25 #define LAST_CLASS_VERSION 3
26 #define CURRENT_FIELDS_SUB_NAMESPACE rawnano
27 #include "DAQDataFormats/DataFormatLast.inc"
28 
29 
30 namespace daqdataformats {
32 
37  };// end of NanoSliceMASKS
38 
40 public:
43  DEFINE_TESTVALUE(TimeStamp);
44  DEFINE_TESTVALUE(PulseHeight);
45  DEFINE_TESTVALUE(Value1);
46 
50 
51  /// Gets the NanoSlice version
53 
55  const RawNanoSlice* nano_ver = (const RawNanoSlice*)inver;
56  return nano_ver->getHeader()->getVersion();
57  }
58 
59 public:
60  nanosliceheader::NanoSliceHeaderConstructor _nanoSliceHeaderConstructor;
61 
62 };
63 
64 }}// end of namespaces
65 
66 
67 #endif /* NANOSLICECONSTRUCTOR_H */
68 
daqdataformats::RawDAQData * getEmptyDataFormat(const daqdataformats::version_t) const
method to create an empty dataformat with a given version
version_t getNanoSliceVersion(const RawNanoSlice *) const
Gets the NanoSlice version.
IMPLEMENT_MAIN_STANDARD IMPLEMENT_MAIN_setBufferSource daqdataformats::RawNanoSliceHeader * getHeader() const
Get the NanoSlice header pointer.
Definition: RawNanoSlice.h:57
bool fillDataFormat(daqdataformats::RawDAQData *) const
method to Fill the input dataformat
#define CURRENT_FIELDS_SUB_NAMESPACE
daqdataformats::RawDAQData * getFilledDataFormat(const daqdataformats::version_t) const
int32_t version_t
Definition: RawDAQData.h:72
nanosliceheader::NanoSliceHeaderConstructor _nanoSliceHeaderConstructor
Class to hold the data from the FEBs in correct formats.
version_t getVersion(const daqdataformats::RawDAQData *inver) const
Get version of the input dataformat.