Geant4  10.02
G4ProcessTable.icc
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 // $Id: G4ProcessTable.icc 71231 2013-06-12 13:06:28Z gcosmo $
28 //
29 // History:
30 // Use STL vector instead of RW vector 1. Mar 00 H.Kurashige
31 //
32 #include "G4ParticleTable.hh"
33 
34 //////////////////////////
35 inline
36  void G4ProcessTable::SetVerboseLevel(G4int value)
37 {
38  verboseLevel = value;
39 }
40 
41 //////////////////////////
42 inline
43  G4int G4ProcessTable::GetVerboseLevel() const
44 {
45  return verboseLevel;
46 }
47 
48 //////////////////////////
49 inline
50  G4int G4ProcessTable::Length() const
51 {
52  return fProcTblVector->size();
53 }
54 
55 //////////////////////////
56 inline
57  G4ProcessTable::G4ProcNameVector* G4ProcessTable::GetNameList()
58 {
59  return fProcNameVector;
60 }
61 
62 //////////////////////////
63 inline
64  G4ProcessTable::G4ProcTableVector* G4ProcessTable::GetProcTableVector()
65 {
66  return fProcTblVector;
67 }
68 
69 
70 //////////////////////////
71 inline
72  G4VProcess* G4ProcessTable::FindProcess(const G4String& processName,
73  const G4ParticleDefinition* particle)
74  const
75 {
76  if ( particle == 0 ) return 0;
77  else return FindProcess(processName, particle->GetProcessManager());
78 }
79 
80 //////////////////////////
81 inline
82  G4VProcess* G4ProcessTable::FindProcess(const G4String& processName,
83  const G4String& particleName) const
84 {
85  return FindProcess(processName,
86  G4ParticleTable::GetParticleTable()->FindParticle(particleName));
87 }
88 
89 
90 //////////////////////////
91 inline
92  void G4ProcessTable::SetProcessActivation(
93  const G4String& processName,
94  G4ParticleDefinition* particle,
95  G4bool fActive)
96 {
97  if ( particle != 0 ) {
98  SetProcessActivation(processName, particle->GetProcessManager(), fActive);
99  }
100 }
101 //////////////////////////
102 inline
103  void G4ProcessTable::SetProcessActivation(
104  const G4String& processName,
105  const G4String& particleName,
106  G4bool fActive )
107 {
108  if (particleName == "ALL" ) {
109  SetProcessActivation( processName , fActive);
110  } else {
111  SetProcessActivation(
112  processName,
113  G4ParticleTable::GetParticleTable()->FindParticle(particleName),
114  fActive );
115  }
116 }
117 
118 //////////////////////////
119 inline
120  void G4ProcessTable::SetProcessActivation(
121  G4ProcessType processType,
122  G4ParticleDefinition* particle,
123  G4bool fActive)
124 {
125  if ( particle != 0 ) {
126  SetProcessActivation( processType, particle->GetProcessManager(), fActive);
127  }
128 }
129 
130 //////////////////////////
131 inline
132  void G4ProcessTable::SetProcessActivation(
133  G4ProcessType processType,
134  const G4String& particleName ,
135  G4bool fActive)
136 {
137  if ((particleName == "ALL" )||(particleName == "all" )) {
138  SetProcessActivation( processType, fActive );
139  } else {
140  SetProcessActivation(
141  processType,
142  G4ParticleTable::GetParticleTable()->FindParticle(particleName),
143  fActive );
144  }
145 }
146