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

#include <G4GlobalFastSimulationManager.hh>

Public Member Functions

G4VFastSimulationModelGetFastSimulationModel (const G4String &modelName, const G4VFastSimulationModel *previousFound=0) const
 
 ~G4GlobalFastSimulationManager ()
 
void AddFastSimulationManager (G4FastSimulationManager *)
 
void RemoveFastSimulationManager (G4FastSimulationManager *)
 
void AddFSMP (G4FastSimulationManagerProcess *)
 
void RemoveFSMP (G4FastSimulationManagerProcess *)
 
void FastSimulationNeedsToBeClosed ()
 
void ShowSetup ()
 
void ListEnvelopes (const G4String &aName="all", listType aListType=NAMES_ONLY)
 
void ListEnvelopes (const G4ParticleDefinition *)
 
void ActivateFastSimulationModel (const G4String &)
 
void InActivateFastSimulationModel (const G4String &)
 

Static Public Member Functions

static
G4GlobalFastSimulationManager
GetGlobalFastSimulationManager ()
 
static
G4GlobalFastSimulationManager
GetInstance ()
 

Detailed Description

Definition at line 85 of file G4GlobalFastSimulationManager.hh.

Constructor & Destructor Documentation

G4GlobalFastSimulationManager::~G4GlobalFastSimulationManager ( )

Definition at line 96 of file G4GlobalFastSimulationManager.cc.

97 {
98  delete fTheFastSimulationMessenger;
99  fTheFastSimulationMessenger = 0;
100 }

Member Function Documentation

void G4GlobalFastSimulationManager::ActivateFastSimulationModel ( const G4String aName)

Definition at line 127 of file G4GlobalFastSimulationManager.cc.

128 {
129  G4bool result = false;
130  for (size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++)
131  result = result || ManagedManagers[ifsm]->
133  if(result)
134  G4cout << "Model " << aName << " activated.";
135  else
136  G4cout << "Model " << aName << " not found.";
137  G4cout << G4endl;
138 }
G4double G4ParticleHPJENDLHEData::G4double result
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define G4endl
Definition: G4ios.hh:61

Here is the caller graph for this function:

void G4GlobalFastSimulationManager::AddFastSimulationManager ( G4FastSimulationManager fsmanager)

Definition at line 106 of file G4GlobalFastSimulationManager.cc.

107 {
108  ManagedManagers.push_back(fsmanager);
109 }
void G4GlobalFastSimulationManager::AddFSMP ( G4FastSimulationManagerProcess fp)

Definition at line 117 of file G4GlobalFastSimulationManager.cc.

118 {
119  fFSMPVector.push_back(fp);
120 }

Here is the caller graph for this function:

void G4GlobalFastSimulationManager::FastSimulationNeedsToBeClosed ( )
G4VFastSimulationModel * G4GlobalFastSimulationManager::GetFastSimulationModel ( const G4String modelName,
const G4VFastSimulationModel previousFound = 0 
) const

Definition at line 299 of file G4GlobalFastSimulationManager.cc.

301 {
303  // -- flag used to navigate accross the various managers;
304  bool foundPrevious(false);
305  for (size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++)
306  {
307  model = ManagedManagers[ifsm]->
308  GetFastSimulationModel(modelName, previousFound, foundPrevious);
309  if (model) break;
310  }
311  return model;
312 }
G4VFastSimulationModel * GetFastSimulationModel(const G4String &modelName, const G4VFastSimulationModel *previousFound=0) const
const XML_Char XML_Content * model
Definition: expat.h:151
G4GlobalFastSimulationManager * G4GlobalFastSimulationManager::GetGlobalFastSimulationManager ( )
static

Definition at line 71 of file G4GlobalFastSimulationManager.cc.

72 {
73  if(!fGlobalFastSimulationManager)
74  fGlobalFastSimulationManager = new G4GlobalFastSimulationManager;
75 
76  return fGlobalFastSimulationManager;
77 }

Here is the caller graph for this function:

G4GlobalFastSimulationManager * G4GlobalFastSimulationManager::GetInstance ( )
static

Definition at line 80 of file G4GlobalFastSimulationManager.cc.

81 {
83 }
static G4GlobalFastSimulationManager * GetGlobalFastSimulationManager()

Here is the call graph for this function:

void G4GlobalFastSimulationManager::InActivateFastSimulationModel ( const G4String aName)

Definition at line 140 of file G4GlobalFastSimulationManager.cc.

141 {
142  G4bool result = false;
143  for (size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++)
144  result = result || ManagedManagers[ifsm]->
146  if (result) G4cout << "Model " << aName << " inactivated.";
147  else G4cout << "Model " << aName << " not found.";
148  G4cout << G4endl;
149 }
G4double G4ParticleHPJENDLHEData::G4double result
void InActivateFastSimulationModel(const G4String &)
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define G4endl
Definition: G4ios.hh:61

Here is the caller graph for this function:

void G4GlobalFastSimulationManager::ListEnvelopes ( const G4String aName = "all",
listType  aListType = NAMES_ONLY 
)

Definition at line 256 of file G4GlobalFastSimulationManager.cc.

