53 : theAttrVector(nullptr),
54 theParticleType(aParticleType),
56 theProcessList(nullptr),
57 duringTracking(
false),
64 G4Exception(
"G4ProcessManager::G4ProcessManager()",
"ProcMan012",
74 G4Exception(
"G4ProcessManager::G4ProcessManager()",
"ProcMan012",
100 : theAttrVector(nullptr),
101 theParticleType(right.theParticleType),
102 numberOfProcesses(0),
103 theProcessList(nullptr),
104 duringTracking(
false),
105 verboseLevel(right.verboseLevel)
110 G4cout <<
"G4ProcessManageer:: copy constructor " <<
G4endl;
119 G4Exception(
"G4ProcessManager::G4ProcessManager() [coopy constructor]",
142 G4Exception(
"G4ProcessManager::G4ProcessManager() [coopy constructor]",
148 for (std::size_t j=0; j< src->
entries() ; ++j)
153 if ( (*src)[j] !=
nullptr )
155 theProcessTable->
Insert((*src)[j],
this);
172 : theAttrVector(nullptr),
173 theParticleType(nullptr),
174 numberOfProcesses(0),
175 theProcessList(nullptr),
176 duringTracking(
false),
180 G4Exception(
"G4ProcessManager::G4ProcessManager()",
"ProcMan111",
199 G4Exception(
"G4ProcessManager::operator=",
"ProcMan112",
237 G4cout <<
"G4ProcessManagerMessenger is deleted" <<
G4endl;
255 if ( ( idxProc >=0) && (ivec >=0) )
264 G4cout <<
" G4ProcessManager::GetProcessVectorIndex:";
270 G4cout <<
" is not registered yet ";
274 G4cout <<
" illegal DoIt Index [= " <<
G4int(idx) <<
","
275 <<
G4int(typ) <<
"]";
293 G4cout <<
"G4ProcessManager::GetAttribute():";
305 G4VProcess* aProcess = (*theProcessList)[index];
306 if (aProcess ==
nullptr)
308 G4String aErrorMessage(
"Bad ProcessList: Null Pointer for");
310 G4Exception(
"G4ProcessManager::GetAttribute()",
"ProcMan012",
327 G4cout <<
"G4ProcessManager::GetAttribute():";
330 G4cout <<
"Warning: attribute vector index is inconsistent with process List index"
338 if ( (*itr)->idxProcessList == index)
359 if ( (ip<0) || (ip >
G4int(pVector->
entries())) )
return -1;
368 if (aAttr !=
nullptr)
380 G4cout <<
" G4ProcessManager::InsertAt : No Process Attribute "
394 if ( (ip<0) || (ip >=
G4int(pVector->
entries())) )
return -1;
403 if (aAttr !=
nullptr)
405 if (ip < aAttr->idxProcVector[ivec])
420 G4cout <<
" G4ProcessManager::RemoveAt : No Process Attribute "
455 G4int ordAlongStepDoIt,
456 G4int ordPostStepDoIt
467 G4cout <<
"This process is not applicable to this particle" <<
G4endl;
482 theProcessTable->
Insert(aProcess,
this);
492 G4String anErrorMessage(
"Bad ProcessList: Inconsistent process List size for ");
495 G4Exception(
"G4ProcessManager::AddProcess()",
"ProcMan012",
505 if (ordAtRestDoIt==0) ordAtRestDoIt = 1;
506 if (ordAlongStepDoIt==0) ordAlongStepDoIt = 1;
507 if (ordPostStepDoIt==0) ordPostStepDoIt = 1;
542 G4cout <<
" in ProcessVetor[" << ivec<<
"]";
543 G4cout <<
" with Ordering parameter = " ;
572 if (pAttr ==
nullptr)
return nullptr;
575 G4VProcess* removedProcess = (*theProcessList)[index];
586 if (
RemoveAt(idx, removedProcess, ivec) <0)
588 G4String anErrorMessage(
"Bad index in attribute");
590 anErrorMessage +=
"process[" + removedProcess->
GetProcessName() +
"] " ;
591 G4Exception(
"G4ProcessManager::RemoveProcess()",
"Fatal Error",
603 G4String anErrorMessage(
"Bad ProcessList : Index is out of range ");
605 anErrorMessage +=
"process[" + removedProcess->
GetProcessName() +
"] " ;
606 G4Exception(
"G4ProcessManager::RemoveProcess()",
"ProcMan012",
616 if ( (*itr) == pAttr)
636 theProcessTable->
Remove(removedProcess,
this);
638 return removedProcess;
659 if (pAttr !=
nullptr)
675 const G4String aErrorMessage(
" G4ProcessManager::SetProcessOrdering");
696 G4cout <<
" illegal DoIt Index [= " <<
G4int(idDoIt) <<
"]";
706 if (pAttr ==
nullptr)
721 if (ordDoIt == 0) ordDoIt = 1;
741 G4cout <<
" in ProcessVetor[" << ivec<<
"]";
742 G4cout <<
" with Ordering parameter = " << ordDoIt ;
769 G4cout <<
"G4ProcessManager::SetProcessOrdering: ";
770 G4cout <<
" illegal DoIt Index [= " <<
G4int(idDoIt) <<
"]";
779 if (pAttr ==
nullptr)
806 G4cout <<
"G4ProcessManager::SetProcessOrderingToFirst: ";
808 G4cout <<
" in ProcessVetor[" << ivec<<
"]";
816 G4String anErrMsg =
"Set Ordering First is invoked twice for ";
820 G4Exception(
"G4ProcessManager::SetProcessOrderingToFirst()",
839 const G4String aErrorMessage(
" G4ProcessManager::SetProcessOrderingToSecond");
860 G4cout <<
" illegal DoIt Index [= " <<
G4int(idDoIt) <<
"]";
869 if (pAttr ==
nullptr)
923 G4cout <<
" in ProcessVetor[" << ivec<<
"]";
924 G4cout <<
" with Ordering parameter = 1 ";
946 G4String anErrMsg =
"Set Ordering Last is invoked twice for ";
950 G4Exception(
"G4ProcessManager::SetProcessOrderingToLast()",
"ProcMan114",
966 G4cout <<
"G4ProcessManager::InActivateProcess is not valid in ";
983 if (pAttr ==
nullptr)
return nullptr;
986 G4VProcess* pProcess = (*theProcessList)[index];
988 const G4String aErrorMessage(
" G4ProcessManager::InactivateProcess():");
1002 else if ((idx >= 0) && (idx <
G4int(pVector->
entries())))
1005 if ((*pVector)[
idx]== pProcess)
1007 (*pVector)[
idx]=
nullptr;
1011 G4String anErrorMessage(
"Bad ProcessList: Bad index in attribute");
1013 anErrorMessage +=
"process[" + pProcess->
GetProcessName() +
"] " ;
1014 G4Exception(
"G4ProcessManager::InactivateProcess():",
"ProcMan012",
1022 G4String anErrorMessage(
"Bad ProcessList: Index is out of range");
1024 anErrorMessage +=
"process[" + pProcess->
GetProcessName() +
"] " ;
1025 G4Exception(
"G4ProcessManager::InactivateProcess():",
"ProcMan012",
1045 G4cout <<
"G4ProcessManager::ActivateProcess is not valid in ";
1062 if (pAttr ==
nullptr)
return nullptr;
1065 G4VProcess* pProcess = (*theProcessList)[index];
1078 else if ((idx >= 0) && (idx <
G4int(pVector->
entries())))
1081 if ((*pVector)[
idx] ==
nullptr)
1083 (*pVector)[
idx] = pProcess;
1087 G4String anErrorMessage(
"Bad ProcessList: Bad index in attribute");
1089 anErrorMessage +=
"process[" + pProcess->
GetProcessName() +
"] " ;
1090 G4Exception(
"G4ProcessManager::ActivateProcess():",
"ProcMan012",
1098 G4String anErrorMessage(
"bad ProcessList: Index is out of range");
1100 anErrorMessage +=
"process[" + pProcess->
GetProcessName() +
"] " ;
1101 G4Exception(
"G4ProcessManager::ActivateProcess():",
"ProcMan012",
1114 return (
this == &right);
1120 return (
this != &right);
1129 G4cout <<
"G4ProcessManager: particle["
1138 G4cout <<
"=== process[" << ((*theProcessList)(
idx))->GetProcessName()<<
" :";
1144 if ( pAttr-> isActive )
1158 G4cout <<
" Ordering:: ";
1159 G4cout <<
" AtRest AlongStep PostStep ";
1162 G4cout <<
" GetPIL/ DoIt GetPIL/ DoIt GetPIL/ DoIt ";
1166 for (
G4int idx2 = 0; idx2 <6 ; ++idx2)
1172 for (
G4int idx3 = 0; idx3 <6 ; ++idx3)
1199 for(
G4int j=nproc-1;j>=0;--j)
1275 G4cout <<
"G4ProcessManager::GetProcessActivation ";
1276 G4cout <<
" process (or its index) not found ";
1284 return pAttr-> isActive;
1290 if (aProcess ==
nullptr)
return;
1292 if (pAttr ==
nullptr)
1297 G4cout <<
"G4ProcessManager::CheckOrderingParameters ";
1299 <<
" has no attribute" <<
G4endl;
1313 G4cerr <<
"G4ProcessManager::CheckOrderingParameters ";
1314 G4cerr <<
"You cannot set ordering parameter ["
1316 <<
"] for AtRest DoIt to the process "
1328 G4cerr <<
"G4ProcessManager::CheckOrderingParameters ";
1329 G4cerr <<
"You cannot set ordering parameter ["
1331 <<
"] for AlongStep DoIt to the process "
1344 G4cerr <<
"G4ProcessManager::CheckOrderingParameters ";
1345 G4cerr <<
"You cannot set ordering parameter ["
1347 <<
"] for PostStep DoIt to the process"
1357 msg =
"Invalid ordering parameters are set for ";
1359 G4Exception(
"G4ProcessManager::CheckOrderingParameters ",