thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.1.5
MultiEventGenerator.h
1 // -*- C++ -*-
2 //
3 // MultiEventGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2017 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 
15 namespace ThePEG {
16 
35 
36 public:
37 
44 
48  virtual ~MultiEventGenerator();
50 
57  virtual void addTag(string tag);
58 
59 protected:
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 
114 public:
115 
116 
123  void persistentOutput(PersistentOStream & os) const;
124 
130  void persistentInput(PersistentIStream & is, int version);
132 
136  static void Init();
137 
138 protected:
139 
146  virtual IBPtr clone() const;
147 
152  virtual IBPtr fullclone() const;
154 
155 protected:
156 
168  virtual void rebind(const TranslationMap & trans);
169 
175  virtual IVector getReferences();
177 
178 private:
179 
181  typedef vector<string> StringVector;
182 
187 
192  StringVector theInterfaces;
193 
198  StringVector thePosArgs;
199 
203  vector<StringVector> theValues;
204 
209 
214 
220 
221 private:
222 
227 
232 
233 };
234 
235 
240 template <>
243  typedef EventGenerator NthBase;
244 };
245 
249 template <>
250 struct 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 */
PersistentIStream is used to read persistent objects from a stream where they were previously written...
StringVector thePosArgs
If the there are positional arguments to theInterfaces these are specified here.
RandomGenerator & random() const
Return a reference to the default RandomGenerator object in this run.
virtual void addTag(string tag)
Append a tag to the run name.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
int firstSubrun
If non zero, the first subrun to be considered.
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
MultiEventGenerator()
Default constructor.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
string heading(long, const vector< const InterfaceBase *> &, string) const
return a header for this sub-run.
MultiEventGenerator & operator=(const MultiEventGenerator &)=delete
Private and non-existent assignment operator.
int lastSubrun
If non zero, the last subrun to be considered.
virtual ~MultiEventGenerator()
Destructor.
The MultiEventGenerator class is derived from the EventGenerator class and is capable of making sever...
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
RanGenPtr theSeparateRandom
A separate random number generator to be used for generating random parameter values (to ensure repro...
RandomGenerator is an interface to the CLHEP::RandomEngine classes.
static void Init()
Standard Init function used to initialize the interfaces.
string addRndInterface(string)
Used to add an interface of an object a random value each run.
vector< string > StringVector
A vector of character strings.
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.
StringVector theInterfaces
The interfaces to be modified for the corresponding objects in theObjects.
string removeInterface(string)
Used to remove an interface of an object which should be used with a set of different values...
virtual IBPtr clone() const
Make a simple clone of this object.
IVector theObjects
The objects for which there are different interface settings.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
string addInterface(string)
Used to add an interface of an object which should be used with a set of different values...
virtual IVector getReferences()
Return a vector of all pointers to Interfaced objects used in this object.
virtual void doGo(long next, long maxevent, bool tics)
Run this EventGenerator session.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
vector< IBPtr > IVector
A vector of pointers to InterfacedBase objects.
Definition: Containers.h:67
vector< StringVector > theValues
The arguments to be used for each of theInterfaces.
virtual void rebind(const TranslationMap &trans)
Rebind pointer to other Interfaced objects.
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
The EventGenerator class manages a whole event generator run.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.