69 G4Exception(
"G4ProcessManager::G4ProcessManager()",
"ProcMan012",
77 G4Exception(
"G4ProcessManager::G4ProcessManager()",
"ProcMan012",
108 G4cout <<
"G4ProcessManageer:: copy constructor " <<
G4endl;
116 G4Exception(
"G4ProcessManager::G4ProcessManager() [coopy constructor]",
137 G4Exception(
"G4ProcessManager::G4ProcessManager() [coopy constructor]",
147 if ( (*src)[j] !=0 ) {
148 theProcessTable->
Insert((*src)[j],
this);
173 G4Exception(
"G4ProcessManager::G4ProcessManager()",
"ProcMan111",
194 G4Exception(
"G4ProcessManager::operator=",
"ProcMan112",
212 G4ProcessAttrVector::iterator itr;
228 G4cout <<
"G4ProcessManagerMessenger is deleted" <<
G4endl;
246 if ( ( idxProc >=0) && (ivec >=0) ){
251 G4cout <<
" G4ProcessManager::GetProcessVectorIndex:";
256 G4cout <<
" is not registered yet ";
259 G4cout <<
" illegal DoIt Index [= " <<
G4int(idx) <<
","
260 <<
G4int(typ) <<
"]";
276 G4cout <<
"G4ProcessManager::GetAttribute():";
288 G4VProcess* aProcess = (*theProcessList)[index];
290 G4String aErrorMessage(
"Bad ProcessList: Null Pointer for");
292 G4Exception(
"G4ProcessManager::GetAttribute()",
"ProcMan012",
305 G4cout <<
"G4ProcessManager::GetAttribute():";
308 G4cout <<
"Warning:: attribute vector index is inconsistent with process List index"
314 G4ProcessAttrVector::iterator itr;
316 if ( (*itr)->idxProcessList == index) {
336 if ( (ip<0) || (ip > pVector->
entries()) )
return -1;
351 G4cout <<
" G4ProcessManager::InsertAt : No Process Attribute " <<
G4endl;
364 if ( (ip<0) || (ip >= pVector->
entries()) )
return -1;
373 if (ip < aAttr->idxProcVector[ivec]) {
382 G4cout <<
" G4ProcessManager::RemoveAt : No Process Attribute " <<
G4endl;
413 G4int ordAlongStepDoIt,
414 G4int ordPostStepDoIt
423 G4cout <<
"This process is not applicable to this particle" <<
G4endl;
437 theProcessTable->
Insert(aProcess,
this);
446 G4String anErrorMessage(
"Bad ProcessList: Inconsistent process List size for ");
449 G4Exception(
"G4ProcessManager::AddProcess()",
"ProcMan012",
459 if (ordAtRestDoIt==0) ordAtRestDoIt = 1;
460 if (ordAlongStepDoIt==0) ordAlongStepDoIt = 1;
461 if (ordPostStepDoIt==0) ordPostStepDoIt = 1;
491 G4cout <<
" in ProcessVetor[" << ivec<<
"]";
492 G4cout <<
" with Ordering parameter = " ;
521 if (pAttr == 0)
return 0;
524 G4VProcess* removedProcess = (*theProcessList)[index];
531 if ((idx >= 0) && (idx < pVector->entries())) {
533 if (
RemoveAt(idx, removedProcess, ivec) <0) {
534 G4String anErrorMessage(
"Bad index in attribute");
536 anErrorMessage +=
"process[" + removedProcess->
GetProcessName() +
"] " ;
537 G4Exception(
"G4ProcessManager::RemoveProcess()",
"Fatal Error",
545 G4String anErrorMessage(
"Bad ProcessList : Index is out of range ");
547 anErrorMessage +=
"process[" + removedProcess->
GetProcessName() +
"] " ;
548 G4Exception(
"G4ProcessManager::RemoveProcess()",
"ProcMan012",
556 G4ProcessAttrVector::iterator itr;
558 if ( (*itr) == pAttr) {
576 theProcessTable->
Remove(removedProcess,
this);
578 return removedProcess;
613 const G4String aErrorMessage(
" G4ProcessManager::SetProcessOrdering");
631 G4cout <<
" illegal DoIt Index [= " <<
G4int(idDoIt) <<
"]";
653 if (ordDoIt == 0) ordDoIt = 1;
671 G4cout <<
" in ProcessVetor[" << ivec<<
"]";
672 G4cout <<
" with Ordering parameter = " << ordDoIt ;
698 G4cout <<
"G4ProcessManager::SetProcessOrdering: ";
699 G4cout <<
" illegal DoIt Index [= " <<
G4int(idDoIt) <<
"]";
730 G4cout <<
"G4ProcessManager::SetProcessOrderingToFirst: ";
732 G4cout <<
" in ProcessVetor[" << ivec<<
"]";
739 G4String anErrMsg =
"Set Ordering First is invoked twice for ";
743 G4Exception(
"G4ProcessManager::SetProcessOrderingToFirst()",
763 const G4String aErrorMessage(
" G4ProcessManager::SetProcessOrderingToSecond");
781 G4cout <<
" illegal DoIt Index [= " <<
G4int(idDoIt) <<
"]";
835 G4cout <<
" in ProcessVetor[" << ivec<<
"]";
836 G4cout <<
" with Ordering parameter = 1 ";
857 G4String anErrMsg =
"Set Ordering Last is invoked twice for ";
861 G4Exception(
"G4ProcessManager::SetProcessOrderingToLast()",
"ProcMan114",
875 G4cout <<
"G4ProcessManager::InActivateProcess is not valid in ";
889 if (pAttr == 0)
return 0;
892 G4VProcess* pProcess = (*theProcessList)[index];
894 const G4String aErrorMessage(
" G4ProcessManager::InactivateProcess():");
905 }
else if ((idx >= 0) && (idx < pVector->entries())) {
907 if ((*pVector)[idx]== pProcess) {
910 G4String anErrorMessage(
"Bad ProcessList: Bad index in attribute");
912 anErrorMessage +=
"process[" + pProcess->
GetProcessName() +
"] " ;
913 G4Exception(
"G4ProcessManager::InactivateProcess():",
"ProcMan012",
919 G4String anErrorMessage(
"Bad ProcessList: Index is out of range");
921 anErrorMessage +=
"process[" + pProcess->
GetProcessName() +
"] " ;
922 G4Exception(
"G4ProcessManager::InactivateProcess():",
"ProcMan012",
940 G4cout <<
"G4ProcessManager::ActivateProcess is not valid in ";
954 if (pAttr == 0)
return 0;
957 G4VProcess* pProcess = (*theProcessList)[index];
966 }
else if ((idx >= 0) && (idx < pVector->entries())) {
968 if ((*pVector)[idx]== 0) {
969 (*pVector)[idx] = pProcess;
971 G4String anErrorMessage(
"Bad ProcessList: Bad index in attribute");
973 anErrorMessage +=
"process[" + pProcess->
GetProcessName() +
"] " ;
974 G4Exception(
"G4ProcessManager::ActivateProcess():",
"ProcMan012",
980 G4String anErrorMessage(
"bad ProcessList: Index is out of range");
982 anErrorMessage +=
"process[" + pProcess->
GetProcessName() +
"] " ;
983 G4Exception(
"G4ProcessManager::ActivateProcess():",
"ProcMan012",
997 return (
this == &right);
1003 return (
this != &right);
1012 G4cout <<
"G4ProcessManager: particle["
1019 G4cout <<
"[" << idx <<
"]";
1020 G4cout <<
"=== process[" << ((*theProcessList)(idx))->GetProcessName()<<
" :";
1026 if ( pAttr-> isActive ) {
1036 G4cout <<
" Ordering:: ";
1037 G4cout <<
" AtRest AlongStep PostStep ";
1040 G4cout <<
" GetPIL/ DoIt GetPIL/ DoIt GetPIL/ DoIt ";
1044 for (
G4int idx2 = 0; idx2 <6 ; idx2++) {
1049 for (
G4int idx3 = 0; idx3 <6 ; idx3++) {
1073 for(
G4int j=nproc-1;j>=0;j--) {
1143 G4cout <<
"G4ProcessManager::GetProcessActivation ";
1144 G4cout <<
" process (or its index) not found ";
1152 return pAttr-> isActive;
1158 if (aProcess==0)
return;
1163 G4cout <<
"G4ProcessManager::CheckOrderingParameters ";
1165 <<
" has no attribute" <<
G4endl;
1177 G4cerr <<
"G4ProcessManager::CheckOrderingParameters ";
1178 G4cerr <<
"You cannot set ordering parameter ["
1180 <<
"] for AtRest DoIt to the process "
1190 G4cerr <<
"G4ProcessManager::CheckOrderingParameters ";
1191 G4cerr <<
"You cannot set ordering parameter ["
1193 <<
"] for AlongStep DoIt to the process "
1204 G4cerr <<
"G4ProcessManager::CheckOrderingParameters ";
1205 G4cerr <<
"You cannot set ordering parameter ["
1207 <<
"] for PostStep DoIt to the process"
1216 msg =
"Invalid ordering parameters are set for ";
1218 G4Exception(
"G4ProcessManager::CheckOrderingParameters ",
G4bool GetProcessActivation(G4VProcess *aProcess) const
G4VProcess * ActivateProcess(G4int index)
G4VProcess * removeAt(G4int i)
G4VProcess * GetProcess(const G4String &) const
G4int idxProcVector[G4ProcessManager::SizeOfProcVectorArray]
void SetProcessOrderingToLast(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
static G4ThreadLocal G4ProcessManagerMessenger * fProcessManagerMessenger
G4bool isPostStepDoItIsEnabled() const
G4int GetProcessVectorIndex(G4VProcess *aProcess, G4ProcessVectorDoItIndex idx, G4ProcessVectorTypeIndex typ=typeGPIL) const
G4VProcess * InActivateProcess(G4int index)
G4int GetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
const G4String & GetParticleName() const
G4int Remove(G4VProcess *aProcess, G4ProcessManager *aProcMgr)
virtual G4bool IsApplicable(const G4ParticleDefinition &)
static G4ProcessTable * GetProcessTable()
G4bool isSetOrderingLastInvoked[NDoit]
G4int RemoveAt(G4int position, G4VProcess *process, G4int ivec)
G4int ordProcVector[G4ProcessManager::SizeOfProcVectorArray]
G4ProcessVectorTypeIndex typ
G4VProcess * removeLast()
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
void SetProcessOrderingToSecond(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
static const G4String & GetProcessTypeName(G4ProcessType)
G4bool isAtRestDoItIsEnabled() const
G4ProcessManager & operator=(const G4ProcessManager &right)
G4int Insert(G4VProcess *aProcess, G4ProcessManager *aProcMgr)
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
G4bool isAlongStepDoItIsEnabled() const
G4bool insert(G4VProcess *aProcess)
G4int operator==(const G4ProcessManager &right) const
G4ProcessAttrVector * theAttrVector
G4VProcess * SetProcessActivation(G4VProcess *aProcess, G4bool fActive)
void SetProcessOrderingToFirst(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
const G4String & GetProcessName() const
G4ProcessVector * theProcessList
G4int InsertAt(G4int position, G4VProcess *process, G4int ivec)
G4GLOB_DLL std::ostream G4cerr
G4int GetProcessVectorId(G4ProcessVectorDoItIndex idx, G4ProcessVectorTypeIndex typ=typeGPIL) const
G4int FindInsertPosition(G4int ord, G4int ivec)
G4ProcessAttribute * GetAttribute(G4int index) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4bool isSetOrderingFirstInvoked[NDoit]
G4ApplicationState GetCurrentState() const
void StartTracking(G4Track *aTrack=0)
G4bool insertAt(G4int i, G4VProcess *aProcess)
G4VProcess * RemoveProcess(G4VProcess *aProcess)
G4GLOB_DLL std::ostream G4cout
std::vector< G4ProcessAttribute * > G4ProcessAttrVector
virtual void SetProcessManager(const G4ProcessManager *)
G4ProcessVector * theProcVector[SizeOfProcVectorArray]
const G4ParticleDefinition * theParticleType
G4int operator!=(const G4ProcessManager &right) const
void CheckOrderingParameters(G4VProcess *) const
G4int GetVerboseLevel() const
G4int GetProcessIndex(G4VProcess *) const
static G4StateManager * GetStateManager()
static G4ThreadLocal G4int counterOfObjects