Geant4-11
Public Member Functions | Private Member Functions | Private Attributes
G4ImportanceConfigurator Class Reference

#include <G4ImportanceConfigurator.hh>

Inheritance diagram for G4ImportanceConfigurator:
G4VSamplerConfigurator

Public Member Functions

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

Private Member Functions

 G4ImportanceConfigurator (const G4ImportanceConfigurator &)
 
G4ImportanceConfiguratoroperator= (const G4ImportanceConfigurator &)
 

Private Attributes

G4bool fDeleteIalg
 
const G4VImportanceAlgorithmfIalgorithm
 
G4ImportanceProcessfImportanceProcess
 
G4VIStorefIStore
 
G4ProcessPlacer fPlacer
 
const G4VPhysicalVolumefWorld
 
G4String fWorldName
 
G4bool paraflag
 

Detailed Description

Definition at line 51 of file G4ImportanceConfigurator.hh.

Constructor & Destructor Documentation

◆ G4ImportanceConfigurator() [1/3]

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

Definition at line 49 of file G4ImportanceConfigurator.cc.

54 : fWorld(worldvolume),
55 fWorldName(worldvolume->GetName()),
56 fPlacer(particlename),
57 fIStore(istore),
58 fDeleteIalg( ( ! ialg) ),
60 new G4ImportanceAlgorithm : ialg)),
62 paraflag(para)
63{;}
const G4VPhysicalVolume * fWorld
const G4VImportanceAlgorithm * fIalgorithm
G4ImportanceProcess * fImportanceProcess
const G4String & GetName() const

◆ G4ImportanceConfigurator() [2/3]

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

◆ ~G4ImportanceConfigurator()

G4ImportanceConfigurator::~G4ImportanceConfigurator ( )
virtual

Definition at line 83 of file G4ImportanceConfigurator.cc.

84{
86 {
88 delete fImportanceProcess;
89 }
90 if (fDeleteIalg)
91 {
92 delete fIalgorithm;
93 }
94}
virtual void RemoveProcess(G4VProcess *process)

References fDeleteIalg, fIalgorithm, fImportanceProcess, fPlacer, and G4ProcessPlacer::RemoveProcess().

◆ G4ImportanceConfigurator() [3/3]

G4ImportanceConfigurator::G4ImportanceConfigurator ( const G4ImportanceConfigurator )
private

Member Function Documentation

◆ Configure()

void G4ImportanceConfigurator::Configure ( G4VSamplerConfigurator preConf)
virtual

Implements G4VSamplerConfigurator.

Definition at line 97 of file G4ImportanceConfigurator.cc.

98{
99 G4cout << "G4ImportanceConfigurator:: entering importance configure, paraflag " << paraflag << G4endl;
100 const G4VTrackTerminator *terminator = 0;
101 if (preConf)
102 {
103 terminator = preConf->GetTrackTerminator();
104 };
105
106
107#ifdef G4MULTITHREADED
108 G4AutoLock l(&BiasConfigMutex);
109#endif
112 fIStore,
113 terminator,"ImportanceProcess",paraflag);
114
116 {
117 G4Exception("G4ImportanceConfigurator::Configure()",
118 "FatalError", FatalException,
119 "Failed allocation of G4ImportanceProcess !");
120 }
121
122 // G4cout << "G4ImportanceConfigurator:: setting parallel World " << paraflag << G4endl;
124#ifdef G4MULTITHREADED
125 l.unlock();
126// G4MUTEXUNLOCK(&G4ImportanceConfigurator::BiasConfigMutex);
127#endif
128 // if(paraflag) fImportanceProcess->SetParallelWorld(fWorldName);
129 // G4cout << "G4ImportanceConfigurator:: set " << paraflag << " name: " << fWorld->GetName() << G4endl;
130 // getchar();
132}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
void SetParallelWorld(const G4String &parallelWorldName)
virtual void AddProcessAsSecondDoIt(G4VProcess *process)
virtual const G4VTrackTerminator * GetTrackTerminator() const =0

References G4ProcessPlacer::AddProcessAsSecondDoIt(), FatalException, fIalgorithm, fImportanceProcess, fIStore, fPlacer, fWorld, G4cout, G4endl, G4Exception(), G4VPhysicalVolume::GetName(), G4VSamplerConfigurator::GetTrackTerminator(), paraflag, G4ImportanceProcess::SetParallelWorld(), and G4TemplateAutoLock< _Mutex_t >::unlock().

◆ GetTrackTerminator()

const G4VTrackTerminator * G4ImportanceConfigurator::GetTrackTerminator ( ) const
virtual

Implements G4VSamplerConfigurator.

Definition at line 134 of file G4ImportanceConfigurator.cc.

136{
137 return fImportanceProcess;
138}

References fImportanceProcess.

◆ operator=()

G4ImportanceConfigurator & G4ImportanceConfigurator::operator= ( const G4ImportanceConfigurator )
private

◆ SetWorldName()

void G4ImportanceConfigurator::SetWorldName ( const G4String Name)

Definition at line 140 of file G4ImportanceConfigurator.cc.

141{
142 G4cout << " G4ImportanceConfigurator:: setting world name: " << name << G4endl;
144}
const char * name(G4int ptype)

References fWorldName, G4cout, G4endl, and G4InuclParticleNames::name().

Referenced by G4GeometrySampler::PrepareImportanceSampling().

Field Documentation

◆ fDeleteIalg

G4bool G4ImportanceConfigurator::fDeleteIalg
private

Definition at line 84 of file G4ImportanceConfigurator.hh.

Referenced by ~G4ImportanceConfigurator().

◆ fIalgorithm

const G4VImportanceAlgorithm* G4ImportanceConfigurator::fIalgorithm
private

Definition at line 85 of file G4ImportanceConfigurator.hh.

Referenced by Configure(), and ~G4ImportanceConfigurator().

◆ fImportanceProcess

G4ImportanceProcess* G4ImportanceConfigurator::fImportanceProcess
private

◆ fIStore

G4VIStore& G4ImportanceConfigurator::fIStore
private

Definition at line 83 of file G4ImportanceConfigurator.hh.

Referenced by Configure().

◆ fPlacer

G4ProcessPlacer G4ImportanceConfigurator::fPlacer
private

Definition at line 82 of file G4ImportanceConfigurator.hh.

Referenced by Configure(), and ~G4ImportanceConfigurator().

◆ fWorld

const G4VPhysicalVolume* G4ImportanceConfigurator::fWorld
private

Definition at line 80 of file G4ImportanceConfigurator.hh.

Referenced by Configure(), and G4ImportanceConfigurator().

◆ fWorldName

G4String G4ImportanceConfigurator::fWorldName
private

Definition at line 81 of file G4ImportanceConfigurator.hh.

Referenced by G4ImportanceConfigurator(), and SetWorldName().

◆ paraflag

G4bool G4ImportanceConfigurator::paraflag
private

Definition at line 89 of file G4ImportanceConfigurator.hh.

Referenced by Configure(), and G4ImportanceConfigurator().


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