DLG4::VolumeBuilders
A fluent interface for Geant4 geometry definition.
Loading...
Searching...
No Matches
FromG4VSolidCore.cc
Go to the documentation of this file.
1/*
2 * FromG4VSolid.cc
3 *
4 * Created on: Jun 29, 2024
5 * Author: D. S. Leonard
6 */
7
8// See header for documentation.
9
10#include "FromG4VSolidCore.hh"
11#include "VolumeBuilderBase.hh"
12#include <string>
14//#include "disableable_shared_from_this.hh"
15#include "i_shared_ptr.hh"
18
19class G4String;
20using namespace DLG4::Utilities;
21
22//GeantMultiPlane methods //////////////////////////////////////////////////
23namespace DLG4::VolumeBuilders {
24 //Factories
26 auto object = FromG4VSolid();
27 object.get()->SetSolid(solid);
28 object.get()->SetName(solid->GetName());
29 return FromG4VSolid(object);
30 }
31}
32
34 //Private default copy ctor.
35 //This is used by clone methods of concrete classes
36 FromG4VSolidCore::FromG4VSolidCore(const FromG4VSolidCore &other) :
38 // Call base class copy constructor
40 SetName(other.GetBuilderName());
41 solid_ptr_.Link(other.solid_ptr_);
43 }
44}
A solid buider class that just wrap an existing G4VSolid.
VolumeBuilder: Common functionality for volume builder classes.
DerivedPtr SetName(const G4String &name)
SetName Sets name used for solid and derived product names.
FromG4VSolid CreateFromG4VSolid(G4VSolid *solid)
Constructor to make a builder from an Existing Geant solid.
_internals_::FromG4VSolid FromG4VSolid
Shared pointer to _internals_::FromG4VSolidCore.