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

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

Inheritance diagram for daqdataformats::MilliSliceHeaderConstructor:
daqdataformats::RawDAQDataConstructor

Public Member Functions

 MilliSliceHeaderConstructor ()
 
 ~MilliSliceHeaderConstructor ()
 
 DEFINE_TESTVALUE (SliceSize)
 
 DEFINE_TESTVALUE (Partition)
 
 DEFINE_TESTVALUE (DestBuffID)
 
 DEFINE_TESTVALUE (DiblockId)
 
 DEFINE_TESTVALUE (DCMId)
 
 DEFINE_TESTVALUE (DetId)
 
 DEFINE_TESTVALUE (GlobalDCMID)
 
 DEFINE_TESTVALUE (MilliSliceSEQ)
 
 DEFINE_TESTVALUE (TimeStartLow)
 
 DEFINE_TESTVALUE (TimeStartHigh)
 
 DEFINE_TESTVALUE (TimeLength)
 
 DEFINE_TESTVALUE_IS (Complete)
 
 DEFINE_TESTVALUE_IS (ConnectionInitialization)
 
 DEFINE_TESTVALUE_IS (CloseConnection)
 
 DEFINE_TESTVALUE_IS (CorruptData)
 
 DEFINE_TESTVALUE_IS (MissingData)
 
 DEFINE_TESTVALUE (MicrosliceNumber)
 
 DEFINE_TESTVALUE (FrameSEQ)
 
 DEFINE_TESTVALUE (MilliSliceIndexNumber)
 
 DEFINE_TESTVALUE (MicroSliceTimeLength_usec)
 
 DEFINE_TESTVALUE_BOOL (MonteCarloFlag)
 
 DEFINE_TESTVALUE_IS (CRCCalculationUsed)
 
 DEFINE_TESTVALUE_IS (MilliSliceIndexUsed)
 
bool setFieldToTestValue_Mode (daqdataformats::CURRENT_CLASS *dataformat) const
 
bool setFieldToZeroValue_Mode (daqdataformats::CURRENT_CLASS *dataformat) const
 
uint64_t getFieldValue_Mode (const daqdataformats::CURRENT_CLASS *dataformat) const
 
daqdataformats::RawDAQDatagetFilledDataFormat (const daqdataformats::version_t) const
 
daqdataformats::RawDAQDatagetEmptyDataFormat (const daqdataformats::version_t) const
 method to create an empty dataformat with a given version More...
 
bool fillDataFormat (daqdataformats::RawDAQData *) const
 method to Fill the input dataformat More...
 
version_t getVersion (const daqdataformats::RawDAQData *inver) const
 Get version of the input dataformat. More...
 
version_t getMaximumVersion () const
 Get maximum version for the dataformat. More...
 

Protected Member Functions

uint32_t boolToUint32_t (const bool number) const
 Bool to uint abd backwards conversions. More...
 
bool uint32_tToBool (const uint32_t number) const
 

Protected Attributes

version_t _maximumVersion
 Maximum version of the dataformat. More...
 

Detailed Description

Definition at line 45 of file MilliSliceHeaderConstructor.h.

Constructor & Destructor Documentation

daqdataformats::MilliSliceHeaderConstructor::MilliSliceHeaderConstructor ( )

Definition at line 16 of file MilliSliceHeaderConstructor.cpp.

17 {
18 }
daqdataformats::MilliSliceHeaderConstructor::~MilliSliceHeaderConstructor ( )

Definition at line 21 of file MilliSliceHeaderConstructor.cpp.

21 { }

Member Function Documentation

uint32_t daqdataformats::RawDAQDataConstructor::boolToUint32_t ( const bool  number) const
inlineprotectedinherited

Bool to uint abd backwards conversions.

Definition at line 156 of file RawDAQDataConstructor.h.

