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

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-09-17/DAQDataFormats/cxx/unittest/RunHeaderConstructor.h"

Inheritance diagram for daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor:
daqdataformats::RawDAQDataConstructor

Public Member Functions

 RunHeaderConstructor ()
 
 ~RunHeaderConstructor ()
 
 DEFINE_TESTVALUE_64 (UniversalEventStart)
 
 DEFINE_TESTVALUE_64 (UniversalEventEnd)
 
 DEFINE_TESTVALUE (CRC)
 
 DEFINE_TESTVALUE (TriggerPrescaleListIDX)
 
 DEFINE_TESTVALUE (TriggerListIDX)
 
 DEFINE_TESTVALUE (ValidTriggerTypesHigh2)
 
 DEFINE_TESTVALUE (ValidTriggerTypesHigh)
 
 DEFINE_TESTVALUE (ValidTriggerTypesLow)
 
 DEFINE_TESTVALUE (VTMod)
 
 DEFINE_TESTVALUE (TriggerMC)
 
 DEFINE_TESTVALUE (TriggerCtrlID)
 
 DEFINE_TESTVALUE (TriggerVersion)
 
 DEFINE_TESTVALUE (RunSize)
 
 DEFINE_TESTVALUE (UniversalEventEndHi)
 
 DEFINE_TESTVALUE (UniversalEventEndLo)
 
 DEFINE_TESTVALUE (UniversalEventStartHi)
 
 DEFINE_TESTVALUE (UniversalEventStartLo)
 
 DEFINE_TESTVALUE (TotalEvents)
 
 DEFINE_TESTVALUE (RunEndTime)
 
 DEFINE_TESTVALUE (SubRunEndTime)
 
 DEFINE_TESTVALUE (SubRunStartTime)
 
 DEFINE_TESTVALUE (RunStartTime)
 
 DEFINE_TESTVALUE (DataLoggerID)
 
 DEFINE_TESTVALUE (DataLoggerVersion)
 
 DEFINE_TESTVALUE (RunControlID)
 
 DEFINE_TESTVALUE (RunControlVersion)
 
 DEFINE_TESTVALUE (ConfigurationBlockSet)
 
 DEFINE_TESTVALUE (Subrun)
 
 DEFINE_TESTVALUE (Partition)
 
 DEFINE_TESTVALUE (ConfigIDX)
 
 DEFINE_TESTVALUE (RunType)
 
 DEFINE_TESTVALUE (RunNumber)
 
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 66 of file RunHeaderConstructor.h.

Constructor & Destructor Documentation

daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::RunHeaderConstructor ( )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::~RunHeaderConstructor ( )

Definition at line 33 of file RunHeaderConstructor.cpp.

33 { }

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::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( CRC  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( TriggerPrescaleListIDX  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( TriggerListIDX  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( ValidTriggerTypesHigh2  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( ValidTriggerTypesHigh  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( ValidTriggerTypesLow  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( VTMod  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( TriggerMC  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( TriggerCtrlID  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( TriggerVersion  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( RunSize  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( UniversalEventEndHi  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( UniversalEventEndLo  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( UniversalEventStartHi  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( UniversalEventStartLo  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( TotalEvents  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( RunEndTime  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( SubRunEndTime  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( SubRunStartTime  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( RunStartTime  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( DataLoggerID  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( DataLoggerVersion  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( RunControlID  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( RunControlVersion  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( ConfigurationBlockSet  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( Subrun  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( Partition  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( ConfigIDX  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( RunType  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE ( RunNumber  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE_64 ( UniversalEventStart  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::DEFINE_TESTVALUE_64 ( UniversalEventEnd  )
bool daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::fillDataFormat ( daqdataformats::RawDAQData ) const
virtual

method to Fill the input dataformat

Implements daqdataformats::RawDAQDataConstructor.

Definition at line 48 of file RunHeaderConstructor.cpp.

Referenced by getFilledDataFormat().

48  {
50 
51 
52  setFieldToTestValue_UniversalEventStart(runheader);
53  setFieldToTestValue_UniversalEventEnd(runheader);
54  setFieldToTestValue_CRC(runheader);
55  setFieldToTestValue_TriggerPrescaleListIDX(runheader);
56  setFieldToTestValue_TriggerListIDX(runheader);
57  setFieldToTestValue_ValidTriggerTypesHigh2(runheader);
58  setFieldToTestValue_ValidTriggerTypesHigh(runheader);
59  setFieldToTestValue_ValidTriggerTypesLow(runheader);
60  setFieldToTestValue_VTMod(runheader);
61  setFieldToTestValue_TriggerMC(runheader);
62  setFieldToTestValue_TriggerCtrlID(runheader);
63  setFieldToTestValue_TriggerVersion(runheader);
64  setFieldToTestValue_RunSize(runheader);
65  setFieldToTestValue_UniversalEventEndHi(runheader);
66  setFieldToTestValue_UniversalEventEndLo(runheader);
67  setFieldToTestValue_UniversalEventStartHi(runheader);
68  setFieldToTestValue_UniversalEventStartLo(runheader);
69  setFieldToTestValue_TotalEvents(runheader);
70  setFieldToTestValue_RunEndTime(runheader);
71  setFieldToTestValue_SubRunEndTime(runheader);
72  setFieldToTestValue_SubRunStartTime(runheader);
73  setFieldToTestValue_RunStartTime(runheader);
74  setFieldToTestValue_DataLoggerID(runheader);
75  setFieldToTestValue_DataLoggerVersion(runheader);
76  setFieldToTestValue_RunControlID(runheader);
77  setFieldToTestValue_RunControlVersion(runheader);
78  setFieldToTestValue_ConfigurationBlockSet(runheader);
79  setFieldToTestValue_Subrun(runheader);
80  setFieldToTestValue_Partition(runheader);
81  setFieldToTestValue_ConfigIDX(runheader);
82  setFieldToTestValue_RunType(runheader);
83  setFieldToTestValue_RunNumber(runheader);
84 
85 
86  return true;
87 }
daqdataformats::RawDAQData * daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::getEmptyDataFormat ( const daqdataformats::version_t  ) const
virtual

method to create an empty dataformat with a given version

Implements daqdataformats::RawDAQDataConstructor.

Definition at line 43 of file RunHeaderConstructor.cpp.

Referenced by getFilledDataFormat().

43  {
44  return new daqdataformats::RawRunHeader(ver);
45 }
daqdataformats::RawDAQData * daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::getFilledDataFormat ( const daqdataformats::version_t  ) const
virtual

method to create a filled dataformat with a given version

Implements daqdataformats::RawDAQDataConstructor.

Definition at line 36 of file RunHeaderConstructor.cpp.

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

36  {
37  RawRunHeader* out = (RawRunHeader*)getEmptyDataFormat(ver);
38  fillDataFormat(out);
39  return out;
40 }
bool fillDataFormat(daqdataformats::RawDAQData *) const
method to Fill the input dataformat
daqdataformats::RawDAQData * getEmptyDataFormat(const daqdataformats::version_t) const
method to create an empty dataformat with a given version
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::CURRENT_FIELDS_SUB_NAMESPACE::RunHeaderConstructor::getVersion ( const daqdataformats::RawDAQData ) const
inlinevirtual

Get version of the input dataformat.

Reimplemented from daqdataformats::RawDAQDataConstructor.

Definition at line 107 of file RunHeaderConstructor.h.

107  {
108  const RawRunHeader* nano_ver = (const RawRunHeader*)inver;
109  return nano_ver->getVersion();
110  }
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: