Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4INCL::IAvatar Class Referenceabstract

#include <G4INCLIAvatar.hh>

Inheritance diagram for G4INCL::IAvatar:

Public Member Functions

 IAvatar ()
 
 IAvatar (G4double time)
 
virtual ~IAvatar ()
 
virtual G4INCL::IChannelgetChannel ()=0
 
FinalStategetFinalState ()
 
void fillFinalState (FinalState *fs)
 
virtual void preInteraction ()=0
 
virtual void postInteraction (FinalState *)=0
 
G4double getTime () const
 
virtual ParticleList getParticles () const =0
 
virtual std::string dump () const =0
 
AvatarType getType () const
 
G4bool isACollision () const
 
G4bool isADecay () const
 
void setType (AvatarType t)
 
long getID () const
 
std::string toString ()
 

Protected Attributes

G4double theTime
 

Detailed Description

Definition at line 72 of file G4INCLIAvatar.hh.

Constructor & Destructor Documentation

G4INCL::IAvatar::IAvatar ( )

Definition at line 53 of file G4INCLIAvatar.cc.

53  :
54  type(UnknownAvatarType),
55  theTime(0.)
56  {
57  ID = nextID;
58  nextID++;
59  }
G4INCL::IAvatar::IAvatar ( G4double  time)

Definition at line 61 of file G4INCLIAvatar.cc.

61  :
62  type(UnknownAvatarType),
63  theTime(time)
64  {
65  ID = nextID;
66  nextID++;
67  }
G4INCL::IAvatar::~IAvatar ( )
virtual

Definition at line 69 of file G4INCLIAvatar.cc.

69  {
70  INCL_DEBUG("destroying avatar " << this << std::endl);
71  }
#define INCL_DEBUG(x)

Member Function Documentation

virtual std::string G4INCL::IAvatar::dump ( ) const
pure virtual
void G4INCL::IAvatar::fillFinalState ( FinalState fs)

Definition at line 96 of file G4INCLIAvatar.cc.

96  {
97  INCL_DEBUG("Random seeds before preInteraction: " << Random::getSeeds() << '\n');
99  INCL_DEBUG("Random seeds before getChannel: " << Random::getSeeds() << '\n');
100  IChannel *c = getChannel();
101  if( !c )
102  return;
103  INCL_DEBUG("Random seeds before getFinalState: " << Random::getSeeds() << '\n');
104  c->fillFinalState(fs);
105  INCL_DEBUG("Random seeds before postInteraction: " << Random::getSeeds() << '\n');
106  postInteraction(fs);
107  delete c;
108  }
virtual G4INCL::IChannel * getChannel()=0
virtual void postInteraction(FinalState *)=0
virtual void preInteraction()=0
SeedVector getSeeds()
Definition: G4INCLRandom.cc:89
#define INCL_DEBUG(x)
tuple c
Definition: test.py:13

Here is the call graph for this function:

Here is the caller graph for this function:

virtual G4INCL::IChannel* G4INCL::IAvatar::getChannel ( )
pure virtual
FinalState * G4INCL::IAvatar::getFinalState ( )

Definition at line 90 of file G4INCLIAvatar.cc.

90  {
91  FinalState *fs = new FinalState;
92  fillFinalState(fs);
93  return fs;
94  }
void fillFinalState(FinalState *fs)

Here is the call graph for this function:

Here is the caller graph for this function:

long G4INCL::IAvatar::getID ( ) const
inline

Definition at line 94 of file G4INCLIAvatar.hh.

94 { return ID; };

Here is the caller graph for this function:

virtual ParticleList G4INCL::IAvatar::getParticles ( ) const
pure virtual

Implemented in G4INCL::SurfaceAvatar, G4INCL::DecayAvatar, G4INCL::BinaryCollisionAvatar, and G4INCL::ParticleEntryAvatar.

Here is the caller graph for this function:

G4double G4INCL::IAvatar::getTime ( ) const
inline

Definition at line 84 of file G4INCLIAvatar.hh.

84 { return theTime; };

Here is the caller graph for this function:

AvatarType G4INCL::IAvatar::getType ( ) const
inline

Definition at line 90 of file G4INCLIAvatar.hh.

90 { return type; };

Here is the caller graph for this function:

G4bool G4INCL::IAvatar::isACollision ( ) const
inline

Definition at line 91 of file G4INCLIAvatar.hh.

G4bool G4INCL::IAvatar::isADecay ( ) const
inline

Definition at line 92 of file G4INCLIAvatar.hh.

92 { return (type==DecayAvatarType); };
virtual void G4INCL::IAvatar::postInteraction ( FinalState )
pure virtual
virtual void G4INCL::IAvatar::preInteraction ( )
pure virtual
void G4INCL::IAvatar::setType ( AvatarType  t)
inline

Definition at line 93 of file G4INCLIAvatar.hh.

93 { type = t; };

Here is the caller graph for this function:

std::string G4INCL::IAvatar::toString ( )

Definition at line 73 of file G4INCLIAvatar.cc.

73  {
74  std::stringstream entry;
75  std::stringstream particleString;
76  ParticleList const &pl = getParticles();
78  for(ParticleIter i=pl.begin(), e=pl.end(); i!=e; ++i) {
79  numberOfParticles++;
80  particleString << (*i)->getID() << " ";
81  }
82  if(numberOfParticles == 1) particleString << "-1";
83  entry << getID() << " "
84  << getType() << " "
85  << getTime() << " "
86  << particleString.str();
87  return entry.str();
88  }
static int numberOfParticles
int G4int
Definition: G4Types.hh:78
G4double getTime() const
tuple pl
Definition: readPY.py:5
long getID() const
virtual ParticleList getParticles() const =0
AvatarType getType() const
ParticleList::const_iterator ParticleIter

Here is the call graph for this function:

Member Data Documentation

G4double G4INCL::IAvatar::theTime
protected

Definition at line 102 of file G4INCLIAvatar.hh.


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