156 { return ((number) ? 1 : 0); }
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( SliceSize  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( Partition  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( DestBuffID  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( DiblockId  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( DCMId  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( DetId  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( GlobalDCMID  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( MilliSliceSEQ  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( TimeStartLow  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( TimeStartHigh  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( TimeLength  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( MicrosliceNumber  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( FrameSEQ  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( MilliSliceIndexNumber  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE ( MicroSliceTimeLength_usec  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE_BOOL ( MonteCarloFlag  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE_IS ( Complete  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE_IS ( ConnectionInitialization  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE_IS ( CloseConnection  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE_IS ( CorruptData  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE_IS ( MissingData  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE_IS ( CRCCalculationUsed  )
daqdataformats::MilliSliceHeaderConstructor::DEFINE_TESTVALUE_IS ( MilliSliceIndexUsed  )
bool daqdataformats::MilliSliceHeaderConstructor::fillDataFormat ( daqdataformats::RawDAQData ) const
virtual

method to Fill the input dataformat

Implements daqdataformats::RawDAQDataConstructor.

Definition at line 36 of file MilliSliceHeaderConstructor.cpp.

References setFieldToTestValue_Mode().

Referenced by getFieldValue_Mode(), and getFilledDataFormat().

36  {
38 
39  setFieldToTestValue_SliceSize(millislice_header);
40  setFieldToTestValue_Partition(millislice_header);
41  setFieldToTestValue_DestBuffID(millislice_header);
42  setFieldToTestValue_DiblockId(millislice_header);
43  setFieldToTestValue_DCMId(millislice_header);
44  setFieldToTestValue_DetId(millislice_header);
45  setFieldToTestValue_GlobalDCMID(millislice_header);
46  setFieldToTestValue_MilliSliceSEQ(millislice_header);
47  setFieldToTestValue_TimeStartLow(millislice_header);
48  setFieldToTestValue_TimeStartHigh(millislice_header);
49  setFieldToTestValue_TimeLength(millislice_header);
50  setFieldToTestValue_Complete(millislice_header);
51  setFieldToTestValue_Mode(millislice_header);
52  setFieldToTestValue_ConnectionInitialization(millislice_header);
53  setFieldToTestValue_CloseConnection(millislice_header);
54  setFieldToTestValue_MicrosliceNumber(millislice_header);
55  setFieldToTestValue_FrameSEQ(millislice_header);
56  setFieldToTestValue_MilliSliceIndexNumber(millislice_header);
57  setFieldToTestValue_MicroSliceTimeLength_usec(millislice_header);
58  setFieldToTestValue_MonteCarloFlag(millislice_header);
59  setFieldToTestValue_CRCCalculationUsed(millislice_header);
60  setFieldToTestValue_MilliSliceIndexUsed(millislice_header);
61 
62 
63  return true;
64 }
bool setFieldToTestValue_Mode(daqdataformats::CURRENT_CLASS *dataformat) const
daqdataformats::RawDAQData * daqdataformats::MilliSliceHeaderConstructor::getEmptyDataFormat ( const daqdataformats::version_t  ) const
virtual
uint64_t daqdataformats::MilliSliceHeaderConstructor::getFieldValue_Mode ( const daqdataformats::CURRENT_CLASS dataformat) const
inline

Definition at line 74 of file MilliSliceHeaderConstructor.h.

References CHECK_FIELD, fillDataFormat(), getEmptyDataFormat(), getFilledDataFormat(), and Mode().

74 {return boost::lexical_cast<uint64_t> (dataformat->getMode());}
daqdataformats::RawDAQData * daqdataformats::MilliSliceHeaderConstructor::getFilledDataFormat ( const daqdataformats::version_t  ) const
virtual

method to create a filled dataformat with a given version

Implements daqdataformats::RawDAQDataConstructor.

Definition at line 24 of file MilliSliceHeaderConstructor.cpp.

References fillDataFormat(), getEmptyDataFormat(), and confusionMatrixTree::out.

Referenced by getFieldValue_Mode().

24  {
25  RawMilliSliceHeader* out = (RawMilliSliceHeader*)getEmptyDataFormat(ver);
26  fillDataFormat(out);
27  return out;
28 }
daqdataformats::RawDAQData * getEmptyDataFormat(const daqdataformats::version_t) const
method to create an empty dataformat with a given version
bool fillDataFormat(daqdataformats::RawDAQData *) const
method to Fill the input dataformat
version_t daqdataformats::RawDAQDataConstructor::getMaximumVersion ( ) const
inlineinherited

Get maximum version for the dataformat.

Definition at line 152 of file RawDAQDataConstructor.h.

References daqdataformats::RawDAQDataConstructor::_maximumVersion.

152 {return _maximumVersion;}
version_t _maximumVersion
Maximum version of the dataformat.
version_t daqdataformats::MilliSliceHeaderConstructor::getVersion ( const daqdataformats::RawDAQData ) const
inlinevirtual

Get version of the input dataformat.

Reimplemented from daqdataformats::RawDAQDataConstructor.

Definition at line 81 of file MilliSliceHeaderConstructor.h.

81  {
82  const RawMilliSliceHeader* nano_ver = (const RawMilliSliceHeader*)inver;
83  return nano_ver->getVersion();
84  }
bool daqdataformats::MilliSliceHeaderConstructor::setFieldToTestValue_Mode ( daqdataformats::CURRENT_CLASS dataformat) const
inline

Definition at line 72 of file MilliSliceHeaderConstructor.h.

Referenced by fillDataFormat().

72 {return dataformat->setMode(TEST_VALUE_Mode);}
const rawmillihdr::Mode_t TEST_VALUE_Mode
bool daqdataformats::MilliSliceHeaderConstructor::setFieldToZeroValue_Mode ( daqdataformats::CURRENT_CLASS dataformat) const
inline
bool daqdataformats::RawDAQDataConstructor::uint32_tToBool ( const uint32_t  number) const
inlineprotectedinherited

Definition at line 157 of file RawDAQDataConstructor.h.

157 { return ((number) ? true : false); }

Member Data Documentation

version_t daqdataformats::RawDAQDataConstructor::_maximumVersion
protectedinherited

Maximum version of the dataformat.

Definition at line 162 of file RawDAQDataConstructor.h.

Referenced by daqdataformats::RawDAQDataConstructor::getMaximumVersion().


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