DLG4::VolumeBuilders
A fluent interface for Geant4 geometry definition.
Loading...
Searching...
No Matches
FromG4VSolid.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 "FromG4VSolid.hh"
11#include "VolumeBuilder.hh"
12#include <string>
13#include <VolumeBuilderTypes.hh>
14//#include "disableable_shared_from_this.hh"
15#include "i_shared_ptr.hh"
16#include "StructureBuilder.hh"
17#include "StructureBuilder.hpp"
18
19class G4String;
20using namespace DLG4::Utilities;
21
22//GeantMultiPlane methods //////////////////////////////////////////////////
23namespace DLG4::VolumeBuilders {
24 //Factories
26 auto object = FromG4VSolidPtr();
27 object.get()->SetSolid(solid);
28 object.get()->SetName(solid->GetName());
29 return FromG4VSolidPtr(object);
30 }
31
32
33 //Private default copy ctor.
34 //This is used by clone methods of concrete classes
35 FromG4VSolid::FromG4VSolid(const FromG4VSolid &other) :
37 // Call base class copy constructor
39 SetName(other.GetBuilderName());
40 solid_ptr_.Link(other.solid_ptr_);
42 }
43}
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.
A wrapper for std::shared_ptr that allows and facilitates many implicit(i) type conversions.
FromG4VSolidPtr CreateFromG4VSolid(G4VSolid *solid)
Constructor to make a builder from an Existing Geant solid.
SharedPtr< FromG4VSolid > FromG4VSolidPtr