Public Member Functions | Protected Member Functions | List of all members
daqdataformats::RawDataBlock Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-10-28/DAQDataFormats/cxx/include/RawDataBlock.h"

Inheritance diagram for daqdataformats::RawDataBlock:

Public Member Functions

 RawDataBlock (const uint32_t buffersize=DEFAULT_DATABLOCK_SIZE, const uint32_t tlvl=0, const version_t version=datablockheader::RAWDATABLOCKHEADER_LATEST_VERSION)
 
 RawDataBlock (const RawDataBlock &copy_in)
 The default constructor. More...
 
 RawDataBlock (const void *datablock_buffer, const version_t version=rawdaqdataformat::DAQDATAFORMAT_UNKNOWN_VERSION, const uint32_t buffersize=DEFAULT_DATABLOCK_SIZE)
 Deep copy constructor. More...
 
 ~RawDataBlock ()
 Destructor. More...
 
bool addMicroBlock (const void *microblock_buffer, const bool check_mc_flag=true)
 
bool addMicroBlock (const void *microblock_buffer, const uint32_t microblock_size, const bool check_mc_flag=true)
 
bool addMicroBlock (const void *millislice_buffer, const void *microslice_buffer, const version_t microblock_version=microblock::RAWMICROBLOCK_LATEST_VERSION, const bool check_mc_flag=true)
 
bool addMicroBlock (const void *millislice_buffer, const void *microslice_buffer, const uint32_t microslice_size, const version_t microblock_version=microblock::RAWMICROBLOCK_LATEST_VERSION, const bool check_mc_flag=true)
 
bool addDCMData (const void *dcmdata_buffer)
 
bool addDCMData (const void *dcmdata_buffer, const uint32_t dcmdata_size)
 
bool close (bool produce_crc=false)
 
IMPLEMENT_MAIN_STANDARD IMPLEMENT_MAIN_setBufferSource readDataStatus readData (const int fd)
 
 IMPLEMENT_GET_MAIN (Version, uint32_t)
 
 IMPLEMENT_GET_MAIN (Marker, uint32_t)
 
 IMPLEMENT_GET_MAIN (DataSize, uint32_t)
 

Protected Member Functions

bool setFunctionPointers ()
 
bool addMicroBlock1 (const void *, const bool)
 These functions are not allowed to be executed as public. More...
 
bool addMicroBlock2 (const void *, const uint32_t, const bool)
 
bool addMicroBlock3 (const void *, const void *, const version_t, const bool)
 
bool addMicroBlock4 (const void *, const void *, const uint32_t, const version_t, const bool)
 
bool addDCMData1 (const void *)
 
bool addDCMData2 (const void *, const uint32_t)
 

Detailed Description

Definition at line 27 of file RawDataBlock.h.

Constructor & Destructor Documentation

daqdataformats::RawDataBlock::RawDataBlock ( const uint32_t  buffersize = DEFAULT_DATABLOCK_SIZE,
const uint32_t  tlvl = 0,
const version_t  version = datablockheader::RAWDATABLOCKHEADER_LATEST_VERSION 
)

Constructors I had to put version at the end, so that it would be compatible with the old BufferNodeEVB and DataLogger codes

Definition at line 22 of file RawDataBlock.cpp.

References PRINT_ON_DEBUG.

22  :
23  PREVIOUS_VERSION_CLASS_NAME(version, tlvl)
24 {
25  INITIALIZE_DEBUGGING_VARIABLES;
26  PRINT_ON_DEBUG(__PRETTY_FUNCTION__<<" start");
27  reserveInternalBuffer(size);
28  defaultConstructorFloatingSize();
29  PRINT_ON_DEBUG(__PRETTY_FUNCTION__<<" end");
30 }
const XML_Char * version
Definition: expat.h:187
#define PRINT_ON_DEBUG(x)
Definition: RawDAQData.h:35
daqdataformats::RawDataBlock::RawDataBlock ( const RawDataBlock copy_in)

The default constructor.

Definition at line 33 of file RawDataBlock.cpp.

References PRINT_ON_DEBUG.

33  :
34  PREVIOUS_VERSION_CLASS_NAME(copy_in)
35 {
36  INITIALIZE_DEBUGGING_VARIABLES;
37  PRINT_ON_DEBUG(__PRETTY_FUNCTION__<<" start");
38  lastOperationsInDeepCopy(copy_in);
39  PRINT_ON_DEBUG(__PRETTY_FUNCTION__<<" end");
40 }
#define PRINT_ON_DEBUG(x)
Definition: RawDAQData.h:35
daqdataformats::RawDataBlock::RawDataBlock ( const void datablock_buffer,
const version_t  version = rawdaqdataformat::DAQDATAFORMAT_UNKNOWN_VERSION,
const uint32_t  buffersize = DEFAULT_DATABLOCK_SIZE 
)

Deep copy constructor.

Definition at line 43 of file RawDataBlock.cpp.

References PRINT_ON_DEBUG.

43  :
44  PREVIOUS_VERSION_CLASS_NAME(version, 0)
45 {
46  INITIALIZE_DEBUGGING_VARIABLES;
47  PRINT_ON_DEBUG(__PRETTY_FUNCTION__<<" start");
48  reserveInternalBuffer(buffersize);
49  copy(datablock_buffer);
50  PRINT_ON_DEBUG(__PRETTY_FUNCTION__<<" end");
51 }
const XML_Char * version
Definition: expat.h:187
#define PRINT_ON_DEBUG(x)
Definition: RawDAQData.h:35
daqdataformats::RawDataBlock::~RawDataBlock ( )

Destructor.

Shallow copy constructor

Definition at line 55 of file RawDataBlock.cpp.

55  {
56  tprintf(24,"~RawDataBlock (this=%p)\n",(void *)this);
57 }

Member Function Documentation

bool daqdataformats::RawDataBlock::addDCMData ( const void dcmdata_buffer)
inline

Definition at line 77 of file RawDataBlock.h.

References addDCMData1(), and RETURN_FUNCTION.

77 {RETURN_FUNCTION(addDCMData1)(dcmdata_buffer);}
#define RETURN_FUNCTION(FULLFUNCTIONNAME)
Definition: Macros.h:57
bool addDCMData1(const void *)
Definition: RawDataBlock.h:130
bool daqdataformats::RawDataBlock::addDCMData ( const void dcmdata_buffer,
const uint32_t  dcmdata_size 
)
inline

Definition at line 78 of file RawDataBlock.h.

References addDCMData2(), and RETURN_FUNCTION.

78 {RETURN_FUNCTION(addDCMData2)(dcmdata_buffer,dcmdata_size);}
#define RETURN_FUNCTION(FULLFUNCTIONNAME)
Definition: Macros.h:57
bool addDCMData2(const void *, const uint32_t)
Definition: RawDataBlock.h:131
bool daqdataformats::RawDataBlock::addDCMData1 ( const void )
inlineprotected

Definition at line 130 of file RawDataBlock.h.

Referenced by addDCMData().

130 { return functionIsNotAllowed(__FUNCTION__, "Function is private.");}
bool daqdataformats::RawDataBlock::addDCMData2 ( const void ,
const uint32_t   
)
inlineprotected

Definition at line 131 of file RawDataBlock.h.

Referenced by addDCMData().

131 { return functionIsNotAllowed(__FUNCTION__,"Function is private.");}
bool daqdataformats::RawDataBlock::addMicroBlock ( const void microblock_buffer,
const bool  check_mc_flag = true 
)
inline

Add the MicroBlock to _Buffer. If check_mc_flag = true, the method checks whether the microslice in the microblock is MC generatedand adds an appropriate flag to the DataBlock Header.

Definition at line 42 of file RawDataBlock.h.

References addMicroBlock1(), and RETURN_FUNCTION.

Referenced by mcdatadaq::BufferNodeSimulator::addMilliSlice(), and daqdataformats::DataBlockConstructor::fillDataFormat().

45  {RETURN_FUNCTION(addMicroBlock1)(microblock_buffer, check_mc_flag);}
#define RETURN_FUNCTION(FULLFUNCTIONNAME)
Definition: Macros.h:57
bool addMicroBlock1(const void *, const bool)
These functions are not allowed to be executed as public.
Definition: RawDataBlock.h:111
bool daqdataformats::RawDataBlock::addMicroBlock ( const void microblock_buffer,
const uint32_t  microblock_size,
const bool  check_mc_flag = true 
)
inline

Add the MicroBlock of a known size to _Buffer. If check_mc_flag = true, the method checks whether the microslice in the microblock is MC generatedand adds an appropriate flag to the DataBlock Header.

Definition at line 49 of file RawDataBlock.h.

References addMicroBlock2(), and RETURN_FUNCTION.

