thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
Handlers
StepHandler.h
1
// -*- C++ -*-
2
//
3
// StepHandler.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2019 Leif Lonnblad
5
//
6
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef ThePEG_StepHandler_H
10
#define ThePEG_StepHandler_H
11
// This is the declaration of the StepHandler class.
12
13
#include "
ThePEG/Config/ThePEG.h
"
14
#include "ThePEG/Utilities/Exception.fh"
15
#include "ThePEG/Handlers/HandlerBase.h"
16
#include <stdexcept>
17
18
namespace
ThePEG
{
19
41
class
StepHandler
:
public
HandlerBase
{
42
43
public
:
44
50
virtual
~StepHandler
();
52
53
public
:
54
71
virtual
void
handle
(
EventHandler
& eh,
const
tPVector
& tagged,
72
const
Hint
& hint) = 0;
74
81
tEHPtr
eventHandler
()
const
{
return
theEventHandler
; }
82
87
void
eventHandler
(
tEHPtr
);
88
93
tStepPtr
newStep
() {
94
if
( !
theNewStep
)
createNewStep
();
95
return
theNewStep
;
96
}
97
102
tStepPtr
currentStep
() {
103
if
(
theNewStep
)
return
theNewStep
;
104
return
theCurrentStep
;
105
}
107
108
public
:
109
113
static
void
Init
();
114
115
protected
:
116
120
void
createNewStep
();
121
122
private
:
123
128
tEHPtr
theEventHandler
;
129
133
tStepPtr
theNewStep
;
134
139
tStepPtr
theCurrentStep
;
140
141
private
:
142
146
static
AbstractNoPIOClassDescription<StepHandler>
initStepHandler
;
147
151
StepHandler
&
operator=
(
const
StepHandler
&) =
delete
;
152
153
};
154
161
template
<>
162
struct
BaseClassTrait
<
StepHandler
,1>:
public
ClassTraitsType
{
164
typedef
HandlerBase
NthBase
;
165
};
166
171
template
<>
172
struct
ClassTraits<StepHandler>:
public
ClassTraitsBase<StepHandler> {
174
static
string
className
() {
return
"ThePEG::StepHandler"
; }
175
};
176
179
}
180
181
#endif
/* ThePEG_StepHandler_H */
ThePEG.h
This is the main config header file for ThePEG.
ThePEG::AbstractNoPIOClassDescription
A concreate implementation of ClassDescriptionBase describing an abstract class without persistent da...
Definition:
ClassDescription.h:417
ThePEG::EventHandler
The EventHandler is the base class used to implement event handlers in ThePEG.
Definition:
EventHandler.h:63
ThePEG::HandlerBase
HandlerBase is an abstract base class derived from the Interfaced class via the HandlerBaseT class ad...
Definition:
HandlerBase.h:151
ThePEG::Hint
Hint is a base class to be used to pass information between StepHandler s, which cannot be convayed t...
Definition:
Hint.h:48
ThePEG::Pointer::TransientRCPtr
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition:
RCPtr.h:519
ThePEG::StepHandler
StepHandler is the base class for implementing any model for a step in the event generation chain.
Definition:
StepHandler.h:41
ThePEG::StepHandler::operator=
StepHandler & operator=(const StepHandler &)=delete
Private and non-existent assignment operator.
ThePEG::StepHandler::eventHandler
void eventHandler(tEHPtr)
Set a pointer to the EventHandler which made the last call to handle().
ThePEG::StepHandler::theNewStep
tStepPtr theNewStep
A pointer to a new step if created in the last call to handle().
Definition:
StepHandler.h:133
ThePEG::StepHandler::theCurrentStep
tStepPtr theCurrentStep
A pointer to the current step.
Definition:
StepHandler.h:139
ThePEG::StepHandler::createNewStep
void createNewStep()
Use the collision handler to create a new step.
ThePEG::StepHandler::~StepHandler
virtual ~StepHandler()
The destructor.
ThePEG::StepHandler::currentStep
tStepPtr currentStep()
If a new step has been created, return it, otherwise return the current step from the eventHandler().
Definition:
StepHandler.h:102
ThePEG::StepHandler::eventHandler
tEHPtr eventHandler() const
Get a pointer to the EventHandler which made the last call to handle().
Definition:
StepHandler.h:81
ThePEG::StepHandler::theEventHandler
tEHPtr theEventHandler
A pointer to the (partial) collision handler which made the current call to handle().
Definition:
StepHandler.h:128
ThePEG::StepHandler::newStep
tStepPtr newStep()
Return a pointer to a new step.
Definition:
StepHandler.h:93
ThePEG::StepHandler::Init
static void Init()
Standard Init function used to initialize the interface.
ThePEG::StepHandler::handle
virtual void handle(EventHandler &eh, const tPVector &tagged, const Hint &hint)=0
The main function called by the EventHandler class to perform a step.
ThePEG::StepHandler::initStepHandler
static AbstractNoPIOClassDescription< StepHandler > initStepHandler
Describe an abstract class without persistent data.
Definition:
StepHandler.h:146
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::tPVector
vector< tPPtr > tPVector
A vector of transient pointers to Particle objects.
Definition:
Containers.h:82
ThePEG::BaseClassTrait
BaseClassTraits describes the base classes of the templated class.
Definition:
ClassTraits.h:156
ThePEG::BaseClassTrait::NthBase
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition:
ClassTraits.h:161
ThePEG::ClassTraitsBase::className
static string className()
Return the name of class T.
Definition:
ClassTraits.h:66
ThePEG::ClassTraitsType
ClassTraitsType is an empty, non-polymorphic, base class.
Definition:
ClassTraits.h:30
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6