62 fLastNonSequentialCopyNo(-99)
72 const G4String& outFileName = pSystem -> GetOutFileName();
73 if (outFileName ==
"G4cout") {
80 G4cout <<
"G4ASCIITreeSceneHandler::BeginModeling: writing to ";
81 if (outFileName ==
"G4cout") {
82 G4cout <<
"G4 standard output (G4cout)";
84 G4cout <<
"file \"" << outFileName <<
"\"";
89 if (outFileName !=
"G4cout") {
98 const G4int detail = verbosity % 10;
99 os <<
"# Set verbosity with \"/vis/ASCIITree/verbose <verbosity>\":";
104 os <<
"\n# Now printing with verbosity " << verbosity;
105 os <<
"\n# Format is: PV:n";
106 if (detail >= 1) os <<
" / LV (SD,RO)";
107 if (detail >= 2) os <<
" / Solid(type)";
108 if (detail >= 3) os <<
", volume, density";
109 if (detail >= 5) os <<
", daughter-subtracted volume and mass";
110 if (detail >= 6) os <<
", physical volume dump";
111 if (detail >= 7) os <<
", polyhedron dump";
113 "\n# Abbreviations: PV = Physical Volume, LV = Logical Volume,"
114 "\n# SD = Sensitive Detector, RO = Read Out Geometry.";
120 const G4int detail = verbosity % 10;
121 const G4String& outFileName = pSystem -> GetOutFileName();
141 std::vector<G4Scene::Model>::const_iterator i;
142 for (i = models.begin(); i != models.end(); ++i) {
158 G4cout <<
"Overall volume of \""
164 <<
" and the daughter-included mass";
167 G4cout <<
" to unlimited depth";
169 G4cout <<
", ignoring daughters at depth "
182 if (outFileName !=
"G4cout") {
184 G4cout <<
"Output file \"" << outFileName <<
"\" closed." <<
G4endl;
188 G4cout <<
"G4ASCIITreeSceneHandler::EndModeling" <<
G4endl;
196 if (!pPVModel)
return;
215 G4int detail = verbosity % 10;
217 if (verbosity < 10 && pCurrentPV->IsReplicated()) {
219 PVPath::const_reverse_iterator thisID = drawnPVPath.rbegin();
220 PVPath::const_reverse_iterator motherID = ++drawnPVPath.rbegin();
224 if (i->back().GetPhysicalVolume()->GetLogicalVolume() ==
225 thisID->GetPhysicalVolume()->GetLogicalVolume()) {
244 if (motherID == drawnPVPath.rend() &&
247 if (motherID != drawnPVPath.rend() &&
249 motherID->GetPhysicalVolume()->GetLogicalVolume() ==
250 (*i)[i->size() - 2].GetPhysicalVolume()->GetLogicalVolume())
263 if (verbosity < 10 &&
270 G4Exception(
"G4ASCIITreeSceneHandler::RequestPrimitives",
273 "Replica unexpected");
303 for (
size_t i = 0; i < drawnPVPath.size(); i++ ) *
fpOutFile <<
" ";
306 <<
"\":" << currentCopyNo;
309 if (verbosity < 10) {
324 <<
" (" << nReplicas <<
" parametrised volumes)";
332 <<
" (" << nReplicas <<
" replicas)";
337 if (verbosity < 10) {
348 << pCurrentLV->
GetName() <<
"\"";
371 if (pCurrentMaterial) {
374 <<
" (" << pCurrentMaterial->
GetName() <<
")";
381 if (pCurrentMaterial) {
389 G4double daughter_subtracted_volume =
390 daughter_subtracted_mass / pCurrentMaterial->
GetDensity();
392 <<
G4BestUnit(daughter_subtracted_volume,
"Volume")
394 <<
G4BestUnit(daughter_subtracted_mass,
"Mass");
400 const std::map<G4String,G4AttDef>* attDefs = pPVModel->
GetAttDefs();
407 fRestOfLine <<
"\nLocal polyhedron coordinates:\n" << *polyhedron;
409 polyhedron->Transform(*transform);
410 fRestOfLine <<
"\nGlobal polyhedron coordinates:\n" << *polyhedron;
414 fLVSet.insert(pCurrentLV);
virtual G4Polyhedron * GetPolyhedron() const
const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual G4bool IsReplicated() const =0
const G4String & GetName() const
G4Material * GetCurrentMaterial() const
G4double GetDensity() const
G4Navigator * GetNavigatorForTracking() const
const G4ModelingParameters * GetModelingParameters() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4ASCIITreeSceneHandler(G4VGraphicsSystem &system, const G4String &name)
virtual G4GeometryType GetEntityType() const =0
const std::vector< G4PhysicalVolumeNodeID > & GetDrawnPVPath() const
void SetModelingParameters(const G4ModelingParameters *)
std::set< PVPath > fReplicaSet
std::vector< PVNodeID > PVPath
static std::vector< G4String > fVerbosityGuidance
virtual void BeginModeling()
virtual void RequestPrimitives(const G4VSolid &)
virtual void EndModeling()
std::set< PVPath >::iterator ReplicaSetIterator
G4GLOB_DLL std::ostream G4cout
G4Transform3D * GetCurrentTransform() const
const G4String & GetName() const
const std::vector< Model > & GetRunDurationModelList() const
virtual G4VPVParameterisation * GetParameterisation() const =0
G4VReadOutGeometry * GetROgeometry() const
G4VGraphicsSystem * GetGraphicsSystem() const
G4int GetNoDaughters() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VPhysicalVolume * GetTopPhysicalVolume() const
virtual G4bool IsParameterised() const =0
G4double GetVolume() const
static G4TransportationManager * GetTransportationManager()
G4int GetRequestedDepth() const
G4int GetVerbosity() const
G4LogicalVolume * GetLogicalVolume() const
std::vector< G4AttValue > * CreateCurrentAttValues() const
virtual void EndModeling()
virtual G4int GetCopyNo() const =0
G4int fLastNonSequentialCopyNo
const G4VPhysicalVolume * fpLastPV
virtual ~G4ASCIITreeSceneHandler()
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const =0
void WriteHeader(std::ostream &)
G4double GetMass(G4bool forced=false, G4bool propagate=true, G4Material *parMaterial=0)
const G4String & GetName() const
G4LogicalVolume * GetCurrentLV() const
G4VPhysicalVolume * GetCurrentPV() const
std::set< G4LogicalVolume * > fLVSet
G4VSensitiveDetector * GetSensitiveDetector() const
G4VPhysicalVolume * GetWorldVolume() const
virtual void BeginModeling()
void CurtailDescent() const
std::ostringstream fRestOfLine
void DescribeYourselfTo(G4VGraphicsScene &)