#include <CloseCoutSentry.h>
Public Member Functions | |
void | clear () |
CloseCoutSentry (bool silent=true) | |
FILE * | trueStdOut () |
~CloseCoutSentry () | |
Static Public Member Functions | |
static void | breakFree () |
Static Private Member Functions | |
static void | reallyClear () |
Private Attributes | |
bool | silent_ |
bool | stdOutIsMine_ |
Static Private Attributes | |
static int | fdErr_ = 0 |
static int | fdOut_ = 0 |
static bool | open_ = true |
static FILE * | trueStdOut_ = 0 |
This class redirects cout and cerr to /dev/null when created, and restores them back when destroyed.
Definition at line 7 of file CloseCoutSentry.h.
CloseCoutSentry::CloseCoutSentry | ( | bool | silent = true | ) |
CloseCoutSentry::~CloseCoutSentry | ( | ) |
Definition at line 29 of file CloseCoutSentry.cc.
References clear().
|
static |
void CloseCoutSentry::clear | ( | void | ) |
Definition at line 34 of file CloseCoutSentry.cc.
References reallyClear(), silent_, stdOutIsMine_, and trueStdOut_.
Referenced by FitterAlgoBase::doFit(), Asymptotic::findExpectedLimitFromCrossing(), Asymptotic::getCLs(), MarkovChainMC::run(), ProfileLikelihood::runLimit(), Asymptotic::runLimitExpected(), MarkovChainMC::runOnce(), GoodnessOfFit::runSaturatedModel(), ProfileLikelihood::runSignificance(), ChannelCompatibilityCheck::runSpecific(), and ~CloseCoutSentry().
|
staticprivate |
Definition at line 43 of file CloseCoutSentry.cc.
References fdErr_, fdOut_, and open_.
Referenced by breakFree(), and clear().
FILE * CloseCoutSentry::trueStdOut | ( | ) |
Definition at line 59 of file CloseCoutSentry.cc.
References fdOut_, open_, stdOutIsMine_, and trueStdOut_.
Referenced by MultiDimFit::doGrid().
|
staticprivate |
Definition at line 18 of file CloseCoutSentry.h.
Referenced by CloseCoutSentry(), and reallyClear().
|
staticprivate |
Definition at line 18 of file CloseCoutSentry.h.
Referenced by CloseCoutSentry(), reallyClear(), and trueStdOut().
|
staticprivate |
Definition at line 19 of file CloseCoutSentry.h.
Referenced by CloseCoutSentry(), reallyClear(), and trueStdOut().
|
private |
Definition at line 17 of file CloseCoutSentry.h.
Referenced by clear(), and CloseCoutSentry().
|
private |
Definition at line 23 of file CloseCoutSentry.h.
Referenced by clear(), and trueStdOut().
|
staticprivate |
Definition at line 22 of file CloseCoutSentry.h.
Referenced by clear(), and trueStdOut().