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

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

Inheritance diagram for daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::NanoSliceConstructor:
daqdataformats::RawDAQDataConstructor

Public Member Functions

 NanoSliceConstructor ()
 
 ~NanoSliceConstructor ()
 
 DEFINE_TESTVALUE (TimeStamp)
 
 DEFINE_TESTVALUE (PulseHeight)
 
 DEFINE_TESTVALUE (Value1)
 
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 getNanoSliceVersion (const RawNanoSlice *) const
 Gets the NanoSlice version. 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...
 

Public Attributes

nanosliceheader::NanoSliceHeaderConstructor _nanoSliceHeaderConstructor
 

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 39 of file NanoSliceConstructor.h.

Constructor & Destructor Documentation

daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::NanoSliceConstructor::NanoSliceConstructor ( )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::NanoSliceConstructor::~NanoSliceConstructor ( )

Definition at line 33 of file NanoSliceConstructor.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::NanoSliceConstructor::DEFINE_TESTVALUE ( TimeStamp  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::NanoSliceConstructor::DEFINE_TESTVALUE ( PulseHeight  )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::NanoSliceConstructor::DEFINE_TESTVALUE ( Value1  )
bool daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::NanoSliceConstructor::fillDataFormat ( daqdataformats::RawDAQData ) const
virtual

method to Fill the input dataformat

Implements daqdataformats::RawDAQDataConstructor.

Definition at line 48 of file NanoSliceConstructor.cpp.

References _nanoSliceHeaderConstructor, and daqdataformats::RawNanoSlice::getHeader().

Referenced by getFilledDataFormat().

48  {
50 
51  setFieldToTestValue_TimeStamp(nanoslice);
52  if(nanoslice->getHeader()->getVersion() == 0){
53  setFieldToTestValue_PulseHeight(nanoslice);
54  }
55  if(nanoslice->getHeader()->getVersion() == 1){
56  setFieldToTestValue_Value1(nanoslice);
57  }
58  if(nanoslice->getHeader()->getVersion() == 2){
59  //setFieldToTestValue_Value1(nanoslice);
60  //setFieldToTestValue_Value2(nanoslice);
61  }
62 
64 
65  _nanoSliceHeaderConstructor.fillDataFormat(nanoslice_header);
66 
67 
68 
69 
70  return true;
71 }
IMPLEMENT_MAIN_STANDARD IMPLEMENT_MAIN_setBufferSource daqdataformats::RawNanoSliceHeader * getHeader() const
Get the NanoSlice header pointer.
Definition: RawNanoSlice.h:57
nanosliceheader::NanoSliceHeaderConstructor _nanoSliceHeaderConstructor
daqdataformats::RawDAQData * daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::NanoSliceConstructor::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 NanoSliceConstructor.cpp.

Referenced by getFilledDataFormat().

43  {
44  return new daqdataformats::RawNanoSlice(ver);
45 }
daqdataformats::RawDAQData * daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::NanoSliceConstructor::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 NanoSliceConstructor.cpp.

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

36  {
37  RawNanoSlice* out = (RawNanoSlice*)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::NanoSliceConstructor::getNanoSliceVersion ( const RawNanoSlice nano) const

Gets the NanoSlice version.

Definition at line 75 of file NanoSliceConstructor.cpp.

References daqdataformats::RawNanoSlice::getHeader().

75  {
76  return (version_t) nano->getHeader()->getVersion();
77 }
int32_t version_t
Definition: RawDAQData.h:72
version_t daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::NanoSliceConstructor::getVersion ( const daqdataformats::RawDAQData ) const
inlinevirtual

Get version of the input dataformat.

Reimplemented from daqdataformats::RawDAQDataConstructor.

Definition at line 54 of file NanoSliceConstructor.h.

References daqdataformats::RawNanoSlice::getHeader().

54  {
55  const RawNanoSlice* nano_ver = (const RawNanoSlice*)inver;
56  return nano_ver->getHeader()->getVersion();
57  }
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().

nanosliceheader::NanoSliceHeaderConstructor daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::NanoSliceConstructor::_nanoSliceHeaderConstructor

Definition at line 60 of file NanoSliceConstructor.h.

Referenced by fillDataFormat().


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