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

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/DAQDataFormats/cxx/include/RawDataBlockHeaderV0.h"

Inheritance diagram for daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader:

Public Member Functions

 RawDataBlockHeader (const version_t)
 The default constructor. More...
 
 RawDataBlockHeader (const RawDataBlockHeader &)
 
 ~RawDataBlockHeader ()
 Destructor. More...
 
void init ()
 
void print (std::ostream &os=std::cout) const
 
voidreadData (const void *pointer)
 
uint32_t sizeofdata () const
 
 RawDataBlockHeader (const version_t)
 The default constructor. More...
 
 RawDataBlockHeader (const RawDataBlockHeader &)
 
 ~RawDataBlockHeader ()
 Destructor. More...
 
 RawDataBlockHeader (const version_t)
 The default constructor. More...
 
 RawDataBlockHeader (const RawDataBlockHeader &)
 
 ~RawDataBlockHeader ()
 Destructor. More...
 

Protected Member Functions

 IMPLEMENT_FIRST_GET_AND_SET (Version, uint32_t)
 
 IMPLEMENT_FIRST_GET_AND_SET (Marker, uint32_t)
 
 IMPLEMENT_FIRST_GET_AND_SET (TrigNumLo, uint32_t)
 
 IMPLEMENT_FIRST_GET_AND_SET (TrigNumHi, uint32_t)
 
 IMPLEMENT_FIRST_GET_AND_SET (NumMicroBlocks, uint16_t)
 
 IMPLEMENT_FIRST_GET_AND_SET (BuffId, uint16_t)
 
 IMPLEMENT_FIRST_GET_AND_SET (DataSize, uint32_t)
 
 IMPLEMENT_FIRST_GET_AND_SET_BOOL (MonteCarloFlag)
 
 IMPLEMENT_FIRST_IS_AND_SET (CRCCalculationUsed)
 
 IMPLEMENT_FIRST_IS_AND_SET (ConnectionInitialization)
 
 IMPLEMENT_FIRST_IS_AND_SET (CloseConnection)
 
 IMPLEMENT_FIRST_IS_AND_SET (MissingData)
 
 INIT_FIRST (getTrigNum, const, uint64_t,)
 
 INIT_FIRST (setTrigNum,, bool, const uint64_t)
 
 INIT_FIRST (addDataSize,, bool, const uint32_t)
 
 INIT_FIRST (advanceNumMicroBlocks,, bool,)
 
 INIT_FIRST (checkMarker, const, bool,)
 
 INIT_FIRST (checkMarker, const, bool,)
 

Detailed Description

Definition at line 75 of file RawDataBlockHeaderV0.h.

Constructor & Destructor Documentation

daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::RawDataBlockHeader ( const version_t  version)

The default constructor.

Definition at line 23 of file RawDataBlockHeaderV0.cpp.

23  :
24  RawDAQData(version)
25 { }
const XML_Char * version
Definition: expat.h:187
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::RawDataBlockHeader ( const RawDataBlockHeader copyin)

Definition at line 28 of file RawDataBlockHeaderV0.cpp.

28  :
29  RawDAQData(copyin)
30  ,DEEPCOPY_GET_AND_SET(Version)
31  ,DEEPCOPY_GET_AND_SET(Marker)
32  ,DEEPCOPY_GET_AND_SET(TrigNumLo)
33  ,DEEPCOPY_GET_AND_SET(TrigNumHi)
34  ,DEEPCOPY_GET_AND_SET(NumMicroBlocks)
35  ,DEEPCOPY_GET_AND_SET(BuffId)
36  ,DEEPCOPY_GET_AND_SET(DataSize)
37  ,DEEPCOPY_GET_AND_SET(MonteCarloFlag)
38  ,DEEPCOPY_IS_AND_SET(CRCCalculationUsed)
39  ,DEEPCOPY_IS_AND_SET(ConnectionInitialization)
40  ,DEEPCOPY_IS_AND_SET(CloseConnection)
41  ,DEEPCOPY_IS_AND_SET(MissingData)
42  ,DEEPCOPY_GET_AND_SET(TrigNum)
43  ,DEEPCOPY_FUNCTION(addDataSize)
44  ,DEEPCOPY_FUNCTION(advanceNumMicroBlocks)
45  ,DEEPCOPY_FUNCTION(checkMarker)
46 { }
#define DEEPCOPY_FUNCTION(FUNC)
Definition: FunctionBind.h:40
#define DEEPCOPY_GET_AND_SET(FUNC)
Definition: FunctionBind.h:44
#define DEEPCOPY_IS_AND_SET(FUNC)
Definition: FunctionBind.h:47
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::~RawDataBlockHeader ( )

Destructor.

Definition at line 50 of file RawDataBlockHeaderV0.cpp.

50 { }
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::RawDataBlockHeader ( const version_t  )

The default constructor.

daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::RawDataBlockHeader ( const RawDataBlockHeader )
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::~RawDataBlockHeader ( )

Destructor.

daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::RawDataBlockHeader ( const version_t  )

The default constructor.

daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::RawDataBlockHeader ( const RawDataBlockHeader )
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::~RawDataBlockHeader ( )

Destructor.

Member Function Documentation

daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::IMPLEMENT_FIRST_GET_AND_SET ( Version  ,
uint32_t   
)
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::IMPLEMENT_FIRST_GET_AND_SET ( Marker  ,
uint32_t   
)
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::IMPLEMENT_FIRST_GET_AND_SET ( TrigNumLo  ,
uint32_t   
)
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::IMPLEMENT_FIRST_GET_AND_SET ( TrigNumHi  ,
uint32_t   
)
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::IMPLEMENT_FIRST_GET_AND_SET ( NumMicroBlocks  ,
uint16_t   
)
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::IMPLEMENT_FIRST_GET_AND_SET ( BuffId  ,
uint16_t   
)
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::IMPLEMENT_FIRST_GET_AND_SET ( DataSize  ,
uint32_t   
)
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::IMPLEMENT_FIRST_GET_AND_SET_BOOL ( MonteCarloFlag  )
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::IMPLEMENT_FIRST_IS_AND_SET ( CRCCalculationUsed  )
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::IMPLEMENT_FIRST_IS_AND_SET ( ConnectionInitialization  )
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::IMPLEMENT_FIRST_IS_AND_SET ( CloseConnection  )
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::IMPLEMENT_FIRST_IS_AND_SET ( MissingData  )
protected
void daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::init ( )

In the beginning of the datablock we havn't calculated CRC yet So, set it to false

Size of the header + CRC

Definition at line 54 of file RawDataBlockHeaderV0.cpp.

References samweb_client.client::_version, daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::DataBlock_Marker, EXECUTE_FUNCTION, RETURN_FUNCTION, gen_flatrecord::size, and sizeofdata().

Referenced by demo.App::__init__(), testem0.App::__init__(), Lesson1.App::__init__(), and ExN03.App::__init__().

54  {
55 
56  // Set the Marker
57  EXECUTE_FUNCTION(setVersion) (_version);
59 
60  /// In the beginning of the datablock we havn't calculated CRC yet
61  /// So, set it to false
62  EXECUTE_FUNCTION(setCRCCalculationUsed)(false);
63 
64  /// Size of the header + CRC
65  EXECUTE_FUNCTION(setDataSize)(EXECUTE_FUNCTION(sizeofdata)() + 1);
66 }
#define EXECUTE_FUNCTION(FULLFUNCTIONNAME)
Execute and return the delegate.
Definition: Macros.h:54
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::INIT_FIRST ( checkMarker  ,
const  ,
bool   
)
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::INIT_FIRST ( getTrigNum  ,
const  ,
uint64_t   
)
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::INIT_FIRST ( setTrigNum  ,
bool  ,
const uint64_t   
)
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::INIT_FIRST ( addDataSize  ,
bool  ,
const uint32_t   
)
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::INIT_FIRST ( advanceNumMicroBlocks  ,
bool   
)
protected
daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::INIT_FIRST ( checkMarker  ,
const  ,
bool   
)
protected
void daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::print ( std::ostream &  os = std::cout) const

Definition at line 91 of file RawDataBlockHeaderV0.cpp.

References samweb_client.client::_version, allTimeWatchdog::endl, EXECUTE_FUNCTION, novadaq::HexUtils::format(), MECModelEnuComparisons::i, and sizeofdata().

91  {
92 
93  const uint32_t size_of_data = EXECUTE_FUNCTION(sizeofdata)();
94 
95  os<<boost::format("\nRawDataBlockHeader Header (size=%u, version=%u): ") % size_of_data % _version<<std::endl;
96  printBuffer(os);
97 
98  os<<boost::format("Version=%u" ) % EXECUTE_FUNCTION(getVersion)();
99  os<<boost::format(" Marker=%u" ) % EXECUTE_FUNCTION(getMarker)();
100  os<<boost::format(" TriggerNumberLo=%u" ) % EXECUTE_FUNCTION(getTrigNumLo)();
101  os<<boost::format(" TriggerNumberHi=%u" ) % EXECUTE_FUNCTION(getTrigNumHi)();
102  os<<boost::format(" NumMicroBlocks=%u" ) % EXECUTE_FUNCTION(getNumMicroBlocks)();
103  os<<boost::format(" BuffId=%u" ) % EXECUTE_FUNCTION(getBuffId)();
104  os<<boost::format(" DataSize=%u" ) % EXECUTE_FUNCTION(getDataSize)();
105  os<<boost::format(" MonteCarloFlag=%u" ) % EXECUTE_FUNCTION(getMonteCarloFlag)();
106  os<<boost::format(" isCRCCalculationUsed=%u" ) % EXECUTE_FUNCTION(isCRCCalculationUsed)();
107  os<<boost::format(" isConnectionInitialization=%u") % EXECUTE_FUNCTION(isConnectionInitialization)();
108  os<<boost::format(" isCloseConnection=%u" ) % EXECUTE_FUNCTION(isCloseConnection)();
109  os<<boost::format(" isMissingData=%u" ) % EXECUTE_FUNCTION(isMissingData)();
110  os<<std::endl;
111 
112  os<<"\nRawDataBlockHeader RAW bits (converted, if required, to native endian format):";
113  for(uint32_t i = 0; i < size_of_data; ++i){
114  os<<boost::format("\n");
115  printWord(i, true, os);
116  }
117 
118 }// end of print
#define EXECUTE_FUNCTION(FULLFUNCTIONNAME)
Execute and return the delegate.
Definition: Macros.h:54
std::string format(const int32_t &value, const int &ndigits=8)
Definition: HexUtils.cpp:14
void* daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::readData ( const void pointer)
inline

Definition at line 85 of file RawDataBlockHeaderV0.h.

References daqdataformats::RawDAQData::readDataGeneral().

Referenced by PandAna.core.core.loader::Go().

85 {return RawDAQData::readDataGeneral(pointer);};
void * readDataGeneral(const void *buffer)
General ReadData method when the sizeofdata is known.
Definition: RawDAQData.cpp:186
uint32_t daqdataformats::VERSION_NAMESPACE::RawDataBlockHeader::sizeofdata ( ) const
inline

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