Geant4  10.02.p03
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 G4ParallelWorldProcessStoreGetInstance ()
 
static G4ParallelWorldProcessStoreGetInstanceIfExist ()
 

Private Member Functions

 G4ParallelWorldProcessStore ()
 

Static Private Attributes

static G4ThreadLocal G4ParallelWorldProcessStorefInstance =0
 

Detailed Description

Definition at line 63 of file G4ParallelWorldProcessStore.hh.

Constructor & Destructor Documentation

◆ G4ParallelWorldProcessStore()

G4ParallelWorldProcessStore::G4ParallelWorldProcessStore ( )
private

Definition at line 49 of file G4ParallelWorldProcessStore.cc.

50 {;}
Here is the caller graph for this function:

◆ ~G4ParallelWorldProcessStore()

G4ParallelWorldProcessStore::~G4ParallelWorldProcessStore ( )
virtual

Definition at line 52 of file G4ParallelWorldProcessStore.cc.

53 {
54  Clear();
55  fInstance = 0;
56 }
static G4ThreadLocal G4ParallelWorldProcessStore * fInstance
Here is the call graph for this function:

Member Function Documentation

◆ Clear()

void G4ParallelWorldProcessStore::Clear ( )

Definition at line 98 of file G4ParallelWorldProcessStore.cc.

99 { fInstance->clear(); }
static G4ThreadLocal G4ParallelWorldProcessStore * fInstance
Here is the caller graph for this function:

◆ GetInstance()

G4ParallelWorldProcessStore * G4ParallelWorldProcessStore::GetInstance ( void  )
static

Definition at line 37 of file G4ParallelWorldProcessStore.cc.

38 {
39  if(!fInstance)
41  return fInstance;
42 }
static G4ThreadLocal G4ParallelWorldProcessStore * fInstance
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInstanceIfExist()

G4ParallelWorldProcessStore * G4ParallelWorldProcessStore::GetInstanceIfExist ( )
static

Definition at line 44 of file G4ParallelWorldProcessStore.cc.

45 {
46  return fInstance;
47 }
static G4ThreadLocal G4ParallelWorldProcessStore * fInstance
Here is the caller graph for this function:

◆ GetProcess()

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 }
static G4ThreadLocal G4ParallelWorldProcessStore * fInstance

◆ SetParallelWorld()

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
static G4ThreadLocal G4ParallelWorldProcessStore * fInstance
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:

◆ UpdateWorlds()

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 }
static G4ThreadLocal G4ParallelWorldProcessStore * fInstance
void SetParallelWorld(G4ParallelWorldProcess *proc, G4String parallelWorldName)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fInstance

G4ThreadLocal G4ParallelWorldProcessStore * G4ParallelWorldProcessStore::fInstance =0
staticprivate

Definition at line 71 of file G4ParallelWorldProcessStore.hh.


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