Import Geant4 2.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:42:07 +02:00
parent 103bda00c8
commit e7d7193284
3106 changed files with 171117 additions and 90550 deletions
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IVContinuousDiscreteProcess.cc,v 1.4.8.1 1999/12/07 20:52:47 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4IVContinuousDiscreteProcess.cc,v 1.5 1999/12/15 14:53:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// --------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IVRestDiscreteProcess.cc,v 1.4.8.1 1999/12/07 20:52:48 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4IVRestDiscreteProcess.cc,v 1.5 1999/12/15 14:53:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// --------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ProcTblElement.cc,v 1.2.8.1 1999/12/07 20:52:48 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4ProcTblElement.cc,v 1.4 2000/03/02 01:16:06 kurasige Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ------------------------------------------------------------
@@ -17,7 +17,8 @@
// History: first implementation, based on object model of
// 4th Aug 1998, H.Kurashige
// ------------------------------------------------------------
// Use STL vector instead of RW vector 1. Mar 00 H.Kurashige
//
#include "G4ProcTblElement.hh"
@@ -41,8 +42,9 @@ G4ProcTblElement::G4ProcTblElement(const G4ProcTblElement &right)
pProcess = right.pProcess;
// copy all contents in pProcMgrVector
pProcMgrVector = new G4ProcMgrVector();
for (G4int idx=0; idx<pProcMgrVector->length(); idx++){
pProcMgrVector->insert((*(right.pProcMgrVector))[idx]);
G4ProcMgrVector::iterator i;
for (i = pProcMgrVector->begin(); i!= pProcMgrVector->end(); ++i) {
pProcMgrVector->push_back(*i);
}
}
@@ -68,8 +70,9 @@ G4ProcTblElement & G4ProcTblElement::operator=(G4ProcTblElement &right)
delete pProcMgrVector;
}
pProcMgrVector = new G4ProcMgrVector();
for (G4int idx=0; idx<pProcMgrVector->length(); idx++){
pProcMgrVector->insert((*(right.pProcMgrVector))[idx]);
G4ProcMgrVector::iterator i;
for (i = pProcMgrVector->begin(); i!= pProcMgrVector->end(); ++i) {
pProcMgrVector->push_back(*i);
}
}
return *this;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ProcessAttribute.cc,v 1.2.8.1 1999/12/07 20:52:48 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4ProcessAttribute.cc,v 1.3 1999/12/15 14:53:43 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ProcessManager.cc,v 1.10.4.1.2.5 1999/12/14 09:16:49 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4ProcessManager.cc,v 1.15 2000/03/11 00:58:47 kurasige Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// --------------------------------------------------------------
@@ -21,6 +21,7 @@
// remove sprintf 14 Nov 1997 H.Kurahige
// fixed bugs in FindInsertPosition
// 18 July 1998 H.Kurashige
// Use STL vector instead of RW vector 1. Mar 00 H.Kurashige
// ------------------------------------------------------------
#include "G4ProcessManagerMessenger.hh"
@@ -39,6 +40,7 @@
// ---------------------------------
G4ProcessManagerMessenger* G4ProcessManager::fProcessManagerMessenger = 0;
G4int G4ProcessManager::counterOfObjects = 0;
// ///////////////////////////////////////
G4ProcessManager::G4ProcessManager(const G4ParticleDefinition* aParticleType):
theParticleType(aParticleType),
@@ -106,7 +108,7 @@ G4ProcessManager::G4ProcessManager(G4ProcessManager &right)
G4ProcessAttribute* sAttr = (*right.theAttrVector)[idx];
G4ProcessAttribute* dAttr = new G4ProcessAttribute(*sAttr);
// adds a G4ProcessAttribute object
theAttrVector->insert(dAttr);
theAttrVector->push_back(dAttr);
numberOfProcesses +=1;
}
@@ -119,10 +121,14 @@ G4ProcessManager::G4ProcessManager(G4ProcessManager &right)
G4String aErrorMessage("G4ProcessManager::G4ProcessManager():");
G4Exception((const char*)(aErrorMessage));
}
G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
G4ProcessVector* src = right.theProcVector[i];
for (G4int j=0; j< src->entries() ; j++){
// copy j-th process in i-th ProcessVector
theProcVector[i]->insert((*src)[j]);
//add aProcess and this ProcessManager into ProcesssTable
theProcessTable->Insert((*src)[j], this);
}
}
@@ -159,7 +165,11 @@ G4ProcessManager::~G4ProcessManager()
theProcessList->clear();
delete theProcessList;
theAttrVector->clearAndDestroy();
G4ProcessAttrVector::iterator itr;
for (itr = theAttrVector->begin(); itr!= theAttrVector->end(); ++itr) {
delete (*itr);
}
theAttrVector->clear();
delete theAttrVector;
counterOfObjects-=1;
@@ -253,9 +263,10 @@ G4ProcessAttribute* G4ProcessManager::GetAttribute(G4int index) const
#endif
// re-ordering attribute vector
G4ProcessAttribute *pAttr = 0;
for (G4int i=0; i<theAttrVector->entries(); i++){
if ( ((*theAttrVector)[i])->idxProcessList == index) {
pAttr = (*theAttrVector)[i];
G4ProcessAttrVector::iterator itr;
for (itr = theAttrVector->begin(); itr!= theAttrVector->end(); ++itr) {
if ( (*itr)->idxProcessList == index) {
pAttr = (*itr);
break;
}
}
@@ -442,7 +453,7 @@ G4int G4ProcessManager::AddProcess(
}
//add ProcessAttribute to ProcessAttrVector
theAttrVector->insert(pAttr);
theAttrVector->push_back(pAttr);
numberOfProcesses += 1;
@@ -507,7 +518,13 @@ G4VProcess* G4ProcessManager::RemoveProcess(G4int index)
}
// remove from the process List and delete the attribute
theProcessList->removeAt(index);
theAttrVector->remove(pAttr);
G4ProcessAttrVector::iterator itr;
for (itr = theAttrVector->begin(); itr!= theAttrVector->end(); ++itr) {
if ( (*itr) == pAttr) {
theAttrVector->erase(itr);
break;
}
}
delete pAttr;
numberOfProcesses -= 1;
@@ -540,23 +557,12 @@ G4int G4ProcessManager::GetProcessOrdering(
{
// get Process Vector Id
G4int ivec = GetProcessVectorId(idDoIt, typeDoIt);
if (ivec <0 ) {
#ifdef G4VERBOSE
if (verboseLevel>0) {
G4cout << "G4ProcessManager::SetProcessOrdering: ";
G4cout << " illegal DoIt Index [= " << idDoIt << "]";
G4cout << G4endl;
if (ivec >=0 ) {
// get attribute
G4ProcessAttribute* pAttr = GetAttribute(aProcess);
if (pAttr != 0) {
return pAttr->ordProcVector[ivec];
}
#endif
return -1;
}
// get attribute
G4ProcessAttribute* pAttr = GetAttribute(aProcess);
if (pAttr != 0) {
return pAttr->ordProcVector[ivec];
} else {
return -1;
}
return -1;
}
@@ -775,16 +781,6 @@ G4VProcess* G4ProcessManager::InActivateProcess(G4int index)
}
}
pAttr->isActive = false;
} else {
#ifdef G4VERBOSE
if (GetVerboseLevel()>0) {
G4cout << aErrorMessage;
G4cout << "particle["<<theParticleType->GetParticleName()<<"] " ;
G4cout << "process["<<pProcess->GetProcessName()<<"] " ;
G4cout << "The process is already inactive" << G4endl;
}
#endif
}
return pProcess;
}
@@ -818,14 +814,7 @@ G4VProcess* G4ProcessManager::ActivateProcess(G4int index)
const G4String aErrorMessage(" G4ProcessManager::ActivateProcess():");
if (pAttr->isActive) {
#ifdef G4VERBOSE
if (GetVerboseLevel()>0) {
G4cout << aErrorMessage << G4endl;
G4cout << "The process is already active" << G4endl;
}
#endif
} else {
if (!pAttr->isActive) {
// remove process from vectors if the process is active
for (G4int i=0; i<SizeOfProcVectorArray; i++) {
G4ProcessVector* pVector = theProcVector[i];
@@ -900,7 +889,7 @@ void G4ProcessManager::DumpInfo()
G4cout << G4VProcess::GetProcessTypeName( ((*theProcessList)(idx))->GetProcessType() )<< "]";
// process attribute
G4ProcessAttribute* pAttr = (*theAttrVector)(idx);
G4ProcessAttribute* pAttr = (*theAttrVector)[idx];
// status
if ( pAttr-> isActive ) {
G4cout << " Active ";
@@ -1019,7 +1008,7 @@ void G4ProcessManager::EndTracking()
return false;
}
// process attribute
G4ProcessAttribute* pAttr = (*theAttrVector)(index);
G4ProcessAttribute* pAttr = (*theAttrVector)[index];
// status
return pAttr-> isActive;
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ProcessManagerMessenger.cc,v 1.3.8.1.2.5 1999/12/14 09:16:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4ProcessManagerMessenger.cc,v 1.4 1999/12/15 14:53:43 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//---------------------------------------------------------------
+108 -112
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ProcessTable.cc,v 1.3.8.1.2.1 1999/12/08 17:35:13 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4ProcessTable.cc,v 1.5 2000/03/02 01:16:06 kurasige Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ------------------------------------------------------------
@@ -17,6 +17,9 @@
// History: first implementation, based on object model of
// 4th Aug 1998, H.Kurashige
// ------------------------------------------------------------
// History:
// Use STL vector instead of RW vector 1. Mar 00 H.Kurashige
//
#include "G4ProcessTableMessenger.hh"
#include "G4ProcessTable.hh"
@@ -54,19 +57,22 @@ G4ProcessTable::~G4ProcessTable()
}
#endif
// delete all processes
for (G4int idxTbl =0; idxTbl <fProcTblVector->length(); idxTbl++){
delete ((*fProcTblVector)(idxTbl))->GetProcess();
}
if ( tmpTblVector != 0) {
tmpTblVector ->clear();
delete tmpTblVector;
}
if ( fProcTblVector != 0) {
fProcTblVector ->clearAndDestroy();
G4ProcTableVector::iterator idx;
for (idx=fProcTblVector->begin(); idx!=fProcTblVector->end(); ++idx) {
// delete all processes
delete (*idx)->GetProcess();
delete (*idx);
}
fProcTblVector ->clear();
delete fProcTblVector;
}
if ( fProcNameVector != 0) {
fProcNameVector ->clear();
delete fProcNameVector;
@@ -151,37 +157,20 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
}
#endif
G4int idxTbl;
G4ProcTableVector::iterator itr;
G4int idxTbl=0;
G4ProcTblElement* anElement;
G4bool isFoundInTbl = false;
// loop over all elements
for (idxTbl =0; idxTbl <fProcTblVector->length(); idxTbl++){
anElement = (*fProcTblVector)(idxTbl);
G4int idx;
for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr, ++idxTbl) {
anElement = (*itr);
// check if this process is included
if (aProcess == anElement->GetProcess()) {
isFoundInTbl = true;
#ifdef G4VERBOSE
if (verboseLevel>2){
G4cout << " This Process has been already registered !! " << G4endl;
}
#endif
//
G4bool isFound = false;
// check if this process manager is included
for (idx=0; idx<anElement->Length(); idx++){
if ( aProcMgr == anElement->GetProcessManager(idx) ){
isFound = true;
#ifdef G4VERBOSE
if (verboseLevel>1){
G4cout << " This Process Manager has been already registered !! " << G4endl;
}
#endif
break;
}
}
// add the process manager into the element
if (!isFound) {
// add the process manager into the element
// unless this process manager is included
if (!anElement->Contains(aProcMgr)) {
anElement->Insert(aProcMgr);
#ifdef G4VERBOSE
if (verboseLevel>2){
@@ -192,20 +181,25 @@ G4int G4ProcessTable::Insert(G4VProcess* aProcess,
break;
}
}
// add this process into the table
// add this process into the table by creating a new element
if (!isFoundInTbl) {
G4ProcTblElement* newElement = new G4ProcTblElement(aProcess);
newElement->Insert(aProcMgr);
fProcTblVector->insert(newElement);
fProcTblVector->push_back(newElement);
// add into name vector
if (!fProcNameVector->contains(aProcess->GetProcessName()) ){
fProcNameVector->insert(aProcess->GetProcessName() );
G4ProcNameVector::iterator ip;
G4bool isFound = false;
for (ip=fProcNameVector->begin(); ip!=fProcNameVector->end(); ++ip) {
isFound |= (aProcess->GetProcessName() == (*ip));
}
if (!isFound) {
fProcNameVector->push_back(aProcess->GetProcessName() );
#ifdef G4VERBOSE
if (verboseLevel>2){
G4cout << " This Process is registered !! " << G4endl;
}
if (verboseLevel>2){
G4cout << " This Process is registered !! " << G4endl;
}
#endif
}
}
return idxTbl;
}
@@ -231,69 +225,66 @@ G4int G4ProcessTable::Remove( G4VProcess* aProcess,
}
#endif
G4int idxTbl;
G4ProcTableVector::iterator itr;
G4int idxTbl=0;
G4ProcTblElement* anElement;
G4bool isFoundInTbl = false;
G4bool isFound = false;
// loop over all elements
for (idxTbl =0; idxTbl <fProcTblVector->length(); idxTbl++){
anElement = (*fProcTblVector)(idxTbl);
for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr, ++idxTbl) {
anElement = (*itr);
G4int idx;
// check if this process is included
if (aProcess == anElement->GetProcess()) {
isFoundInTbl = true;
// check if this process manager is included
for (idx=0; idx<anElement->Length(); idx++){
if ( aProcMgr == anElement->GetProcessManager(idx) ){
isFound = true;
break;
}
}
// add the process manager into the element
if (isFound) {
anElement->Remove(aProcMgr);
isFound = anElement->Contains(aProcMgr);
// remove the process manager from the element
anElement->Remove(aProcMgr);
#ifdef G4VERBOSE
if (verboseLevel>2){
G4cout << " This Process Manager is removed !! " << G4endl;
}
#endif
if (verboseLevel>2){
G4cout << " This Process Manager is removed !! " << G4endl;
}
#endif
break;
}
}
if (isFound) {
if (anElement->Length() == 0){
fProcTblVector->remove(anElement);
delete anElement;
// check other prcesses with same name exist or not
G4bool isSameName = false;
for (idxTbl =0; idxTbl <fProcTblVector->length(); idxTbl++){
anElement = (*fProcTblVector)(idxTbl);
if (anElement->GetProcessName() == aProcess->GetProcessName()) {
isSameName = true;
//
if (!isFound) {
#ifdef G4VERBOSE
if (verboseLevel>0){
G4cout << " This Process Manager is not registered !! " << G4endl;
}
#endif
return -1;
}
// remove the element if it has no entry
if (anElement->Length() == 0){
fProcTblVector->erase(itr);
delete anElement;
// check other prcesses with same name exist or not
G4bool isSameName = false;
for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr) {
anElement = (*itr);
if (anElement->GetProcessName() == aProcess->GetProcessName()) {
isSameName = true;
break;
}
}
// remove from name vector
if (!isSameName ) {
G4ProcNameVector::iterator i;
for (i=fProcNameVector->begin(); i!=fProcNameVector->end(); ++i) {
if ( *i == aProcess->GetProcessName() ) {
fProcNameVector->erase(i);
break;
}
}
// remove from name vector
if (!isSameName ) {
fProcNameVector->remove(aProcess->GetProcessName() );
}
#ifdef G4VERBOSE
if (verboseLevel>1){
G4cout << " This Process is removed !! " << G4endl;
}
#endif
}
return idxTbl;
} else {
#ifdef G4VERBOSE
if (verboseLevel>0){
G4cout << " This Process is not registered !! " << G4endl;
if (verboseLevel>1){
G4cout << " This Process is removed !! " << G4endl;
}
#endif
}
return -1;
return idxTbl;
}
//////////////////////////
@@ -301,11 +292,12 @@ G4VProcess* G4ProcessTable::FindProcess(const G4String& processName,
const G4ProcessManager* processManager)
const
{
G4int idxTblVec;
G4ProcTableVector::iterator itr;
G4int idxTbl = 0;
G4bool isFound = false;
G4ProcTblElement* anElement;
for ( idxTblVec = 0; idxTblVec < fProcTblVector->length(); idxTblVec++){
anElement = (*fProcTblVector)(idxTblVec);
for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr, ++idxTbl) {
anElement = (*itr);
// check name
if ( anElement->GetProcessName() == processName ) {
// check if the processManage is included
@@ -332,17 +324,17 @@ G4ProcessTable::G4ProcTableVector* G4ProcessTable::Find(
G4ProcTableVector* procTblVector,
const G4String& processName )
{
tmpTblVector-> clear();
tmpTblVector->clear();
G4int idxTblVec;
G4ProcTableVector::iterator itr;
G4bool isFound = false;
G4ProcTblElement* anElement;
for ( idxTblVec = 0; idxTblVec < procTblVector->length(); idxTblVec++){
anElement = (*procTblVector)(idxTblVec);
for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr) {
anElement = (*itr);
// check name
if ( anElement->GetProcessName() == processName ) {
isFound = true;
tmpTblVector->insert(anElement);
tmpTblVector->push_back(anElement);
}
}
@@ -363,15 +355,15 @@ G4ProcessTable::G4ProcTableVector* G4ProcessTable::Find(
{
tmpTblVector->clear();
G4int idxTblVec;
G4ProcTableVector::iterator itr;
G4bool isFound = false;
G4ProcTblElement* anElement;
for ( idxTblVec = 0; idxTblVec < procTblVector->length(); idxTblVec++){
anElement = (*procTblVector)(idxTblVec);
for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr) {
anElement = (*itr);
// check name
if ( anElement->GetProcess()->GetProcessType() == processType ) {
isFound = true;
tmpTblVector->insert(anElement);
tmpTblVector->push_back(anElement);
}
}
@@ -390,9 +382,10 @@ G4ProcessTable::G4ProcTableVector* G4ProcessTable::Find(
G4ProcessVector* G4ProcessTable::ExtractProcesses( G4ProcTableVector* procTblVector)
{
G4ProcessVector* procList = new G4ProcessVector();
G4int idxTblVec;
for ( idxTblVec = 0; idxTblVec < procTblVector->length(); idxTblVec++){
G4ProcTblElement* anElement = (*procTblVector)(idxTblVec);
G4ProcTableVector::iterator itr;
// loop over all elements
for (itr=procTblVector->begin(); itr!=procTblVector->end(); ++itr) {
G4ProcTblElement* anElement = (*itr);
procList->insert( anElement->GetProcess() );
}
return procList;
@@ -437,10 +430,11 @@ void G4ProcessTable::SetProcessActivation( const G4String& processName,
#endif
G4ProcTableVector* pTblVector = Find(fProcTblVector, processName);
G4int idxTblVec;
G4ProcTableVector::iterator itr;
G4ProcTblElement* anElement;
for ( idxTblVec = 0; idxTblVec < pTblVector->length(); idxTblVec++){
anElement = (*pTblVector)(idxTblVec);
// loop over all elements
for (itr=pTblVector->begin(); itr!=pTblVector->end(); ++itr) {
anElement = (*itr);
G4VProcess* process = anElement->GetProcess();
for (G4int idx = 0 ; idx < anElement->Length(); idx++) {
G4ProcessManager* manager = anElement->GetProcessManager(idx);
@@ -494,10 +488,11 @@ void G4ProcessTable::SetProcessActivation( G4ProcessType processType,
#endif
G4ProcTableVector* pTblVector = Find(fProcTblVector, processType);
G4int idxTblVec;
G4ProcTableVector::iterator itr;
G4ProcTblElement* anElement;
for ( idxTblVec = 0; idxTblVec < pTblVector->length(); idxTblVec++){
anElement = (*pTblVector)(idxTblVec);
// loop over all elements
for (itr=pTblVector->begin(); itr!=pTblVector->end(); ++itr) {
anElement = (*itr);
G4VProcess* process = anElement->GetProcess();
#ifdef G4VERBOSE
if (verboseLevel>1){
@@ -551,19 +546,17 @@ void G4ProcessTable::SetProcessActivation(
void G4ProcessTable::DumpInfo(G4VProcess* process,
G4ParticleDefinition* particle)
{
G4int idxTbl;
G4ProcTableVector::iterator itr;
G4int idxTbl=0;
G4ProcTblElement* anElement;
G4bool isFoundInTbl = false;
G4ProcessManager* manager;
G4int idx;
// loop over all elements
for (idxTbl =0; idxTbl <fProcTblVector->length(); idxTbl++){
anElement = (*fProcTblVector)(idxTbl);
for (itr=fProcTblVector->begin(); itr!=fProcTblVector->end(); ++itr, ++idxTbl) {
anElement = (*itr);
if (process == anElement->GetProcess() ){
if (particle==0) {
isFoundInTbl = true;
break;
} else {
if (particle!=0) {
for (idx=0; idx<anElement->Length(); idx++){
manager = anElement->GetProcessManager(idx);
if (particle == manager->GetParticleType()) {
@@ -571,7 +564,10 @@ void G4ProcessTable::DumpInfo(G4VProcess* process,
break;
}
}
} else {
isFoundInTbl = true;
}
break;
}
}
if (!isFoundInTbl ) return;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ProcessTableMessenger.cc,v 1.3.6.1.2.1.2.5 1999/12/14 09:16:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4ProcessTableMessenger.cc,v 1.7 2000/03/02 01:16:06 kurasige Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//---------------------------------------------------------------
@@ -20,6 +20,8 @@
//
// History:
// 15 Aug. 1998, H. Kurashige
// Use STL vector instead of RW vector 1. Mar 00 H.Kurashige
//
//---------------------------------------------------------------
#include "G4ProcessTableMessenger.hh"
@@ -161,12 +163,14 @@ void G4ProcessTableMessenger::SetNewValue(G4UIcommand * command,G4String newValu
}
}
G4int counter = 0;
for (idx = 0; idx < procNameVector->length(); idx++) {
G4String name = (*procNameVector)(idx);
tmpVector = theProcessTable->FindProcesses(name);
idx =0;
G4ProcessTable::G4ProcNameVector::iterator itr;
for (itr=procNameVector->begin(); itr!=procNameVector->end(); ++itr) {
idx +=1;
tmpVector = theProcessTable->FindProcesses(*itr);
if ( (type <0) || ( ((*tmpVector)(0)->GetProcessType()) == type) ) {
if ( counter%4 != 0) G4cout << ",";
G4cout << G4std::setw(19) << name;
G4cout << G4std::setw(19) <<*itr;
if ((counter++)%4 == 3) {
G4cout << G4endl;
}
@@ -188,10 +192,15 @@ void G4ProcessTableMessenger::SetNewValue(G4UIcommand * command,G4String newValu
currentProcessName = G4String(next());
G4bool isNameFound = false;
G4bool isProcName = false;
if ( procNameVector->contains(currentProcessName) ){
isNameFound = true;
isProcName = true;
} else {
G4ProcessTable::G4ProcNameVector::iterator itr;
for (itr=procNameVector->begin(); itr!=procNameVector->end(); ++itr) {
if ( (*itr) == currentProcessName ) {
isNameFound = true;
isProcName = true;
break;
}
}
if (!isProcName) {
type = GetProcessType(currentProcessName);
if (type >=0) {
isNameFound = true;
@@ -301,8 +310,9 @@ G4String G4ProcessTableMessenger::GetCurrentValue(G4UIcommand * command)
// process name
param = command->GetParameter(0);
candidates = "";
for (idx = 0; idx < procNameVector->length() ; idx ++ ) {
candidates += " " + (*procNameVector)(idx);
G4ProcessTable::G4ProcNameVector::iterator itr;
for (itr=procNameVector->begin(); itr!=procNameVector->end(); ++itr) {
candidates += " " + (*itr);
}
param->SetParameterCandidates((const char*)(candidates));
// particle name
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VContinuousDiscreteProcess.cc,v 1.1.10.1 1999/12/07 20:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VContinuousDiscreteProcess.cc,v 1.2 1999/12/15 14:53:43 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// --------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VContinuousProcess.cc,v 1.1.10.1 1999/12/07 20:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VContinuousProcess.cc,v 1.2 1999/12/15 14:53:43 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// --------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VDiscreteProcess.cc,v 1.1.10.1 1999/12/07 20:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VDiscreteProcess.cc,v 1.2 1999/12/15 14:53:44 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// --------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VProcess.cc,v 1.3.8.1.2.1 1999/12/08 17:35:13 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VProcess.cc,v 1.4 1999/12/15 14:53:44 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// --------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRestContinuousDiscreteProcess.cc,v 1.1.10.1 1999/12/07 20:52:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VRestContinuousDiscreteProcess.cc,v 1.2 1999/12/15 14:53:44 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// --------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRestContinuousProcess.cc,v 1.1.10.1 1999/12/07 20:52:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VRestContinuousProcess.cc,v 1.2 1999/12/15 14:53:44 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// --------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRestDiscreteProcess.cc,v 1.1.10.1 1999/12/07 20:52:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VRestDiscreteProcess.cc,v 1.2 1999/12/15 14:53:44 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// --------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRestProcess.cc,v 1.1.10.1 1999/12/07 20:52:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VRestProcess.cc,v 1.2 1999/12/15 14:53:44 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// --------------------------------------------------------------