RawMicroBlockV0.h
Go to the documentation of this file.
1 #ifndef RAWMICROBLOCKV0_H
2 #define RAWMICROBLOCKV0_H
3 #include "DAQDataFormats/RawMicroSlice.h"
4 #include "DAQDataFormats/RawMicroBlockHeader.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 RawMicroBlock
16 #define CURRENT_CLASS_VERSION 0
17 #define CURRENT_FIELDS_SUB_NAMESPACE rawmicroblock
18 #include "DAQDataFormats/DataFormatLast.inc"
19 
20 namespace daqdataformats {
21 namespace VERSION_NAMESPACE {
22  /// MicroBlock header size + MicroSlice Header
24 
25  class RawMicroBlock : public PREVIOUS_VERSION_CLASS_NAME {
26 
27  public:
28  // Constructors
29  RawMicroBlock (const version_t); //! The default constructor
31  /// Destructor
33 
34  void init () {_Header->init();}
36  void print (std::ostream& os=std::cout) const;
37  uint32_t sizeofdata () const;
38  bool setBufferSource (const void* pointer);
39 
40  daqdataformats::RawMicroBlockHeader* getHeader() const {return _Header;} //! MicroBlock Header reference
41  daqdataformats::RawMicroSlice* getMicroSlice() const {return _MicroSlice;} //! The current floating MicroSlice reference
42 
43  bool setMicroBlockHeader(const void* millislice_buffer) {return _Header->setAllParameters(millislice_buffer);}
44  bool setMicroSlice (const void* microslice_buffer);
45 
46  using PREVIOUS_VERSION_CLASS_NAME::readData; // unhide the reset of the readData methods
47  void* readData(const void*);
48 
49  protected:
51 
52 
53 
54  protected:
57  };
58 
59 
60 }} // END NAMESPCE daqdataformats
61 #endif /* RawMicroBlockV0V0_H */
#define VERSION_NAMESPACE
daqdataformats::RawMicroSlice * _MicroSlice
MicroBlock Header.
bool setMicroSlice(const void *microslice_buffer)
daqdataformats::RawMicroBlockHeader * _Header
static const uint32_t MICROBLOCK_HEADER_STUFF
MicroBlock header size + MicroSlice Header.
daqdataformats::RawMicroSlice * getMicroSlice() const
MicroBlock Header reference.
bool print
bool setMicroBlockHeader(const void *millislice_buffer)
The current floating MicroSlice reference.
OStream cout
Definition: OStream.cxx:6
daqdataformats::RawMicroBlockHeader * getHeader() const
Class to hold the MicroSlice data.
Definition: RawMicroSlice.h:48
int32_t version_t
Definition: RawDAQData.h:72
void print(std::ostream &os=std::cout) const
Class to hold the data from the FEBs in correct formats.
static const uint32_t RAWMICROSLICEHEADER_SIZE