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

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

Inheritance diagram for daqdataformats::TriggerHeaderConstructor:
daqdataformats::RawDAQDataConstructor

Public Member Functions

 TriggerHeaderConstructor ()
 
 ~TriggerHeaderConstructor ()
 
 DEFINE_TESTVALUE (HWFlag)
 
 DEFINE_TESTVALUE (Source)
 
 DEFINE_TESTVALUE (SourceSubID)
 
 DEFINE_TESTVALUE (SourceID)
 
 DEFINE_TESTVALUE (TriggerNumberLow)
 
 DEFINE_TESTVALUE (TriggerNumberHigh)
 
 DEFINE_TESTVALUE (MasterTriggerNumberLow)
 
 DEFINE_TESTVALUE (MasterTriggerNumberHigh)
 
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 43 of file TriggerHeaderConstructor.h.

Constructor & Destructor Documentation

daqdataformats::TriggerHeaderConstructor::TriggerHeaderConstructor ( )
daqdataformats::TriggerHeaderConstructor::~TriggerHeaderConstructor ( )

Definition at line 32 of file TriggerHeaderConstructor.cpp.

32 { }

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::TriggerHeaderConstructor::DEFINE_TESTVALUE ( HWFlag  )
daqdataformats::TriggerHeaderConstructor::DEFINE_TESTVALUE ( Source  )
daqdataformats::TriggerHeaderConstructor::DEFINE_TESTVALUE ( SourceSubID  )
daqdataformats::TriggerHeaderConstructor::DEFINE_TESTVALUE ( SourceID  )
daqdataformats::TriggerHeaderConstructor::DEFINE_TESTVALUE ( TriggerNumberLow  )
daqdataformats::TriggerHeaderConstructor::DEFINE_TESTVALUE ( TriggerNumberHigh  )
daqdataformats::TriggerHeaderConstructor::DEFINE_TESTVALUE ( MasterTriggerNumberLow  )
daqdataformats::TriggerHeaderConstructor::DEFINE_TESTVALUE ( MasterTriggerNumberHigh  )
bool daqdataformats::TriggerHeaderConstructor::fillDataFormat ( daqdataformats::RawDAQData ) const
virtual

method to Fill the input dataformat

Implements daqdataformats::RawDAQDataConstructor.

Definition at line 47 of file TriggerHeaderConstructor.cpp.

Referenced by daqdataformats::TriggerConstructor::fillDataFormat(), and getFilledDataFormat().

47  {
49  setFieldToTestValue_HWFlag(triggerheader);
50  setFieldToTestValue_Source(triggerheader);
51  setFieldToTestValue_SourceSubID(triggerheader);
52  setFieldToTestValue_TriggerNumberLow(triggerheader);
53  setFieldToTestValue_TriggerNumberHigh(triggerheader);
54  setFieldToTestValue_MasterTriggerNumberLow(triggerheader);
55  setFieldToTestValue_MasterTriggerNumberHigh(triggerheader);
56  return true;
57 }
daqdataformats::RawDAQData * daqdataformats::TriggerHeaderConstructor::getEmptyDataFormat ( const daqdataformats::version_t  ) const
virtual

method to create an empty dataformat with a given version

Implements daqdataformats::RawDAQDataConstructor.

Definition at line 42 of file TriggerHeaderConstructor.cpp.

Referenced by getFilledDataFormat(), and daqdataformats::TriggerHeaderUnitTest::~TriggerHeaderUnitTest().

daqdataformats::RawDAQData * daqdataformats::TriggerHeaderConstructor::getFilledDataFormat ( const daqdataformats::version_t  ) const
virtual

method to create a filled dataformat with a given version

Implements daqdataformats::RawDAQDataConstructor.

Definition at line 35 of file TriggerHeaderConstructor.cpp.

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

35  {
36  RawTriggerHeader* out = (RawTriggerHeader*)getEmptyDataFormat(ver);
37  fillDataFormat(out);
38  return out;
39 }
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::TriggerHeaderConstructor::getVersion ( const daqdataformats::RawDAQData ) const
inlinevirtual

Get version of the input dataformat.

Reimplemented from daqdataformats::RawDAQDataConstructor.

Definition at line 59 of file TriggerHeaderConstructor.h.

59  {
60  const RawTriggerHeader* nano_ver = (const RawTriggerHeader*)inver;
61  return nano_ver->getVersion();
62  }
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: