From 67a616622b0044269c44b98051f867ef4f306194 Mon Sep 17 00:00:00 2001 From: "Joseph F. Boudreau" <boudreau@pitt.edu> Date: Fri, 23 Jun 2023 04:25:42 -0500 Subject: [PATCH] The interface to both plugins and factories is modified to accept *any* phys vol, full or not, as the "world" phys vol within which new volumes are added. The motivation is to allow a greater range of use for these factories. --- .../GeoModelKernel/GeoModelKernel/GeoVDetectorFactory.h | 4 ++-- .../GeoModelKernel/GeoModelKernel/GeoVGeometryPlugin.h | 2 +- GeoModelExamples/KitchenSinkPlugin/src/KitchenSinkPlugin.cxx | 4 ++-- GeoModelExamples/MinimalPlugin/src/MinimalPlugin.cxx | 4 ++-- GeoModelTools/GDMLtoGM/src/GDMLtoGM.cxx | 4 ++-- GeoModelTools/GeoModelXML/GMXPlugin/src/GMXPlugin.cxx | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoVDetectorFactory.h b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoVDetectorFactory.h index 55e508910..836f82a80 100644 --- a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoVDetectorFactory.h +++ b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoVDetectorFactory.h @@ -16,7 +16,7 @@ #include "GeoModelKernel/GeoVPhysVol.h" -class GeoPhysVol; +class GeoVPhysVol; class GeoVDetectorManager; class GeoVDetectorFactory @@ -26,7 +26,7 @@ class GeoVDetectorFactory virtual ~GeoVDetectorFactory(); // Create the system. - virtual void create (GeoPhysVol* world) = 0; + virtual void create (GeoVPhysVol* world) = 0; // Access to the Detector Manager. When implementing this // method, please use the covariant return type mechanism. diff --git a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoVGeometryPlugin.h b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoVGeometryPlugin.h index b2c29a636..b8ed64306 100644 --- a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoVGeometryPlugin.h +++ b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoVGeometryPlugin.h @@ -33,7 +33,7 @@ class GeoVGeometryPlugin //! Create the system geometry. /// Note: this is a pure virtual method, so you need to implement it in your derived plugin class - virtual void create ( GeoPhysVol* world, bool publish = false ) = 0; + virtual void create ( GeoVPhysVol* world, bool publish = false ) = 0; //! Returns the plugin's name std::string getName() { return m_pluginName; } diff --git a/GeoModelExamples/KitchenSinkPlugin/src/KitchenSinkPlugin.cxx b/GeoModelExamples/KitchenSinkPlugin/src/KitchenSinkPlugin.cxx index c7cb428b1..6edac522b 100644 --- a/GeoModelExamples/KitchenSinkPlugin/src/KitchenSinkPlugin.cxx +++ b/GeoModelExamples/KitchenSinkPlugin/src/KitchenSinkPlugin.cxx @@ -51,7 +51,7 @@ class KitchenSinkPlugin : public GeoVGeometryPlugin { ~KitchenSinkPlugin(); // Creation of geometry: - virtual void create(GeoPhysVol *world, bool publish=false); + virtual void create(GeoVPhysVol *world, bool publish=false); private: @@ -79,7 +79,7 @@ KitchenSinkPlugin::~KitchenSinkPlugin() // example (normally one may "publish" a list of FullPhysVol's and Alignable // transforms, but this example has none such). // -void KitchenSinkPlugin::create(GeoPhysVol *world, bool /*publish*/) +void KitchenSinkPlugin::create(GeoVPhysVol *world, bool /*publish*/) { const double degree=M_PI/180.0; diff --git a/GeoModelExamples/MinimalPlugin/src/MinimalPlugin.cxx b/GeoModelExamples/MinimalPlugin/src/MinimalPlugin.cxx index 41a3c4ef4..df940fb98 100644 --- a/GeoModelExamples/MinimalPlugin/src/MinimalPlugin.cxx +++ b/GeoModelExamples/MinimalPlugin/src/MinimalPlugin.cxx @@ -18,7 +18,7 @@ class MinimalPlugin : public GeoVGeometryPlugin { ~MinimalPlugin(); // Creation of geometry: - virtual void create(GeoPhysVol *world, bool publish=false); + virtual void create(GeoVPhysVol *world, bool publish=false); private: @@ -46,7 +46,7 @@ MinimalPlugin::~MinimalPlugin() // example (normally one may "publish" a list of FullPhysVol's and Alignable // transforms, but this example has none such). // -void MinimalPlugin::create(GeoPhysVol *world, bool /*publish*/) +void MinimalPlugin::create(GeoVPhysVol *world, bool /*publish*/) { const double degree=M_PI/180.0; diff --git a/GeoModelTools/GDMLtoGM/src/GDMLtoGM.cxx b/GeoModelTools/GDMLtoGM/src/GDMLtoGM.cxx index 4530b696d..e27c4ff5e 100644 --- a/GeoModelTools/GDMLtoGM/src/GDMLtoGM.cxx +++ b/GeoModelTools/GDMLtoGM/src/GDMLtoGM.cxx @@ -31,7 +31,7 @@ class GDMLtoGM : public GeoVGeometryPlugin { ~GDMLtoGM(); // Creation of geometry: - virtual void create(GeoPhysVol *world, bool publish = false ) override; + virtual void create(GeoVPhysVol *world, bool publish = false ) override; private: @@ -48,7 +48,7 @@ GDMLtoGM::~GDMLtoGM() //## Other Operations (implementation) -void GDMLtoGM::create(GeoPhysVol *world, bool /* 'publish' is not used here */) +void GDMLtoGM::create(GeoVPhysVol *world, bool /* 'publish' is not used here */) { char* fPath=getenv("GDML_FILE_NAME"); std::string fileName; diff --git a/GeoModelTools/GeoModelXML/GMXPlugin/src/GMXPlugin.cxx b/GeoModelTools/GeoModelXML/GMXPlugin/src/GMXPlugin.cxx index f04800be9..071a93b9d 100644 --- a/GeoModelTools/GeoModelXML/GMXPlugin/src/GMXPlugin.cxx +++ b/GeoModelTools/GeoModelXML/GMXPlugin/src/GMXPlugin.cxx @@ -32,7 +32,7 @@ class GMXPlugin : public GeoVGeometryPlugin { ~GMXPlugin(); // Creation of geometry: - virtual void create(GeoPhysVol *world, bool publish) override; + virtual void create(GeoVPhysVol *world, bool publish) override; private: @@ -79,7 +79,7 @@ GMXPlugin::~GMXPlugin() //## Other Operations (implementation) -void GMXPlugin::create(GeoPhysVol *world, bool publish) +void GMXPlugin::create(GeoVPhysVol *world, bool publish) { std::cout<< "This is GMXPlugin: creating a GeoModelXml detector "<<std::endl; std::vector<std::string> filesToParse; -- GitLab