G4ParticlePropertyTable.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 // $Id$
00027 //
00028 // 
00029 // ------------------------------------------------------------
00030 //      GEANT 4 class header file 
00031 //
00032 //      History: 
00033 // ---------------- G4ParticlePropertyTable ----------------
00034 // first implementation by H Kurashige 9 June 2003
00035 // ------------------------------------------------------------
00036 
00037 #ifndef G4ParticlePropertyTable_h
00038 #define G4ParticlePropertyTable_h 1
00039 
00040 #include "globals.hh"
00041 #include "G4ios.hh"
00042 #include <vector>
00043 
00044 #include "G4ParticlePropertyData.hh"
00045 #include "G4ParticleDefinition.hh"
00046 #include "G4ParticleTable.hh"
00047  
00048 class G4ParticlePropertyTable
00049 {
00050   // Class Description
00051   //  This class manages properties of a particle which are 
00052   //  properties in G4ParticlePropertyTable class.
00053   //  This class is a singleton.
00054  
00055  protected: 
00056   // hide default constructor because this class is a singleton  
00057   G4ParticlePropertyTable();
00058   G4ParticlePropertyTable(const G4ParticlePropertyTable &right);
00059       
00060   G4ParticlePropertyTable & operator=(const G4ParticlePropertyTable &right);
00061   
00062  public:
00063   G4int operator==(const G4ParticlePropertyTable &right) const;
00064   G4int operator!=(const G4ParticlePropertyTable &right) const;
00065 
00066  public:
00067   virtual ~G4ParticlePropertyTable();
00068 
00069  public: //With Description
00070   static G4ParticlePropertyTable* GetParticlePropertyTable();
00071    // return the pointer to G4ParticlePropertyTable object
00072    // G4ParticlePropertyTable is a "singleton" and can get its pointer 
00073    // by this function. At the first time of calling this function, 
00074    // the G4ParticleTable object is instantiated 
00075 
00076   G4ParticlePropertyData* GetParticleProperty(const G4String& aParticleName);
00077   G4ParticlePropertyData* GetParticleProperty(const G4ParticleDefinition* aParticle);
00078   // return the pointer to  G4ParticlePropertyData object,
00079   // which contains properties for the particle specified.
00080   // (return 0 if the specified particle does not exist)
00081  
00082   G4bool SetParticleProperty(const G4ParticlePropertyData& newProperty);
00083   // change particle properties for the particle specified.
00084   // return true if properties are sucessfully set 
00085 
00086   void   Clear();
00087   // clear and destroy arrayDataObject
00088 
00089  public:
00090   void  SetVerboseLevel(G4int value);
00091   G4int GetVerboseLevel() const;
00092   // controle flag for output message
00093   //  0: Silent
00094   //  1: Warning message
00095   //  2: More
00096 
00097  protected:
00098   G4ParticleTable* fParticleTable;  
00099   
00100  private:
00101   G4int verboseLevel;
00102   static G4ParticlePropertyTable*  fgParticlePropertyTable;
00103   
00104  protected:
00105   std::vector<G4ParticlePropertyData*> arrayDataObject; 
00106 };
00107 
00108 
00109 #endif
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 

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