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 apps/SchemaEditor/SchemaCustomMethodModel.cpp).
5
6
#include "
dbe/SchemaCustomMethodModel.hpp
"
7
8
using namespace
dunedaq::oks
;
9
10
dbse::CustomMethodModel::CustomMethodModel
(
OksClass
* ClassInfo, QStringList Headers,
11
bool
Derived )
12
:
CustomModelInterface
( Headers ),
13
SchemaClass
( ClassInfo ),
14
SchemaDerived
( Derived )
15
{
16
setupModel
();
17
}
18
19
void
dbse::CustomMethodModel::setupModel
()
20
{
21
Data
.clear();
22
const
std::list<OksMethod *> * MethodList;
23
std::set<std::string> direct_methods;
24
auto
methods =
SchemaClass
->direct_methods();
25
if
(methods !=
nullptr
) {
26
for
(
auto
method : *methods) {
27
direct_methods.insert(method->get_name());
28
}
29
}
30
31
if
(
SchemaDerived
)
32
{
33
MethodList =
SchemaClass
->all_methods();
34
}
35
else
36
{
37
MethodList =
SchemaClass
->direct_methods();
38
}
39
40
if
( MethodList !=
nullptr
)
41
{
42
for
(
OksMethod
* Method : *MethodList )
43
{
44
QStringList row;
45
auto
name = Method->get_name();
46
row.append ( QString::fromStdString ( name ) );
47
if
(direct_methods.contains(name)) {
48
row.append(
"D"
);
49
}
50
else
{
51
row.append(
"I"
);
52
}
53
Data
.append ( row );
54
}
55
}
56
}
57
58
dbse::CustomMethodModel::~CustomMethodModel
() =
default
;
SchemaCustomMethodModel.hpp
dbse::CustomMethodModel::CustomMethodModel
CustomMethodModel(dunedaq::oks::OksClass *ClassInfo, QStringList Headers, bool Derived=false)
Definition
SchemaCustomMethodModel.cpp:10
dbse::CustomMethodModel::setupModel
void setupModel()
Definition
SchemaCustomMethodModel.cpp:19
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:11
dbse::CustomModelInterface::Data
QList< QStringList > Data
Definition
SchemaCustomModelInterface.hpp:31
dunedaq::oks::OksClass
The OKS class.
Definition
class.hpp:205
dunedaq::oks::OksMethod
OKS method class.
Definition
method.hpp:158
dunedaq::oks
Definition
OksConfiguration.hpp:24
Generated on
for DUNE-DAQ by
1.17.0