REST-for-Physics
v2.3
Rare Event Searches ToolKit for Physics
|
This class serves as an universal std::string output tool, aiming at leveling, rendering, and auto saving for the output message.
To use this tool class in the other classes, include this header file. You will get several global output objects: fout, info, essential, debug, etc. they works similarly as std::cout: fout<<"hello world"<<endl;
. It is also possible to initialize a local TRestStringOutput object. Then one can customize output color, border and orientation on that.
Definition at line 148 of file TRestStringOutput.h.
#include <TRestStringOutput.h>
Public Types | |
enum class | REST_Display_Orientation { kLeft = 1 , kMiddle = 0 } |
Enumerate of TRestStringOutput display orientation. | |
enum class | REST_Verbose_Level { REST_Silent = 0 , REST_Essential = 1 , REST_Warning = REST_Essential , REST_Info = 2 , REST_Debug = 3 , REST_Extreme = 4 } |
Enumerate of verbose level, containing five levels. More... | |
Public Member Functions | |
void | flushstring () |
std::string | FormattingPrintString (std::string input) |
std::string | GetBuffer () |
REST_Verbose_Level | GetVerboseLevel () |
bool | isError () |
TRestStringOutput & | operator<< (endl_t et) |
template<class T > | |
TRestStringOutput & | operator<< (T const &content) |
TRestStringOutput & | operator<< (void(*pfunc)(TRestStringOutput &)) |
void | resetborder () |
void | resetcolor () |
void | resetheader () |
void | resetorientation () |
void | resetstring () |
void | setborder (std::string b) |
void | setcolor (COLORCODE_TYPE colordef) |
void | setheader (std::string headerdef) |
void | setlength (int n) |
void | setorientation (REST_Display_Orientation o) |
TRestStringOutput (COLORCODE_TYPE color=COLOR_RESET, std::string formatter="", REST_Display_Orientation orientation=TRestStringOutput::REST_Display_Orientation::kLeft) | |
TRestStringOutput (REST_Verbose_Level v, COLORCODE_TYPE _color=COLOR_RESET, std::string formatter="", REST_Display_Orientation orientation=TRestStringOutput::REST_Display_Orientation::kLeft, bool _iserror=false) | |
Static Public Member Functions | |
static void | RESTendl (TRestStringOutput &input) |
Protected Attributes | |
std::stringstream | buf |
COLORCODE_TYPE | color |
std::string | formatstring |
bool | iserror |
int | length |
REST_Display_Orientation | orientation |
bool | useborder |
REST_Verbose_Level | verbose |
Friends | |
TRestStringOutput & | operator<< (TRestMetadata &mt, TRestStringOutput &so) |
Related Functions | |
(Note that these are not member functions.) | |
void | PrintWelcome () |
|
strong |
Enumerate of verbose level, containing five levels.
Definition at line 152 of file TRestStringOutput.h.
|
related |
print a welcome message by calling shell script "rest-config"
Definition at line 230 of file TRestStringOutput.h.