Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VUserChemistryList Class Referenceabstract

#include <G4VUserChemistryList.hh>

Inheritance diagram for G4VUserChemistryList:

Public Member Functions

 G4VUserChemistryList (bool flag=true)
 
virtual ~G4VUserChemistryList ()
 
bool IsPhysicsConstructor ()
 
void ThisIsAPhysicsConstructor (bool flag=true)
 
virtual void ConstructMolecule ()
 
virtual void ConstructProcess ()
 
virtual void ConstructDissociationChannels ()
 
virtual void ConstructReactionTable (G4DNAMolecularReactionTable *reactionTable)=0
 
virtual void ConstructTimeStepModel (G4DNAMolecularReactionTable *reactionTable)=0
 
void BuildPhysicsTable ()
 

Protected Member Functions

void RegisterTimeStepModel (G4VITStepModel *timeStepModel, double startingTime=0)
 
void BuildPhysicsTable (G4MoleculeDefinition *)
 

Protected Attributes

int verboseLevel
 
bool fIsPhysicsConstructor
 

Detailed Description

Definition at line 53 of file G4VUserChemistryList.hh.

Constructor & Destructor Documentation

G4VUserChemistryList::G4VUserChemistryList ( bool  flag = true)

Definition at line 41 of file G4VUserChemistryList.cc.

41  :
43 {
44  verboseLevel = 1;
45 }
G4VUserChemistryList::~G4VUserChemistryList ( )
virtual

Definition at line 47 of file G4VUserChemistryList.cc.

48 {
50  if (chemMan)
51  {
52  chemMan->Deregister(this);
53  }
54 }
void Deregister(G4VUserChemistryList *)
static G4DNAChemistryManager * GetInstanceIfExists()

Here is the call graph for this function:

Member Function Documentation

void G4VUserChemistryList::BuildPhysicsTable ( )

Definition at line 62 of file G4VUserChemistryList.cc.

63 {
64  G4MoleculeTable* theMoleculeTable = G4MoleculeTable::Instance();
65 
67  theMoleculeTable->GetDefintionIterator();
68 
69  iterator.reset();
70  while (iterator())
71  {
72  G4MoleculeDefinition* moleculeDef = iterator.value();
73  BuildPhysicsTable(moleculeDef);
74  }
75 }
static G4MoleculeTable * Instance()
G4MoleculeDefinitionIterator GetDefintionIterator()

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VUserChemistryList::BuildPhysicsTable ( G4MoleculeDefinition moleculeDef)
protected

Definition at line 77 of file G4VUserChemistryList.cc.

