DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SchemaCustomAttributeModel.cpp
Go to the documentation of this file.
2
3using namespace dunedaq::oks;
4
6 QStringList Headers,
7 bool Derived )
8 : CustomModelInterface ( Headers ),
9 SchemaClass ( ClassInfo ),
10 SchemaDerived ( Derived )
11{
12 setupModel();
13}
14
16{
17 Data.clear();
18 const std::list<OksAttribute *> * AttributeList;
19
20 if ( SchemaDerived )
21 {
22 AttributeList = SchemaClass->all_attributes();
23 }
24 else
25 {
26 AttributeList = SchemaClass->direct_attributes();
27 }
28
29 if ( AttributeList )
30 {
31 for ( OksAttribute * Attribute : *AttributeList )
32 {
33 QStringList Row;
34 Row.append ( QString::fromStdString ( Attribute->get_name() ) );
35 Row.append ( QString::fromStdString ( Attribute->get_type() ) );
36 Data.append ( Row );
37 }
38 }
39}
40
CustomAttributeModel(dunedaq::oks::OksClass *ClassInfo, QStringList Headers, bool Derived=false)
OKS attribute class.
The OKS class.
Definition class.hpp:200