Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
Cout.h
1/*
2 * HalCout.h
3 *
4 * Created on: 30-04-2022
5 * Author: Daniel Wielanek
6 * bumch of stuff used in many places
7 */
8
9#ifndef HALCOUT_H_
10#define HALCOUT_H_
11#include "Std.h"
12
13#include <TObject.h>
14#include <TString.h>
15
16#define HalCoutDebug(text) Hal::Cout::PrintLineFileInfo(__FILE__, __LINE__, text)
20namespace Hal {
21 class Cout : public TObject {
22 private:
23 static Int_t fgLineLength;
24 static Cout* fgInstance;
25 static Hal::EInfo fgVerboseMode;
26 static TString GetShift(Int_t i);
27 static TString MergeStrings(Int_t no, ...);
28 static void InStars(Int_t shift, TString text, Color_t color);
29 static void PrintWarning(TString warning);
30 static void PrintError(TString error);
31
32 public:
33 Cout();
38 static TString GetDisableColor();
44 static TString GetColor(Color_t Color);
49 static Cout* Instance();
54 static void SetLineLenght(Int_t lenght) { fgLineLength = lenght; };
55 virtual ~Cout();
60 static void SetVerboseMode(Hal::EInfo verbose);
65 [[deprecated]] static void Database(Int_t no...);
70 static void Database(std::initializer_list<TString> list);
75 static void Database(const std::vector<TString>& list);
81 static void ShiftDatabase(Int_t shift, Int_t no...);
88 static void InStars(TString text, Color_t color = -1);
95 static void ShiftInStars(Int_t shift, TString text, Color_t color = -1);
103 static void Text(TString text, TString option = "L", Color_t color = -1);
104
109 static void Stars(Color_t color = -1);
118 static void ShiftText(Int_t shift, TString text, TString option, Color_t color = -1);
123 static void Empty(Color_t color = -1);
129 static void Percent(Double_t actual, Double_t total);
135 static void ProgressBar(Double_t acutal, Double_t total);
142 static void PrintInfo(TString text, Hal::EInfo status);
149 static void FailSucced(TString value, TString flag, Color_t color);
154 static void DebugInfo(Int_t i);
160 static void DebugInfo(TString file, Int_t i);
165 static Hal::EInfo GetVerboseMode() { return fgVerboseMode; }
173 static void PrintLineFileInfo(TString file, Int_t line, TString text, Hal::EInfo flag = Hal::EInfo::kDebugInfo);
174 ClassDef(Cout, 1)
175 };
176 /*
177 */
178
179} // namespace Hal
180#endif /* HALCOUT_H_ */
static void SetLineLenght(Int_t lenght)
Definition Cout.h:54
static void Text(TString text, TString option="L", Color_t color=-1)
Definition Cout.cxx:92
static void PrintLineFileInfo(TString file, Int_t line, TString text, Hal::EInfo flag=Hal::EInfo::kDebugInfo)
Definition Cout.cxx:407
static void PrintInfo(TString text, Hal::EInfo status)
Definition Cout.cxx:370
static void Stars(Color_t color=-1)
Definition Cout.cxx:150
static TString GetColor(Color_t Color)
Definition Cout.cxx:268
static void Empty(Color_t color=-1)
Definition Cout.cxx:207
static TString GetDisableColor()
Definition Cout.cxx:261
static void DebugInfo(Int_t i)
Definition Cout.cxx:249
static void Database(Int_t no...)
static void ShiftDatabase(Int_t shift, Int_t no...)
Definition Cout.cxx:317
static void FailSucced(TString value, TString flag, Color_t color)
Definition Cout.cxx:382
static Cout * Instance()
Definition Cout.cxx:400
static void ShiftInStars(Int_t shift, TString text, Color_t color=-1)
Definition Cout.cxx:355
static Hal::EInfo GetVerboseMode()
Definition Cout.h:165
static void SetVerboseMode(Hal::EInfo verbose)
Definition Cout.cxx:368
static void Percent(Double_t actual, Double_t total)
Definition Cout.cxx:219
static void ProgressBar(Double_t acutal, Double_t total)
Definition Cout.cxx:229
static void ShiftText(Int_t shift, TString text, TString option, Color_t color=-1)
Definition Cout.cxx:350