Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes
G4VUserParallelWorld Class Referenceabstract

#include <G4VUserParallelWorld.hh>

Inheritance diagram for G4VUserParallelWorld:
B02ImportanceDetectorConstruction B03ImportanceDetectorConstruction HadrontherapyDetectorROGeometry Par01ParallelWorldForPion RE04ParallelWorldConstruction RE05CalorimeterROGeometry RE06ParallelWorld

Public Member Functions

 G4VUserParallelWorld (G4String worldName)
 
virtual ~G4VUserParallelWorld ()
 
virtual void Construct ()=0
 
virtual void ConstructSD ()
 
G4String GetName ()
 

Protected Member Functions

G4VPhysicalVolumeGetWorld ()
 
void SetSensitiveDetector (const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
 
void SetSensitiveDetector (G4LogicalVolume *logVol, G4VSensitiveDetector *aSD)
 

Protected Attributes

G4String fWorldName
 

Detailed Description

Definition at line 48 of file G4VUserParallelWorld.hh.

Constructor & Destructor Documentation

G4VUserParallelWorld::G4VUserParallelWorld ( G4String  worldName)

Definition at line 39 of file G4VUserParallelWorld.cc.

References fWorldName.

40 { fWorldName = worldName; }
G4VUserParallelWorld::~G4VUserParallelWorld ( )
virtual

Definition at line 42 of file G4VUserParallelWorld.cc.

43 { ; }

Member Function Documentation

virtual void G4VUserParallelWorld::Construct ( )
pure virtual
void G4VUserParallelWorld::ConstructSD ( )
virtual
G4String G4VUserParallelWorld::GetName ( void  )
inline
G4VPhysicalVolume * G4VUserParallelWorld::GetWorld ( )
protected
void G4VUserParallelWorld::SetSensitiveDetector ( const G4String logVolName,
G4VSensitiveDetector aSD,
G4bool  multi = false 
)
protected

Definition at line 58 of file G4VUserParallelWorld.cc.

References FatalErrorInArgument, G4Exception(), G4LogicalVolumeStore::GetInstance(), and G4VSensitiveDetector::GetName().

Referenced by RE05CalorimeterROGeometry::ConstructSD(), HadrontherapyDetectorROGeometry::ConstructSD(), B03ImportanceDetectorConstruction::ConstructSD(), and B02ImportanceDetectorConstruction::ConstructSD().

59 {
60  G4bool found = false;
62  for(G4LogicalVolumeStore::iterator pos=store->begin(); pos!=store->end(); pos++)
63  {
64  if((*pos)->GetName()==logVolName)
65  {
66  if(found && !multi)
67  {
68  G4String eM = "More than one logical volumes of the name <";
69  eM += (*pos)->GetName();
70  eM += "> are found and thus the sensitive detector <";
71  eM += aSD->GetName();
72  eM += "> cannot be uniquely assigned.";
73  G4Exception("G4VUserParallelWorld::SetSensitiveDetector",
74  "Run5052",FatalErrorInArgument,eM);
75  }
76  found = true;
77  SetSensitiveDetector(*pos,aSD);
78  }
79  }
80  if(!found)
81  {
82  G4String eM2 = "No logical volume of the name <";
83  eM2 += logVolName;
84  eM2 += "> is found. The specified sensitive detector <";
85  eM2 += aSD->GetName();
86  eM2 += "> couldn't be assigned to any volume.";
87  G4Exception("G4VUserParallelWorld::SetSensitiveDetector",
88  "Run5053",FatalErrorInArgument,eM2);
89  }
90 }
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
bool G4bool
Definition: G4Types.hh:79
static G4LogicalVolumeStore * GetInstance()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
void G4VUserParallelWorld::SetSensitiveDetector ( G4LogicalVolume logVol,
G4VSensitiveDetector aSD 
)
protected

Definition at line 93 of file G4VUserParallelWorld.cc.

References G4SDManager::AddNewDetector(), G4SDManager::GetSDMpointer(), and G4LogicalVolume::SetSensitiveDetector().

94 {
96  logVol->SetSensitiveDetector(aSD);
97 }
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:67
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)

Field Documentation

G4String G4VUserParallelWorld::fWorldName
protected

Definition at line 59 of file G4VUserParallelWorld.hh.

Referenced by G4VUserParallelWorld(), GetName(), and GetWorld().


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