G4ProcessTable.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 
00027 //
00028 // $Id$
00029 //
00030 // 
00031 // ------------------------------------------------------------
00032 //      GEANT 4 class header file 
00033 //
00034 //      History: first implementation, based on object model of
00035 //      4th Aug 1998, H.Kurashige
00036 //
00037 // Class Description
00038 //  This class is used for "book keeping" of all processes 
00039 //  which are registered in all particles
00040 //
00041 //  History:
00042 //   Added G4ProcessTableMesseneger         16 Aug. 1998, H.Kurashige
00043 //   Use STL vector instead of RW vector    1. Mar 00 H.Kurashige
00044 //
00045 // ------------------------------------------------------------
00046 
00047 #ifndef G4ProcessTable_h
00048 #define G4ProcessTable_h 1
00049 
00050 #include "globals.hh"
00051 #include "G4ios.hh"
00052 #include <vector>
00053 
00054 #include "G4ProcTblElement.hh"
00055 #include "G4ProcessVector.hh"
00056 class G4UImessenger;
00057 class G4ProcessTableMessenger;
00058 
00059 class G4ProcessTable
00060 {
00061  public:
00062   G4ProcessTable();
00063   //  Constructors
00064   
00065   ~G4ProcessTable();
00066   //  Destructor
00067   
00068  private:
00069   G4ProcessTable(const G4ProcessTable &right);
00070   G4ProcessTable & operator=(const G4ProcessTable &right);
00071   // Assignment operator
00072   G4int operator==(const G4ProcessTable &right) const;
00073   G4int operator!=(const G4ProcessTable &right) const;
00074   // equal / unequal operator
00075   
00076  
00077  public: // with description
00078   static G4ProcessTable* GetProcessTable();
00079   // return the pointer to G4ProcessTable object
00080   //   G4ProcessTable is a "singleton" and can get its pointer by this function
00081 
00082   G4int  Length() const;
00083   // return the number of processes in the table
00084 
00085   G4int  Insert(G4VProcess* aProcess, G4ProcessManager* aProcMgr);
00086   G4int  Remove(G4VProcess* aProcess, G4ProcessManager* aProcMgr);  
00087   // insert and remove methods
00088   //  each process object is registered with information of process managers
00089   //  that use it.
00090 
00091   G4VProcess* FindProcess(const G4String& processName, 
00092                           const G4String& particleName) const;
00093   G4VProcess* FindProcess(const G4String& processName, 
00094                           const G4ParticleDefinition* particle) const;
00095   G4VProcess* FindProcess(const G4String& processName, 
00096                           const G4ProcessManager* processManager) const;
00097   // return the process pointer   
00098   
00099   G4ProcessVector* FindProcesses();
00100   G4ProcessVector* FindProcesses( const G4ProcessManager* processManager );
00101   G4ProcessVector* FindProcesses( const G4String& processName );
00102   G4ProcessVector* FindProcesses( G4ProcessType   processType );
00103   // return pointer of a process vector 
00104   //  which includes processes specified
00105   //  Note:: User is responsible to delete this process vector object  
00106 
00107   void SetProcessActivation( const G4String& processName, 
00108                              G4bool          fActive);
00109   void SetProcessActivation( const G4String& processName, 
00110                              const G4String& particleName, 
00111                              G4bool          fActive );
00112   void SetProcessActivation( const G4String& processName, 
00113                              G4ParticleDefinition* particle, 
00114                              G4bool          fActive );
00115   void SetProcessActivation( const G4String& processName, 
00116                              G4ProcessManager* processManager, 
00117                              G4bool          fActive  );
00118   void SetProcessActivation( G4ProcessType   processType, 
00119                              G4bool          fActive  );
00120   void SetProcessActivation( G4ProcessType   processType,
00121                              const G4String& particleName, 
00122                              G4bool          fActive  );
00123   void SetProcessActivation( G4ProcessType   processType,
00124                              G4ParticleDefinition* particle, 
00125                              G4bool          fActive );
00126   void SetProcessActivation( G4ProcessType   processType,
00127                              G4ProcessManager* processManager, 
00128                              G4bool          fActive  );
00129   // These methods are provided to activate or inactivate processes
00130 
00131  public:
00132   typedef std::vector<G4ProcTblElement*>  G4ProcTableVector;
00133   typedef std::vector<G4String> G4ProcNameVector;
00134 
00135  public: // with description
00136   G4ProcNameVector*  GetNameList();
00137   // return pointer of the list of process name
00138 
00139   G4ProcTableVector* GetProcTableVector();
00140   // return pointer of the vector of G4ProcTblElement
00141   
00142  private:
00143   G4ProcTableVector* Find(  G4ProcTableVector* procTableVector,
00144                             const G4String& processName );
00145   G4ProcTableVector* Find(  G4ProcTableVector* procTableVector,
00146                             G4ProcessType   processType );
00147   // return pointer of a ProcTableVector 
00148   //  which includes ProcTbleElement specified
00149 
00150   G4ProcessVector*   ExtractProcesses( G4ProcTableVector* procTableVector);
00151   // extract all process objects from the process table 
00152  
00153  public: // with description
00154   void DumpInfo(G4VProcess* process, G4ParticleDefinition* particle=0);
00155   // dump out information of the process table
00156   //  second argument is used to specify processes designated by a particle 
00157   
00158  public: // with description
00159    G4UImessenger* CreateMessenger();
00160    void           DeleteMessenger();
00161    // These methods are used by RunManager to let the process table
00162    // know the timing of creation/destructuion of  messengers
00163   
00164  public: // with description
00165    void  SetVerboseLevel(G4int value);
00166    G4int GetVerboseLevel() const;
00167    // Set/Get controle flag for output message
00168    //  0: Silent
00169    //  1: Warning message
00170    //  2: More
00171 
00172 
00173  private:
00174   static G4ProcessTable*    fProcessTable;
00175   G4ProcessTableMessenger*   fProcTblMessenger;
00176 
00177  private:
00178   G4ProcTableVector*        fProcTblVector;
00179   G4ProcNameVector*         fProcNameVector;
00180   // list of G4ProcTblElement
00181   
00182   G4ProcTableVector*        tmpTblVector;
00183   // used only internaly for temporary buffer.
00184 
00185  private:
00186    G4int verboseLevel;
00187    // controle flag for output message
00188 
00189 };
00190 
00191 #include "G4ProcessTable.icc"
00192 #endif

Generated on Mon May 27 17:49:26 2013 for Geant4 by  doxygen 1.4.7