Skip to content
Snippets Groups Projects
Commit 77804409 authored by Riccardo Maria Bianchi's avatar Riccardo Maria Bianchi :sunny:
Browse files

Fix Boolean shapes construction. Now the geometry is built correctly.

parent ba765597
No related branches found
No related tags found
1 merge request!9Implements parallel I/O (Read, for the moment) & starts dropping Qt5
Pipeline #1666291 failed
...@@ -124,9 +124,9 @@ private: ...@@ -124,9 +124,9 @@ private:
GeoVPhysVol* parseChildren(GeoVPhysVol* vol, QMap<unsigned int, QStringList> children, int depth = 0); GeoVPhysVol* parseChildren(GeoVPhysVol* vol, QMap<unsigned int, QStringList> children, int depth = 0);
GeoVPhysVol* buildVPhysVol(const unsigned int id, const unsigned int tableId, const unsigned int copyNumber); GeoVPhysVol* buildVPhysVolInstance(const unsigned int id, const unsigned int tableId, const unsigned int copyNumber);
GeoVPhysVol* buildNewVPhysVol(const unsigned int id, const unsigned int tableId, const unsigned int copyNumber); // GeoVPhysVol* buildNewVPhysVolInstance(const unsigned int id, const unsigned int tableId, const unsigned int copyNumber);
GeoVPhysVol* buildActualVPhysVol(const unsigned int id, const unsigned int tableId, unsigned int logVol_ID=0); GeoVPhysVol* buildVPhysVol(const unsigned int id, const unsigned int tableId, unsigned int logVol_ID=0);
GeoLogVol* buildLogVol(const unsigned int id); GeoLogVol* buildLogVol(const unsigned int id);
GeoShape* buildShape(const unsigned int id, type_shapes_boolean_info* shapes_info_sub); GeoShape* buildShape(const unsigned int id, type_shapes_boolean_info* shapes_info_sub);
...@@ -231,10 +231,13 @@ private: ...@@ -231,10 +231,13 @@ private:
unsigned long* m_progress; unsigned long* m_progress;
// data containers // data containers
QHash<QString, QMap<unsigned int, QStringList>> m_allchildren; // key = "parentId:parentTable", item = list of children parameters, inserted by child position // QHash<QString, QMap<unsigned int, QStringList>> m_allchildren; // key = "parentId:parentTable", item = list of children parameters, inserted by child position
// std::map<std::string, std::> std::vector<std::vector<std::string>> m_allchildrenStd;
QHash<unsigned int, QStringList> m_functions; QHash<unsigned int, QStringList> m_functions;
// std::vector<std::vector<std::string>> m_functions;
std::vector<std::vector<std::string>> m_physVolsStd; std::vector<std::vector<std::string>> m_physVolsStd;
std::vector<std::vector<std::string>> m_fullPhysVolsStd; std::vector<std::vector<std::string>> m_fullPhysVolsStd;
...@@ -247,17 +250,19 @@ private: ...@@ -247,17 +250,19 @@ private:
std::vector<std::vector<std::string>> m_materials; 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_shapes; std::vector<std::vector<std::string>> m_shapes;
// std::vector<std::vector<std::string>> m_functions; // FIXME:
std::vector<std::vector<std::string>> m_allchildrenStd;
QHash<unsigned int, QString> m_tableID_toTableName; // to look for node's type name starting from a table ID // QHash<unsigned int, QString> m_tableID_toTableName; // to look for node's type name starting from a table ID
QHash<QString, unsigned int> m_tableName_toTableID; // to look for table ID starting from node's type name // QHash<QString, unsigned int> m_tableName_toTableID; // to look for table ID starting from node's type name
std::unordered_map<unsigned int, std::string> m_tableID_toTableName; // to look for node's type name starting from a table ID
std::unordered_map<std::string, unsigned int> m_tableName_toTableID; // to look for table ID starting from node's type name
QStringList m_root_vol_data; QStringList m_root_vol_data;
QHash<QString, GeoGraphNode*> m_memMap; // FIXME: move to std:: QHash<QString, GeoGraphNode*> m_memMap;
// std::unordered_map<unsigned int, GeoShape*> m_memMapShapes; // FIXME: move all these to vectors // std::unordered_map<unsigned int, GeoShape*> m_memMapShapes;
// std::unordered_map<unsigned int, GeoTransform*> m_memMapTransforms; // std::unordered_map<unsigned int, GeoTransform*> m_memMapTransforms;
// std::unordered_map<unsigned int, GeoLogVol*> m_memMapLogs; // std::unordered_map<unsigned int, GeoLogVol*> m_memMapLogs;
// std::unordered_map<unsigned int, GeoMaterial*> m_memMapMats; // std::unordered_map<unsigned int, GeoMaterial*> m_memMapMats;
...@@ -266,6 +271,7 @@ private: ...@@ -266,6 +271,7 @@ private:
// std::unordered_map<unsigned int, GeoFullPhysVol*> m_memMapFullPhysVols; // std::unordered_map<unsigned int, GeoFullPhysVol*> m_memMapFullPhysVols;
// std::unordered_map<unsigned int, TRANSFUNCTION> m_memMapFuncs; // std::unordered_map<unsigned int, TRANSFUNCTION> m_memMapFuncs;
std::vector<GeoPhysVol*> m_memMapPhysVols; std::vector<GeoPhysVol*> m_memMapPhysVols;
std::vector<GeoFullPhysVol*> m_memMapFullPhysVols; std::vector<GeoFullPhysVol*> m_memMapFullPhysVols;
std::vector<GeoTransform*> m_memMapTransforms; std::vector<GeoTransform*> m_memMapTransforms;
...@@ -276,8 +282,10 @@ private: ...@@ -276,8 +282,10 @@ private:
std::vector<GeoLogVol*> m_memMapLogVols; std::vector<GeoLogVol*> m_memMapLogVols;
std::vector<GeoMaterial*> m_memMapMaterials; std::vector<GeoMaterial*> m_memMapMaterials;
std::vector<GeoElement*> m_memMapElements; std::vector<GeoElement*> m_memMapElements;
std::vector<GeoShape*> m_memMapShapes; // std::vector<GeoShape*> m_memMapShapes;
// std::vector<TRANSFUNCTION> m_memMapFunctions; // FIXME: std::unordered_map<unsigned int, GeoShape*> m_memMapShapes;
// std::vector<TRANSFUNCTION> m_memMapFunctions; // FIXME: implement cache for Functions
// std::unordered_map<std::string, GeoGraphNode*> m_memMap;
std::set<std::string> m_unknown_shapes; std::set<std::string> m_unknown_shapes;
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment