9 #ifndef ThePEG_CurrentGenerator_H 10 #define ThePEG_CurrentGenerator_H 13 #include "ThePEG/Repository/EventGenerator.h" 14 #include "CurrentGenerator.fh" 108 operator bool()
const {
162 template <
typename T>
181 template <
typename T>
190 template <
typename T>
static IBPtr getPointer(string name)
Get object.
Ptr< T >::pointer getObject(string name) const
Return a pointer to an object of type T present in this run given its full name.
ostream & out()
This stream should be used for output of information and statistics of an EventGenerator run in the f...
CurrentGenerator & operator=(const CurrentGenerator &)
Private and non-existent assignment operator.
static ostream & out()
Get the current standard output stream.
static Ptr< T >::pointer getObject(string name)
Get object.
bool useStdOut() const
Has the generator been asked to redirect everything to standard output?
CurrentGenerator(const CurrentGenerator &)
Copy-constructor does nothing.
string str() const
If output is stored internally, acces what has been written so far.
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
ostream & log()
Return a reference to the stream connected to the file for logging information.
static vector< EGPtr > theGeneratorStack
The stack of EventGenerators requested.
~Redirect()
The destructor which restores the original destination of the stream.
ostream * theStream
The stream which is redirected.
ostringstream intStream
An internal buffer, the content of which will be discarded when the this object is destructed...
This is the main namespace within which all identifiers in ThePEG are declared.
static EventGenerator * ptr()
Pointer to the stack.
static tSMPtr standardModel()
Return a pointer to the standard model parameters used by the current generator.
bool operator!() const
Test for existance.
static ostream & log()
Get the current standard log stream.
ostream & ref()
Return a reference to the stream connected to the filea for references from used objects.
IBPtr getPointer(string name) const
Return a pointer to an object present in this run given its full name.
EventGenerator & operator*() const
Return a reference to the currently chosen object.
std::streambuf * theBuffer
The original buffer of the redirected stream.
EventGenerator * operator->() const
Return a pointer to the currently chosen object.
Class used to temporarily redirect a given ostream to the misc() stream of the current EventGenerator...
tStrategyPtr strategy() const
Return a pointer to the strategy object containing a set of non-default particles to use...
RCPtr is a reference counted (smart) pointer.
static EventGenerator & current()
Return a reference to the currently chosen EventGenerator object.
CurrentGenerator()
Default constructor does nothing.
static Ptr< T >::pointer getPtr(const T &t)
Get object.
Ptr< T >::pointer getDefault() const
Return the default object for class T.
This CurrentGenerator class keeps a static stack of EventGenerators which can be used anywhere by any...
~CurrentGenerator()
The destructor removing the EventGenerator specified in the constructor from the stack.
Ptr< T >::pointer getPtr(const T &) const
Return a garbage collected pointer to a given object.
static tStrategyPtr strategy()
Return a pointer to the strategy object containing eg.
static bool isVoid()
Returns true if there is no currently chosen EventGenerator object.
CurrentGenerator(const EGPtr &eg)
Construct a new object specifying a new EventGenerator, eg, to be used during this objects lifetime...
bool generatorPushed
True if this object is responsible for pushing a EventGenerator onto the stack.
static ostream & ref()
Get the current standard ref stream.
tSMPtr standardModel() const
Return a pointer to the standard model parameters.
Redirect(ostream &os, bool internal=false)
Constructor taking the stream to be redirected as input.
static Ptr< T >::pointer getDefault()
Get default object.
The EventGenerator class manages a whole event generator run.