Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ProcessTable.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 
27 //
28 // $Id: G4ProcessTable.hh 71231 2013-06-12 13:06:28Z gcosmo $
29 //
30 //
31 // ------------------------------------------------------------
32 // GEANT 4 class header file
33 //
34 // History: first implementation, based on object model of
35 // 4th Aug 1998, H.Kurashige
36 //
37 // Class Description
38 // This class is used for "book keeping" of all processes
39 // which are registered in all particles
40 //
41 // History:
42 // Added G4ProcessTableMesseneger 16 Aug. 1998, H.Kurashige
43 // Use STL vector instead of RW vector 1. Mar 00 H.Kurashige
44 //
45 // ------------------------------------------------------------
46 
47 #ifndef G4ProcessTable_h
48 #define G4ProcessTable_h 1
49 
50 #include "globals.hh"
51 #include "G4ios.hh"
52 #include <vector>
53 
54 #include "G4ProcTblElement.hh"
55 #include "G4ProcessVector.hh"
56 class G4UImessenger;
58 
60 {
61  public:
63  // Constructors
64 
66  // Destructor
67 
68  private:
70  G4ProcessTable & operator=(const G4ProcessTable &right);
71  // Assignment operator
72  G4int operator==(const G4ProcessTable &right) const;
73  G4int operator!=(const G4ProcessTable &right) const;
74  // equal / unequal operator
75 
76 
77  public: // with description
79  // return the pointer to G4ProcessTable object
80  // G4ProcessTable is a "singleton" and can get its pointer by this function
81 
82  G4int Length() const;
83  // return the number of processes in the table
84 
85  G4int Insert(G4VProcess* aProcess, G4ProcessManager* aProcMgr);
86  G4int Remove(G4VProcess* aProcess, G4ProcessManager* aProcMgr);
87  // insert and remove methods
88  // each process object is registered with information of process managers
89  // that use it.
90 
91  G4VProcess* FindProcess(const G4String& processName,
92  const G4String& particleName) const;
93  G4VProcess* FindProcess(const G4String& processName,
94  const G4ParticleDefinition* particle) const;
95  G4VProcess* FindProcess(const G4String& processName,
96  const G4ProcessManager* processManager) const;
97  // return the process pointer
98 
100  G4ProcessVector* FindProcesses( const G4ProcessManager* processManager );
101  G4ProcessVector* FindProcesses( const G4String& processName );
103  // return pointer of a process vector
104  // which includes processes specified
105  // Note:: User is responsible to delete this process vector object
106 
107  void SetProcessActivation( const G4String& processName,
108  G4bool fActive);
109  void SetProcessActivation( const G4String& processName,
110  const G4String& particleName,
111  G4bool fActive );
112  void SetProcessActivation( const G4String& processName,
113  G4ParticleDefinition* particle,
114  G4bool fActive );
115  void SetProcessActivation( const G4String& processName,
116  G4ProcessManager* processManager,
117  G4bool fActive );
118  void SetProcessActivation( G4ProcessType processType,
119  G4bool fActive );
120  void SetProcessActivation( G4ProcessType processType,
121  const G4String& particleName,
122  G4bool fActive );
123  void SetProcessActivation( G4ProcessType processType,
124  G4ParticleDefinition* particle,
125  G4bool fActive );
126  void SetProcessActivation( G4ProcessType processType,
127  G4ProcessManager* processManager,
128  G4bool fActive );
129  // These methods are provided to activate or inactivate processes
130 
131  public:
132  typedef std::vector<G4ProcTblElement*> G4ProcTableVector;
133  typedef std::vector<G4String> G4ProcNameVector;
134 
135  public: // with description
137  // return pointer of the list of process name
138 
140  // return pointer of the vector of G4ProcTblElement
141 
142  private:
143  G4ProcTableVector* Find( G4ProcTableVector* procTableVector,
144  const G4String& processName );
145  G4ProcTableVector* Find( G4ProcTableVector* procTableVector,
146  G4ProcessType processType );
147  // return pointer of a ProcTableVector
148  // which includes ProcTbleElement specified
149 
150  G4ProcessVector* ExtractProcesses( G4ProcTableVector* procTableVector);
151  // extract all process objects from the process table
152 
153  public: // with description
154  void DumpInfo(G4VProcess* process, G4ParticleDefinition* particle=0);
155  // dump out information of the process table
156  // second argument is used to specify processes designated by a particle
157 
158  public: // with description
160  void DeleteMessenger();
161  // These methods are used by RunManager to let the process table
162  // know the timing of creation/destructuion of messengers
163 
164  public: // with description
166  G4int GetVerboseLevel() const;
167  // Set/Get controle flag for output message
168  // 0: Silent
169  // 1: Warning message
170  // 2: More
171 
172 
173  private:
174  static G4ThreadLocal G4ProcessTable* fProcessTable;
175  G4ProcessTableMessenger* fProcTblMessenger;
176 
177  private:
178  G4ProcTableVector* fProcTblVector;
179  G4ProcNameVector* fProcNameVector;
180  // list of G4ProcTblElement
181 
182  G4ProcTableVector* tmpTblVector;
183  // used only internaly for temporary buffer.
184 
185  private:
186  G4int verboseLevel;
187  // controle flag for output message
188 
189 };
190 
191 #include "G4ProcessTable.icc"
192 #endif
G4int Insert(G4VProcess *aProcess, G4ProcessManager *aProcMgr)
void DumpInfo(G4VProcess *process, G4ParticleDefinition *particle=0)
G4ProcTableVector * GetProcTableVector()
G4UImessenger * CreateMessenger()
G4int Remove(G4VProcess *aProcess, G4ProcessManager *aProcMgr)
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78
void SetProcessActivation(const G4String &processName, G4bool fActive)
const XML_Char int const XML_Char * value
Definition: expat.h:331
void SetVerboseLevel(G4int value)
bool G4bool
Definition: G4Types.hh:79
G4int Length() const
G4ProcNameVector * GetNameList()
G4int GetVerboseLevel() const
std::vector< G4String > G4ProcNameVector
std::vector< G4ProcTblElement * > G4ProcTableVector
G4ProcessVector * FindProcesses()
static G4ProcessTable * GetProcessTable()
G4VProcess * FindProcess(const G4String &processName, const G4String &particleName) const
G4ProcessType