g4system
Loading...
Searching...
No Matches
g4volume.cc
Go to the documentation of this file.
1
7#include "g4volume.h"
8
9// Store the solid pointer and emit a debug trace to help diagnose factory/build ordering.
10void G4Volume::setSolid(G4VSolid* s, const std::shared_ptr<GLogger>& log) {
11 solidVolume = s;
12 log->debug(NORMAL, "G4Volume: solid assigned @", s);
13}
14
15// Store the logical pointer and emit a debug trace to help diagnose factory/build ordering.
16void G4Volume::setLogical(G4LogicalVolume* l, const std::shared_ptr<GLogger>& log) {
17 logicalVolume = l;
18 log->debug(NORMAL, "G4Volume: logical assigned @", l);
19}
20
21// Store the physical pointer and emit a debug trace to help diagnose factory/build ordering.
22void G4Volume::setPhysical(G4VPhysicalVolume* p, const std::shared_ptr<GLogger>& log) {
23 physicalVolume = p;
24 log->debug(NORMAL, "G4Volume: physical assigned @", p);
25}
26
27// Attach a field manager to the logical volume if it exists; otherwise do nothing.
28void G4Volume::setFieldManager(G4FieldManager* fm, bool forceToAllDaughters) {
29 if (!logicalVolume) return; // nothing to attach to
30 logicalVolume->SetFieldManager(fm, forceToAllDaughters);
31}
void setLogical(G4LogicalVolume *l, const std::shared_ptr< GLogger > &log)
Store a G4LogicalVolume pointer and log the assignment.
Definition g4volume.cc:16
void setPhysical(G4VPhysicalVolume *p, const std::shared_ptr< GLogger > &log)
Store a G4VPhysicalVolume pointer and log the assignment.
Definition g4volume.cc:22
void setFieldManager(G4FieldManager *fm, bool forceToAllDaughters)
Attach a G4FieldManager to the stored logical volume, if present.
Definition g4volume.cc:28
void setSolid(G4VSolid *s, const std::shared_ptr< GLogger > &log)
Store a G4VSolid pointer and log the assignment.
Definition g4volume.cc:10
Thin wrapper that stores the Geant4 solid/logical/physical triple for one GEMC volume.
NORMAL