ThePEG  1.8.0
MultiEventGenerator.h
1 // -*- C++ -*-
2 //
3 // MultiEventGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2011 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 2 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 
43  virtual ~MultiEventGenerator();
45 
46 protected:
47 
54  virtual void doGo(long next, long maxevent, bool tics);
56 
65  string addInterface(string);
66 
72  string removeInterface(string);
74 
78  void heading(ostream &, long,
79  const vector<const InterfaceBase *> &, string) const;
80 
81 public:
82 
83 
90  void persistentOutput(PersistentOStream & os) const;
91 
97  void persistentInput(PersistentIStream & is, int version);
99 
103  static void Init();
104 
105 protected:
106 
113  virtual IBPtr clone() const;
114 
119  virtual IBPtr fullclone() const;
121 
122 protected:
123 
135  virtual void rebind(const TranslationMap & trans);
136 
142  virtual IVector getReferences();
144 
145 private:
146 
148  typedef vector<string> StringVector;
149 
154 
159  StringVector theInterfaces;
160 
165  StringVector thePosArgs;
166 
170  vector<StringVector> theValues;
171 
172 private:
173 
178 
183 
184 };
185 
186 
191 template <>
194  typedef EventGenerator NthBase;
195 };
196 
200 template <>
201 struct ClassTraits<MultiEventGenerator>:
202  public ClassTraitsBase<MultiEventGenerator> {
204  static string className() { return "ThePEG::MultiEventGenerator"; }
208  static string library() { return "MultiEventGenerator.so"; }
209 
210 };
211 
214 }
215 
216 #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.
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
MultiEventGenerator & operator=(const MultiEventGenerator &)
Private and non-existent assignment operator.
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
static void Init()
Standard Init function used to initialize the interfaces.
vector< string > StringVector
A vector of character strings.
static ClassDescription< MultiEventGenerator > initMultiEventGenerator
Describe a concrete class with persistent data.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
static string library()
The name of a file containing the dynamic library where the class T is implemented.
Definition: ClassTraits.h:85
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...
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.
void heading(ostream &, long, const vector< const InterfaceBase * > &, string) const
Write out header for each sub-run.
virtual void doGo(long next, long maxevent, bool tics)
Run this EventGenerator session.
static string className()
Return the name of class T.
Definition: ClassTraits.h:66
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
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.
virtual IBPtr clone() const
Make a simple clone of this object.
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
The EventGenerator class manages a whole event generator run.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.