Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

 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

Definition at line 64 of file G4VParticlePropertyReporter.hh.

Constructor & Destructor Documentation

G4VParticlePropertyReporter::G4VParticlePropertyReporter ( )
G4VParticlePropertyReporter::~G4VParticlePropertyReporter ( )
virtual

Member Function Documentation

void G4VParticlePropertyReporter::Clear ( )
virtual

Definition at line 86 of file G4VParticlePropertyReporter.cc.

References pList.

87 {
88  pList.clear();
89 }
G4bool G4VParticlePropertyReporter::FillList ( G4String  name)
virtual

Definition at line 54 of file G4VParticlePropertyReporter.cc.

References G4ParticleTable::GetIterator(), G4ParticlePropertyTable::GetParticleProperty(), G4ParticleTable::GetParticleTable(), G4ParticleDefinition::GetParticleType(), pList, pPropertyTable, G4ParticleTableIterator< K, V >::reset(), theParticleIterator, and G4ParticleTableIterator< K, V >::value().

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
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 }
G4ParticlePropertyTable * pPropertyTable
G4ParticlePropertyData * GetParticleProperty(const G4String &aParticleName)
void reset(G4bool ifSkipIon=true)
bool G4bool
Definition: G4Types.hh:79
const G4String & GetParticleType() const
static G4ParticleTable * GetParticleTable()
G4PTblDicIterator * GetIterator() const
#define theParticleIterator
const G4PPDContainer& G4VParticlePropertyReporter::GetList ( ) const
inline

Definition at line 77 of file G4VParticlePropertyReporter.hh.

References pList.

77 {return pList;}
G4int G4VParticlePropertyReporter::operator!= ( const G4VParticlePropertyReporter right) const
inline

Definition at line 60 of file G4VParticlePropertyReporter.hh.

61  { return (this != &right); }
G4int G4VParticlePropertyReporter::operator== ( const G4VParticlePropertyReporter right) const
inline

Definition at line 57 of file G4VParticlePropertyReporter.hh.

58  { return (this == &right); }
virtual void G4VParticlePropertyReporter::Print ( const G4String option)
pure virtual

Field Documentation

G4PPDContainer G4VParticlePropertyReporter::pList
protected
G4ParticlePropertyTable* G4VParticlePropertyReporter::pPropertyTable
protected

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