Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VParticlePropertyReporter Class Referenceabstract

#include <G4VParticlePropertyReporter.hh>

+ Inheritance diagram for G4VParticlePropertyReporter:

Public Types

typedef std::vector< G4ParticlePropertyData * > G4PPDContainer
 

Public Member Functions

 G4VParticlePropertyReporter ()
 
virtual ~G4VParticlePropertyReporter ()
 
G4bool operator== (const G4VParticlePropertyReporter &right) const
 
G4bool operator!= (const G4VParticlePropertyReporter &right) const
 
virtual G4bool FillList (G4String name)
 
virtual void Clear ()
 
virtual void Print (const G4String &option)=0
 
const G4PPDContainerGetList () const
 

Protected Attributes

G4PPDContainer pList
 
G4ParticlePropertyTablepPropertyTable
 

Detailed Description

Definition at line 45 of file G4VParticlePropertyReporter.hh.

Member Typedef Documentation

◆ G4PPDContainer

Constructor & Destructor Documentation

◆ G4VParticlePropertyReporter()

G4VParticlePropertyReporter::G4VParticlePropertyReporter ( )

Definition at line 40 of file G4VParticlePropertyReporter.cc.

◆ ~G4VParticlePropertyReporter()

G4VParticlePropertyReporter::~G4VParticlePropertyReporter ( )
virtual

Member Function Documentation

◆ Clear()

void G4VParticlePropertyReporter::Clear ( )
virtual

Definition at line 85 of file G4VParticlePropertyReporter.cc.

86{
87 pList.clear();
88}

◆ FillList()

G4bool G4VParticlePropertyReporter::FillList ( G4String  name)
virtual

Definition at line 53 of file G4VParticlePropertyReporter.cc.

54{
56 G4bool result = false;
57 if (pData != 0) {
58 //the particle exists
59 pList.push_back(pData);
60 result = true;
61 } else {
62 // pointer to the particle table
65 theParticleIterator = theParticleTable->GetIterator();
66
67 // loop over all particles in G4ParticleTable
68 theParticleIterator->reset();
69 while( (*theParticleIterator)() ){ // Loop checking, 09.08.2015, K.Kurashige
70 G4ParticleDefinition* particle = theParticleIterator->value();
71 G4String type = particle->GetParticleType();
72 pData =pPropertyTable->GetParticleProperty(particle);
73 if ( name == "all" ) {
74 pList.push_back(pData);
75 result = true;
76 } else if ( name == type ) {
77 pList.push_back(pData);
78 result = true;
79 }
80 }
81 }
82 return result;
83}
bool G4bool
Definition: G4Types.hh:86
#define theParticleIterator
const G4String & GetParticleType() const
G4ParticlePropertyData * GetParticleProperty(const G4String &aParticleName)
G4PTblDicIterator * GetIterator() const
static G4ParticleTable * GetParticleTable()

◆ GetList()

const G4PPDContainer & G4VParticlePropertyReporter::GetList ( ) const
inline

Definition at line 76 of file G4VParticlePropertyReporter.hh.

76{return pList;}

◆ operator!=()

G4bool G4VParticlePropertyReporter::operator!= ( const G4VParticlePropertyReporter right) const
inline

Definition at line 59 of file G4VParticlePropertyReporter.hh.

60 { return (this != &right); }

◆ operator==()

G4bool G4VParticlePropertyReporter::operator== ( const G4VParticlePropertyReporter right) const
inline

Definition at line 56 of file G4VParticlePropertyReporter.hh.

57 { return (this == &right); }

◆ Print()

virtual void G4VParticlePropertyReporter::Print ( const G4String option)
pure virtual

Member Data Documentation

◆ pList

◆ pPropertyTable

G4ParticlePropertyTable* G4VParticlePropertyReporter::pPropertyTable
protected

The documentation for this class was generated from the following files: