#include <G4ProcessManager.hh>
|
| G4ProcessManager (G4ProcessManager &right) |
|
| G4ProcessManager (const G4ParticleDefinition *aParticleType) |
|
| ~G4ProcessManager () |
|
G4int | operator== (const G4ProcessManager &right) const |
|
G4int | operator!= (const G4ProcessManager &right) const |
|
G4ProcessVector * | GetProcessList () const |
|
G4int | GetProcessListLength () const |
|
G4int | GetProcessIndex (G4VProcess *) const |
|
G4ProcessVector * | GetProcessVector (G4ProcessVectorDoItIndex idx, G4ProcessVectorTypeIndex typ=typeGPIL) const |
|
G4ProcessVector * | GetAtRestProcessVector (G4ProcessVectorTypeIndex typ=typeGPIL) const |
|
G4ProcessVector * | GetAlongStepProcessVector (G4ProcessVectorTypeIndex typ=typeGPIL) const |
|
G4ProcessVector * | GetPostStepProcessVector (G4ProcessVectorTypeIndex typ=typeGPIL) const |
|
G4int | GetProcessVectorIndex (G4VProcess *aProcess, G4ProcessVectorDoItIndex idx, G4ProcessVectorTypeIndex typ=typeGPIL) const |
|
G4int | GetAtRestIndex (G4VProcess *aProcess, G4ProcessVectorTypeIndex typ=typeGPIL) const |
|
G4int | GetAlongStepIndex (G4VProcess *aProcess, G4ProcessVectorTypeIndex typ=typeGPIL) const |
|
G4int | GetPostStepIndex (G4VProcess *aProcess, G4ProcessVectorTypeIndex typ=typeGPIL) const |
|
G4int | AddProcess (G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive) |
|
G4int | AddRestProcess (G4VProcess *aProcess, G4int ord=ordDefault) |
|
G4int | AddDiscreteProcess (G4VProcess *aProcess, G4int ord=ordDefault) |
|
G4int | AddContinuousProcess (G4VProcess *aProcess, G4int ord=ordDefault) |
|
G4int | GetProcessOrdering (G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt) |
|
void | SetProcessOrdering (G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault) |
|
void | SetProcessOrderingToFirst (G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt) |
|
void | SetProcessOrderingToSecond (G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt) |
|
void | SetProcessOrderingToLast (G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt) |
|
G4VProcess * | RemoveProcess (G4VProcess *aProcess) |
|
G4VProcess * | RemoveProcess (G4int index) |
|
G4VProcess * | SetProcessActivation (G4VProcess *aProcess, G4bool fActive) |
|
G4VProcess * | SetProcessActivation (G4int index, G4bool fActive) |
|
G4bool | GetProcessActivation (G4VProcess *aProcess) const |
|
G4bool | GetProcessActivation (G4int index) const |
|
G4ParticleDefinition * | GetParticleType () const |
|
void | SetParticleType (const G4ParticleDefinition *) |
|
void | StartTracking (G4Track *aTrack=0) |
|
void | EndTracking () |
|
void | DumpInfo () |
|
void | SetVerboseLevel (G4int value) |
|
G4int | GetVerboseLevel () const |
|
Definition at line 106 of file G4ProcessManager.hh.
Definition at line 100 of file G4ProcessManager.cc.
101 : theParticleType(right.theParticleType),
102 numberOfProcesses(0),
103 duringTracking(
false),
108 G4cout <<
"G4ProcessManageer:: copy constructor " <<
G4endl;
114 theAttrVector =
new G4ProcessAttrVector();
115 if ( ( theProcessList == 0) || (theAttrVector == 0) ){
116 G4Exception(
"G4ProcessManager::G4ProcessManager() [coopy constructor]",
120 for (
G4int idx=0; idx < right.numberOfProcesses; idx++) {
122 theProcessList->
insert((*right.theProcessList)[idx]);
127 theAttrVector->push_back(dAttr);
128 numberOfProcesses +=1;
136 if ( theProcVector[i] == 0) {
137 G4Exception(
"G4ProcessManager::G4ProcessManager() [coopy constructor]",
145 theProcVector[i]->
insert((*src)[j]);
147 if ( (*src)[j] !=0 ) {
148 theProcessTable->
Insert((*src)[j],
this);
154 isSetOrderingFirstInvoked[i]= right.isSetOrderingFirstInvoked[i];
155 isSetOrderingLastInvoked[i] = right.isSetOrderingLastInvoked[i];
G4int Insert(G4VProcess *aProcess, G4ProcessManager *aProcMgr)
G4int GetVerboseLevel() const
G4GLOB_DLL std::ostream G4cout
G4bool insert(G4VProcess *aProcess)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4ProcessTable * GetProcessTable()
Definition at line 60 of file G4ProcessManager.cc.
61 theParticleType(aParticleType),
63 duringTracking(
false),
68 if ( theProcessList == 0) {
69 G4Exception(
"G4ProcessManager::G4ProcessManager()",
"ProcMan012",
76 if ( theProcVector[i] == 0) {
77 G4Exception(
"G4ProcessManager::G4ProcessManager()",
"ProcMan012",
83 theAttrVector =
new G4ProcessAttrVector();
86 if (fProcessManagerMessenger == 0){
91 isSetOrderingFirstInvoked[i]=
false;
92 isSetOrderingLastInvoked[i]=
false;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4ProcessManager::~G4ProcessManager |
( |
| ) |
|
Definition at line 201 of file G4ProcessManager.cc.
204 if (theProcVector[i]) {
205 theProcVector[i]->
clear();
206 delete theProcVector[i];
209 theProcessList->
clear();
210 delete theProcessList;
212 G4ProcessAttrVector::iterator itr;
213 for (itr = theAttrVector->begin(); itr!= theAttrVector->end(); ++itr) {
216 theAttrVector->clear();
217 delete theAttrVector;
222 if ( counterOfObjects == 0 ){
223 if (fProcessManagerMessenger != 0){
224 delete fProcessManagerMessenger;
225 fProcessManagerMessenger = 0;
228 G4cout <<
"G4ProcessManagerMessenger is deleted" <<
G4endl;
G4int GetVerboseLevel() const
G4GLOB_DLL std::ostream G4cout
Definition at line 410 of file G4ProcessManager.cc.
423 G4cout <<
"This process is not applicable to this particle" <<
G4endl;
437 theProcessTable->
Insert(aProcess,
this);
440 theProcessList->
insert(aProcess);
444 if (numberOfProcesses != idx){
446 G4String anErrorMessage(
"Bad ProcessList: Inconsistent process List size for ");
448 anErrorMessage +=
" particle[" + theParticleType->
GetParticleName() +
"]";
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 = " ;
500 theAttrVector->push_back(pAttr);
502 numberOfProcesses += 1;
virtual void SetProcessManager(const G4ProcessManager *)
G4int Insert(G4VProcess *aProcess, G4ProcessManager *aProcMgr)
G4VProcess * removeLast()
G4int GetVerboseLevel() const
G4int InsertAt(G4int position, G4VProcess *process, G4int ivec)
const G4String & GetParticleName() const
void CheckOrderingParameters(G4VProcess *) const
G4GLOB_DLL std::ostream G4cout
G4int ordProcVector[G4ProcessManager::SizeOfProcVectorArray]
G4int FindInsertPosition(G4int ord, G4int ivec)
G4int idxProcVector[G4ProcessManager::SizeOfProcVectorArray]
const G4String & GetProcessName() const
G4bool insert(G4VProcess *aProcess)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4ProcessTable * GetProcessTable()
virtual G4bool IsApplicable(const G4ParticleDefinition &)
void G4ProcessManager::CheckOrderingParameters |
( |
G4VProcess * |
aProcess | ) |
const |
|
protected |
Definition at line 1149 of file G4ProcessManager.cc.
1151 if (aProcess==0)
return;
1156 G4cout <<
"G4ProcessManager::CheckOrderingParameters ";
1158 <<
" has no attribute" <<
G4endl;
1170 G4cerr <<
"G4ProcessManager::CheckOrderingParameters ";
1171 G4cerr <<
"You cannot set ordering parameter ["
1173 <<
"] for AtRest DoIt to the process "
1183 G4cerr <<
"G4ProcessManager::CheckOrderingParameters ";
1184 G4cerr <<
"You cannot set ordering parameter ["
1186 <<
"] for AlongStep DoIt to the process "
1197 G4cerr <<
"G4ProcessManager::CheckOrderingParameters ";
1198 G4cerr <<
"You cannot set ordering parameter ["
1200 <<
"] for PostStep DoIt to the process"
1209 msg =
"Invalid ordering parameters are set for ";
1211 G4Exception(
"G4ProcessManager::CheckOrderingParameters ",
G4bool isAlongStepDoItIsEnabled() const
G4bool isPostStepDoItIsEnabled() const
G4bool isAtRestDoItIsEnabled() const
G4int GetVerboseLevel() const
G4GLOB_DLL std::ostream G4cout
G4int ordProcVector[G4ProcessManager::SizeOfProcVectorArray]
const G4String & GetProcessName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4GLOB_DLL std::ostream G4cerr
void G4ProcessManager::DumpInfo |
( |
| ) |
|
Definition at line 1007 of file G4ProcessManager.cc.
1012 G4cout <<
"G4ProcessManager: particle["
1017 for (
G4int idx=0; idx <theProcessList->
entries(); idx++){
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++) {
static const G4String & GetProcessTypeName(G4ProcessType)
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4int ordProcVector[G4ProcessManager::SizeOfProcVectorArray]
G4int idxProcVector[G4ProcessManager::SizeOfProcVectorArray]
void G4ProcessManager::EndTracking |
( |
| ) |
|
Definition at line 391 of file G4ProcessManager.cc.
399 for (
G4int iproc=0; iproc<numberOfProcesses; iproc++) {
G4int ordProcVector[G4ProcessManager::SizeOfProcVectorArray]
G4int idxProcVector[G4ProcessManager::SizeOfProcVectorArray]
Definition at line 1124 of file G4ProcessManager.cc.
G4int GetProcessIndex(G4VProcess *) const
G4bool GetProcessActivation(G4VProcess *aProcess) const
G4bool G4ProcessManager::GetProcessActivation |
( |
G4int |
index | ) |
const |
Definition at line 1131 of file G4ProcessManager.cc.
1136 G4cout <<
"G4ProcessManager::GetProcessActivation ";
1137 G4cout <<
" process (or its index) not found ";
1145 return pAttr-> isActive;
G4int GetVerboseLevel() const
G4GLOB_DLL std::ostream G4cout
G4int G4ProcessManager::GetProcessListLength |
( |
| ) |
const |
Definition at line 588 of file G4ProcessManager.cc.
G4int ordProcVector[G4ProcessManager::SizeOfProcVectorArray]
G4int GetProcessVectorId(G4ProcessVectorDoItIndex idx, G4ProcessVectorTypeIndex typ=typeGPIL) const
Definition at line 236 of file G4ProcessManager.cc.
246 if ( ( idxProc >=0) && (ivec >=0) ){
251 G4cout <<
" G4ProcessManager::GetProcessVectorIndex:";
256 G4cout <<
" is not registered yet ";
259 G4cout <<
" illegal DoIt Index [= " <<
G4int(idx) <<
","
G4ProcessVectorTypeIndex typ
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4int idxProcVector[G4ProcessManager::SizeOfProcVectorArray]
const G4String & GetProcessName() const
G4int GetProcessVectorId(G4ProcessVectorDoItIndex idx, G4ProcessVectorTypeIndex typ=typeGPIL) const
G4int GetProcessIndex(G4VProcess *) const
G4int G4ProcessManager::GetVerboseLevel |
( |
| ) |
const |
Definition at line 332 of file G4ProcessManager.cc.
336 if ( (ip<0) || (ip > pVector->
entries()) )
return -1;
342 for (
G4int iproc=0; iproc<numberOfProcesses; iproc++) {
351 G4cout <<
" G4ProcessManager::InsertAt : No Process Attribute " <<
G4endl;
G4bool insertAt(G4int i, G4VProcess *aProcess)
G4int GetVerboseLevel() const
G4GLOB_DLL std::ostream G4cout
G4int idxProcVector[G4ProcessManager::SizeOfProcVectorArray]
Definition at line 360 of file G4ProcessManager.cc.
364 if ( (ip<0) || (ip >= pVector->
entries()) )
return -1;
370 for(
G4int iproc=0; iproc<numberOfProcesses; iproc++) {
373 if (ip < aAttr->idxProcVector[ivec]) {
382 G4cout <<
" G4ProcessManager::RemoveAt : No Process Attribute " <<
G4endl;
G4int GetVerboseLevel() const
G4GLOB_DLL std::ostream G4cout
G4int ordProcVector[G4ProcessManager::SizeOfProcVectorArray]
G4int idxProcVector[G4ProcessManager::SizeOfProcVectorArray]
G4VProcess * removeAt(G4int i)
Definition at line 582 of file G4ProcessManager.cc.
G4int GetProcessIndex(G4VProcess *) const
G4VProcess * RemoveProcess(G4VProcess *aProcess)
Definition at line 517 of file G4ProcessManager.cc.
521 if (pAttr == 0)
return 0;
524 G4VProcess* removedProcess = (*theProcessList)[index];
526 if (!(pAttr->
isActive)) { ActivateProcess(index);}
531 if ((idx >= 0) && (idx < pVector->entries())) {
533 if (
RemoveAt(idx, removedProcess, ivec) <0) {
534 G4String anErrorMessage(
"Bad index in attribute");
535 anErrorMessage +=
"for particle[" + theParticleType->
GetParticleName() +
"] ";
536 anErrorMessage +=
"process[" + removedProcess->
GetProcessName() +
"] " ;
537 G4Exception(
"G4ProcessManager::RemoveProcess()",
"Fatal Error",
545 G4String anErrorMessage(
"Bad ProcessList : Index is out of range ");
546 anErrorMessage +=
"for particle[" + theParticleType->
GetParticleName() +
"] ";
547 anErrorMessage +=
"process[" + removedProcess->
GetProcessName() +
"] " ;
548 G4Exception(
"G4ProcessManager::RemoveProcess()",
"ProcMan012",
556 G4ProcessAttrVector::iterator itr;
557 for (itr = theAttrVector->begin(); itr!= theAttrVector->end(); ++itr) {
558 if ( (*itr) == pAttr) {
559 theAttrVector->erase(itr);
564 numberOfProcesses -= 1;
567 for(
G4int i=0; i<numberOfProcesses; i++) {
576 theProcessTable->
Remove(removedProcess,
this);
578 return removedProcess;
G4int Remove(G4VProcess *aProcess, G4ProcessManager *aProcMgr)
const G4String & GetParticleName() const
G4int RemoveAt(G4int position, G4VProcess *process, G4int ivec)
G4int idxProcVector[G4ProcessManager::SizeOfProcVectorArray]
const G4String & GetProcessName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VProcess * removeAt(G4int i)
static G4ProcessTable * GetProcessTable()
Definition at line 1109 of file G4ProcessManager.cc.
G4VProcess * SetProcessActivation(G4VProcess *aProcess, G4bool fActive)
G4int GetProcessIndex(G4VProcess *) const
Definition at line 1117 of file G4ProcessManager.cc.
1119 if (fActive)
return ActivateProcess(index);
1120 else return InActivateProcess(index);
Definition at line 607 of file G4ProcessManager.cc.
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 ;
G4int GetVerboseLevel() const
G4int InsertAt(G4int position, G4VProcess *process, G4int ivec)
const G4String & GetParticleName() const
void CheckOrderingParameters(G4VProcess *) const
G4int RemoveAt(G4int position, G4VProcess *process, G4int ivec)
G4GLOB_DLL std::ostream G4cout
G4int ordProcVector[G4ProcessManager::SizeOfProcVectorArray]
G4int FindInsertPosition(G4int ord, G4int ivec)
G4int idxProcVector[G4ProcessManager::SizeOfProcVectorArray]
const G4String & GetProcessName() const
G4int GetProcessVectorId(G4ProcessVectorDoItIndex idx, G4ProcessVectorTypeIndex typ=typeGPIL) const
Definition at line 688 of file G4ProcessManager.cc.
698 G4cout <<
"G4ProcessManager::SetProcessOrdering: ";
699 G4cout <<
" illegal DoIt Index [= " <<
G4int(idDoIt) <<
"]";
730 G4cout <<
"G4ProcessManager::SetProcessOrderingToFirst: ";
732 G4cout <<
" in ProcessVetor[" << ivec<<
"]";
738 if (isSetOrderingFirstInvoked[idDoIt]){
739 G4String anErrMsg =
"Set Ordering First is invoked twice for ";
743 G4Exception(
"G4ProcessManager::SetProcessOrderingToFirst()",
747 isSetOrderingFirstInvoked[idDoIt] =
true;
G4int InsertAt(G4int position, G4VProcess *process, G4int ivec)
const G4String & GetParticleName() const
void CheckOrderingParameters(G4VProcess *) const
G4int RemoveAt(G4int position, G4VProcess *process, G4int ivec)
G4GLOB_DLL std::ostream G4cout
G4int ordProcVector[G4ProcessManager::SizeOfProcVectorArray]
G4int idxProcVector[G4ProcessManager::SizeOfProcVectorArray]
const G4String & GetProcessName() const
G4int GetProcessVectorId(G4ProcessVectorDoItIndex idx, G4ProcessVectorTypeIndex typ=typeGPIL) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition at line 849 of file G4ProcessManager.cc.
856 if (isSetOrderingLastInvoked[idDoIt]){
857 G4String anErrMsg =
"Set Ordering Last is invoked twice for ";
861 G4Exception(
"G4ProcessManager::SetProcessOrderingToLast()",
"ProcMan114",
864 isSetOrderingLastInvoked[idDoIt] =
true;
const G4String & GetParticleName() const
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
const G4String & GetProcessName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition at line 758 of file G4ProcessManager.cc.
763 const G4String aErrorMessage(
" G4ProcessManager::SetProcessOrderingToSecond");
781 G4cout <<
" illegal DoIt Index [= " <<
G4int(idDoIt) <<
"]";
811 for (
G4int iproc=0; iproc<numberOfProcesses; iproc++) {
835 G4cout <<
" in ProcessVetor[" << ivec<<
"]";
836 G4cout <<
" with Ordering parameter = 1 ";
G4int GetVerboseLevel() const
G4int InsertAt(G4int position, G4VProcess *process, G4int ivec)
const G4String & GetParticleName() const
void CheckOrderingParameters(G4VProcess *) const
G4int RemoveAt(G4int position, G4VProcess *process, G4int ivec)
G4GLOB_DLL std::ostream G4cout
G4int ordProcVector[G4ProcessManager::SizeOfProcVectorArray]
G4int idxProcVector[G4ProcessManager::SizeOfProcVectorArray]
const G4String & GetProcessName() const
G4int GetProcessVectorId(G4ProcessVectorDoItIndex idx, G4ProcessVectorTypeIndex typ=typeGPIL) const
void G4ProcessManager::SetVerboseLevel |
( |
G4int |
value | ) |
|
void G4ProcessManager::StartTracking |
( |
G4Track * |
aTrack = 0 | ) |
|
Definition at line 1088 of file G4ProcessManager.cc.
1090 for (
G4int idx = 0; idx<theProcessList->
entries(); idx++){
1094 if(aTrack) duringTracking =
true;
void StartTracking(G4Track *aTrack=0)
G4int G4ProcessManager::verboseLevel |
|
protected |
The documentation for this class was generated from the following files: