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;
129 G4cout <<
"-- G4ProcessTable assignment operator --" <<
G4endl;
138 return (
this == &right);
144 return (
this != &right);
156 fProcessTable = &theProcessTable;
158 return fProcessTable;
165 if ( (aProcess == 0) || ( aProcMgr == 0 ) ){
168 G4cout <<
"G4ProcessTable::Insert : arguments are 0 pointer "
169 <<aProcess <<
","<< aProcMgr <<
G4endl;
177 G4cout <<
"G4ProcessTable::Insert ";
184 G4ProcTableVector::iterator itr;
187 G4bool isFoundInTbl =
false;
189 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr, ++idxTbl) {
197 if (!anElement->
Contains(aProcMgr)) {
198 anElement->
Insert(aProcMgr);
201 G4cout <<
" This Process Manager is registered !! " <<
G4endl;
211 newElement->
Insert(aProcMgr);
212 fProcTblVector->push_back(newElement);
214 G4ProcNameVector::iterator ip;
216 for (ip=fProcNameVector->begin(); ip!=fProcNameVector->end(); ++ip) {
235 if ( (aProcess == 0) || ( aProcMgr == 0 ) ){
238 G4cout <<
"G4ProcessTable::Remove : arguments are 0 pointer "<<
G4endl;
246 G4cout <<
"G4ProcessTable::Remove ";
252 G4ProcTableVector::iterator itr;
257 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr, ++idxTbl) {
262 isFound = anElement->
Contains(aProcMgr);
264 anElement->
Remove(aProcMgr);
267 G4cout <<
" This Process Manager is removed !! " <<
G4endl;
277 G4cout <<
" This Process Manager is not registered !! " <<
G4endl;
283 if (anElement->
Length() == 0){
284 fProcTblVector->erase(itr);
287 G4bool isSameName =
false;
288 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr) {
297 G4ProcNameVector::iterator i;
298 for (i=fProcNameVector->begin(); i!=fProcNameVector->end(); ++i) {
300 fProcNameVector->erase(i);
319 G4ProcTableVector::iterator itr;
323 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr, ++idxTbl) {
328 if ( anElement->
Contains(processManager) ) {
335 if (!isFound && verboseLevel>1){
336 G4cout <<
" G4ProcessTable::FindProcess :" ;
337 G4cout <<
" The Process[" << processName <<
"] is not found ";
351 tmpTblVector->clear();
353 G4ProcTableVector::iterator itr;
356 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr) {
361 tmpTblVector->push_back(anElement);
365 if (!isFound && verboseLevel>0){
367 G4cout <<
" G4ProcessTable::Find :" ;
368 G4cout <<
" The Process[" << processName <<
"] is not found " <<
G4endl;
380 tmpTblVector->clear();
382 G4ProcTableVector::iterator itr;
385 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr) {
390 tmpTblVector->push_back(anElement);
394 if (!isFound && verboseLevel>0){
396 G4cout <<
" G4ProcessTable::Find :" ;
397 G4cout <<
" The ProcessType[" << processType <<
"] is not found " <<
G4endl;
406 G4ProcessVector* G4ProcessTable::ExtractProcesses( G4ProcTableVector* procTblVector)
409 G4ProcTableVector::iterator itr;
411 for (itr=procTblVector->begin(); itr!=procTblVector->end(); ++itr) {
421 return ExtractProcesses(fProcTblVector);
435 return ExtractProcesses(pTblVector);
442 return ExtractProcesses(pTblVector);
451 G4cout <<
" G4ProcessTable::SetProcessActivation:" ;
452 G4cout <<
" The Process[" << processName <<
"] "<<
G4endl;
457 G4ProcTableVector::iterator itr;
460 for (itr=pTblVector->begin(); itr!=pTblVector->end(); ++itr) {
463 for (
G4int idx = 0 ; idx < anElement->
Length(); idx++) {
485 G4cout <<
" G4ProcessTable::SetProcessActivation:" ;
486 G4cout <<
" The Process[" << processName <<
"] "<<
G4endl;
509 G4cout <<
" G4ProcessTable::SetProcessActivation:" ;
515 G4ProcTableVector::iterator itr;
518 for (itr=pTblVector->begin(); itr!=pTblVector->end(); ++itr) {
526 for (
G4int idx = 0 ; idx < anElement->
Length(); idx++) {
547 G4cout <<
" G4ProcessTable::SetProcessActivation:" ;
553 for (
G4int idx = 0; idx < procList->
length(); idx++) {
573 G4ProcTableVector::iterator itr;
576 G4bool isFoundInTbl =
false;
580 for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr, ++idxTbl) {
584 for (idx=0; idx<anElement->
Length(); idx++){
597 if (!isFoundInTbl )
return;
604 for (idx=0; idx<anElement->
Length(); idx++){
609 if (verboseLevel >2){
621 if (verboseLevel >2){
G4int Insert(G4VProcess *aProcess, G4ProcessManager *aProcMgr)
void DumpInfo(G4VProcess *process, G4ParticleDefinition *particle=0)
G4UImessenger * CreateMessenger()
G4int Remove(G4VProcess *aProcess, G4ProcessManager *aProcMgr)
void SetVerboseLevel(G4int value)
G4ProcessManager * GetProcessManager(G4int index) const
G4ProcessType GetProcessType() const
G4int GetVerboseLevel() const
void SetProcessActivation(const G4String &processName, G4bool fActive)
const G4String & GetParticleName() const
G4VProcess * SetProcessActivation(G4VProcess *aProcess, G4bool fActive)
G4int GetVerboseLevel() const
G4GLOB_DLL std::ostream G4cout
G4bool Contains(const G4ProcessManager *pManager) const
void Insert(G4ProcessManager *aProcMgr)
const G4String & GetProcessName() const
G4ParticleDefinition * GetParticleType() const
const G4String & GetProcessName() const
G4bool insert(G4VProcess *aProcess)
void Remove(G4ProcessManager *aProcMgr)
G4VProcess * GetProcess() const
std::vector< G4String > G4ProcNameVector
std::vector< G4ProcTblElement * > G4ProcTableVector
G4int GetProcessIndex(G4VProcess *) const
virtual void DumpInfo() const
G4ProcessVector * FindProcesses()
static G4ProcessTable * GetProcessTable()
G4VProcess * FindProcess(const G4String &processName, const G4String &particleName) const
void SetVerboseLevel(G4int value)
G4ProcessVector * GetProcessList() const