Skip to content
Snippets Groups Projects
Commit c251802d authored by Johannes Junggeburth's avatar Johannes Junggeburth :dog2:
Browse files

Revert "Minor clean of the constructors"

parent e077d87d
No related branches found
No related tags found
1 merge request!444Revert "Minor clean of the constructors"
Pipeline #12002739 passed
Showing
with 123 additions and 78 deletions
......@@ -24,7 +24,7 @@ class GeoAccessSurfaceAction final : public GeoNodeAction
{
public:
GeoAccessSurfaceAction (unsigned int Index, const GeoVAlignmentStore* store);
virtual ~GeoAccessSurfaceAction() = default;
virtual ~GeoAccessSurfaceAction() override;
/// Handles a Transform.
virtual void handleTransform (const GeoTransform *xform) override;
......@@ -48,6 +48,10 @@ class GeoAccessSurfaceAction final : public GeoNodeAction
const GeoTrf::Transform3D & getDefTransform () const;
private:
GeoAccessSurfaceAction(const GeoAccessSurfaceAction &right);
GeoAccessSurfaceAction & operator=(const GeoAccessSurfaceAction &right);
/// Returns a pointer to the ith virtual surface under this one.
VSConstLink m_surface{};
......
......@@ -46,6 +46,9 @@ class GeoAccessVolAndSTAction final : public GeoNodeAction {
std::optional<unsigned int> getId() const;
private:
GeoAccessVolAndSTAction(const GeoAccessVolAndSTAction &right);
const GeoAccessVolAndSTAction & operator=(const GeoAccessVolAndSTAction &right);
/// A pointer to the ith physical volume under this one.
PVConstLink m_volume{};
......
......@@ -16,15 +16,18 @@
#include "GeoModelKernel/GeoNodeAction.h"
class GeoClearAbsPosAction : public GeoNodeAction {
class GeoClearAbsPosAction : public GeoNodeAction
{
public:
GeoClearAbsPosAction() = default;
virtual ~GeoClearAbsPosAction() = default;
GeoClearAbsPosAction();
virtual ~GeoClearAbsPosAction();
// Handles a physical volume.
virtual void handleFullPhysVol (const GeoFullPhysVol *vol) override;
virtual void handleFullPhysVol (const GeoFullPhysVol *vol);
private:
GeoClearAbsPosAction(const GeoClearAbsPosAction &right);
GeoClearAbsPosAction & operator=(const GeoClearAbsPosAction &right);
};
......
......@@ -11,7 +11,7 @@ class GeoCountSurfaceAction final: public GeoNodeAction
{
public:
GeoCountSurfaceAction ();
virtual ~GeoCountSurfaceAction() = default;
virtual ~GeoCountSurfaceAction();
// Handles a virtual surface.
virtual void handleVSurface (const GeoVSurface *) override;
......
......@@ -11,7 +11,7 @@ class GeoCountVolAction : public GeoNodeAction
{
public:
GeoCountVolAction ();
virtual ~GeoCountVolAction() = default;
virtual ~GeoCountVolAction();
// Handles a physical volume.
virtual void handlePhysVol (const GeoPhysVol *) override;
......@@ -29,8 +29,10 @@ class GeoCountVolAction : public GeoNodeAction
unsigned int getCount () const;
private:
GeoCountVolAction(const GeoCountVolAction &right);
GeoCountVolAction & operator=(const GeoCountVolAction &right);
unsigned int m_count{0};
unsigned int m_count;
};
inline unsigned int GeoCountVolAction::getCount () const
......
......@@ -18,7 +18,7 @@ class GeoCountVolAndSTAction : public GeoNodeAction
{
public:
GeoCountVolAndSTAction();
virtual ~GeoCountVolAndSTAction() = default;
virtual ~GeoCountVolAndSTAction();
virtual void handlePhysVol(const GeoPhysVol*);
virtual void handleFullPhysVol(const GeoFullPhysVol*);
......@@ -27,7 +27,10 @@ class GeoCountVolAndSTAction : public GeoNodeAction
unsigned int getCount() const;
private:
unsigned int m_count{0};
GeoCountVolAndSTAction(const GeoCountVolAndSTAction &right);
const GeoCountVolAndSTAction & operator=(const GeoCountVolAndSTAction &right);
unsigned int m_count;
};
inline unsigned int GeoCountVolAndSTAction::getCount() const
......
......@@ -138,16 +138,16 @@ class GeoShapeAction
private:
GeoShapeAction(const GeoShapeAction &right) = delete;
GeoShapeAction & operator=(const GeoShapeAction &right) = delete;
GeoShapeAction(const GeoShapeAction &right);
GeoShapeAction & operator=(const GeoShapeAction &right);
// A limit may be placed upon the depth to which the action
// descends. 0 = self. 1 = self and children.
std::optional<unsigned int> m_depth{std::nullopt};
std::optional<unsigned int> m_depth;
// Termination flag; causes an abortion of action execution.
bool m_terminate{false};
GeoShapePath m_path{};
bool m_terminate;
GeoShapePath m_path;
};
......
......@@ -48,21 +48,21 @@ class GeoSurfaceCursor final : public GeoNodeAction
/// Ressucitate (undo terminate)
void resuscitate();
PVConstLink m_parent{nullptr};
PVConstLink m_volume{nullptr};
VSConstLink m_surface{nullptr};
GeoTrf::Transform3D m_transform{GeoTrf::Transform3D::Identity()};
GeoTrf::Transform3D m_defTransform{GeoTrf::Transform3D::Identity()};
PVConstLink m_parent;
PVConstLink m_volume;
VSConstLink m_surface;
GeoTrf::Transform3D m_transform;
GeoTrf::Transform3D m_defTransform;
unsigned int m_majorIndex{0};
unsigned int m_volCount{0};
unsigned int m_surfCount{0};
unsigned int m_majorIndex;
unsigned int m_volCount;
unsigned int m_surfCount;
std::vector<const GeoTransform *> m_pendingTransformList{};
std::vector<const GeoTransform *> m_pendingTransformList;
bool m_hasAlignTrans{};
GeoVAlignmentStore *m_alignStore{nullptr};
GeoVAlignmentStore *m_alignStore;
};
#endif
......@@ -22,11 +22,8 @@ class GeoVDetectorManager;
class GeoVDetectorFactory
{
public:
GeoVDetectorFactory() = default;
virtual ~GeoVDetectorFactory() = default;
GeoVDetectorFactory(const GeoVDetectorFactory &right) = delete;
GeoVDetectorFactory & operator=(const GeoVDetectorFactory &right) = delete;
GeoVDetectorFactory();
virtual ~GeoVDetectorFactory();
// Create the system.
virtual void create (GeoPhysVol* world) = 0;
......@@ -36,6 +33,8 @@ class GeoVDetectorFactory
virtual const GeoVDetectorManager* getDetectorManager () const = 0;
private:
GeoVDetectorFactory(const GeoVDetectorFactory &right);
GeoVDetectorFactory & operator=(const GeoVDetectorFactory &right);
};
......
......@@ -31,9 +31,6 @@ class GeoVDetectorManager
GeoVDetectorManager();
virtual ~GeoVDetectorManager();
GeoVDetectorManager(const GeoVDetectorManager &right) = delete;
GeoVDetectorManager & operator=(const GeoVDetectorManager &right) = delete;
// Returns the number of Tree Tops (Top Level Physicsl
// Volumes)
virtual unsigned int getNumTreeTops () const = 0;
......@@ -45,8 +42,10 @@ class GeoVDetectorManager
void setName(const std::string & name);
private:
GeoVDetectorManager(const GeoVDetectorManager &right);
GeoVDetectorManager & operator=(const GeoVDetectorManager &right);
std::string m_name{};
std::string m_name;
};
......
......@@ -19,9 +19,9 @@ class GeoVG4ExtensionSolid
public:
//! Default constructor.
GeoVG4ExtensionSolid() = default;
GeoVG4ExtensionSolid() {}
virtual ~GeoVG4ExtensionSolid() = default;
virtual ~GeoVG4ExtensionSolid() {}
//! Create the specified solid. .
virtual G4VSolid *newG4Solid(const GeoUnidentifiedShape *shape) const=0;
......
......@@ -29,9 +29,6 @@ class GeoVGeometryPlugin
GeoVGeometryPlugin(const std::string& name) :
m_pluginName{name} { m_publisher->setName(m_pluginName); }
/// We prohibit copy constructor, and assignment operator
GeoVGeometryPlugin(const GeoVGeometryPlugin &right)=delete;
GeoVGeometryPlugin & operator=(const GeoVGeometryPlugin &right)=delete;
virtual ~GeoVGeometryPlugin() = default;
......@@ -51,8 +48,14 @@ class GeoVGeometryPlugin
std::unique_ptr<GeoPublisher> m_publisher{std::make_unique<GeoPublisher>()};
private:
/// We prohibit copy constructor, and assignment operator
GeoVGeometryPlugin(const GeoVGeometryPlugin &right)=delete;
GeoVGeometryPlugin & operator=(const GeoVGeometryPlugin &right)=delete;
//! The name of the plugin, used to store plugin's published nodes.
std::string m_pluginName{};
std::string m_pluginName;
};
......
......@@ -26,7 +26,7 @@ class GeoVolumeAction
public:
GeoVolumeAction (Type type = TOP_DOWN);
virtual ~GeoVolumeAction() = default;
virtual ~GeoVolumeAction();
// Callback method. Overriden by users.
virtual void handleVPhysVol (const GeoVPhysVol *);
......@@ -50,15 +50,17 @@ class GeoVolumeAction
GeoVolumeAction::Type getType () const;
private:
GeoVolumeAction(const GeoVolumeAction &right);
GeoVolumeAction & operator=(const GeoVolumeAction &right);
// This type specifies that the action should be carried
// out from the bottom up or from the top down.
Type m_type{Type::TOP_DOWN};
Type m_type;
// Termination flag; causes an abortion of action execution.
bool m_terminate{false};
bool m_terminate;
GeoTraversalState m_traversalState{};
GeoTraversalState m_traversalState;
};
......
......@@ -17,7 +17,10 @@ class GeoVolumeCursor final : public GeoNodeAction
public:
using VSConstLink = GeoVSurface::VSConstLink;
GeoVolumeCursor (PVConstLink parent, GeoVAlignmentStore* store=nullptr);
virtual ~GeoVolumeCursor() = default;
virtual ~GeoVolumeCursor() override;
GeoVolumeCursor(const GeoVolumeCursor &right) = delete;
GeoVolumeCursor & operator=(const GeoVolumeCursor &right) = delete;
/// Advance
void next();
......@@ -76,28 +79,29 @@ class GeoVolumeCursor final : public GeoNodeAction
/// Ressucitate (undo terminate)
void resuscitate();
PVConstLink m_parent{nullptr};
PVConstLink m_volume{nullptr};
VSConstLink m_surface{nullptr};
GeoTrf::Transform3D m_transform{GeoTrf::Transform3D::Identity()};
GeoTrf::Transform3D m_defTransform{GeoTrf::Transform3D::Identity()};
PVConstLink m_parent;
PVConstLink m_volume;
VSConstLink m_surface;
GeoTrf::Transform3D m_transform;
GeoTrf::Transform3D m_defTransform;
unsigned int m_majorIndex{0};
unsigned int m_minorIndex{0};
unsigned int m_minorLimit{0};
const GeoSerialTransformer* m_serialTransformer{nullptr};
unsigned int m_majorIndex;
unsigned int m_minorIndex;
unsigned int m_minorLimit;
const GeoSerialTransformer *m_serialTransformer;
const GeoNameTag* m_nameTag{nullptr};
const GeoSerialDenominator* m_serialDenominator{nullptr};
const GeoIdentifierTag* m_idTag{nullptr};
std::vector<const GeoTransform *> m_pendingTransformList{};
unsigned int m_serialDenomPosition{0};
const GeoSerialIdentifier* m_serialIdentifier{nullptr};
unsigned int m_serialIdentPosition{0};
unsigned int m_volCount{0};
bool m_hasAlignTrans{false};
GeoVAlignmentStore* m_alignStore{};
const GeoNameTag *m_nameTag;
const GeoSerialDenominator *m_serialDenominator;
const GeoIdentifierTag *m_idTag;
std::vector<const GeoTransform *> m_pendingTransformList;
unsigned int m_serialDenomPosition;
const GeoSerialIdentifier *m_serialIdentifier;
unsigned int m_serialIdentPosition;
unsigned int m_volCount;
bool m_hasAlignTrans;
GeoVAlignmentStore *m_alignStore;
};
#endif
......@@ -4,20 +4,21 @@
#include <map>
#include "GeoModelKernel/GeoVPhysVol.h"
#define volumeTags std::map<std::string, PVLink >
#define volumeTags std::map<std::string, GeoVPhysVol* >
#define tagCatalog std::map<std::string, volumeTags >
class GeoVolumeTagCatalog {
public:
void addTaggedVolume(const std::string& category, const std::string& tag, PVLink v) {
void addTaggedVolume(std::string category, std::string tag, GeoVPhysVol* v)
{
theTags[category][tag]=v;
}
GeoVPhysVol* getTaggedVolume(const std::string& category, const std::string& tag)
GeoVPhysVol* getTaggedVolume(std::string category, std::string tag)
{
return theTags[category][tag];
}
GeoVolumeTagCatalog() = default;
GeoVolumeTagCatalog() {}
static GeoVolumeTagCatalog* VolumeTagCatalog() {
static GeoVolumeTagCatalog* theCatalog=new GeoVolumeTagCatalog;
return theCatalog;
......
......@@ -16,6 +16,8 @@ GeoAccessSurfaceAction::GeoAccessSurfaceAction(unsigned int Index, const GeoVAli
m_pendingTransformList.reserve(1);
}
GeoAccessSurfaceAction::~GeoAccessSurfaceAction() = default;
void GeoAccessSurfaceAction::handleTransform (const GeoTransform *xform)
{
m_pendingTransformList.push_back (xform);
......
......@@ -4,7 +4,15 @@
#include "GeoModelKernel/GeoClearAbsPosAction.h"
GeoClearAbsPosAction::GeoClearAbsPosAction()
{
}
GeoClearAbsPosAction::~GeoClearAbsPosAction()
{
}
void GeoClearAbsPosAction::handleFullPhysVol (const GeoFullPhysVol *vol) {
vol->clearPositionInfo();
void GeoClearAbsPosAction::handleFullPhysVol (const GeoFullPhysVol *vol)
{
vol->clearPositionInfo ();
}
......@@ -9,6 +9,8 @@ GeoCountSurfaceAction::GeoCountSurfaceAction ()
setDepthLimit (1);
}
GeoCountSurfaceAction::~GeoCountSurfaceAction() = default;
void GeoCountSurfaceAction::handleVSurface (const GeoVSurface *)
{
// count the number of all virtual surfaces.
......
......@@ -5,10 +5,14 @@
#include "GeoModelKernel/GeoCountVolAction.h"
GeoCountVolAction::GeoCountVolAction ()
: m_count (0)
{
setDepthLimit (1);
}
GeoCountVolAction::~GeoCountVolAction()
{
}
void GeoCountVolAction::handlePhysVol (const GeoPhysVol *)
{
......@@ -16,7 +20,7 @@ void GeoCountVolAction::handlePhysVol (const GeoPhysVol *)
// Do not count the top volume, this action counts only children!
//
if (getPath ()->getLength () > 1)
++m_count;
m_count++;
}
void GeoCountVolAction::handleFullPhysVol (const GeoFullPhysVol *)
......@@ -25,13 +29,13 @@ void GeoCountVolAction::handleFullPhysVol (const GeoFullPhysVol *)
// Do not count the top volume, this action counts only children!
//
if (getPath ()->getLength () > 1)
++m_count;
m_count++;
}
void GeoCountVolAction::handleVSurface (const GeoVSurface *)
{
// Virtual Surface is always child of Physical Volume
++m_count;
m_count++;
}
......
......@@ -4,10 +4,15 @@
#include "GeoModelKernel/GeoCountVolAndSTAction.h"
GeoCountVolAndSTAction::GeoCountVolAndSTAction() {
GeoCountVolAndSTAction::GeoCountVolAndSTAction()
:m_count (0)
{
setDepthLimit (1);
}
GeoCountVolAndSTAction::~GeoCountVolAndSTAction()
{
}
void GeoCountVolAndSTAction::handlePhysVol(const GeoPhysVol*)
{
......@@ -15,7 +20,7 @@ void GeoCountVolAndSTAction::handlePhysVol(const GeoPhysVol*)
// Do not count the top volume, this action counts only children!
//
if (getPath ()->getLength () > 1)
++m_count;
m_count++;
}
void GeoCountVolAndSTAction::handleFullPhysVol(const GeoFullPhysVol*)
......@@ -24,11 +29,12 @@ void GeoCountVolAndSTAction::handleFullPhysVol(const GeoFullPhysVol*)
// Do not count the top volume, this action counts only children!
//
if (getPath ()->getLength () > 1)
++m_count;
m_count++;
}
void GeoCountVolAndSTAction::handleSerialTransformer(const GeoSerialTransformer *)
{
m_count ++;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment