thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
ThePEG::CurrentGenerator::Redirect Class Reference

Class used to temporarily redirect a given ostream to the misc() stream of the current EventGenerator. More...

#include <CurrentGenerator.h>

Public Member Functions

 Redirect (ostream &os, bool internal=false)
 Constructor taking the stream to be redirected as input. More...
 
 ~Redirect ()
 The destructor which restores the original destination of the stream.
 
string str () const
 If output is stored internally, acces what has been written so far.
 

Public Attributes

ostream * theStream
 The stream which is redirected.
 
std::streambuf * theBuffer
 The original buffer of the redirected stream.
 
ostringstream intStream
 An internal buffer, the content of which will be discarded when the this object is destructed.
 

Detailed Description

Class used to temporarily redirect a given ostream to the misc() stream of the current EventGenerator.

Definition at line 201 of file CurrentGenerator.h.

Constructor & Destructor Documentation

◆ Redirect()

ThePEG::CurrentGenerator::Redirect::Redirect ( ostream &  os,
bool  internal = false 
)
inline

Constructor taking the stream to be redirected as input.

If the internal flag false the output will be stored in the Event Generator and written to the log file in the end of the run. If

Definition at line 213 of file CurrentGenerator.h.

References ThePEG::CurrentGenerator::current(), intStream, theStream, and ThePEG::EventGenerator::useStdOut().


The documentation for this class was generated from the following file: