![]() |
GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
|
![]() |
A simple class to redirect stdout and stderr to file(s). To use it, create it, providing the path of the files stdout and stderr should be redirected to, and an (optional) flag whether to append to those files (default) or not. If only one file is provided, both stdout and stderr are redirected to it. If the filename for either stdout or stderr is a nullptr, the redirection for this output won't happen. The redirection ends when the TRedirect object is destroyed.
Definition at line 26 of file TRedirect.h.
Public Member Functions | |
TRedirect (const char *newOut, bool append=true) | |
TRedirect (const char *newOut, const char *newErr, bool append=true) | |
TRedirect (const TRedirect &)=delete | |
TRedirect (TRedirect &&)=delete | |
~TRedirect () | |
const char * | ErrFile () |
TRedirect & | operator= (const TRedirect &)=delete |
TRedirect & | operator= (TRedirect &&)=delete |
const char * | OutFile () |
Private Member Functions | |
void | Redirect (bool append) |
Private Attributes | |
const char * | fErrFile {nullptr} |
const char * | fOutFile {nullptr} |
int | fStdErrFileDescriptor {0} |
int | fStdOutFileDescriptor {0} |
|
inline |
Definition at line 28 of file TRedirect.h.
References Redirect().
|
inlineexplicit |
Definition at line 33 of file TRedirect.h.
References Redirect().
|
inline |
Definition at line 42 of file TRedirect.h.
References fStdErrFileDescriptor, and fStdOutFileDescriptor.
|
delete |
|
delete |
|
inline |
|
inline |
|
inlineprivate |
Definition at line 57 of file TRedirect.h.
References fErrFile, fOutFile, fStdErrFileDescriptor, and fStdOutFileDescriptor.
Referenced by TRedirect(), and TRedirect().
|
private |
Definition at line 78 of file TRedirect.h.
Referenced by ErrFile(), and Redirect().
|
private |
Definition at line 77 of file TRedirect.h.
Referenced by OutFile(), and Redirect().
|
private |
Definition at line 76 of file TRedirect.h.
Referenced by ~TRedirect(), and Redirect().
|
private |
Definition at line 75 of file TRedirect.h.
Referenced by ~TRedirect(), and Redirect().