#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 G4PPDContainer & | GetList () const |
Protected Attributes | |
G4PPDContainer | pList |
G4ParticlePropertyTable * | pPropertyTable |
Definition at line 46 of file G4VParticlePropertyReporter.hh.
typedef std::vector<G4ParticlePropertyData*> G4VParticlePropertyReporter::G4PPDContainer |
Definition at line 64 of file G4VParticlePropertyReporter.hh.
G4VParticlePropertyReporter::G4VParticlePropertyReporter | ( | ) |
Definition at line 41 of file G4VParticlePropertyReporter.cc.
References G4ParticlePropertyTable::GetParticlePropertyTable(), and pPropertyTable.
00042 { 00043 pPropertyTable = G4ParticlePropertyTable::GetParticlePropertyTable(); 00044 }
G4VParticlePropertyReporter::~G4VParticlePropertyReporter | ( | ) | [virtual] |
Definition at line 47 of file G4VParticlePropertyReporter.cc.
References G4ParticlePropertyTable::Clear(), pList, and pPropertyTable.
00048 { 00049 pList.clear(); 00050 pPropertyTable->Clear(); 00051 }
void G4VParticlePropertyReporter::Clear | ( | ) | [virtual] |
Definition at line 86 of file G4VParticlePropertyReporter.cc.
References pList.
00087 { 00088 pList.clear(); 00089 }
Definition at line 54 of file G4VParticlePropertyReporter.cc.
References G4ParticleTable::GetIterator(), G4ParticlePropertyTable::GetParticleProperty(), G4ParticleTable::GetParticleTable(), G4ParticleDefinition::GetParticleType(), pList, pPropertyTable, G4ParticleTableIterator< K, V >::reset(), and G4ParticleTableIterator< K, V >::value().
00055 { 00056 G4ParticlePropertyData* pData = pPropertyTable->GetParticleProperty(name); 00057 G4bool result = false; 00058 if (pData != 0) { 00059 //the particle exists 00060 pList.push_back(pData); 00061 result = true; 00062 } else { 00063 // pointer to the particle table 00064 G4ParticleTable* theParticleTable = G4ParticleTable::GetParticleTable(); 00065 G4ParticleTable::G4PTblDicIterator* theParticleIterator; 00066 theParticleIterator = theParticleTable->GetIterator(); 00067 00068 // loop over all particles in G4ParticleTable 00069 theParticleIterator->reset(); 00070 while( (*theParticleIterator)() ){ 00071 G4ParticleDefinition* particle = theParticleIterator->value(); 00072 G4String type = particle->GetParticleType(); 00073 pData =pPropertyTable->GetParticleProperty(particle); 00074 if ( name == "all" ) { 00075 pList.push_back(pData); 00076 result = true; 00077 } else if ( name == type ) { 00078 pList.push_back(pData); 00079 result = true; 00080 } 00081 } 00082 } 00083 return result; 00084 }
const G4PPDContainer& G4VParticlePropertyReporter::GetList | ( | ) | const [inline] |
Definition at line 77 of file G4VParticlePropertyReporter.hh.
References pList.
00077 {return pList;}
G4int G4VParticlePropertyReporter::operator!= | ( | const G4VParticlePropertyReporter & | right | ) | const [inline] |
G4int G4VParticlePropertyReporter::operator== | ( | const G4VParticlePropertyReporter & | right | ) | const [inline] |
virtual void G4VParticlePropertyReporter::Print | ( | const G4String & | option | ) | [pure virtual] |
Implemented in G4HtmlPPReporter, G4SimplePPReporter, and G4TextPPReporter.
G4PPDContainer G4VParticlePropertyReporter::pList [protected] |
Definition at line 80 of file G4VParticlePropertyReporter.hh.
Referenced by Clear(), FillList(), GetList(), G4TextPPReporter::Print(), G4SimplePPReporter::Print(), G4HtmlPPReporter::Print(), and ~G4VParticlePropertyReporter().
Definition at line 81 of file G4VParticlePropertyReporter.hh.
Referenced by FillList(), G4VParticlePropertyReporter(), and ~G4VParticlePropertyReporter().