#include <StepHandler.h>
Public Member Functions | |
Standard constructors and destructors. | |
virtual | ~StepHandler () |
The destructor. | |
Virtual functions to be implemented by concrete sub-classes. | |
virtual void | handle (EventHandler &eh, const tPVector &tagged, const Hint &hint)=0 |
The main function called by the EventHandler class to perform a step. | |
Access to the calling EventHandler and current Step. | |
tEHPtr | eventHandler () const |
Get a pointer to the EventHandler which made the last call to handle(). | |
void | eventHandler (tEHPtr) |
Set a pointer to the EventHandler which made the last call to handle(). | |
tStepPtr | newStep () |
Return a pointer to a new step. | |
tStepPtr | currentStep () |
If a new step has been created, return it, otherwise return the current step from the eventHandler(). | |
Static Public Member Functions | |
static void | Init () |
Standard Init function used to initialize the interface. | |
Protected Member Functions | |
void | createNewStep () |
Use the collision handler to create a new step. | |
Private Member Functions | |
StepHandler & | operator= (const StepHandler &) |
Private and non-existent assignment operator. | |
Private Attributes | |
tEHPtr | theEventHandler |
A pointer to the (partial) collision handler which made the current call to handle(). | |
tStepPtr | theNewStep |
A pointer to a new step if created in the last call to handle(). | |
tStepPtr | theCurrentStep |
A pointer to the current step. | |
Static Private Attributes | |
static AbstractNoPIOClassDescription < StepHandler > | initStepHandler |
Describe an abstract class without persistent data. |
It has one main virtual method, handle(), which should be overridden by sub classes. The handle method is given a reference to a EventHandler, a vector of particles and a Hint as arguments. The handler is only allowed to treat particles which are in the vector. The Hint may be cast dynamically to a sub class and do whatever it wishes with the information found there. The EventHandler can be used to add other StepHandler
s and Hints to modify the subsequent generation. If the StepHandler actually performs some action, the resulting particles should be added to a new Step which should be aquired with the newStep() function.
Definition at line 41 of file StepHandler.h.
virtual void ThePEG::StepHandler::handle | ( | EventHandler & | eh, | |
const tPVector & | tagged, | |||
const Hint & | hint | |||
) | [pure virtual] |
The main function called by the EventHandler class to perform a step.
eh | the EventHandler in charge of the Event generation. | |
tagged | if not empty these are the only particles which should be considered by the StepHandler. | |
hint | a Hint object with possible information from previously performed steps. |
Veto | if the StepHandler requires the current step to be discarded. | |
Stop | if the generation of the current Event should be stopped after this call. | |
Exception | if something goes wrong. |
Implemented in ThePEG::CascadeHandler, ThePEG::ClusterCollapser, and ThePEG::DecayHandler.
tStepPtr ThePEG::StepHandler::newStep | ( | ) | [inline] |
Return a pointer to a new step.
If one has alredy been created in the last call to handle(), that step will be returned.
Definition at line 93 of file StepHandler.h.
References createNewStep(), and theNewStep.
tStepPtr ThePEG::StepHandler::theCurrentStep [private] |
A pointer to the current step.
Is equal to theNewStep if one was created in the current call to handle().
Definition at line 139 of file StepHandler.h.
Referenced by currentStep().