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

#include <G4ParallelWorldProcessStore.hh>

Inheritance diagram for G4ParallelWorldProcessStore:
Collaboration diagram for G4ParallelWorldProcessStore:

Public Member Functions

virtual ~G4ParallelWorldProcessStore ()
 
void SetParallelWorld (G4ParallelWorldProcess *proc, G4String parallelWorldName)
 
void UpdateWorlds ()
 
G4ParallelWorldProcessGetProcess (G4String parallelWorldName)
 
void Clear ()
 

Static Public Member Functions

static
G4ParallelWorldProcessStore
GetInstance ()
 
static
G4ParallelWorldProcessStore
GetInstanceIfExist ()
 

Detailed Description

Definition at line 63 of file G4ParallelWorldProcessStore.hh.

Constructor & Destructor Documentation

G4ParallelWorldProcessStore::~G4ParallelWorldProcessStore ( )
virtual

Definition at line 52 of file G4ParallelWorldProcessStore.cc.

53 {
54  Clear();
55  fInstance = 0;
56 }

Here is the call graph for this function:

Member Function Documentation

void G4ParallelWorldProcessStore::Clear ( )

Definition at line 98 of file G4ParallelWorldProcessStore.cc.

99 { fInstance->clear(); }

Here is the caller graph for this function:

G4ParallelWorldProcessStore * G4ParallelWorldProcessStore::GetInstance ( )
static

Definition at line 37 of file G4ParallelWorldProcessStore.cc.

38 {
39  if(!fInstance)
40  { fInstance = new G4ParallelWorldProcessStore(); }
41  return fInstance;
42 }

Here is the caller graph for this function:

G4ParallelWorldProcessStore * G4ParallelWorldProcessStore::GetInstanceIfExist ( )
static

Definition at line 44 of file G4ParallelWorldProcessStore.cc.

45 {
46  return fInstance;
47 }

Here is the caller graph for this function:

G4ParallelWorldProcess * G4ParallelWorldProcessStore::GetProcess ( G4String  parallelWorldName)

Definition at line 90 of file G4ParallelWorldProcessStore.cc.

91 {
92  std::map<G4ParallelWorldProcess*,G4String>::iterator itr;
93  for(itr=fInstance->begin();itr!=fInstance->end();itr++)
94  { if(itr->second==parallelWorldName) return itr->first; }
95  return 0;
96 }
void G4ParallelWorldProcessStore::SetParallelWorld ( G4ParallelWorldProcess proc,
G4String  parallelWorldName 
)

Definition at line 58 of file G4ParallelWorldProcessStore.cc.

60 {
61  std::map<G4ParallelWorldProcess*,G4String>::iterator itr;
62  for(itr=fInstance->begin();itr!=fInstance->end();itr++)
63  {
64  if(itr->first==proc)
65  {
66  if(itr->second==parallelWorldName)
67  { // already registered
68  return;
69  }
70  else
71  { // insonsistent !
73  ED << "G4ParallelWorldProcess (" << proc << ") has the world volume ("
74  << itr->second << "). It is inconsistent with (" << parallelWorldName << ").";
75  G4Exception("G4ParallelWorldProcessStore::SetParallelWorld","ProcScore0101",
76  FatalException,ED);
77  }
78  }
79  }
80  (*fInstance)[proc] = parallelWorldName;
81 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Here is the call graph for this function:

Here is the caller graph for this function:

void G4ParallelWorldProcessStore::UpdateWorlds ( )

Definition at line 83 of file G4ParallelWorldProcessStore.cc.

84 {
85  std::map<G4ParallelWorldProcess*,G4String>::iterator itr;
86  for(itr=fInstance->begin();itr!=fInstance->end();itr++)
87  { (itr->first)->SetParallelWorld(itr->second); }
88 }
void SetParallelWorld(G4ParallelWorldProcess *proc, G4String parallelWorldName)

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: