Geant4  10.02.p03
G4TouchableDumpScene Class Reference

#include <G4TouchableDumpScene.hh>

Inheritance diagram for G4TouchableDumpScene:
Collaboration diagram for G4TouchableDumpScene:

Public Member Functions

 G4TouchableDumpScene (std::ostream &os, G4PhysicalVolumeModel *pPVModel, const G4ModelingParameters::PVNameCopyNoPath &requiredTouchable)
 
virtual ~G4TouchableDumpScene ()
 
G4bool IsFound ()
 
- Public Member Functions inherited from G4PseudoScene
 G4PseudoScene ()
 
virtual ~G4PseudoScene ()
 
void PreAddSolid (const G4Transform3D &objectTransformation, const G4VisAttributes &)
 
void PostAddSolid ()
 
void AddSolid (const G4Box &solid)
 
void AddSolid (const G4Cons &solid)
 
void AddSolid (const G4Tubs &solid)
 
void AddSolid (const G4Trd &solid)
 
void AddSolid (const G4Trap &solid)
 
void AddSolid (const G4Sphere &solid)
 
void AddSolid (const G4Para &solid)
 
void AddSolid (const G4Torus &solid)
 
void AddSolid (const G4Polycone &solid)
 
void AddSolid (const G4Polyhedra &solid)
 
void AddSolid (const G4VSolid &solid)
 
void AddCompound (const G4VTrajectory &)
 
void AddCompound (const G4VHit &)
 
void AddCompound (const G4VDigi &)
 
void AddCompound (const G4THitsMap< G4double > &)
 
void BeginPrimitives (const G4Transform3D &)
 
void EndPrimitives ()
 
void BeginPrimitives2D (const G4Transform3D &)
 
void EndPrimitives2D ()
 
void AddPrimitive (const G4Polyline &)
 
void AddPrimitive (const G4Scale &)
 
void AddPrimitive (const G4Text &)
 
void AddPrimitive (const G4Circle &)
 
void AddPrimitive (const G4Square &)
 
void AddPrimitive (const G4Polymarker &)
 
void AddPrimitive (const G4Polyhedron &)
 
- Public Member Functions inherited from G4VGraphicsScene
 G4VGraphicsScene ()
 
virtual ~G4VGraphicsScene ()
 
virtual const G4VisExtentGetExtent () const
 

Private Member Functions

void ProcessVolume (const G4VSolid &)
 

Private Attributes

std::ostream & fos
 
const G4PhysicalVolumeModelfpPVModel
 
G4ModelingParameters::PVNameCopyNoPath fRequiredTouchable
 
G4bool fFound
 

Additional Inherited Members

- Protected Attributes inherited from G4PseudoScene
const G4Transform3DfpCurrentObjectTransformation
 

Detailed Description

Definition at line 43 of file G4TouchableDumpScene.hh.

Constructor & Destructor Documentation

◆ G4TouchableDumpScene()

G4TouchableDumpScene::G4TouchableDumpScene ( std::ostream &  os,
G4PhysicalVolumeModel pPVModel,
const G4ModelingParameters::PVNameCopyNoPath requiredTouchable 
)

Definition at line 44 of file G4TouchableDumpScene.cc.

47 :fos(os)
48 ,fpPVModel(pPVModel)
49 ,fRequiredTouchable(requiredTouchable)
50 ,fFound(false)
51 {}
const G4PhysicalVolumeModel * fpPVModel
G4ModelingParameters::PVNameCopyNoPath fRequiredTouchable

◆ ~G4TouchableDumpScene()

G4TouchableDumpScene::~G4TouchableDumpScene ( )
virtual

Definition at line 53 of file G4TouchableDumpScene.cc.

53 {}

Member Function Documentation

◆ IsFound()

G4bool G4TouchableDumpScene::IsFound ( )
inline

Definition at line 54 of file G4TouchableDumpScene.hh.

54 {return fFound;}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessVolume()

void G4TouchableDumpScene::ProcessVolume ( const G4VSolid solid)
privatevirtual

Implements G4PseudoScene.

Definition at line 55 of file G4TouchableDumpScene.cc.

55  {
56 
57  const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>&
58  fullPVPath = fpPVModel->GetFullPVPath();
59 
60  if (fRequiredTouchable.size() == fullPVPath.size()) {
61  // OK - there's a size match. Check it out.
62 // G4cout << "Size match" << G4endl;
64  std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>::const_iterator
65  iPVNodeId;
66  for (iNameCopyNo = fRequiredTouchable.begin(), iPVNodeId = fullPVPath.begin();
67  iNameCopyNo != fRequiredTouchable.end();
68  ++iNameCopyNo, ++iPVNodeId) {
69 // G4cout
70 // << iNameCopyNo->GetName()
71 // << ',' << iNameCopyNo->GetCopyNo()
72 // << "; " << iPVNodeId->GetPhysicalVolume()->GetName()
73 // << ',' << iPVNodeId->GetPhysicalVolume()->GetCopyNo()
74 // << G4endl;
75  if (!(
76  iNameCopyNo->GetName() ==
77  iPVNodeId->GetPhysicalVolume()->GetName() &&
78  iNameCopyNo->GetCopyNo() ==
79  iPVNodeId->GetPhysicalVolume()->GetCopyNo()
80  )) {
81  break;
82  }
83  }
84  if (iNameCopyNo == fRequiredTouchable.end()) {
85 // G4cout << "Match found" << G4endl;
86  fFound = true;
87 
88  const std::map<G4String,G4AttDef>* attDefs = fpPVModel->GetAttDefs();
89  std::vector<G4AttValue>* attValues = fpPVModel->CreateCurrentAttValues();
90  fos << G4AttCheck(attValues, attDefs);
91  delete attValues;
92 
93  G4Polyhedron* polyhedron = solid.GetPolyhedron();
94  fos << "\nLocal polyhedron coordinates:\n" << *polyhedron;
96  polyhedron->Transform(*transform);
97  fos << "\nGlobal polyhedron coordinates:\n" << *polyhedron;
98 
99  fpPVModel->Abort(); // No need to look further.
100  }
101  }
102 }
const std::map< G4String, G4AttDef > * GetAttDefs() const
std::vector< G4AttValue > * CreateCurrentAttValues() const
virtual G4Polyhedron * GetPolyhedron() const
Definition: G4VSolid.cc:644
const std::vector< G4PhysicalVolumeNodeID > & GetFullPVPath() const
const G4PhysicalVolumeModel * fpPVModel
G4Transform3D * GetCurrentTransform() const
G4ModelingParameters::PVNameCopyNoPath fRequiredTouchable
PVNameCopyNoPath::const_iterator PVNameCopyNoPathConstIterator
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fFound

G4bool G4TouchableDumpScene::fFound
private

Definition at line 63 of file G4TouchableDumpScene.hh.

◆ fos

std::ostream& G4TouchableDumpScene::fos
private

Definition at line 60 of file G4TouchableDumpScene.hh.

◆ fpPVModel

const G4PhysicalVolumeModel* G4TouchableDumpScene::fpPVModel
private

Definition at line 61 of file G4TouchableDumpScene.hh.

◆ fRequiredTouchable

G4ModelingParameters::PVNameCopyNoPath G4TouchableDumpScene::fRequiredTouchable
private

Definition at line 62 of file G4TouchableDumpScene.hh.


The documentation for this class was generated from the following files: