19#include <G4VProcess.hh>
32 "Cannot create two instances of singleton.");
55 if (
fMap.find(subType) ==
fMap.end())
67 G4int subType, TMCProcess mcProcess,
TG4G3Control g3Control)
74 fMap[subType] = std::pair(mcProcess, g3Control);
85 if (
fMap.empty())
return;
87 G4cout <<
"Dump of TG4ProcessMap - " <<
fMap.size()
88 <<
" entries:" << G4endl;
90 for (
auto [subType, codes] :
fMap) {
92 G4cout <<
"Map element " << std::setw(3) << counter++ <<
" "
93 << subType <<
" " << TMCProcessName[codes.first] <<
" "
107std::pair<TMCProcess, TG4G3Control>
115 auto i =
fMap.find(process->GetProcessSubType());
116 if (i ==
fMap.end()) {
117 G4String text =
"Unknown process code for ";
118 text += process->GetProcessName();
149 if (!process)
return TMCProcessName[kPNoProcess];
Definition of the TG4G3PhysicsManager class.
Definition of the TG4Globals class and basic container types.
Definition of the TG4ProcessMap class.
static const G4String & GetControlName(TG4G3Control control)
static void Warning(const TString &className, const TString &methodName, const TString &text)
static void Exception(const TString &className, const TString &methodName, const TString &text)
Maps G4 process sub types to TMCProcess and TG4G3Control codes.
TG4G3Control GetControl(const G4VProcess *process) const
std::pair< TMCProcess, TG4G3Control > GetCodes(const G4VProcess *process) const
std::map< G4int, std::pair< TMCProcess, TG4G3Control > > fMap
map container
TMCProcess GetMCProcess(const G4VProcess *process) const
G4String GetMCProcessName(const G4VProcess *process) const
G4bool Add(G4int subType, TMCProcess mcProcess, TG4G3Control g3Control)
G4String GetControlName(const G4VProcess *process) const
G4bool IsDefined(G4int subType)
static TG4ProcessMap * fgInstance
this instance
TG4G3Control
Enumeration for G3 types of physics processes controls.
@ kNoG3Controls
No process control.