Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-09 08:22:59

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author     : M.Frank
0011 //
0012 //==========================================================================
0013 
0014 // Framework include files
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 // C/C++ includes
0023 
0024 using namespace dd4hep;
0025 
0026 DD4HEP_INSTANTIATE_HANDLE(TGDMLMatrix);
0027 
0028 /// Initializing constructor.
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 /// Assignment from object pointer
0041 PropertyTable& PropertyTable::operator=(Object* matrix)  {
0042   this->m_element = matrix;
0043   return *this;
0044 }
0045 
0046 /// Access property title
0047 const char* PropertyTable::title()  const  {
0048   return access()->GetTitle();
0049 }
0050 
0051 /// Number of rows in the property table
0052 std::size_t PropertyTable::numRows()  const  {
0053   return access()->GetRows();
0054 }
0055 
0056 /// Number of colums in the property table
0057 std::size_t PropertyTable::numColumns()  const  {
0058   return access()->GetCols();
0059 }
0060