Geant4 11.2.2
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

using G4PPDContainer = std::vector<G4ParticlePropertyData*>
 

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 35 of file G4VParticlePropertyReporter.hh.

Member Typedef Documentation

◆ G4PPDContainer

Constructor & Destructor Documentation

◆ G4VParticlePropertyReporter()

G4VParticlePropertyReporter::G4VParticlePropertyReporter ( )

Definition at line 31 of file G4VParticlePropertyReporter.cc.

◆ ~G4VParticlePropertyReporter()

G4VParticlePropertyReporter::~G4VParticlePropertyReporter ( )
virtual

Member Function Documentation

◆ Clear()

void G4VParticlePropertyReporter::Clear ( )
virtual

Definition at line 76 of file G4VParticlePropertyReporter.cc.

77{
78 pList.clear();
79}

◆ FillList()

G4bool G4VParticlePropertyReporter::FillList ( G4String name)
virtual

Definition at line 42 of file G4VParticlePropertyReporter.cc.

43{
45 G4bool result = false;
46 if (pData != nullptr) {
47 // the particle exists
48 pList.push_back(pData);
49 result = true;
50 }
51 else {
52 // pointer to the particle table
55 theParticleIterator = theParticleTable->GetIterator();
56
57 // loop over all particles in G4ParticleTable
59 while ((*theParticleIterator)()) { // Loop checking, 09.08.2015, K.Kurashige
60 G4ParticleDefinition* particle = theParticleIterator->value();
61 G4String type = particle->GetParticleType();
62 pData = pPropertyTable->GetParticleProperty(particle);
63 if (name == "all") {
64 pList.push_back(pData);
65 result = true;
66 }
67 else if (name == type) {
68 pList.push_back(pData);
69 result = true;
70 }
71 }
72 }
73 return result;
74}
bool G4bool
Definition G4Types.hh:86
#define theParticleIterator
const G4String & GetParticleType() const
G4ParticlePropertyData * GetParticleProperty(const G4String &aParticleName)
void reset(G4bool ifSkipIon=true)
G4PTblDicIterator * GetIterator() const
static G4ParticleTable * GetParticleTable()

◆ GetList()

const G4PPDContainer & G4VParticlePropertyReporter::GetList ( ) const
inline

Definition at line 62 of file G4VParticlePropertyReporter.hh.

62{ return pList; }

◆ operator!=()

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

Definition at line 50 of file G4VParticlePropertyReporter.hh.

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

◆ operator==()

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

Definition at line 48 of file G4VParticlePropertyReporter.hh.

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