DLG4::VolumeBuilders
A fluent interface for Geant4 geometry definition.
Loading...
Searching...
No Matches
FromG4VSolid.hh
Go to the documentation of this file.
1#pragma once
2#ifndef FromG4VSolid_HPP
3#define FromG4VSolid_HPP
7// Created by @author Douglas S. Leonard on @date 6/8/25. All rights Reserved.
8// See related files for license, if any is provided.
9//
10// @ brief A stubbed VolumeBuilder Factory to create a builder from Any geant Solid.
11// Only the out-of-class static Factory CreateFromG4VSolid() is exposed.
12// Use it to configure logical volume and placement with VolumeBuilder from a standard G4VSolid.
15#include "VolumeBuilder.hh"
16#include <BuilderFactories.hh>
17
18// Factory CreateFromG4VSolid moved to BuilderFactories.hh
19
21#include <stdexcept>
28 class FromG4VSolid final: public VolumeBuilder<FromG4VSolid> {
29 friend class VolumeBuilder<FromG4VSolid>;
31 friend FromG4VSolidPtr VB::CreateFromG4VSolid(G4VSolid *solid);
32
33 public:
34 // No functional public methods. Only the Factory!
35 // Just boilerplate below here:
36 // FromG4VSolid(const FromG4VSolid &other) = delete;
37
38 FromG4VSolid(const FromG4VSolid &other);
39 FromG4VSolid &operator=(const FromG4VSolid &other) = delete;
40
41 private:
42 //Implement pure vitual SolidConstructor from ISolidBuilder
43 G4VSolid *SolidConstructor(const G4String &name) override {
44 throw std::runtime_error(
45 "FromG4VSolid::SolidConstructor(const G4String &name) not implemented.\n"
46 "FromG4VSolid is constructed using prebuilt a G4VSolid pointer.");
47 }
48
49 // Does this need to exist? Maybe.
50 FromG4VSolid() {
51 }
52 };
53}
54#endif //FromG4VSolid_HPP
A solid buider class that just wrap an existing G4VSolid.
FromG4VSolid & operator=(const FromG4VSolid &other)=delete
A polymorphic, type-erased builder referencing any specialized builder.
VolumeBuilder: Common functionality for volume builder classes.
FromG4VSolidPtr CreateFromG4VSolid(G4VSolid *solid)
Constructor to make a builder from an Existing Geant solid.