thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
Repository
Strategy.h
1
// -*- C++ -*-
2
//
3
// Strategy.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_Strategy_H
10
#define ThePEG_Strategy_H
11
// This is the declaration of the Strategy class.
12
13
#include "
ThePEG/Config/ThePEG.h
"
14
#include "Strategy.fh"
15
#include "ThePEG/Interface/Interfaced.h"
16
17
namespace
ThePEG
{
18
41
class
Strategy
:
public
Interfaced
{
42
43
public
:
44
50
const
ParticleMap &
particles
()
const
{
return
theParticles
; }
51
59
string
localParticlesDir
()
const
;
60
69
const
vector<string> &
defaultParticlesDirs
()
const
{
70
return
theDefaultParticlesDirs
;
71
}
72
76
const
vector<IPtr> &
defaultObjects
()
const
{
return
theDefaultObjects
; }
78
83
virtual
const
string
versionstring
()
const
{
return
""
; }
84
85
public
:
86
93
void
persistentOutput
(
PersistentOStream
& os)
const
;
94
100
void
persistentInput
(
PersistentIStream
& is,
int
version);
102
106
static
void
Init
();
107
108
protected
:
109
116
virtual
IBPtr
clone
()
const
;
117
122
virtual
IBPtr
fullclone
()
const
;
124
125
private
:
126
130
ParticleMap &
particles
() {
return
theParticles
; }
131
132
private
:
133
137
ParticleMap
theParticles
;
138
146
string
theLocalParticlesDir
;
147
151
vector<IPtr>
theDefaultObjects
;
152
162
vector<string>
theDefaultParticlesDirs
;
163
164
private
:
165
169
void
setLocalParticles
(
PDPtr
pd,
int
);
170
174
void
insLocalParticles
(
PDPtr
pd,
int
);
175
179
void
delLocalParticles
(
int
place);
180
184
vector<PDPtr>
getLocalParticles
()
const
;
185
189
void
setLocalParticlesDir
(
string
);
190
194
void
setDefaultParticlesDirs
(
string
,
int
);
195
199
void
insDefaultParticlesDirs
(
string
,
int
);
200
204
static
bool
checkDir
(
string
);
205
206
private
:
207
211
static
ClassDescription<Strategy>
initStrategy
;
212
216
Strategy
&
operator=
(
const
Strategy
&) =
delete
;
217
218
};
219
224
template
<>
225
struct
BaseClassTrait
<
Strategy
,1>:
public
ClassTraitsType
{
227
typedef
Interfaced
NthBase
;
228
};
229
232
template
<>
233
struct
ClassTraits<Strategy>:
public
ClassTraitsBase<Strategy> {
235
static
string
className
() {
return
"ThePEG::Strategy"
; }
236
};
237
240
}
241
242
#endif
/* ThePEG_Strategy_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::Interfaced
The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to...
Definition:
Interfaced.h:38
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::RCPtr
RCPtr is a reference counted (smart) pointer.
Definition:
RCPtr.h:60
ThePEG::Strategy
The Strategy class represents a general strategy to be assigned to an EventGenerator.
Definition:
Strategy.h:41
ThePEG::Strategy::theDefaultParticlesDirs
vector< string > theDefaultParticlesDirs
By default all particles in the Repository are included in a run, although only one particle per PDG ...
Definition:
Strategy.h:162
ThePEG::Strategy::setLocalParticlesDir
void setLocalParticlesDir(string)
Utility function used by the interface.
ThePEG::Strategy::particles
ParticleMap & particles()
Return the map of local particles.
Definition:
Strategy.h:130
ThePEG::Strategy::insLocalParticles
void insLocalParticles(PDPtr pd, int)
Utility function used by the interface.
ThePEG::Strategy::versionstring
virtual const string versionstring() const
Return a freeform version string.
Definition:
Strategy.h:83
ThePEG::Strategy::defaultObjects
const vector< IPtr > & defaultObjects() const
Return the vector of default objects.
Definition:
Strategy.h:76
ThePEG::Strategy::setDefaultParticlesDirs
void setDefaultParticlesDirs(string, int)
Utility function used by the interface.
ThePEG::Strategy::particles
const ParticleMap & particles() const
Return the map of local particles indexed by their PDG id number.
Definition:
Strategy.h:50
ThePEG::Strategy::localParticlesDir
string localParticlesDir() const
A directory in the repository which will be scanned for particles which will be included as default p...
ThePEG::Strategy::checkDir
static bool checkDir(string)
Utility function used by the interface.
ThePEG::Strategy::operator=
Strategy & operator=(const Strategy &)=delete
Private and non-existent assignment operator.
ThePEG::Strategy::theDefaultObjects
vector< IPtr > theDefaultObjects
A vector of default objects.
Definition:
Strategy.h:151
ThePEG::Strategy::getLocalParticles
vector< PDPtr > getLocalParticles() const
Utility function used by the interface.
ThePEG::Strategy::theParticles
ParticleMap theParticles
the map of default particles.
Definition:
Strategy.h:137
ThePEG::Strategy::setLocalParticles
void setLocalParticles(PDPtr pd, int)
Utility function used by the interface.
ThePEG::Strategy::initStrategy
static ClassDescription< Strategy > initStrategy
Describe a concrete class with persistent data.
Definition:
Strategy.h:211
ThePEG::Strategy::defaultParticlesDirs
const vector< string > & defaultParticlesDirs() const
By default all particles in the Repository are included in a run, although only one particle per PDG ...
Definition:
Strategy.h:69
ThePEG::Strategy::Init
static void Init()
Standard Init function used to initialize the interface.
ThePEG::Strategy::theLocalParticlesDir
string theLocalParticlesDir
A directory in the repository which will be scanned for particles which will be included as default p...
Definition:
Strategy.h:146
ThePEG::Strategy::delLocalParticles
void delLocalParticles(int place)
Utility function used by the interface.
ThePEG::Strategy::clone
virtual IBPtr clone() const
Make a simple clone of this object.
ThePEG::Strategy::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ThePEG::Strategy::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ThePEG::Strategy::insDefaultParticlesDirs
void insDefaultParticlesDirs(string, int)
Utility function used by the interface.
ThePEG::Strategy::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
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