#include <G4PhysListFactorySingleton.hh>
G4PhysListFactorySingleton::G4PhysListFactorySingleton |
( |
| ) |
|
|
private |
G4PhysListFactorySingleton::~G4PhysListFactorySingleton |
( |
| ) |
|
|
privatevirtual |
const std::vector< G4String > & G4PhysListFactorySingleton::AvailablePhysLists |
( |
| ) |
const |
G4String G4PhysListFactorySingleton::GetBaseName |
( |
G4String |
name, |
|
|
std::vector< G4String > & |
physicsReplacements, |
|
|
G4bool & |
allKnown |
|
) |
| |
|
private |
Definition at line 260 of file G4PhysListFactorySingleton.cc.
265 G4String nameNoReplace =
name;
266 physicsReplace.clear();
272 G4String
key = repitr->first;
273 size_t i = nameNoReplace.find(key);
274 if ( i != std::string::npos ) {
276 nameNoReplace.erase(i,key.size());
279 G4String procName = repitr->second;
280 physicsReplace.push_back(procName);
282 G4cout <<
"G4PhysListFactorySingleton::GetBaseName " 283 <<
"\"" << key <<
"\" ==> \"" << procName <<
"\" not found" 295 return nameNoReplace;
std::map< G4String, PhysListCtorFuncPtr_t > fFunctionMap
std::map< G4String, G4String > fPhysicsReplaceList
static G4PhysicsProcessFactorySingleton & Instance()
G4bool IsKnownPhysicsProcess(const G4String &)
const G4String& G4PhysListFactorySingleton::GetDefaultName |
( |
| ) |
const |
|
inline |
G4VModularPhysicsList * G4PhysListFactorySingleton::GetReferencePhysList |
( |
const G4String & |
name | ) |
|
Definition at line 102 of file G4PhysListFactorySingleton.cc.
104 G4VModularPhysicsList*
p = 0;
138 std::vector<G4String> physicsReplacements;
140 G4String nameNoReplace =
GetBaseName(
name,physicsReplacements,allKnown);
152 G4cout <<
"### G4PhysListFactorySingleton WARNING: " 153 <<
"PhysicsList " << nameNoReplace
154 <<
"(originally=\"" <<
name <<
"\")" 157 }
else if ( physicsReplacements.size() != 0 ) {
163 for (
size_t k=0;
k<physicsReplacements.size(); ++
k) {
164 G4String procName = physicsReplacements[
k];
166 G4cout <<
"### G4PhysListFactorySingleton WARNING: " 167 <<
"G4PhysicsProcesFactorySingleton had no process \"" 168 << procName <<
"\" registered" << G4endl;
170 G4cout <<
"### G4PhysListFactorySingleton: ReplacePhysics(" 171 << procName <<
")" << G4endl;
173 p->ReplacePhysics(pctor);
std::map< G4String, PhysListCtorFuncPtr_t > fFunctionMap
G4String GetBaseName(G4String name, std::vector< G4String > &physicsReplacements, G4bool &allKnown)
static G4PhysicsProcessFactorySingleton & Instance()
G4bool IsKnownPhysicsProcess(const G4String &)
G4VModularPhysicsList *(* PhysListCtorFuncPtr_t)()
G4VPhysicsConstructor * GetPhysicsProcess(const G4String &)
Definition at line 59 of file G4PhysListFactorySingleton.cc.
static G4PhysListFactorySingleton * fgTheInstance
G4bool RegisterPhysicsReplacement(G4String key, G4String physics)
G4PhysListFactorySingleton()
G4bool G4PhysListFactorySingleton::IsReferencePhysList |
( |
const G4String & |
name | ) |
|
Definition at line 181 of file G4PhysListFactorySingleton.cc.
184 std::vector<G4String> physicsReplacements;
186 G4String nameNoReplace =
GetBaseName(
name,physicsReplacements,allKnown);
G4String GetBaseName(G4String name, std::vector< G4String > &physicsReplacements, G4bool &allKnown)
void G4PhysListFactorySingleton::PrintAvailablePhysLists |
( |
| ) |
const |
Definition at line 206 of file G4PhysListFactorySingleton.cc.
209 G4cout <<
"G4VModularPhysicsLists in " 210 <<
"G4PhysicsProcessFactorySingleton are: " 212 if ( list.empty() ) G4cout <<
" ... no registered lists" << G4endl;
214 for (
size_t indx=0; indx < list.size(); ++indx ) {
215 G4cout <<
" [" <<
std::setw(2) << indx <<
"] " 216 <<
"\"" << list[indx] <<
"\"" << G4endl;
219 G4cout <<
"G4PhysicsProcessFactorySingleton supports variants of the above" 220 << G4endl <<
"with physics process replacements:" << G4endl;
222 G4cout <<
" ... no registered replacements" << G4endl;
224 G4bool printPhysicsProcesses =
false;
230 G4String
key = repitr->first;
231 G4String procName = repitr->second;
233 if ( ! known ) printPhysicsProcesses =
true;
234 G4cout <<
" " <<
std::setw(10) << key <<
" ==> " 236 << ( (known)?
"known":
"*** unknown ***" ) << G4endl;
std::map< G4String, G4String > fPhysicsReplaceList
const std::vector< G4String > & AvailablePhysLists() const
static G4PhysicsProcessFactorySingleton & Instance()
Q_EXPORT QTSManip setw(int w)
G4bool IsKnownPhysicsProcess(const G4String &)
void PrintAvailablePhysicsProcesses() const
G4VModularPhysicsList * G4PhysListFactorySingleton::ReferencePhysList |
( |
| ) |
|
Definition at line 82 of file G4PhysListFactorySingleton.cc.
86 char* path =
getenv(
"PHYSLIST");
88 name = G4String(path);
91 G4cout <<
"### G4PhysListFactorySingleton WARNING: " 92 <<
" environment variable PHYSLIST is not defined" 94 <<
" Default Physics Lists " << name
std::string getenv(std::string const &name)
G4VModularPhysicsList * GetReferencePhysList(const G4String &)
G4bool G4PhysListFactorySingleton::RegisterCreator |
( |
G4String |
name, |
|
|
PhysListCtorFuncPtr_t |
ctorptr, |
|
|
G4bool * |
ptr |
|
) |
| |
Definition at line 242 of file G4PhysListFactorySingleton.cc.
std::map< G4String, PhysListCtorFuncPtr_t > fFunctionMap
std::map< G4String, G4bool * > fBoolPtrMap
G4bool G4PhysListFactorySingleton::RegisterPhysicsReplacement |
( |
G4String |
key, |
|
|
G4String |
physics |
|
) |
| |
void G4PhysListFactorySingleton::SetDefaultName |
( |
const G4String & |
defname | ) |
|
|
inline |
G4String G4PhysListFactorySingleton::defName |
|
private |
std::map<G4String, G4bool*> G4PhysListFactorySingleton::fBoolPtrMap |
|
private |
std::map<G4String, G4String> G4PhysListFactorySingleton::fPhysicsReplaceList |
|
private |
std::vector<G4String> G4PhysListFactorySingleton::listnames |
|
mutableprivate |
The documentation for this class was generated from the following files: