ConfigurationSystemIDConstructor.h
Go to the documentation of this file.
1 /*
2  * File: ConfigurationSystemIDConstructor.h
3  * Author: denis
4  *
5  * Created on September 20, 2012, 2:18 PM
6  */
7 
8 #ifndef CONFIGURATIONSYSTEMIDCONSTRUCTOR_H
9 #define CONFIGURATIONSYSTEMIDCONSTRUCTOR_H
10 //#include "DAQDataFormats/../unittest/RawDAQDataConstructor.h"
11 #include "RawDAQDataConstructor.h"
12 #include "DAQDataFormats/RawConfigurationSystemID.h"
13 
14 /// It is requred to
15 /// 1. include DAQDataFormats/DataFormatFirst.inc
16 /// 2. define CURRENT_CLASS
17 /// 3. define CURRENT_CLASS_VERSION for version of the class
18 /// OR define LAST_CLASS_VERSION for the main structure of the class
19 /// 4. (optional) define CURRENT_FIELDS_SUB_NAMESPACE
20 /// 5. include DAQDataFormats/DataFormatLast.inc
21 /// before the declaration of the DataFormat version class in the header.
22 #include "DAQDataFormats/DataFormatFirst.inc"
23 #define CURRENT_CLASS RawConfigurationSystemID
24 #define LAST_CLASS_VERSION 0
25 #define CURRENT_FIELDS_SUB_NAMESPACE rawconfsysid
26 #include "DAQDataFormats/DataFormatLast.inc"
27 
28 namespace daqdataformats {
30 
31  const std::string TEST_VALUE_VersionName = "NOvA Testing the Version name.";
32 
36  };// end of ConfigurationTailMASKS
37 
39 public:
42  DEFINE_TESTVALUE (DAQSystemID);
43  DEFINE_TESTVALUE (DAQSubSystemID);
44 
45  bool setFieldToTestValue_VersionName(daqdataformats::CURRENT_CLASS* dataformat) const {return dataformat->setVersionName(TEST_VALUE_VersionName);}
46  bool setFieldToZeroValue_VersionName(daqdataformats::CURRENT_CLASS* dataformat) const {const std::string null_str; return dataformat->setVersionName(null_str);}
47  std::string getFieldValue_VersionName(const daqdataformats::CURRENT_CLASS* dataformat) const {std::string name; dataformat->getVersionName(name); return name;}
49 
50 
54 
56  const RawConfigurationSystemID* nano_ver = (const RawConfigurationSystemID*)inver;
57  return nano_ver->getVersion();
58  }
59 
60 private:
61 
62 };
63 
64 }}// end of namespaces
65 
66 
67 #endif /* CONFIGURATIONSYSTEMIDCONSTRUCTOR_H */
68 
const XML_Char * name
Definition: expat.h:151
daqdataformats::RawDAQData * getFilledDataFormat(const daqdataformats::version_t) const
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
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
int32_t version_t
Definition: RawDAQData.h:72
#define CURRENT_FIELDS_SUB_NAMESPACE
Class to hold the data from the FEBs in correct formats.
std::string getFieldValue_VersionName(const daqdataformats::CURRENT_CLASS *dataformat) const
version_t getVersion(const daqdataformats::RawDAQData *inver) const
Get version of the input dataformat.