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

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

Inheritance diagram for daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor:
daqdataformats::RawDAQDataConstructor

Public Member Functions

 EventHeaderConstructor ()
 
 ~EventHeaderConstructor ()
 
 DEFINE_TESTVALUE (DataLoggerID)
 
 DEFINE_TESTVALUE (RunNumber)
 
 DEFINE_TESTVALUE (RunType)
 
 DEFINE_TESTVALUE (ConfigIDX)
 
 DEFINE_TESTVALUE (Partition)
 
 DEFINE_TESTVALUE (Subrun)
 
 DEFINE_TESTVALUE (EventNumberLo)
 
 DEFINE_TESTVALUE (EventNumberHi)
 
 DEFINE_TESTVALUE (EventType)
 
 DEFINE_TESTVALUE (EventSize)
 
 DEFINE_TESTVALUE (DataBlockNumber)
 
 DEFINE_TESTVALUE (TriggerFilled)
 
 DEFINE_TESTVALUE (TailFilled)
 
 DEFINE_TESTVALUE_BOOL (MonteCarloFlag)
 
 DEFINE_TESTVALUE_IS (CRCCalculationUsed)
 
 DEFINE_TESTVALUE_IS (EventIncomplete)
 
 DEFINE_TESTVALUE_64 (EventNumber)
 
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 49 of file EventHeaderConstructor.h.

Constructor & Destructor Documentation

daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::EventHeaderConstructor ( )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::~EventHeaderConstructor ( )

Definition at line 33 of file EventHeaderConstructor.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::EventHeaderConstructor::DEFINE_TESTVALUE ( DataLoggerID  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE ( RunNumber  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE ( RunType  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE ( ConfigIDX  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE ( Partition  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE ( Subrun  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE ( EventNumberLo  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE ( EventNumberHi  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE ( EventType  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE ( EventSize  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE ( DataBlockNumber  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE ( TriggerFilled  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE ( TailFilled  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE_64 ( EventNumber  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE_BOOL ( MonteCarloFlag  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE_IS ( CRCCalculationUsed  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::DEFINE_TESTVALUE_IS ( EventIncomplete  )
bool daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::fillDataFormat ( daqdataformats::RawDAQData ) const
virtual

method to Fill the input dataformat

Implements daqdataformats::RawDAQDataConstructor.

Definition at line 48 of file EventHeaderConstructor.cpp.

Referenced by getFilledDataFormat().

48  {
50 
51  setFieldToTestValue_DataLoggerID(eventheader);
52  setFieldToTestValue_RunNumber(eventheader);
53  setFieldToTestValue_RunType(eventheader);
54  setFieldToTestValue_ConfigIDX(eventheader);
55  setFieldToTestValue_Partition(eventheader);
56  setFieldToTestValue_Subrun(eventheader);
57  setFieldToTestValue_EventNumberLo(eventheader);
58  setFieldToTestValue_EventNumberHi(eventheader);
59  setFieldToTestValue_EventType(eventheader);
60  setFieldToTestValue_EventSize(eventheader);
61  setFieldToTestValue_EventNumber(eventheader);
62  if(eventheader->getVersion() > 0){
63  setFieldToTestValue_TriggerFilled(eventheader);
64  setFieldToTestValue_TailFilled(eventheader);
65  }
66  setFieldToTestValue_MonteCarloFlag(eventheader);
67  setFieldToTestValue_CRCCalculationUsed(eventheader);
68  setFieldToTestValue_EventIncomplete(eventheader);
69  setFieldToTestValue_EventNumber(eventheader);
70 
71  return true;
72 }
daqdataformats::RawDAQData * daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::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 EventHeaderConstructor.cpp.

Referenced by getFilledDataFormat().

daqdataformats::RawDAQData * daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::EventHeaderConstructor::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 EventHeaderConstructor.cpp.

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

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

Get version of the input dataformat.

Reimplemented from daqdataformats::RawDAQDataConstructor.

Definition at line 75 of file EventHeaderConstructor.h.

75  {
76  const RawEventHeader* nano_ver = (const RawEventHeader*)inver;
77  return nano_ver->getVersion();
78  }
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: