DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
apps
SchemaEditor
SchemaCustomAttributeModel.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/SchemaCustomAttributeModel.cpp to apps/SchemaEditor/SchemaCustomAttributeModel.cpp).
5
6
#include "
dbe/SchemaCustomAttributeModel.hpp
"
7
8
using namespace
dunedaq::oks
;
9
10
dbse::CustomAttributeModel::CustomAttributeModel
(
OksClass
* ClassInfo,
11
QStringList Headers,
12
bool
Derived )
13
:
CustomModelInterface
( Headers ),
14
SchemaClass
( ClassInfo ),
15
SchemaDerived
( Derived )
16
{
17
setupModel
();
18
}
19
20
void
dbse::CustomAttributeModel::setupModel
()
21
{
22
Data
.clear();
23
const
std::list<OksAttribute *> * AttributeList;
24
25
if
(
SchemaDerived
)
26
{
27
AttributeList =
SchemaClass
->all_attributes();
28
}
29
else
30
{
31
AttributeList =
SchemaClass
->direct_attributes();
32
}
33
34
if
( AttributeList )
35
{
36
for
(
OksAttribute
* Attribute : *AttributeList )
37
{
38
QStringList Row;
39
Row.append ( QString::fromStdString ( Attribute->get_name() ) );
40
Row.append ( QString::fromStdString ( Attribute->get_type() ) );
41
Data
.append ( Row );
42
}
43
}
44
}
45
46
dbse::CustomAttributeModel::~CustomAttributeModel
() =
default
;
SchemaCustomAttributeModel.hpp
dbse::CustomAttributeModel::SchemaClass
dunedaq::oks::OksClass * SchemaClass
Definition
SchemaCustomAttributeModel.hpp:24
dbse::CustomAttributeModel::~CustomAttributeModel
~CustomAttributeModel()
dbse::CustomAttributeModel::SchemaDerived
bool SchemaDerived
Definition
SchemaCustomAttributeModel.hpp:25
dbse::CustomAttributeModel::CustomAttributeModel
CustomAttributeModel(dunedaq::oks::OksClass *ClassInfo, QStringList Headers, bool Derived=false)
Definition
SchemaCustomAttributeModel.cpp:10
dbse::CustomAttributeModel::setupModel
void setupModel()
Definition
SchemaCustomAttributeModel.cpp:20
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::OksAttribute
OKS attribute class.
Definition
attribute.hpp:107
dunedaq::oks::OksClass
The OKS class.
Definition
class.hpp:205
dunedaq::oks
Definition
OksConfiguration.hpp:24
Generated on
for DUNE-DAQ by
1.17.0