53  {RETURN_FUNCTION(addMicroBlock2)(microblock_buffer, microblock_size, check_mc_flag);}
#define RETURN_FUNCTION(FULLFUNCTIONNAME)
Definition: Macros.h:57
bool addMicroBlock2(const void *, const uint32_t, const bool)
Definition: RawDataBlock.h:114
bool daqdataformats::RawDataBlock::addMicroBlock ( const void millislice_buffer,
const void microslice_buffer,
const version_t  microblock_version = microblock::RAWMICROBLOCK_LATEST_VERSION,
const bool  check_mc_flag = true 
)
inline

Add the MicroBlock to _Buffer by passing the references of the MilliSlice and the MicroSlice. MilliSlice is the one that contains the MicroSlice. If check_mc_flag = true, the method checks whether the microslice in the microblock is MC generatedand adds an appropriate flag to the DataBlock Header.

Definition at line 58 of file RawDataBlock.h.

References addMicroBlock3(), and RETURN_FUNCTION.

63  {RETURN_FUNCTION(addMicroBlock3)(millislice_buffer,microslice_buffer, microblock_version, check_mc_flag);}
bool addMicroBlock3(const void *, const void *, const version_t, const bool)
Definition: RawDataBlock.h:118
#define RETURN_FUNCTION(FULLFUNCTIONNAME)
Definition: Macros.h:57
bool daqdataformats::RawDataBlock::addMicroBlock ( const void millislice_buffer,
const void microslice_buffer,
const uint32_t  microslice_size,
const version_t  microblock_version = microblock::RAWMICROBLOCK_LATEST_VERSION,
const bool  check_mc_flag = true 
)
inline

Add the MicroBlock to _Buffer by passing the references of the MilliSlice and the MicroSlice of a known size. MilliSlice is the one that contains the MicroSlice. If check_mc_flag = true, the method checks whether the microslice in the microblock is MC generatedand adds an appropriate flag to the DataBlock Header.

Definition at line 69 of file RawDataBlock.h.

References addMicroBlock4(), and RETURN_FUNCTION.

75  {RETURN_FUNCTION(addMicroBlock4)(millislice_buffer, microslice_buffer, microslice_size, microblock_version, check_mc_flag);}
bool addMicroBlock4(const void *, const void *, const uint32_t, const version_t, const bool)
Definition: RawDataBlock.h:123
#define RETURN_FUNCTION(FULLFUNCTIONNAME)
Definition: Macros.h:57
bool daqdataformats::RawDataBlock::addMicroBlock1 ( const void ,
const bool   
)
inlineprotected

These functions are not allowed to be executed as public.

Definition at line 111 of file RawDataBlock.h.

Referenced by addMicroBlock().

113  {return functionIsNotAllowed(__FUNCTION__, "Function is private.");}
bool daqdataformats::RawDataBlock::addMicroBlock2 ( const void ,
const uint32_t  ,
const bool   
)
inlineprotected

Definition at line 114 of file RawDataBlock.h.

Referenced by addMicroBlock().

117  {return functionIsNotAllowed(__FUNCTION__, "Function is private.");}
bool daqdataformats::RawDataBlock::addMicroBlock3 ( const void ,
const void ,
const version_t  ,
const bool   
)
inlineprotected

Definition at line 118 of file RawDataBlock.h.

Referenced by addMicroBlock().

122  {return functionIsNotAllowed(__FUNCTION__, "Function is private.");}
bool daqdataformats::RawDataBlock::addMicroBlock4 ( const void ,
const void ,
const uint32_t  ,
const version_t  ,
const bool   
)
inlineprotected

Definition at line 123 of file RawDataBlock.h.

Referenced by addMicroBlock().

128  {return functionIsNotAllowed(__FUNCTION__, "Function is private.");}
bool daqdataformats::VERSION_NAMESPACE::RawDataBlock::close ( bool  produce_crc = false)
inline
daqdataformats::RawDataBlock::IMPLEMENT_GET_MAIN ( Version  ,
uint32_t   
)

Referenced by readData().

daqdataformats::RawDataBlock::IMPLEMENT_GET_MAIN ( Marker  ,
uint32_t   
)
daqdataformats::RawDataBlock::IMPLEMENT_GET_MAIN ( DataSize  ,
uint32_t   
)
IMPLEMENT_MAIN_STANDARD IMPLEMENT_MAIN_setBufferSource readDataStatus daqdataformats::RawDataBlock::readData ( const int  fd)
inline
bool daqdataformats::RawDataBlock::setFunctionPointers ( )
protected

Referenced by readData().


The documentation for this class was generated from the following files: