Geant4 9.6.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 ()
 
G4int operator== (const G4VParticlePropertyReporter &right) const
 
G4int 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 46 of file G4VParticlePropertyReporter.hh.

Member Typedef Documentation

◆ G4PPDContainer

Constructor & Destructor Documentation

◆ G4VParticlePropertyReporter()

G4VParticlePropertyReporter::G4VParticlePropertyReporter ( )

Definition at line 41 of file G4VParticlePropertyReporter.cc.

◆ ~G4VParticlePropertyReporter()

G4VParticlePropertyReporter::~G4VParticlePropertyReporter ( )
virtual

Member Function Documentation

◆ Clear()

void G4VParticlePropertyReporter::Clear ( )
virtual

Definition at line 86 of file G4VParticlePropertyReporter.cc.

87{
88 pList.clear();
89}

◆ FillList()

G4bool G4VParticlePropertyReporter::FillList ( G4String  name)
virtual

Definition at line 54 of file G4VParticlePropertyReporter.cc.

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

◆ GetList()

const G4PPDContainer & G4VParticlePropertyReporter::GetList ( ) const
inline

Definition at line 77 of file G4VParticlePropertyReporter.hh.

77{return pList;}

◆ operator!=()

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

Definition at line 60 of file G4VParticlePropertyReporter.hh.

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

◆ operator==()

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

Definition at line 57 of file G4VParticlePropertyReporter.hh.

58 { 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: