File indexing completed on 2026-09-09 08:22:59
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include <DD4hep/PropertyTable.h>
0016 #include <DD4hep/NamedObject.h>
0017 #include <DD4hep/Detector.h>
0018 #include <DD4hep/Printout.h>
0019
0020 #include <DD4hep/detail/Handle.inl>
0021
0022
0023
0024 using namespace dd4hep;
0025
0026 DD4HEP_INSTANTIATE_HANDLE(TGDMLMatrix);
0027
0028
0029 PropertyTable::PropertyTable(Detector& description,
0030 const std::string& table_name,
0031 const std::string& property_name,
0032 size_t num_rows,
0033 size_t num_cols)
0034 {
0035 std::unique_ptr<Object> table(new Object(table_name.c_str(), num_rows, num_cols));
0036 table->SetTitle(property_name.c_str());
0037 description.manager().AddGDMLMatrix(m_element=table.release());
0038 }
0039
0040
0041 PropertyTable& PropertyTable::operator=(Object* matrix) {
0042 this->m_element = matrix;
0043 return *this;
0044 }
0045
0046
0047 const char* PropertyTable::title() const {
0048 return access()->GetTitle();
0049 }
0050
0051
0052 std::size_t PropertyTable::numRows() const {
0053 return access()->GetRows();
0054 }
0055
0056
0057 std::size_t PropertyTable::numColumns() const {
0058 return access()->GetCols();
0059 }
0060