thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
MultiEventGenerator.h
1// -*- C++ -*-
2//
3// MultiEventGenerator.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_MultiEventGenerator_H
10#define ThePEG_MultiEventGenerator_H
11// This is the declaration of the MultiEventGenerator class.
12
13#include "EventGenerator.h"
14
15namespace ThePEG {
16
35
36public:
37
44
50
57 virtual void addTag(string tag);
58
59protected:
60
67 virtual void doGo(long next, long maxevent, bool tics);
69
78 string addInterface(string);
79
85 string addRndInterface(string);
86
90 string addInterface(string, bool rnd);
91
92
98 string removeInterface(string);
100
104 string heading(long, const vector<const InterfaceBase *> &, string) const;
105
112 }
113
114public:
115
116
124
130 void persistentInput(PersistentIStream & is, int version);
132
136 static void Init();
137
138protected:
139
146 virtual IBPtr clone() const;
147
152 virtual IBPtr fullclone() const;
154
155protected:
156
168 virtual void rebind(const TranslationMap & trans);
169
177
178private:
179
181 typedef vector<string> StringVector;
182
187
193
199
203 vector<StringVector> theValues;
204
209
214
220
221private:
222
227
232
233};
234
235
240template <>
243 typedef EventGenerator NthBase;
244};
245
249template <>
250struct ClassTraits<MultiEventGenerator>:
251 public ClassTraitsBase<MultiEventGenerator> {
253 static string className() { return "ThePEG::MultiEventGenerator"; }
257 static string library() { return "MultiEventGenerator.so"; }
258
259};
260
263}
264
265#endif /* ThePEG_MultiEventGenerator_H */
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
The EventGenerator class manages a whole event generator run.
RandomGenerator & random() const
Return a reference to the default RandomGenerator object in this run.
The MultiEventGenerator class is derived from the EventGenerator class and is capable of making sever...
int lastSubrun
If non zero, the last subrun to be considered.
MultiEventGenerator()
Default constructor.
string addRndInterface(string)
Used to add an interface of an object a random value each run.
static void Init()
Standard Init function used to initialize the interfaces.
virtual IVector getReferences()
Return a vector of all pointers to Interfaced objects used in this object.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
StringVector thePosArgs
If the there are positional arguments to theInterfaces these are specified here.
virtual void rebind(const TranslationMap &trans)
Rebind pointer to other Interfaced objects.
virtual ~MultiEventGenerator()
Destructor.
RandomGenerator & randomArg() const
A separate random number generator to be used for generating random parameter values (to ensure repro...
static ClassDescription< MultiEventGenerator > initMultiEventGenerator
Describe a concrete class with persistent data.
virtual void addTag(string tag)
Append a tag to the run name.
string addInterface(string)
Used to add an interface of an object which should be used with a set of different values.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
string heading(long, const vector< const InterfaceBase * > &, string) const
return a header for this sub-run.
RanGenPtr theSeparateRandom
A separate random number generator to be used for generating random parameter values (to ensure repro...
StringVector theInterfaces
The interfaces to be modified for the corresponding objects in theObjects.
string addInterface(string, bool rnd)
Helper function for addInterface(string) and addRndInterface(string).
string removeInterface(string)
Used to remove an interface of an object which should be used with a set of different values.
MultiEventGenerator & operator=(const MultiEventGenerator &)=delete
Private and non-existent assignment operator.
vector< string > StringVector
A vector of character strings.
IVector theObjects
The objects for which there are different interface settings.
vector< StringVector > theValues
The arguments to be used for each of theInterfaces.
virtual void doGo(long next, long maxevent, bool tics)
Run this EventGenerator session.
virtual IBPtr clone() const
Make a simple clone of this object.
int firstSubrun
If non zero, the first subrun to be considered.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
RandomGenerator is an interface to the CLHEP::RandomEngine classes.
Rebinder is a class associating pairs of pointers to objects.
Definition: Rebinder.h:27
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
vector< IBPtr > IVector
A vector of pointers to InterfacedBase objects.
Definition: Containers.h:67
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
static string className()
Return the name of class T.
Definition: ClassTraits.h:66
static string library()
The name of a file containing the dynamic library where the class T is implemented.
Definition: ClassTraits.h:85
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30