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
103 G4VModularPhysicsList*
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);
186 std::vector<G4String> physicsReplacements;
188 G4String nameNoReplace =
GetBaseName(name,physicsReplacements,allKnown);
193 const std::vector<G4String>&
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;
263 std::vector<G4String>& physicsReplace,
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;
303 #include "G4NuPhysicsLists/G4PhysListRegisterOld.icc" 306 #include "G4NuPhysicsLists/G4PhysicsProcessRegisterOld.icc"
G4bool IsReferencePhysList(const G4String &)
void PrintAvailablePhysicsProcesses() const
G4VModularPhysicsList * ReferencePhysList()
static G4PhysListFactorySingleton & Instance()
virtual ~G4PhysListFactorySingleton()
const std::vector< G4String > & AvailablePhysLists() const
void PrintAvailablePhysLists() const
std::map< G4String, PhysListCtorFuncPtr_t > fFunctionMap
G4String GetBaseName(G4String name, std::vector< G4String > &physicsReplacements, G4bool &allKnown)
G4VModularPhysicsList * GetReferencePhysList(const G4String &)
G4PhysListFactorySingleton()
std::string getenv(std::string const &name)
G4bool IsKnownPhysicsProcess(const G4String &)
Q_EXPORT QTSManip setw(int w)
static G4PhysicsProcessFactorySingleton & Instance()
G4VModularPhysicsList *(* PhysListCtorFuncPtr_t)()
G4bool RegisterCreator(G4String name, PhysListCtorFuncPtr_t ctorptr, G4bool *ptr)
std::vector< G4String > listnames
std::map< G4String, G4bool * > fBoolPtrMap
static G4PhysListFactorySingleton * fgTheInstance
G4bool RegisterPhysicsReplacement(G4String key, G4String physics)
G4VPhysicsConstructor * GetPhysicsProcess(const G4String &)
std::map< G4String, G4String > fPhysicsReplaceList