thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.1.4
ThePEG::HandlerGroup< HDLR > Class Template Reference

HandlerGroup is a templated utility class to manage a group of StepHandlers. More...

#include <HandlerGroup.h>

Inheritance diagram for ThePEG::HandlerGroup< HDLR >:

Public Types

typedef Ptr< HDLR >::pointer HdlPtr
 A pointer to the template argument class. More...
 
typedef Ptr< HDLR >::transient_pointer tHdlPtr
 A transient pointer to the template argument class. More...
 
- Public Types inherited from ThePEG::HandlerGroupBase
typedef pair< StepHdlPtr, HintPtrStepWithHint
 Associate a StepHandler with a Hint object. More...
 
typedef vector< StepHdlPtrStepVector
 A vector of StepHandler objects. More...
 
typedef vector< StepWithHintStepHintVector
 A vector of StepHandler objects associated with Hint objects. More...
 
typedef deque< HintPtrHintVector
 A vector of Hint objects. More...
 

Public Member Functions

virtual ~HandlerGroup ()
 Destructor.
 
virtual bool setHandler (tStepHdlPtr, const HandlerGroupBase &ext)
 Set the current main handler. More...
 
virtual void setHandler ()
 Unset the current main handler.
 
virtual tStepHdlPtr handler () const
 Return a pointer to the current main handler.
 
virtual tStepHdlPtr defaultHandler () const
 Return a pointer to the default main handler.
 
virtual void refillDefaultHandler (tStepHdlPtr)
 Set the current main handler. More...
 
virtual void clear ()
 Clear all current handlers, but don't touch the default ones.
 
virtual string handlerClass () const
 Return the base class name of the main handler type.
 
void interfaceSetHandler (HdlPtr)
 Utility function used for the interface.
 
HdlPtr interfaceGetHandler () const
 Utility function used for the interface.
 
virtual void write (PersistentOStream &os) const
 Write to persistent streams.
 
virtual void read (PersistentIStream &is)
 Read from persistent streams.
 
- Public Member Functions inherited from ThePEG::HandlerGroupBase
 HandlerGroupBase ()
 Default constructor.
 
virtual ~HandlerGroupBase ()
 Destructor.
 
bool empty () const
 Returns true if current selections in this group is empty.
 
void init (const HandlerGroupBase &ext)
 Initialize, taking the default StepHandlers as the current ones, possibly overridden by the default ones in the auxilliary group supplied in the argument.
 
StepWithHint next ()
 Return the next step;.
 
void addPreHandler (tStepHdlPtr sh, tHintPtr hint, const HandlerGroupBase &ext)
 Add a step handler, sh to the current list of pre-handlers. More...
 
void addPostHandler (tStepHdlPtr sh, tHintPtr hint, const HandlerGroupBase &)
 Add a step handler, sh, to the current list of post-handlers. More...
 
void addHint (tHintPtr hint, const HandlerGroupBase &ext)
 Add a hint to the currently selected main handler. More...
 
StepVectorpreHandlers ()
 Return a reference to the list of default pre-handlers.
 
const StepVectorpreHandlers () const
 Return a reference to the list of default pre-handlers.
 
StepVectorpostHandlers ()
 Return a reference to the list of default post-handlers.
 
const StepVectorpostHandlers () const
 Return a reference to the list of default post-handlers.
 
void refillDefaults (const HandlerGroupBase &)
 Fill main, pre- and post- handlers with the default ones. More...
 
void interfaceSetPrehandler (StepHdlPtr p, int i)
 Utility function used for the interface.
 
void interfaceInsertPrehandler (StepHdlPtr p, int i)
 Utility function used for the interface.
 
void interfaceErasePrehandler (int i)
 Utility function used for the interface.
 
vector< StepHdlPtrinterfaceGetPrehandlers () const
 Utility function used for the interface.
 
void interfaceSetPosthandler (StepHdlPtr p, int i)
 Utility function used for the interface.
 
void interfaceInsertPosthandler (StepHdlPtr p, int i)
 Utility function used for the interface.
 
void interfaceErasePosthandler (int i)
 Utility function used for the interface.
 
vector< StepHdlPtrinterfaceGetPosthandlers () const
 Utility function used for the interface.
 

Private Member Functions

HandlerGroup< HDLR > & operator= (const HandlerGroup< HDLR > &)
 Assignment is private.
 

Private Attributes

HdlPtr theDefaultHandler
 The default main handler.
 
HdlPtr theHandler
 The current main handler.
 

Additional Inherited Members

- Protected Member Functions inherited from ThePEG::HandlerGroupBase
 HandlerGroupBase (const HandlerGroupBase &)
 The copy constructor is only used via subclasses.
 
- Protected Attributes inherited from ThePEG::HandlerGroupBase
bool isEmpty
 True if the current handlers are empty.
 
StepVector theDefaultPreHandlers
 The default pre-handlers with hints.
 
StepVector theDefaultPostHandlers
 The default post-handlers with hints.
 
StepHintVector thePreHandlers
 The current pre-handlers with hints.
 
HintVector theHints
 The current hints for the main handler.
 
StepHintVector thePostHandlers
 The current post-handlers with hints.
 

Detailed Description

template<typename HDLR>
class ThePEG::HandlerGroup< HDLR >

HandlerGroup is a templated utility class to manage a group of StepHandlers.

All HandlerGroup classes are derived from the HandlerGroupBase class. As an example the specialization HandlerGroup<CascadeHandler> keeps a CascadeHandler object and associated pre- and post- StepHandlers, defining shich steps should be performed before the perturbative cascade, which object should be used for the cascade and which steps should be performed after.

The HandlerGroup keesp both a default main handler and the corresponding default pre- and post- handlers as well as the main handler and pre/post hadlers chosen for the current event. The current handlers are accompanied by Hints. Handlers which are copied from the default ones are accompanied by the default Hint, while handlers supplied from the outside may be accompanied by any kind of hint. The main handler can be supplied with several hints, the pre- and post- handlers may only have one hint each.

The HandlerGroup class is used in the EventHandler and SubProcessHandler to manage the post-sub-process handler, the cascade, multiple interaction, hadronization and decay handler groups.

See also
EventHandler
SubProcessHandler
StepHandler
CascadeHandler
MultipleInteractionHandler
HadronizationHandler
DecayHandler

Definition at line 321 of file HandlerGroup.h.

Member Typedef Documentation

◆ HdlPtr

template<typename HDLR>
typedef Ptr<HDLR>::pointer ThePEG::HandlerGroup< HDLR >::HdlPtr

A pointer to the template argument class.

Definition at line 326 of file HandlerGroup.h.

◆ tHdlPtr

template<typename HDLR>
typedef Ptr<HDLR>::transient_pointer ThePEG::HandlerGroup< HDLR >::tHdlPtr

A transient pointer to the template argument class.

Definition at line 329 of file HandlerGroup.h.

Member Function Documentation

◆ refillDefaultHandler()

template<typename HDLR>
virtual void ThePEG::HandlerGroup< HDLR >::refillDefaultHandler ( tStepHdlPtr  )
virtual

Set the current main handler.

If the null pointer use the default main handler.

Implements ThePEG::HandlerGroupBase.

◆ setHandler()

template<typename HDLR>
virtual bool ThePEG::HandlerGroup< HDLR >::setHandler ( tStepHdlPtr  ,
const HandlerGroupBase ext 
)
virtual

Set the current main handler.

Also refill the current pre- and post- handlers with the defaults from ext.

Implements ThePEG::HandlerGroupBase.


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