diff --git a/GeoModelIO/GeoModelWrite/GeoModelWrite/WriteGeoModel.h b/GeoModelIO/GeoModelWrite/GeoModelWrite/WriteGeoModel.h index 1e58bbe23f244cd2885a436e6c113a3d7e207c9c..4577344aa9d72d4bde4f78395c2199c0eb9cd7c5 100644 --- a/GeoModelIO/GeoModelWrite/GeoModelWrite/WriteGeoModel.h +++ b/GeoModelIO/GeoModelWrite/GeoModelWrite/WriteGeoModel.h @@ -351,7 +351,7 @@ class WriteGeoModel : public GeoNodeAction { std::vector<std::vector<std::string>> m_physVols; std::vector<std::vector<std::string>> m_fullPhysVols; std::vector<std::vector<std::string>> m_materials; - std::vector<std::vector<std::string>> m_elements; + // std::vector<std::vector<std::string>> m_elements; std::vector<std::vector<std::string>> m_transforms; std::vector<std::vector<std::string>> m_alignableTransforms; std::vector<std::vector<std::string>> m_serialDenominators; @@ -361,6 +361,8 @@ class WriteGeoModel : public GeoNodeAction { std::vector<std::vector<std::string>> m_nameTags; std::vector<std::vector<std::string>> m_shapes; + DBRowsList m_elements; + DBRowsList m_shapes_Box; DBRowsList m_shapes_Tube; DBRowsList m_shapes_Cons; diff --git a/GeoModelIO/GeoModelWrite/src/WriteGeoModel.cpp b/GeoModelIO/GeoModelWrite/src/WriteGeoModel.cpp index a3e881852ce90cc2d302c237fec50d372f9b22d1..4d96e1c057858d4d75f16628750eeae3397075b9 100644 --- a/GeoModelIO/GeoModelWrite/src/WriteGeoModel.cpp +++ b/GeoModelIO/GeoModelWrite/src/WriteGeoModel.cpp @@ -2041,10 +2041,18 @@ unsigned int WriteGeoModel::addMaterial(const std::string& name, unsigned int WriteGeoModel::addElement(const std::string& name, const std::string& symbol, const double& elZ, const double& elA) { - std::vector<std::vector<std::string>>* container = &m_elements; - std::vector<std::string> values; - values.insert(values.begin(), {name, symbol, CppHelper::to_string_with_precision(elZ), - CppHelper::to_string_with_precision(elA)}); + // std::vector<std::vector<std::string>>* container = &m_elements; + // std::vector<std::string> values; + // values.insert(values.begin(), {name, symbol, CppHelper::to_string_with_precision(elZ), + // CppHelper::to_string_with_precision(elA)}); + + DBRowsList* container = &m_elements; + DBRowEntry values; + values.push_back(name); + values.push_back(symbol); + values.push_back(elZ); + values.push_back(elA); + return addRecord(container, values); }