54 fProcTblMessenger = 0;
64 fProcTblMessenger = 0;
67 G4cout <<
"-- G4ProcessTable copy constructor --" <<
G4endl;
81 if ( tmpTblVector != 0) {
82 tmpTblVector ->clear();
86 if ( fProcTblVector != 0) {
87 G4ProcTableVector::iterator idx;
90 for (idx=fProcTblVector->begin(); idx!=fProcTblVector->end(); ++idx) {
95 fProcTblVector ->clear();
96 delete fProcTblVector;
99 if ( fProcNameVector != 0) {
100 fProcNameVector ->clear();
101 delete fProcNameVector;
109 if (fProcTblMessenger == 0) {
112 return fProcTblMessenger;
118 if (fProcTblMessenger != 0) {
119 delete fProcTblMessenger;
127 verboseLevel = right.verboseLevel;
130 G4cout <<
"-- G4ProcessTable assignment operator --" <<
G4endl;
133 if (&right ==
this)
return *
this;
140 return (
this == &right);
146 return (
this != &right);
158 fProcessTable = &theProcessTable;
160 return fProcessTable;
167 if ( (aProcess == 0) || ( aProcMgr == 0 ) ){
170 G4cout <<
"G4ProcessTable::Insert : arguments are 0 pointer "
171 <<aProcess <<
","<< aProcMgr <<
G4endl;
179 G4cout <<
"G4ProcessTable::Insert ";
186 G4ProcTableVector::iterator itr;
189 G4bool isFoundInTbl =
false;
191 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr, ++idxTbl) {
199 if (!anElement->
Contains(aProcMgr)) {
200 anElement->
Insert(aProcMgr);
203 G4cout <<
" This Process Manager is registered !! " <<
G4endl;
213 newElement->
Insert(aProcMgr);
214 fProcTblVector->push_back(newElement);
216 G4ProcNameVector::iterator ip;
218 for (ip=fProcNameVector->begin(); ip!=fProcNameVector->end(); ++ip) {
237 if ( (aProcess == 0) || ( aProcMgr == 0 ) ){
240 G4cout <<
"G4ProcessTable::Remove : arguments are 0 pointer "<<
G4endl;
248 G4cout <<
"G4ProcessTable::Remove ";
254 G4ProcTableVector::iterator itr;
259 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr, ++idxTbl) {
264 isFound = anElement->
Contains(aProcMgr);
266 anElement->
Remove(aProcMgr);
269 G4cout <<
" This Process Manager is removed !! " <<
G4endl;
279 G4cout <<
" This Process Manager is not registered !! " <<
G4endl;
285 if (anElement->
Length() == 0){
286 fProcTblVector->erase(itr);
289 G4bool isSameName =
false;
290 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr) {
299 G4ProcNameVector::iterator i;
300 for (i=fProcNameVector->begin(); i!=fProcNameVector->end(); ++i) {
302 fProcNameVector->erase(i);
321 G4ProcTableVector::iterator itr;
325 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr, ++idxTbl) {
330 if ( anElement->
Contains(processManager) ) {
337 if (!isFound && verboseLevel>1){
338 G4cout <<
" G4ProcessTable::FindProcess :" ;
339 G4cout <<
" The Process[" << processName <<
"] is not found ";
353 tmpTblVector->clear();
355 G4ProcTableVector::iterator itr;
358 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr) {
363 tmpTblVector->push_back(anElement);
368 if (!isFound && verboseLevel>0){
369 G4cout <<
" G4ProcessTable::Find :" ;
370 G4cout <<
" The Process[" << processName <<
"] is not found " <<
G4endl;
382 tmpTblVector->clear();
384 G4ProcTableVector::iterator itr;
387 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr) {
392 tmpTblVector->push_back(anElement);
397 if (!isFound && verboseLevel>0){
398 G4cout <<
" G4ProcessTable::Find :" ;
399 G4cout <<
" The ProcessType[" << processType <<
"] is not found " <<
G4endl;
408G4ProcessVector* G4ProcessTable::ExtractProcesses( G4ProcTableVector* procTblVector)
411 G4ProcTableVector::iterator itr;
413 for (itr=procTblVector->begin(); itr!=procTblVector->end(); ++itr) {
423 return ExtractProcesses(fProcTblVector);
437 return ExtractProcesses(pTblVector);
444 return ExtractProcesses(pTblVector);
453 G4cout <<
" G4ProcessTable::SetProcessActivation:" ;
454 G4cout <<
" The Process[" << processName <<
"] "<<
G4endl;
459 G4ProcTableVector::iterator itr;
462 for (itr=pTblVector->begin(); itr!=pTblVector->end(); ++itr) {
465 for (
G4int idx = 0 ; idx < anElement->
Length(); idx++) {
487 G4cout <<
" G4ProcessTable::SetProcessActivation:" ;
488 G4cout <<
" The Process[" << processName <<
"] "<<
G4endl;
511 G4cout <<
" G4ProcessTable::SetProcessActivation:" ;
517 G4ProcTableVector::iterator itr;
520 for (itr=pTblVector->begin(); itr!=pTblVector->end(); ++itr) {
528 for (
G4int idx = 0 ; idx < anElement->
Length(); idx++) {
549 G4cout <<
" G4ProcessTable::SetProcessActivation:" ;
555 for (
G4int idx = 0; idx < procList->
length(); idx++) {
575 G4ProcTableVector::iterator itr;
578 G4bool isFoundInTbl =
false;
582 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr, ++idxTbl) {
586 for (idx=0; idx<anElement->
Length(); idx++){
599 if (!isFoundInTbl )
return;
606 for (idx=0; idx<anElement->
Length(); idx++){
611 if (verboseLevel >2){
623 if (verboseLevel >2){
G4DLLIMPORT std::ostream G4cout
const G4String & GetParticleName() const
const G4String & GetProcessName() const
G4VProcess * GetProcess() const
G4bool Contains(const G4ProcessManager *pManager) const
void Remove(G4ProcessManager *aProcMgr)
G4ProcessManager * GetProcessManager(G4int index) const
void Insert(G4ProcessManager *aProcMgr)
G4VProcess * SetProcessActivation(G4VProcess *aProcess, G4bool fActive)
G4ParticleDefinition * GetParticleType() const
void SetVerboseLevel(G4int value)
G4ProcessVector * GetProcessList() const
G4int GetProcessIndex(G4VProcess *) const
G4int GetVerboseLevel() const
void DumpInfo(G4VProcess *process, G4ParticleDefinition *particle=0)
static G4ProcessTable * GetProcessTable()
G4VProcess * FindProcess(const G4String &processName, const G4String &particleName) const
G4int Insert(G4VProcess *aProcess, G4ProcessManager *aProcMgr)
std::vector< G4ProcTblElement * > G4ProcTableVector
G4UImessenger * CreateMessenger()
std::vector< G4String > G4ProcNameVector
G4int Remove(G4VProcess *aProcess, G4ProcessManager *aProcMgr)
void SetProcessActivation(const G4String &processName, G4bool fActive)
G4ProcessVector * FindProcesses()
G4bool insert(G4VProcess *aProcess)
void SetVerboseLevel(G4int value)
G4int GetVerboseLevel() const
G4ProcessType GetProcessType() const
virtual void DumpInfo() const
const G4String & GetProcessName() const