thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
Handlers
Hint.h
1
// -*- C++ -*-
2
//
3
// Hint.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_Hint_H
10
#define ThePEG_Hint_H
11
// This is the declaration of the Hint class.
12
13
#include "
ThePEG/Config/ThePEG.h
"
14
#include "ThePEG/Utilities/ClassDescription.h"
15
16
namespace
ThePEG
{
17
48
class
Hint
:
public
Base
{
49
50
public
:
51
57
Hint
() :
theScale
(
Energy2
()),
theStopFlag
(false) {}
59
60
public
:
61
65
bool
tagged
()
const
{
return
!
theTagged
.empty(); }
66
73
tPVector
tagged
(
const
Step
& s)
const
;
74
78
template
<
typename
InputIterator>
79
void
tag
(InputIterator first, InputIterator last)
80
{
81
theTagged
.insert(
theTagged
.end(), first, last);
82
}
83
87
void
tag
(
tPPtr
p) {
if
(p)
theTagged
.push_back(p); }
88
92
void
stop
(
bool
newStopFlag)
93
{
94
theStopFlag
= newStopFlag;
95
if
(
theStopFlag
)
theTagged
.clear();
96
}
97
101
bool
stop
()
const
{
return
theStopFlag
; }
102
106
void
scale
(
const
Scale
& newScale) {
theScale
= newScale; }
110
const
Scale
&
scale
()
const
{
return
theScale
; }
111
115
static
tHintPtr
Default
() {
return
tHintPtr
(&
theDefaultHint
); }
116
117
public
:
118
125
void
persistentOutput
(
PersistentOStream
& os)
const
;
126
132
void
persistentInput
(
PersistentIStream
& is,
int
version);
134
138
static
void
Init
();
139
140
private
:
141
145
tPVector
theTagged
;
146
150
Scale
theScale
;
151
155
bool
theStopFlag
;
156
160
static
Hint
theDefaultHint
;
161
162
private
:
163
167
static
ClassDescription<Hint>
initHint
;
168
172
Hint
&
operator=
(
const
Hint
& h) =
delete
;
173
174
};
175
176
183
template
<>
184
struct
BaseClassTrait
<
Hint
,1>:
public
ClassTraitsType
{
186
typedef
Base
NthBase
;
187
};
188
193
template
<>
194
struct
ClassTraits<Hint>:
195
public
ClassTraitsBase<Hint> {
197
static
string
className
() {
return
"ThePEG::Hint"
; }
198
};
199
202
}
203
204
#endif
/* ThePEG_Hint_H */
ThePEG.h
This is the main config header file for ThePEG.
ThePEG::ClassDescription
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
Definition:
ClassDescription.h:333
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::Hint::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ThePEG::Hint::theDefaultHint
static Hint theDefaultHint
The default hint.
Definition:
Hint.h:160
ThePEG::Hint::Default
static tHintPtr Default()
Return a pointer to the default hint.
Definition:
Hint.h:115
ThePEG::Hint::stop
bool stop() const
Get the stop hint.
Definition:
Hint.h:101
ThePEG::Hint::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ThePEG::Hint::tag
void tag(tPPtr p)
Add a particle to the list of tagged particles.
Definition:
Hint.h:87
ThePEG::Hint::theTagged
tPVector theTagged
The vector of tagged particles.
Definition:
Hint.h:145
ThePEG::Hint::scale
const Scale & scale() const
Get the scale.
Definition:
Hint.h:110
ThePEG::Hint::initHint
static ClassDescription< Hint > initHint
Describe a concrete class with persistent data.
Definition:
Hint.h:167
ThePEG::Hint::Init
static void Init()
Standard Init function used to initialize the interface.
ThePEG::Hint::tagged
tPVector tagged(const Step &s) const
Return a list of pointers to particles to be handled.
ThePEG::Hint::scale
void scale(const Scale &newScale)
Set the scale.
Definition:
Hint.h:106
ThePEG::Hint::operator=
Hint & operator=(const Hint &h)=delete
Assignment is private and non-existing.
ThePEG::Hint::Hint
Hint()
Default constructor.
Definition:
Hint.h:57
ThePEG::Hint::tag
void tag(InputIterator first, InputIterator last)
Add a range of particles to the list of tagged particles.
Definition:
Hint.h:79
ThePEG::Hint::tagged
bool tagged() const
Return true if there are tagged particles in the hint.
Definition:
Hint.h:65
ThePEG::Hint::theScale
Scale theScale
The scale.
Definition:
Hint.h:150
ThePEG::Hint::stop
void stop(bool newStopFlag)
Set the stop hint.
Definition:
Hint.h:92
ThePEG::Hint::theStopFlag
bool theStopFlag
The stop hint.
Definition:
Hint.h:155
ThePEG::PersistentIStream
PersistentIStream is used to read persistent objects from a stream where they were previously written...
Definition:
PersistentIStream.h:48
ThePEG::PersistentOStream
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
Definition:
PersistentOStream.h:51
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::Qty< 0, 2, 0 >
ThePEG::Step
The Step class contains information of all particles present after certain step in the event generati...
Definition:
Step.h:34
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::tHintPtr
ThePEG::Ptr< Hint >::transient_pointer tHintPtr
Alias for a transient pointer to Hint .
Definition:
Pointers.h:71
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::Base
Define the base class from which all (polymorphic) classes in ThePEG are derived.
Definition:
ThePEG.h:54
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