ConfigurationNameConstructor.h
Go to the documentation of this file.
1 /*
2  * File: ConfigurationNameConstructor.h
3  * Author: denis
4  *
5  * Created on September 20, 2012, 2:18 PM
6  */
7 
8 #ifndef CONFIGURATIONNAMECONSTRUCTOR_H
9 #define CONFIGURATIONNAMECONSTRUCTOR_H
10 //#include "DAQDataFormats/../unittest/RawDAQDataConstructor.h"
11 #include "RawDAQDataConstructor.h"
12 #include "DAQDataFormats/RawConfigurationName.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 RawConfigurationName
24 #define LAST_CLASS_VERSION 0
25 #define CURRENT_FIELDS_SUB_NAMESPACE rawconfname
26 #include "DAQDataFormats/DataFormatLast.inc"
27 
28 namespace daqdataformats {
30 
31  const std::string TEST_VALUE_Name = "test1";
32 
33 
35 public:
38 
39  bool setFieldToTestValue_Name(daqdataformats::CURRENT_CLASS* dataformat) const {return dataformat->setName(TEST_VALUE_Name);}
40  bool setFieldToZeroValue_Name(daqdataformats::CURRENT_CLASS* dataformat) const {const std::string null_str; return dataformat->setName(null_str);}
41  std::string getFieldValue_Name(const daqdataformats::CURRENT_CLASS* dataformat) const {std::string name; dataformat->getName(name); return name;}
42  bool checkField_Name(daqdataformats::CURRENT_CLASS* dataformat) const;
43 
44 
48 
50  const RawConfigurationName* nano_ver = (const RawConfigurationName*)inver;
51  return nano_ver->getVersion();
52  }
53 
54 private:
55 
56 };
57 
58 }}// end of namespaces
59 
60 
61 #endif /* CONFIGURATIONNAMECONSTRUCTOR_H */
62 
bool setFieldToZeroValue_Name(daqdataformats::CURRENT_CLASS *dataformat) const
#define CURRENT_CLASS
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
bool setFieldToTestValue_Name(daqdataformats::CURRENT_CLASS *dataformat) const
version_t getVersion(const daqdataformats::RawDAQData *inver) const
Get version of the input dataformat.
std::string getFieldValue_Name(const daqdataformats::CURRENT_CLASS *dataformat) const
#define CURRENT_FIELDS_SUB_NAMESPACE
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
Class to hold the data from the FEBs in correct formats.