DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
apps
SchemaEditor
SchemaCustomMethodModel.cpp
Go to the documentation of this file.
1
// DUNE DAQ modification notice:
2
// This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
3
// Fork baseline commit: dbe-02-12-17 (2022-05-12).
4
// Renamed since fork: yes (from src/SchemaEditor/SchemaCustomMethodModel.cpp to
5
// apps/SchemaEditor/SchemaCustomMethodModel.cpp).
6
7
#include "
dbe/SchemaCustomMethodModel.hpp
"
8
9
using namespace
dunedaq::oks
;
10
11
dbse::CustomMethodModel::CustomMethodModel
(
OksClass
* ClassInfo, QStringList Headers,
bool
Derived)
12
:
CustomModelInterface
(Headers)
13
,
SchemaClass
(ClassInfo)
14
,
SchemaDerived
(Derived)
15
{
16
setupModel
();
17
}
18
19
void
20
dbse::CustomMethodModel::setupModel
()
21
{
22
Data
.clear();
23
const
std::list<OksMethod*>* MethodList;
24
std::set<std::string> direct_methods;
25
auto
methods =
SchemaClass
->direct_methods();
26
if
(methods !=
nullptr
) {
27
for
(
auto
method : *methods) {
28
direct_methods.insert(method->get_name());
29
}
30
}
31
32
if
(
SchemaDerived
) {
33
MethodList =
SchemaClass
->all_methods();
34
}
else
{
35
MethodList =
SchemaClass
->direct_methods();
36
}
37
38
if
(MethodList !=
nullptr
) {
39
for
(
OksMethod
* Method : *MethodList) {
40
QStringList row;
41
auto
name = Method->get_name();
42
row.append(QString::fromStdString(name));
43
if
(direct_methods.contains(name)) {
44
row.append(
"D"
);
45
}
else
{
46
row.append(
"I"
);
47
}
48
Data
.append(row);
49
}
50
}
51
}
52
53
dbse::CustomMethodModel::~CustomMethodModel
() =
default
;
SchemaCustomMethodModel.hpp
dbse::CustomMethodModel::CustomMethodModel
CustomMethodModel(dunedaq::oks::OksClass *ClassInfo, QStringList Headers, bool Derived=false)
Definition
SchemaCustomMethodModel.cpp:11
dbse::CustomMethodModel::setupModel
void setupModel()
Definition
SchemaCustomMethodModel.cpp:20
dbse::CustomMethodModel::SchemaDerived
bool SchemaDerived
Definition
SchemaCustomMethodModel.hpp:28
dbse::CustomMethodModel::~CustomMethodModel
~CustomMethodModel()
dbse::CustomMethodModel::SchemaClass
dunedaq::oks::OksClass * SchemaClass
Definition
SchemaCustomMethodModel.hpp:27
dbse::CustomModelInterface::CustomModelInterface
CustomModelInterface(QStringList Headers, QObject *parent=nullptr)
Including Schema Editor.
Definition
SchemaCustomModelInterface.cpp:12
dbse::CustomModelInterface::Data
QList< QStringList > Data
Definition
SchemaCustomModelInterface.hpp:31
dunedaq::oks::OksClass
The OKS class.
Definition
class.hpp:223
dunedaq::oks::OksMethod
OKS method class.
Definition
method.hpp:147
dunedaq::oks
Definition
SchemaCommand.hpp:17
Generated on
for DUNE-DAQ by
1.18.0