DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SchemaCustomSuperClassModel.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/SchemaCustomSuperClassModel.cpp to apps/SchemaEditor/SchemaCustomSuperClassModel.cpp).
5
7
8using namespace dunedaq::oks;
9
11 QStringList Headers, bool Derived )
12 : CustomModelInterface ( Headers ),
13 SchemaClass ( ClassInfo ),
14 SchemaDerived ( Derived )
15{
16 setupModel();
17}
18
20{
21 Data.clear();
22
23 std::set<std::string> direct_classes;
24 const auto& directClasses = SchemaClass->direct_super_classes();
25 if(directClasses != nullptr) {
26 for(const std::string* cl : *directClasses) {
27 direct_classes.insert(*cl);
28 }
29 }
30
31 std::list<std::string> SuperClassList;
32 if ( SchemaDerived )
33 {
34 const OksClass::FList* allClasses = SchemaClass->all_super_classes();
35 if(allClasses != nullptr) {
36 for(const OksClass* cl : *allClasses) {
37 SuperClassList.push_back(cl->get_name());
38 }
39 }
40 }
41 else
42 {
43 for (auto cls : direct_classes) {
44 SuperClassList.push_back(cls);
45 }
46 }
47
48 for ( std::string cls : SuperClassList )
49 {
50 QStringList row;
51 row.append ( QString::fromStdString ( cls ) );
52 if (direct_classes.contains(cls)) {
53 row.append("D");
54 }
55 else {
56 row.append("I");
57 }
58 Data.append ( row );
59 }
60}
61
CustomModelInterface(QStringList Headers, QObject *parent=nullptr)
Including Schema Editor.
CustomSuperClassModel(dunedaq::oks::OksClass *ClassInfo, QStringList Headers, bool Derived=false)
The OKS class.
Definition class.hpp:205
std::list< OksClass *, boost::fast_pool_allocator< OksClass * > > FList
Definition class.hpp:240