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

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

Inheritance diagram for daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::ConfigurationBlockConstructor:
daqdataformats::RawDAQDataConstructor

Public Member Functions

 ConfigurationBlockConstructor ()
 
 ~ConfigurationBlockConstructor ()
 
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...
 

Public Attributes

rawconfsysid::ConfigurationSystemIDConstructor _configurationSystemIDConstructor
 

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 32 of file ConfigurationBlockConstructor.h.

Constructor & Destructor Documentation

daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::ConfigurationBlockConstructor::ConfigurationBlockConstructor ( )
daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::ConfigurationBlockConstructor::~ConfigurationBlockConstructor ( )

Definition at line 33 of file ConfigurationBlockConstructor.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); }
bool daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::ConfigurationBlockConstructor::fillDataFormat ( daqdataformats::RawDAQData ) const
virtual

method to Fill the input dataformat

Implements daqdataformats::RawDAQDataConstructor.

Definition at line 53 of file ConfigurationBlockConstructor.cpp.

References _configurationSystemIDConstructor, and daqdataformats::RawConfigurationBlock::close().

Referenced by getFilledDataFormat().

53  {
55 
56  RawConfigurationSystemID* sysid = (RawConfigurationSystemID*)_configurationSystemIDConstructor.getFilledDataFormat(0);
57  cblock->addSystemID(sysid->getBuffer());
58 
59  sysid->setVersionName("That's funny");
60  cblock->addSystemID(sysid->getBuffer());
61 
62  sysid->setVersionName("Ho Ho Ho");
63  cblock->addSystemID(sysid->getBuffer());
64 
65  cblock->close();
66 
67  delete sysid;
68 
69  return true;
70 }
const XML_Char const XML_Char * sysid
Definition: expat.h:300
IMPLEMENT_MAIN_STANDARD IMPLEMENT_MAIN_setBufferSource bool close(const bool produce_crc=false)
daqdataformats::RawDAQData * daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::ConfigurationBlockConstructor::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 ConfigurationBlockConstructor.cpp.

References daqdataformats::RawConfigurationBlock::close(), daqdataformats::rawdaqdataformat::DAQDATAFORMAT_UNKNOWN_VERSION, and confusionMatrixTree::out.

43  {
44  RawConfigurationBlock* out = new daqdataformats::RawConfigurationBlock(ver);
45 
47  out->close();
48 
49  return out;
50 }
static const version_t DAQDATAFORMAT_UNKNOWN_VERSION
Definition: RawDAQData.h:81
daqdataformats::RawDAQData * daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::ConfigurationBlockConstructor::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 ConfigurationBlockConstructor.cpp.

References fillDataFormat(), and confusionMatrixTree::out.

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

Get version of the input dataformat.

Reimplemented from daqdataformats::RawDAQDataConstructor.

Definition at line 41 of file ConfigurationBlockConstructor.h.

41  {
42  const RawConfigurationBlock* nano_ver = (const RawConfigurationBlock*)inver;
43  return nano_ver->getConfigurationVersion();
44  }
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

rawconfsysid::ConfigurationSystemIDConstructor daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::ConfigurationBlockConstructor::_configurationSystemIDConstructor

Definition at line 48 of file ConfigurationBlockConstructor.h.

Referenced by fillDataFormat().

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: