Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ImportanceConfigurator Class Reference

#include <G4ImportanceConfigurator.hh>

Inheritance diagram for G4ImportanceConfigurator:
Collaboration diagram for G4ImportanceConfigurator:

Public Member Functions

 G4ImportanceConfigurator (const G4VPhysicalVolume *worldvolume, const G4String &particlename, G4VIStore &istore, const G4VImportanceAlgorithm *ialg, G4bool paraflag)
 
 G4ImportanceConfigurator (const G4String worldvolumeName, const G4String &particlename, G4VIStore &istore, const G4VImportanceAlgorithm *ialg, G4bool paraflag)
 
virtual ~G4ImportanceConfigurator ()
 
virtual void Configure (G4VSamplerConfigurator *preConf)
 
virtual const G4VTrackTerminatorGetTrackTerminator () const
 
void SetWorldName (G4String Name)
 
- Public Member Functions inherited from G4VSamplerConfigurator
 G4VSamplerConfigurator ()
 
virtual ~G4VSamplerConfigurator ()
 

Detailed Description

Definition at line 52 of file G4ImportanceConfigurator.hh.

Constructor & Destructor Documentation

G4ImportanceConfigurator::G4ImportanceConfigurator ( const G4VPhysicalVolume worldvolume,
const G4String particlename,
G4VIStore istore,
const G4VImportanceAlgorithm ialg,
G4bool  paraflag 
)

Definition at line 44 of file G4ImportanceConfigurator.cc.

48  : fWorld(worldvolume),
49  fWorldName(worldvolume->GetName()),
50  fPlacer(particlename),
51  fIStore(istore),
52  fDeleteIalg( ( ! ialg) ),
53  fIalgorithm(( (fDeleteIalg) ?
54  new G4ImportanceAlgorithm : ialg)),
55  fImportanceProcess(0),
56  paraflag(para)
57 {;}
const G4String & GetName() const
G4ImportanceConfigurator::G4ImportanceConfigurator ( const G4String  worldvolumeName,
const G4String particlename,
G4VIStore istore,
const G4VImportanceAlgorithm ialg,
G4bool  paraflag 
)

Definition at line 60 of file G4ImportanceConfigurator.cc.

64 : fWorldName(worldvolumeName),
65  fPlacer(particlename),
66  fIStore(istore),
67  fDeleteIalg( ( ! ialg) ),
68  fIalgorithm(( (fDeleteIalg) ?
69  new G4ImportanceAlgorithm : ialg)),
70  fImportanceProcess(0),
71  paraflag(para)
72 {
74  if(paraflag) fWorld = G4TransportationManager::GetTransportationManager()->GetParallelWorld(fWorldName);
75 }
G4Navigator * GetNavigatorForTracking() const
static G4TransportationManager * GetTransportationManager()
G4VPhysicalVolume * GetParallelWorld(const G4String &worldName)
G4VPhysicalVolume * GetWorldVolume() const

Here is the call graph for this function:

G4ImportanceConfigurator::~G4ImportanceConfigurator ( )
virtual

Definition at line 77 of file G4ImportanceConfigurator.cc.

78 {
79  if (fImportanceProcess)
80  {
81  fPlacer.RemoveProcess(fImportanceProcess);
82  delete fImportanceProcess;
83  }
84  if (fDeleteIalg)
85  {
86  delete fIalgorithm;
87  }
88 }
virtual void RemoveProcess(G4VProcess *process)

Here is the call graph for this function:

Member Function Documentation

void G4ImportanceConfigurator::Configure ( G4VSamplerConfigurator preConf)
virtual

Implements G4VSamplerConfigurator.

Definition at line 91 of file G4ImportanceConfigurator.cc.

92 {
93  G4cout << "G4ImportanceConfigurator:: entering importance configure, paraflag " << paraflag << G4endl;
94  const G4VTrackTerminator *terminator = 0;
95  if (preConf)
96  {
97  terminator = preConf->GetTrackTerminator();
98  };
99 
100  fImportanceProcess =
101  new G4ImportanceProcess(*fIalgorithm,
102  fIStore,
103  terminator,"ImportanceProcess",paraflag);
104  if (!fImportanceProcess)
105  {
106  G4Exception("G4ImportanceConfigurator::Configure()",
107  "FatalError", FatalException,
108  "Failed allocation of G4ImportanceProcess !");
109  }
110 
111  // G4cout << "G4ImportanceConfigurator:: setting parallel World " << paraflag << G4endl;
112  if(paraflag) fImportanceProcess->SetParallelWorld(fWorld->GetName());
113  // if(paraflag) fImportanceProcess->SetParallelWorld(fWorldName);
114  // G4cout << "G4ImportanceConfigurator:: set " << paraflag << " name: " << fWorld->GetName() << G4endl;
115  // getchar();
116 
117  fPlacer.AddProcessAsSecondDoIt(fImportanceProcess);
118 }
void SetParallelWorld(const G4String &parallelWorldName)
virtual void AddProcessAsSecondDoIt(G4VProcess *process)
virtual const G4VTrackTerminator * GetTrackTerminator() const =0
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

const G4VTrackTerminator * G4ImportanceConfigurator::GetTrackTerminator ( ) const
virtual

Implements G4VSamplerConfigurator.

Definition at line 121 of file G4ImportanceConfigurator.cc.

122 {
123  return fImportanceProcess;
124 }
void G4ImportanceConfigurator::SetWorldName ( G4String  Name)

Definition at line 126 of file G4ImportanceConfigurator.cc.

127 {
128  fWorldName = name;
129 }
const XML_Char * name
Definition: expat.h:151

Here is the caller graph for this function:


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