Geant4-11
Public Types | Public Member Functions | Protected Attributes
G4SimplePPReporter Class Reference

#include <G4SimplePPReporter.hh>

Inheritance diagram for G4SimplePPReporter:
G4VParticlePropertyReporter

Public Types

typedef std::vector< G4ParticlePropertyData * > G4PPDContainer
 

Public Member Functions

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

Protected Attributes

G4PPDContainer pList
 
G4ParticlePropertyTablepPropertyTable
 

Detailed Description

Definition at line 43 of file G4SimplePPReporter.hh.

Member Typedef Documentation

◆ G4PPDContainer

Definition at line 63 of file G4VParticlePropertyReporter.hh.

Constructor & Destructor Documentation

◆ G4SimplePPReporter()

G4SimplePPReporter::G4SimplePPReporter ( )

◆ ~G4SimplePPReporter()

G4SimplePPReporter::~G4SimplePPReporter ( )
virtual

Definition at line 45 of file G4SimplePPReporter.cc.

46{
47}

Member Function Documentation

◆ Clear()

void G4VParticlePropertyReporter::Clear ( )
virtualinherited

Definition at line 85 of file G4VParticlePropertyReporter.cc.

86{
87 pList.clear();
88}

References G4VParticlePropertyReporter::pList.

◆ FillList()

G4bool G4VParticlePropertyReporter::FillList ( G4String  name)
virtualinherited

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

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

◆ GetList()

const G4PPDContainer & G4VParticlePropertyReporter::GetList ( ) const
inlineinherited

Definition at line 76 of file G4VParticlePropertyReporter.hh.

76{return pList;}

References G4VParticlePropertyReporter::pList.

◆ operator!=()

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

Definition at line 59 of file G4VParticlePropertyReporter.hh.

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

◆ operator==()

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

Definition at line 56 of file G4VParticlePropertyReporter.hh.

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

◆ Print()

void G4SimplePPReporter::Print ( const G4String option = "")
virtual

Implements G4VParticlePropertyReporter.

Definition at line 50 of file G4SimplePPReporter.cc.

51{
52 for (size_t i=0; i<pList.size(); i++){
53 G4ParticlePropertyData* ptr = (pList)[i];
54 ptr->Print();
55 G4cout << G4endl;
56 }
57}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

References G4cout, G4endl, G4VParticlePropertyReporter::pList, and G4ParticlePropertyData::Print().

Field Documentation

◆ pList

G4PPDContainer G4VParticlePropertyReporter::pList
protectedinherited

◆ pPropertyTable

G4ParticlePropertyTable* G4VParticlePropertyReporter::pPropertyTable
protectedinherited

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