Geant4-11
Public Types | Public Member Functions | Protected Attributes
G4VParticlePropertyReporter Class Referenceabstract

#include <G4VParticlePropertyReporter.hh>

Inheritance diagram for G4VParticlePropertyReporter:
G4HtmlPPReporter G4SimplePPReporter G4TextPPReporter

Public Types

typedef std::vector< G4ParticlePropertyData * > G4PPDContainer
 

Public Member Functions

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

Protected Attributes

G4PPDContainer pList
 
G4ParticlePropertyTablepPropertyTable
 

Detailed Description

Definition at line 45 of file G4VParticlePropertyReporter.hh.

Member Typedef Documentation

◆ G4PPDContainer

Definition at line 63 of file G4VParticlePropertyReporter.hh.

Constructor & Destructor Documentation

◆ G4VParticlePropertyReporter()

G4VParticlePropertyReporter::G4VParticlePropertyReporter ( )

◆ ~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}

References pList.

◆ 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()
const char * name(G4int ptype)

References G4ParticleTable::GetIterator(), G4ParticlePropertyTable::GetParticleProperty(), G4ParticleTable::GetParticleTable(), G4ParticleDefinition::GetParticleType(), G4InuclParticleNames::name(), pList, pPropertyTable, and theParticleIterator.

◆ GetList()

const G4PPDContainer & G4VParticlePropertyReporter::GetList ( ) const
inline

Definition at line 76 of file G4VParticlePropertyReporter.hh.

76{return pList;}

References 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

Field Documentation

◆ pList

G4PPDContainer G4VParticlePropertyReporter::pList
protected

◆ pPropertyTable

G4ParticlePropertyTable* G4VParticlePropertyReporter::pPropertyTable
protected

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