258 {
259  if (theType == ISAPPLICABLE)
260  {
261  for (size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++) ManagedManagers[ifsm]->ListModels(aName);
262  return;
263  }
264 
265  if(aName == "all")
266  {
267  G4int titled = 0;
268  for (size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++)
269  {
270  if(theType == NAMES_ONLY)
271  {
272  if(!(titled++))
273  G4cout << "Current Envelopes for Fast Simulation:\n";
274  G4cout << " ";
275  ManagedManagers[ifsm]->ListTitle();
276  G4cout << G4endl;
277  }
278  else ManagedManagers[ifsm]->ListModels();
279  }
280  }
281  else
282  {
283  for (size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++)
284  if(aName == ManagedManagers[ifsm]-> GetEnvelope()->GetName())
285  {
286  ManagedManagers[ifsm]->ListModels();
287  break;
288  }
289  }
290 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the caller graph for this function:

void G4GlobalFastSimulationManager::ListEnvelopes ( const G4ParticleDefinition aPD)

Definition at line 292 of file G4GlobalFastSimulationManager.cc.

293 {
294  for (size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++)
295  ManagedManagers[ifsm]->ListModels(aPD);
296 }
void G4GlobalFastSimulationManager::RemoveFastSimulationManager ( G4FastSimulationManager fsmanager)

Definition at line 112 of file G4GlobalFastSimulationManager.cc.

113 {
114  ManagedManagers.remove(fsmanager);
115 }
T * remove(const T *)

Here is the call graph for this function:

void G4GlobalFastSimulationManager::RemoveFSMP ( G4FastSimulationManagerProcess fp)

Definition at line 122 of file G4GlobalFastSimulationManager.cc.

123 {
124  fFSMPVector.remove(fp);
125 }
T * remove(const T *)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4GlobalFastSimulationManager::ShowSetup ( )

Definition at line 155 of file G4GlobalFastSimulationManager.cc.

156 {
157  std::vector<G4VPhysicalVolume*> worldDone;
158  G4VPhysicalVolume* world;
160  // ----------------------------------------------------
161  // -- loop on regions to get the list of world volumes:
162  // ----------------------------------------------------
163  G4cout << "\nFast simulation setup:" << G4endl;
164  for (size_t i=0; i<regions->size(); i++)
165  {
166  world = (*regions)[i]->GetWorldPhysical();
167  G4bool newWorld = true;
168  for (size_t ii=0; ii<worldDone.size(); ii++) if (worldDone[ii] == world) {newWorld = false; break;}
169  if (newWorld)
170  {
171  worldDone.push_back(world);
172  G4Region* worldRegion = world->GetLogicalVolume()->GetRegion();
173  // -- preambule: print physical volume and region names...
174  if (world == G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume())
175  G4cout << "\n * Mass Geometry with ";
176  else
177  G4cout << "\n * Parallel Geometry with ";
178  G4cout << "world volume: `" << world->GetName() << "' [region : `" << worldRegion->GetName() << "']" << G4endl;
179  // -- ... and print G4FSMP(s) attached to this world volume:
180  G4bool findG4FSMP(false);
181  // -- show to what particles this G4FSMP is attached to:
182  std::vector<G4ParticleDefinition*> particlesKnown;
183  for (size_t ip=0; ip<fFSMPVector.size(); ip++)
184  if (fFSMPVector[ip]->GetWorldVolume() == world)
185  {
186  G4cout << " o G4FastSimulationProcess: '" << fFSMPVector[ip]->GetProcessName() << "'" << G4endl;
187  G4cout << " Attached to:";
189  for (G4int iParticle=0; iParticle<particles->entries(); iParticle++)
190  {
191  G4ParticleDefinition* particle = particles->GetParticle(iParticle);
192  G4ProcessVector* processes = particle->GetProcessManager()->GetProcessList();
193  if (processes->contains(fFSMPVector[ip])) {G4cout << " " << particle->GetParticleName(); findG4FSMP = true; particlesKnown.push_back(particle);}
194  }
195  G4cout << G4endl;
196  }
197  if (!findG4FSMP) G4cout << " o G4FastSimulationProcess: (none)" << G4endl;
198  // -- now display the regions in this world volume, with mother<->daughter link shown by indentation:
199  G4cout << " o Region(s) and model(s) setup:" << G4endl;
200  DisplayRegion(worldRegion, 1, particlesKnown);
201  }
202  }
203 }
const G4String & GetName() const
G4Region * GetRegion() const
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
static G4RegionStore * GetInstance()
G4ParticleDefinition * GetParticle(G4int index) const
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
bool G4bool
Definition: G4Types.hh:79
static G4TransportationManager * GetTransportationManager()
G4bool contains(G4VProcess *aProcess) const
G4LogicalVolume * GetLogicalVolume() const
static G4ParticleTable * GetParticleTable()
G4ProcessManager * GetProcessManager() const
#define G4endl
Definition: G4ios.hh:61
G4int entries() const
G4ProcessVector * GetProcessList() const

Here is the call graph for this function:

Here is the caller graph for this function:


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