#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 262 of file G4PhysListFactorySingleton.cc.
267 G4String nameNoReplace =
name;
268 physicsReplace.clear();
274 G4String
key = repitr->first;
275 size_t i = nameNoReplace.find(key);
276 if ( i != std::string::npos ) {
278 nameNoReplace.erase(i,key.size());
281 G4String procName = repitr->second;
282 physicsReplace.push_back(procName);
284 G4cout <<
"G4PhysListFactorySingleton::GetBaseName " 285 <<
"\"" << key <<
"\" ==> \"" << procName <<
"\" not found" 297 return nameNoReplace;
std::map< G4String, PhysListCtorFuncPtr_t > fFunctionMap
G4bool IsKnownPhysicsProcess(const G4String &)
static G4PhysicsProcessFactorySingleton & Instance()
std::map< G4String, G4String > fPhysicsReplaceList
const G4String& g4nu::G4PhysListFactorySingleton::GetDefaultName |
( |
| ) |
const |
|
inline |
G4VModularPhysicsList * G4PhysListFactorySingleton::GetReferencePhysList |
( |
const G4String & |
name | ) |
|
Definition at line 104 of file G4PhysListFactorySingleton.cc.
106 G4VModularPhysicsList*
p = 0;
140 std::vector<G4String> physicsReplacements;
142 G4String nameNoReplace =
GetBaseName(
name,physicsReplacements,allKnown);
154 G4cout <<
"### G4PhysListFactorySingleton WARNING: " 155 <<
"PhysicsList " << nameNoReplace
156 <<
"(originally=\"" <<
name <<
"\")" 159 }
else if ( physicsReplacements.size() != 0 ) {
165 for (
size_t k=0;
k<physicsReplacements.size(); ++
k) {
166 G4String procName = physicsReplacements[
k];
168 G4cout <<
"### G4PhysListFactorySingleton WARNING: " 169 <<
"G4PhysicsProcesFactorySingleton had no process \"" 170 << procName <<
"\" registered" << G4endl;
172 G4cout <<
"### G4PhysListFactorySingleton: ReplacePhysics(" 173 << procName <<
")" << G4endl;
175 p->ReplacePhysics(pctor);
std::map< G4String, PhysListCtorFuncPtr_t > fFunctionMap
G4String GetBaseName(G4String name, std::vector< G4String > &physicsReplacements, G4bool &allKnown)
G4bool IsKnownPhysicsProcess(const G4String &)
static G4PhysicsProcessFactorySingleton & Instance()
G4VModularPhysicsList *(* PhysListCtorFuncPtr_t)()
G4VPhysicsConstructor * GetPhysicsProcess(const G4String &)
Definition at line 61 of file G4PhysListFactorySingleton.cc.
G4PhysListFactorySingleton()
static G4PhysListFactorySingleton * fgTheInstance
G4bool RegisterPhysicsReplacement(G4String key, G4String physics)
G4bool G4PhysListFactorySingleton::IsReferencePhysList |
( |
const G4String & |
name | ) |
|
Definition at line 183 of file G4PhysListFactorySingleton.cc.
186 std::vector<G4String> physicsReplacements;
188 G4String nameNoReplace =
GetBaseName(
name,physicsReplacements,allKnown);
G4String GetBaseName(G4String name, std::vector< G4String > &physicsReplacements, G4bool &allKnown)
void G4PhysListFactorySingleton::PrintAvailablePhysLists |
( |
| ) |
const |
Definition at line 208 of file G4PhysListFactorySingleton.cc.
211 G4cout <<
"G4VModularPhysicsLists in " 212 <<
"G4PhysicsProcessFactorySingleton are: " 214 if ( list.empty() ) G4cout <<
" ... no registered lists" << G4endl;
216 for (
size_t indx=0; indx < list.size(); ++indx ) {
217 G4cout <<
" [" <<
std::setw(2) << indx <<
"] " 218 <<
"\"" << list[indx] <<
"\"" << G4endl;
221 G4cout <<
"G4PhysicsProcessFactorySingleton supports variants of the above" 222 << G4endl <<
"with physics process replacements:" << G4endl;
224 G4cout <<
" ... no registered replacements" << G4endl;
226 G4bool printPhysicsProcesses =
false;
232 G4String
key = repitr->first;
233 G4String procName = repitr->second;
235 if ( ! known ) printPhysicsProcesses =
true;
236 G4cout <<
" " <<
std::setw(10) << key <<
" ==> " 238 << ( (known)?
"known":
"*** unknown ***" ) << G4endl;
const std::vector< G4String > & AvailablePhysLists() const
Q_EXPORT QTSManip setw(int w)
G4bool IsKnownPhysicsProcess(const G4String &)
static G4PhysicsProcessFactorySingleton & Instance()
void PrintAvailablePhysicsProcesses() const
std::map< G4String, G4String > fPhysicsReplaceList
G4VModularPhysicsList * G4PhysListFactorySingleton::ReferencePhysList |
( |
| ) |
|
Definition at line 84 of file G4PhysListFactorySingleton.cc.
88 char* path =
getenv(
"PHYSLIST");
90 name = G4String(path);
93 G4cout <<
"### G4PhysListFactorySingleton WARNING: " 94 <<
" environment variable PHYSLIST is not defined" 96 <<
" Default Physics Lists " << name
G4VModularPhysicsList * GetReferencePhysList(const G4String &)
std::string getenv(std::string const &name)
G4bool G4PhysListFactorySingleton::RegisterCreator |
( |
G4String |
name, |
|
|
PhysListCtorFuncPtr_t |
ctorptr, |
|
|
G4bool * |
ptr |
|
) |
| |
Definition at line 244 of file G4PhysListFactorySingleton.cc.
std::map< G4String, PhysListCtorFuncPtr_t > fFunctionMap
std::map< G4String, G4bool * > fBoolPtrMap
G4bool G4PhysListFactorySingleton::RegisterPhysicsReplacement |
( |
G4String |
key, |
|
|
G4String |
physics |
|
) |
| |
void g4nu::G4PhysListFactorySingleton::SetDefaultName |
( |
const G4String & |
defname | ) |
|
|
inline |
G4String g4nu::G4PhysListFactorySingleton::defName |
|
private |
std::map<G4String, G4bool*> g4nu::G4PhysListFactorySingleton::fBoolPtrMap |
|
private |
std::map<G4String, G4String> g4nu::G4PhysListFactorySingleton::fPhysicsReplaceList |
|
private |
std::vector<G4String> g4nu::G4PhysListFactorySingleton::listnames |
|
mutableprivate |
The documentation for this class was generated from the following files: