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 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/management/include/G4ProcessTable.hh (Version 11.3.0) and /processes/management/include/G4ProcessTable.hh (Version 8.2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // G4ProcessTable                              <<  26 
                                                   >>  27 //
                                                   >>  28 // $Id: G4ProcessTable.hh,v 1.10 2006/06/29 21:07:32 gunter Exp $
                                                   >>  29 // GEANT4 tag $Name: geant4-08-02 $
                                                   >>  30 //
                                                   >>  31 // 
                                                   >>  32 // ------------------------------------------------------------
                                                   >>  33 //  GEANT 4 class header file 
 27 //                                                 34 //
 28 // Class description:                          <<  35 //  History: first implementation, based on object model of
                                                   >>  36 //  4th Aug 1998, H.Kurashige
 29 //                                                 37 //
 30 // This class is used for "book keeping" of al <<  38 // Class Description
 31 // which are registered for all particles      <<  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 // ------------------------------------------------------------
 32                                                    47 
 33 // Author: H.Kurashige, 4 August 1998          <<  48 #ifndef G4ProcessTable_h
 34 // ------------------------------------------- <<  49 #define G4ProcessTable_h 1
 35 #ifndef G4ProcessTable_hh                      << 
 36 #define G4ProcessTable_hh 1                    << 
 37                                                    50 
                                                   >>  51 #include "globals.hh"
                                                   >>  52 #include "G4ios.hh"
 38 #include <vector>                                  53 #include <vector>
 39                                                    54 
 40 #include "globals.hh"                          << 
 41 #include "G4ProcTblElement.hh"                     55 #include "G4ProcTblElement.hh"
 42 #include "G4ProcessVector.hh"                      56 #include "G4ProcessVector.hh"
 43 #include "G4ThreadLocalSingleton.hh"           << 
 44                                                << 
 45 class G4UImessenger;                               57 class G4UImessenger;
 46 class G4ProcessTableMessenger;                     58 class G4ProcessTableMessenger;
 47                                                    59 
 48 class G4ProcessTable                               60 class G4ProcessTable
 49 {                                                  61 {
 50   friend class G4ThreadLocalSingleton<G4Proces <<  62  public:
 51                                                <<  63   G4ProcessTable();
 52   public:                                      <<  64   //  Constructors
 53                                                <<  65   
 54     using G4ProcTableVector = std::vector<G4Pr <<  66   ~G4ProcessTable();
 55     using G4ProcNameVector = std::vector<G4Str <<  67   //  Destructor
 56                                                <<  68   
 57     ~G4ProcessTable();                         <<  69  private:
 58       // Destructor                            <<  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
 59                                                    76   
 60     G4ProcessTable(const G4ProcessTable&) = de << 
 61     G4ProcessTable& operator=(const G4ProcessT << 
 62     G4bool operator==(const G4ProcessTable &ri << 
 63     G4bool operator!=(const G4ProcessTable &ri << 
 64       // Copy constructor and operators not al << 
 65                                                << 
 66     static G4ProcessTable* GetProcessTable();  << 
 67       // Return the pointer to the G4ProcessTa << 
 68       // As "singleton" one can get the instan << 
 69                                                << 
 70     inline G4int Length() const;               << 
 71       // Return the number of processes in the << 
 72                                                << 
 73     G4int Insert(G4VProcess* aProcess, G4Proce << 
 74     G4int Remove(G4VProcess* aProcess, G4Proce << 
 75       // Each process object is registered wit << 
 76       // managers that use it                  << 
 77                                                << 
 78     G4VProcess* FindProcess(const G4String& pr << 
 79                             const G4String& pa << 
 80     inline G4VProcess* FindProcess(const G4Str << 
 81                                    const G4Par << 
 82     G4VProcess* FindProcess(const G4String& pr << 
 83                             const G4ProcessMan << 
 84     G4VProcess* FindProcess(G4ProcessType proc << 
 85                             const G4ParticleDe << 
 86     G4VProcess* FindProcess(G4int processSubTy << 
 87                             const G4ParticleDe << 
 88       // Return the process pointer            << 
 89                                                << 
 90     void RegisterProcess(G4VProcess*);         << 
 91     void DeRegisterProcess(G4VProcess*);       << 
 92       // Implementation of registration mechan << 
 93                                                << 
 94     inline G4ProcessVector* FindProcesses();   << 
 95     inline G4ProcessVector* FindProcesses( con << 
 96     inline G4ProcessVector* FindProcesses( con << 
 97     inline G4ProcessVector* FindProcesses( G4P << 
 98       // Return pointer of a process vector wh << 
 99       // Note: user is responsible to delete t << 
100                                                << 
101     void SetProcessActivation( const G4String& << 
102                                G4bool          << 
103     void SetProcessActivation( const G4String& << 
104                                const G4String& << 
105                                G4bool          << 
106     inline void SetProcessActivation( const G4 << 
107                                       const G4 << 
108                                       G4bool   << 
109     void SetProcessActivation( const G4String& << 
110                                G4ProcessManage << 
111                                G4bool          << 
112     void SetProcessActivation( G4ProcessType   << 
113                                G4bool          << 
114     void SetProcessActivation( G4ProcessType   << 
115                                const G4String& << 
116                                G4bool          << 
117     inline void SetProcessActivation( G4Proces << 
118                                       const G4 << 
119                                       G4bool   << 
120     void SetProcessActivation( G4ProcessType   << 
121                                G4ProcessManage << 
122                                G4bool          << 
123       // These methods are provided to activat << 
124                                                << 
125     inline G4ProcNameVector* GetNameList();    << 
126       // Return pointer of the list of process << 
127                                                << 
128     inline G4ProcTableVector* GetProcTableVect << 
129       // Return pointer of the vector of G4Pro << 
130                                                << 
131     void DumpInfo(G4VProcess* process,         << 
132                   const G4ParticleDefinition*  << 
133       // Dump out information of the process t << 
134       // is used to specify processes designat << 
135                                                << 
136     inline void  SetVerboseLevel(G4int value); << 
137     inline G4int GetVerboseLevel() const;      << 
138       // Set/Get control flag for output messa << 
139       //  0: Silent                            << 
140       //  1: Warning message                   << 
141       //  2: More                              << 
142                                                << 
143   private:                                     << 
144                                                << 
145     G4ProcessTable();                          << 
146       // Private default constructor           << 
147                                                << 
148     G4ProcTableVector* Find(const G4String& pr << 
149     G4ProcTableVector* Find(G4ProcessType   pr << 
150       // Return pointer of a ProcTableVector w << 
151       // ProcTbleElement specified             << 
152                                                << 
153     G4ProcessVector* ExtractProcesses(G4ProcTa << 
154       // Extract all process objects from the  << 
155                                                    77  
156   private:                                     <<  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
157                                                   139 
158     static G4ThreadLocal G4ProcessTable* fProc << 140   G4ProcTableVector* GetProcTableVector();
159     G4ProcessTableMessenger* fProcTblMessenger << 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
160                                                   150 
161     G4ProcTableVector* fProcTblVector = nullpt << 151   G4ProcessVector*   ExtractProcesses( G4ProcTableVector* procTableVector);
162     G4ProcNameVector* fProcNameVector = nullpt << 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
163                                                   164   
164     G4ProcTableVector* tmpTblVector = nullptr; << 165  public: // with description
165       // Used only internally as temporary buf << 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.
166                                                   185 
167     std::vector<G4VProcess*> fListProcesses;   << 186  private:
168       // Used for registration of process inst << 187    G4int verboseLevel;
                                                   >> 188    // controle flag for output message
169                                                   189 
170     G4int verboseLevel = 1;                    << 
171       // Control flag for output message       << 
172 };                                                190 };
173                                                   191 
174 #include "G4ProcessTable.icc"                     192 #include "G4ProcessTable.icc"
175                                                << 
176 #endif                                            193 #endif
177                                                   194