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>
tStrategyPtr strategy() const
Return a pointer to the strategy object containing a set of non-default particles to use...
Ptr< T >::pointer getObject(string name) const
Return a pointer to an object of type T present in this run given its full name.
static IBPtr getPointer(string name)
Get object.
EventGenerator * operator->() const
Return a pointer to the currently chosen object.
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.
CurrentGenerator(const CurrentGenerator &)
Copy-constructor does nothing.
Ptr< T >::pointer getDefault() const
Return the default object for class T.
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.
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.
bool operator!() const
Test for existance.
Ptr< T >::pointer getPtr(const T &) const
Return a garbage collected pointer to a given object.
std::streambuf * theBuffer
The original buffer of the redirected stream.
string str() const
If output is stored internally, acces what has been written so far.
Class used to temporarily redirect a given ostream to the misc() stream of the current EventGenerator...
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.
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.
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...
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.
bool generatorPushed
True if this object is responsible for pushing a EventGenerator onto the stack.
bool useStdOut() const
Has the generator been asked to redirect everything to standard output?
static ostream & ref()
Get the current standard ref stream.
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.
tSMPtr standardModel() const
Return a pointer to the standard model parameters.