Import Geant4 2.0.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ShortLivedTable.hh,v 1.7.2.1 1999/12/07 20:49:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4ShortLivedTable.hh,v 1.9 2000/02/25 07:36:15 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -26,12 +26,7 @@
|
||||
#include "globals.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
|
||||
#ifdef G4USE_STL
|
||||
#include "g4std/vector"
|
||||
#else
|
||||
#include "g4rw/tpordvec.h"
|
||||
#endif
|
||||
|
||||
class G4ParticleTable;
|
||||
|
||||
@@ -43,13 +38,8 @@ class G4ShortLivedTable
|
||||
//
|
||||
|
||||
public:
|
||||
#ifdef G4USE_STL
|
||||
// Use STL Vector as list of shortlives
|
||||
typedef G4std::vector<G4ParticleDefinition*> G4ShortLivedList;
|
||||
#else
|
||||
// Use G4RWTPtrOrderedVector as list of shortlives
|
||||
typedef G4RWTPtrOrderedVector<G4ParticleDefinition> G4ShortLivedList;
|
||||
#endif
|
||||
|
||||
public:
|
||||
G4ShortLivedTable();
|
||||
@@ -57,7 +47,7 @@ class G4ShortLivedTable
|
||||
protected:
|
||||
G4ShortLivedTable(const G4ShortLivedTable &right);
|
||||
|
||||
public:
|
||||
public: // With Description
|
||||
virtual ~G4ShortLivedTable();
|
||||
|
||||
G4bool IsShortLived(G4ParticleDefinition*) const;
|
||||
@@ -82,28 +72,21 @@ class G4ShortLivedTable
|
||||
|
||||
inline G4bool G4ShortLivedTable::Contains(const G4ParticleDefinition* particle) const
|
||||
{
|
||||
#ifdef G4USE_STL
|
||||
G4ShortLivedList::iterator i;
|
||||
for (i = fShortLivedList->begin(); i!= fShortLivedList->end(); ++i) {
|
||||
if (**i==*particle) return true;
|
||||
}
|
||||
return false;
|
||||
#else
|
||||
return fShortLivedList->contains(particle);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline G4int G4ShortLivedTable::Entries() const
|
||||
{
|
||||
#ifdef G4USE_STL
|
||||
return fShortLivedList->size();
|
||||
#else
|
||||
return fShortLivedList->entries();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
inline G4ParticleDefinition* G4ShortLivedTable::GetParticle(G4int index) const
|
||||
inline
|
||||
G4ParticleDefinition* G4ShortLivedTable::GetParticle(G4int index) const
|
||||
{
|
||||
if ( (index >=0 ) && (index < Entries()) ) {
|
||||
return (*fShortLivedList)[index];
|
||||
|
||||
Reference in New Issue
Block a user