DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
Schema.hpp
Go to the documentation of this file.
1//
2// DUNE DAQ modification notice:
3// This file has been modified from the original ATLAS config source for the DUNE DAQ project.
4// Fork baseline commit: 67a24e731 (2022-10-27).
5// Renamed since fork: yes (from config/Schema.h to include/conffwk/Schema.hpp).
6//
7
14
15#ifndef CONFFWK_SCHEMA_H_
16#define CONFFWK_SCHEMA_H_
17
18#include <string>
19#include <vector>
20#include <iostream>
21
22namespace dunedaq {
23 namespace conffwk {
24
26
45
46
48
55
56
58
59 struct attribute_t {
60
61 std::string p_name;
63 std::string p_range;
67 std::string p_default_value;
68 std::string p_description;
69
71
73 const std::string& name,
75 const std::string& range,
76 int_format_t int_format,
77 bool is_not_null,
78 bool is_multi_value,
79 const std::string& default_value,
80 const std::string& description
81 );
82
83
85
87
88
90
91 void print(
92 std::ostream& out,
93 const std::string& prefix = ""
94 ) const;
95
97 static const char * type2str(type_t type );
98
100 static const char * type(type_t type );
101
103 static const char * format2str(int_format_t format );
104
105 };
106
107
109
116
117
119
121
122 std::string p_name;
123 std::string p_type;
126 std::string p_description;
127
129
131 const std::string& name,
132 const std::string& type,
133 bool can_be_null,
134 bool is_multi_value,
135 bool is_aggregation,
136 const std::string& description
137 );
138
139
141
143
144
146
147 void print(
148 std::ostream& out,
149 const std::string& prefix = ""
150 ) const;
151
152
154
155 static const char * card2str(cardinality_t cardinality);
156
157 };
158
159
161
162 struct class_t {
163
164 std::string p_name;
165 std::string p_description;
166 std::string p_schema_path;
168 const std::vector<std::string> p_superclasses;
169 const std::vector<std::string> p_subclasses;
170 const std::vector<attribute_t> p_attributes;
171 const std::vector<relationship_t> p_relationships;
172
174
175 class_t(
176 const std::string& name,
177 const std::string& description,
178 const std::string& schema_path,
179 bool is_abstract
180 );
181
182
184
185 class_t() { ; }
186
187
189
190 void print(
191 std::ostream& out,
192 const std::string& prefix = ""
193 ) const;
194
195 };
196
197 const char * bool2str(bool value);
198
199 std::ostream& operator<<(std::ostream& out, const attribute_t &);
200 std::ostream& operator<<(std::ostream& out, const relationship_t &);
201 std::ostream& operator<<(std::ostream& out, const class_t &);
202
203 }
204}
205
206#endif // CONFFWK_SCHEMA_H_
const char * bool2str(bool value)
std::ostream & operator<<(std::ostream &, const ConfigurationChange &)
Including Qt Headers.
Definition module.cpp:16
DAC value out of range
Message.
Definition DACNode.hpp:32
FELIX Initialization std::string initerror FELIX queue timed out
static const char * type(type_t type)
void print(std::ostream &out, const std::string &prefix="") const
static const char * type2str(type_t type)
static const char * format2str(int_format_t format)
attribute_t(const std::string &name, type_t type, const std::string &range, int_format_t int_format, bool is_not_null, bool is_multi_value, const std::string &default_value, const std::string &description)
const std::vector< attribute_t > p_attributes
Definition Schema.hpp:170
const std::vector< relationship_t > p_relationships
Definition Schema.hpp:171
void print(std::ostream &out, const std::string &prefix="") const
class_t(const std::string &name, const std::string &description, const std::string &schema_path, bool is_abstract)
const std::vector< std::string > p_subclasses
Definition Schema.hpp:169
std::string p_description
Definition Schema.hpp:165
std::string p_schema_path
Definition Schema.hpp:166
const std::vector< std::string > p_superclasses
Definition Schema.hpp:168
void print(std::ostream &out, const std::string &prefix="") const
static const char * card2str(cardinality_t cardinality)
relationship_t(const std::string &name, const std::string &type, bool can_be_null, bool is_multi_value, bool is_aggregation, const std::string &description)