source: trunk/source/processes/management/include/G4ProcessTable.hh@ 1126

Last change on this file since 1126 was 1007, checked in by garnier, 17 years ago

update to geant4.9.2

File size: 7.0 KB
RevLine 
[819]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,v 1.10 2006/06/29 21:07:32 gunter Exp $
[1007]29// GEANT4 tag $Name: geant4-09-02 $
[819]30//
31//
32// ------------------------------------------------------------
33// GEANT 4 class header file
34//
35// History: first implementation, based on object model of
36// 4th Aug 1998, H.Kurashige
37//
38// Class Description
39// This class is used for "book keeping" of all processes
40// which are registered in all particles
41//
42// History:
43// Added G4ProcessTableMesseneger 16 Aug. 1998, H.Kurashige
44// Use STL vector instead of RW vector 1. Mar 00 H.Kurashige
45//
46// ------------------------------------------------------------
47
48#ifndef G4ProcessTable_h
49#define G4ProcessTable_h 1
50
51#include "globals.hh"
52#include "G4ios.hh"
53#include <vector>
54
55#include "G4ProcTblElement.hh"
56#include "G4ProcessVector.hh"
57class G4UImessenger;
58class G4ProcessTableMessenger;
59
60class G4ProcessTable
61{
62 public:
63 G4ProcessTable();
64 // Constructors
65
66 ~G4ProcessTable();
67 // Destructor
68
69 private:
70 G4ProcessTable(const G4ProcessTable &right);
71 G4ProcessTable & operator=(const G4ProcessTable &right);
72 // Assignment operator
73 G4int operator==(const G4ProcessTable &right) const;
74 G4int operator!=(const G4ProcessTable &right) const;
75 // equal / unequal operator
76
77
78 public: // with description
79 static G4ProcessTable* GetProcessTable();
80 // return the pointer to G4ProcessTable object
81 // G4ProcessTable is a "singleton" and can get its pointer by this function
82
83 G4int Length() const;
84 // return the number of processes in the table
85
86 G4int Insert(G4VProcess* aProcess, G4ProcessManager* aProcMgr);
87 G4int Remove(G4VProcess* aProcess, G4ProcessManager* aProcMgr);
88 // insert and remove methods
89 // each process object is registered with information of process managers
90 // that use it.
91
92 G4VProcess* FindProcess(const G4String& processName,
93 const G4String& particleName) const;
94 G4VProcess* FindProcess(const G4String& processName,
95 const G4ParticleDefinition* particle) const;
96 G4VProcess* FindProcess(const G4String& processName,
97 const G4ProcessManager* processManager) const;
98 // return the process pointer
99
100 G4ProcessVector* FindProcesses();
101 G4ProcessVector* FindProcesses( const G4ProcessManager* processManager );
102 G4ProcessVector* FindProcesses( const G4String& processName );
103 G4ProcessVector* FindProcesses( G4ProcessType processType );
104 // return pointer of a process vector
105 // which includes processes specified
106 // Note:: User is responsible to delete this process vector object
107
108 void SetProcessActivation( const G4String& processName,
109 G4bool fActive);
110 void SetProcessActivation( const G4String& processName,
111 const G4String& particleName,
112 G4bool fActive );
113 void SetProcessActivation( const G4String& processName,
114 G4ParticleDefinition* particle,
115 G4bool fActive );
116 void SetProcessActivation( const G4String& processName,
117 G4ProcessManager* processManager,
118 G4bool fActive );
119 void SetProcessActivation( G4ProcessType processType,
120 G4bool fActive );
121 void SetProcessActivation( G4ProcessType processType,
122 const G4String& particleName,
123 G4bool fActive );
124 void SetProcessActivation( G4ProcessType processType,
125 G4ParticleDefinition* particle,
126 G4bool fActive );
127 void SetProcessActivation( G4ProcessType processType,
128 G4ProcessManager* processManager,
129 G4bool fActive );
130 // These methods are provided to activate or inactivate processes
131
132 public:
133 typedef std::vector<G4ProcTblElement*> G4ProcTableVector;
134 typedef std::vector<G4String> G4ProcNameVector;
135
136 public: // with description
137 G4ProcNameVector* GetNameList();
138 // return pointer of the list of process name
139
140 G4ProcTableVector* GetProcTableVector();
141 // return pointer of the vector of G4ProcTblElement
142
143 private:
144 G4ProcTableVector* Find( G4ProcTableVector* procTableVector,
145 const G4String& processName );
146 G4ProcTableVector* Find( G4ProcTableVector* procTableVector,
147 G4ProcessType processType );
148 // return pointer of a ProcTableVector
149 // which includes ProcTbleElement specified
150
151 G4ProcessVector* ExtractProcesses( G4ProcTableVector* procTableVector);
152 // extract all process objects from the process table
153
154 public: // with description
155 void DumpInfo(G4VProcess* process, G4ParticleDefinition* particle=0);
156 // dump out information of the process table
157 // second argument is used to specify processes designated by a particle
158
159 public: // with description
160 G4UImessenger* CreateMessenger();
161 void DeleteMessenger();
162 // These methods are used by RunManager to let the process table
163 // know the timing of creation/destructuion of messengers
164
165 public: // with description
166 void SetVerboseLevel(G4int value);
167 G4int GetVerboseLevel() const;
168 // Set/Get controle flag for output message
169 // 0: Silent
170 // 1: Warning message
171 // 2: More
172
173
174 private:
175 static G4ProcessTable* fProcessTable;
176 G4ProcessTableMessenger* fProcTblMessenger;
177
178 private:
179 G4ProcTableVector* fProcTblVector;
180 G4ProcNameVector* fProcNameVector;
181 // list of G4ProcTblElement
182
183 G4ProcTableVector* tmpTblVector;
184 // used only internaly for temporary buffer.
185
186 private:
187 G4int verboseLevel;
188 // controle flag for output message
189
190};
191
192#include "G4ProcessTable.icc"
193#endif
Note: See TracBrowser for help on using the repository browser.