G4ParticleTable.icc

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 // $Id$
00028 //
00029 // 
00030 // ------------------------------------------------------------
00031 //      implement new version for using STL map instaed of RW PtrHashedDictionary
00032 //                                       28 ct., 99  H.Kurashige
00033 
00034 inline 
00035  const G4ShortLivedTable*  G4ParticleTable::GetShortLivedTable()
00036 {
00037   return fShortLivedTable;
00038 }
00039 
00040 inline 
00041  G4IonTable*  G4ParticleTable::GetIonTable()
00042 {
00043   return fIonTable;
00044 }
00045 
00046 inline  
00047  void G4ParticleTable::SetVerboseLevel(G4int value )
00048 { 
00049   verboseLevel = value; 
00050 }
00051 
00052 inline 
00053  G4int G4ParticleTable::GetVerboseLevel() const 
00054 { 
00055   return verboseLevel; 
00056 }
00057 
00058 inline 
00059  G4ParticleTable::G4PTblDictionary* G4ParticleTable::GetDictionary()
00060 {
00061   return fDictionary;
00062 }
00063 
00064 inline 
00065  G4ParticleTable::G4PTblDicIterator* G4ParticleTable::GetIterator()
00066 {
00067   return fIterator;
00068 }
00069 
00070 inline 
00071  const G4ParticleTable::G4PTblEncodingDictionary* G4ParticleTable::GetEncodingDictionary()
00072 {
00073   return fEncodingDictionary;
00074 }
00075 
00076 inline 
00077  const G4String& G4ParticleTable::GetKey(const G4ParticleDefinition *particle) const
00078 {
00079   return particle->GetParticleName();
00080 }
00081 
00082 inline 
00083  G4ParticleDefinition* G4ParticleTable::FindAntiParticle(G4int aPDGEncoding)
00084 {
00085   return FindParticle( FindParticle(aPDGEncoding)->GetAntiPDGEncoding() );
00086 }
00087 
00088 inline 
00089  G4ParticleDefinition* G4ParticleTable::FindAntiParticle(const G4String& particle_name) 
00090 {
00091   G4int pcode = FindParticle(particle_name) -> GetAntiPDGEncoding();
00092   return FindParticle(pcode);
00093 }
00094 
00095 inline 
00096  G4ParticleDefinition* G4ParticleTable::FindAntiParticle(const G4ParticleDefinition *particle)
00097 {
00098   G4int pcode = particle -> GetAntiPDGEncoding();
00099   return FindParticle(pcode);
00100 }
00101 
00102 inline 
00103  G4bool  G4ParticleTable::contains(const G4String& particle_name)
00104 {
00105   G4PTblDictionary::iterator it =  fDictionary->find(particle_name);
00106   return (it != fDictionary->end());
00107 }
00108 
00109 inline 
00110  G4bool  G4ParticleTable::contains(const G4ParticleDefinition *particle)
00111 {
00112  return contains(GetKey(particle));
00113 }
00114 
00115 inline 
00116  G4int G4ParticleTable::entries() const
00117 {
00118   return fDictionary->size();
00119 }
00120 
00121 inline 
00122  G4int G4ParticleTable::size() const
00123 {
00124   return fDictionary->size();
00125 }
00126 
00127 inline
00128  void G4ParticleTable::SetReadiness(G4bool val)
00129 {
00130   readyToUse = val;
00131 }
00132 
00133 inline
00134  G4bool G4ParticleTable::GetReadiness() const
00135 {
00136   return readyToUse;
00137 }
00138 

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