78 {
79  //Get processes from master thread;
80  G4ProcessManager* pManager = moleculeDef->GetProcessManager();
81 
82  if (!pManager)
83  {
84 #ifdef G4VERBOSE
85  if (verboseLevel > 0)
86  {
87  G4cout << "G4VUserPhysicsList::BuildPhysicsTable "
88  << " : No Process Manager for " << moleculeDef->GetParticleName()
89  << G4endl;
90  G4cout << moleculeDef->GetParticleName()
91  << " should be created in your PhysicsList" <<G4endl;
92  }
93 #endif
94  G4Exception("G4VUserChemistryList::BuildPhysicsTable",
95  "Run0271", FatalException,
96  "No process manager");
97  return;
98  }
99 
100  G4ProcessManager* pManagerShadow = moleculeDef->GetMasterProcessManager();
101  G4ProcessVector* pVector = pManager->GetProcessList();
102  if (!pVector)
103  {
104 #ifdef G4VERBOSE
105  if (verboseLevel > 0)
106  {
107  G4cout << "G4VUserChemistryList::BuildPhysicsTable "
108  << " : No Process Vector for " << moleculeDef->GetParticleName()
109  << G4endl;
110  }
111 #endif
112  G4Exception("G4VUserChemistryList::BuildPhysicsTable",
113  "Run0272", FatalException,
114  "No process Vector");
115  return;
116  }
117 #ifdef G4VERBOSE
118  if (verboseLevel > 2)
119  {
120  G4cout << "G4VUserChemistryList::BuildPhysicsTable %%%%%% "
121  << moleculeDef->GetParticleName() << G4endl;
122  G4cout << " ProcessManager : " << pManager
123  << " ProcessManagerShadow : " << pManagerShadow << G4endl;
124  for(G4int iv1=0;iv1<pVector->size();iv1++)
125  {
126  G4cout << " " << iv1 << " - " << (*pVector)[iv1]->GetProcessName()
127  << G4endl;
128  }
129  G4cout << "--------------------------------------------------------------"
130  << G4endl;
131  G4ProcessVector* pVectorShadow = pManagerShadow->GetProcessList();
132 
133  for(G4int iv2=0;iv2<pVectorShadow->size();iv2++)
134  {
135  G4cout << " " << iv2 << " - " << (*pVectorShadow)[iv2]->GetProcessName()
136  << G4endl;
137  }
138  }
139 #endif
140  for (G4int j = 0; j < pVector->size(); ++j)
141  {
142  //Andrea July 16th 2013 : migration to new interface...
143  //Infer if we are in a worker thread or master thread
144  //Master thread is the one in which the process manager
145  // and process manager shadow pointers are the same
146  if (pManagerShadow == pManager)
147  {
148  (*pVector)[j]->BuildPhysicsTable(*moleculeDef);
149  }
150  else
151  {
152  (*pVector)[j]->BuildWorkerPhysicsTable(*moleculeDef);
153  }
154 
155  }
156 }
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetMasterProcessManager() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4int size() const
G4ProcessManager * GetProcessManager() const
#define G4endl
Definition: G4ios.hh:61
G4ProcessVector * GetProcessList() const

Here is the call graph for this function:

virtual void G4VUserChemistryList::ConstructDissociationChannels ( )
inlinevirtual

Reimplemented in G4EmDNAChemistry.

Definition at line 85 of file G4VUserChemistryList.hh.

86  {
87  ;
88  }

Here is the caller graph for this function:

virtual void G4VUserChemistryList::ConstructMolecule ( )
inlinevirtual

Reimplemented in G4EmDNAChemistry.

Definition at line 74 of file G4VUserChemistryList.hh.

75  {
76  ;
77  } // PhysicsList::ConstructParticle
virtual void G4VUserChemistryList::ConstructProcess ( void  )
inlinevirtual

Reimplemented in G4EmDNAChemistry.

Definition at line 78 of file G4VUserChemistryList.hh.

79  {
80  ;
81  } // PhysicsList::ConstructProcess
virtual void G4VUserChemistryList::ConstructReactionTable ( G4DNAMolecularReactionTable reactionTable)
pure virtual

Implemented in G4EmDNAChemistry.

Here is the caller graph for this function:

virtual void G4VUserChemistryList::ConstructTimeStepModel ( G4DNAMolecularReactionTable reactionTable)
pure virtual

Implemented in G4EmDNAChemistry.

Here is the caller graph for this function:

bool G4VUserChemistryList::IsPhysicsConstructor ( )
inline

Definition at line 61 of file G4VUserChemistryList.hh.

62  {
63  return fIsPhysicsConstructor;
64  }

Here is the caller graph for this function:

void G4VUserChemistryList::RegisterTimeStepModel ( G4VITStepModel timeStepModel,
double  startingTime = 0 
)
protected

Definition at line 56 of file G4VUserChemistryList.cc.

58 {
59  G4VScheduler::Instance()->RegisterModel(timeStepModel, startingTime);
60 }
static G4VScheduler * Instance()
Definition: G4VScheduler.cc:48
virtual void RegisterModel(G4VITStepModel *, double)
Definition: G4VScheduler.hh:69

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VUserChemistryList::ThisIsAPhysicsConstructor ( bool  flag = true)
inline

Definition at line 66 of file G4VUserChemistryList.hh.

67  {
68  fIsPhysicsConstructor = flag;
69  }

Member Data Documentation

bool G4VUserChemistryList::fIsPhysicsConstructor
protected

Definition at line 100 of file G4VUserChemistryList.hh.

int G4VUserChemistryList::verboseLevel
protected

Definition at line 99 of file G4VUserChemistryList.hh.


The documentation for this class was generated from the following files: