G4VParticlePropertyReporter Class Reference

#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

typedef std::vector<G4ParticlePropertyData*> G4VParticlePropertyReporter::G4PPDContainer

Definition at line 64 of file G4VParticlePropertyReporter.hh.


Constructor & Destructor Documentation

G4VParticlePropertyReporter::G4VParticlePropertyReporter (  ) 

Definition at line 41 of file G4VParticlePropertyReporter.cc.

References G4ParticlePropertyTable::GetParticlePropertyTable(), and pPropertyTable.

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 }    


Member Function Documentation

void G4VParticlePropertyReporter::Clear (  )  [virtual]

Definition at line 86 of file G4VParticlePropertyReporter.cc.

References pList.

00087 {
00088   pList.clear();
00089 }

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(), 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]

Definition at line 60 of file G4VParticlePropertyReporter.hh.

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

G4int G4VParticlePropertyReporter::operator== ( const G4VParticlePropertyReporter right  )  const [inline]

Definition at line 57 of file G4VParticlePropertyReporter.hh.

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

virtual void G4VParticlePropertyReporter::Print ( const G4String option  )  [pure virtual]

Implemented in G4HtmlPPReporter, G4SimplePPReporter, and G4TextPPReporter.


Field Documentation

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().

G4ParticlePropertyTable* G4VParticlePropertyReporter::pPropertyTable [protected]

Definition at line 81 of file G4VParticlePropertyReporter.hh.

Referenced by FillList(), G4VParticlePropertyReporter(), and ~G4VParticlePropertyReporter().


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:52 2013 for Geant4 by  doxygen 1.4.7