GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
Globals.h File Reference
#include <cstdint>
#include <iostream>
#include <iomanip>
#include <stdexcept>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <execinfo.h>
#include <cxxabi.h>
#include <sstream>
#include <array>
#include <memory>
#include <unistd.h>
#include "TEnv.h"
#include <sys/wait.h>
#include <sys/prctl.h>
+ Include dependency graph for Globals.h:

Go to the source code of this file.

Classes

struct  grsi::exit_exception
 

Namespaces

namespace  grsi
 

Macros

#define ALERTTEXT   "\033[47m\033[0;31m"
 
#define BG_BLUE   "\033[44m"
 
#define BG_CYAN   "\033[46m"
 
#define BG_GREEN   "\033[42m"
 
#define BG_MAGENTA   "\033[45m"
 
#define BG_RED   "\033[41m"
 
#define BG_WHITE   "\033[47m"
 
#define BG_YELLOW   "\033[43m"
 
#define BLACK   "\033[1;30m"
 
#define BLUE   "\033[1;34m"
 
#define CYAN   "\033[1;36m"
 
#define DBLACK   "\033[0;30m"
 
#define DBLUE   "\033[0;34m"
 
#define DCYAN   "\033[0;36m"
 
#define DGREEN   "\033[0;32m"
 
#define DMAGENTA   "\033[0;35m"
 
#define DRED   "\033[0;31m"
 
#define DWHITE   "\033[0;37m"
 
#define DYELLOW   "\033[0;33m"
 
#define GREEN   "\033[1;32m"
 
#define HIDE_CURSOR   "\033[?25l"
 
#define MAGENTA   "\033[1;35m"
 
#define RED   "\033[1;31m"
 
#define RESET_COLOR   "\033[m"
 
#define SHOW_CURSOR   "\033[?25h"
 
#define WHITE   "\033[1;37m"
 
#define YELLOW   "\033[1;33m"
 

Enumerations

enum  EVerbosity : int {
  kQuiet = 0 , kBasicFlow = 1 , kSubroutines = 2 , kLoops = 3 ,
  kAll = 4
}
 

Functions

template<typename T , typename... U>
void grsi::Append (std::ostringstream &stream, const T &head, const U &... tail)
 
template<typename T >
void grsi::Append (std::ostringstream &stream, const T &tail)
 
static std::string getexepath ()
 
template<typename T >
std::string hex (T val, int width=-1)
 
static void PrintGdbStacktrace ()
 
static void PrintStacktrace (std::ostream &out=std::cout, int maxFrames=63)
 
const std::string & ProgramName ()
 
void grsi::SetGRSIEnv ()
 
static std::string sh (const std::string &cmd)
 
template<typename T , typename... U>
std::string grsi::Stringify (const T &head, const U &... tail)
 

Macro Definition Documentation

◆ ALERTTEXT

◆ BG_BLUE

#define BG_BLUE   "\033[44m"

Definition at line 28 of file Globals.h.

◆ BG_CYAN

#define BG_CYAN   "\033[46m"

Definition at line 30 of file Globals.h.

◆ BG_GREEN

#define BG_GREEN   "\033[42m"

Definition at line 26 of file Globals.h.

◆ BG_MAGENTA

#define BG_MAGENTA   "\033[45m"

Definition at line 29 of file Globals.h.

◆ BG_RED

#define BG_RED   "\033[41m"

Definition at line 25 of file Globals.h.

◆ BG_WHITE

#define BG_WHITE   "\033[47m"

◆ BG_YELLOW

#define BG_YELLOW   "\033[43m"

Definition at line 27 of file Globals.h.

◆ BLACK

#define BLACK   "\033[1;30m"

Definition at line 10 of file Globals.h.

◆ BLUE

◆ CYAN

◆ DBLACK

#define DBLACK   "\033[0;30m"

Definition at line 19 of file Globals.h.

◆ DBLUE

◆ DCYAN

◆ DGREEN

◆ DMAGENTA

#define DMAGENTA   "\033[0;35m"

Definition at line 20 of file Globals.h.

Referenced by AtExitHandler(), atexitHandler(), main(), main(), and WriteEvents().

◆ DRED

◆ DWHITE

#define DWHITE   "\033[0;37m"

Definition at line 22 of file Globals.h.

◆ DYELLOW

◆ GREEN

#define GREEN   "\033[1;32m"

◆ HIDE_CURSOR

#define HIDE_CURSOR   "\033[?25l"

◆ MAGENTA

#define MAGENTA   "\033[1;35m"

Definition at line 11 of file Globals.h.

◆ RED

◆ RESET_COLOR

#define RESET_COLOR   "\033[m"

Definition at line 5 of file Globals.h.

Referenced by TEventBuildingLoop::TEventBuildingLoop(), TGriffinAngles::TGriffinAngles(), TGRSIHelper::TGRSIHelper(), TMidasFile::TMidasFile(), TSourceTab::TSourceTab(), TSourceCalibration::AcceptChannel(), TRunInfo::Add(), TSingleton< T >::AddCurrent(), TTigress::AddFragment(), TCalGraph::AddLists(), Analyze(), TGRSIint::ApplyOptions(), AtExitHandler(), atexitHandler(), TEpicsFrag::BuildScalerMap(), TSourceCalibration::Calibrate(), TPeak::CheckArea(), TPeak::CheckArea(), CheckFile(), CheckHighTimeStamp(), CheckHighTimeStamp(), TGRSIFunctions::CheckParameterErrors(), TGRSIHelper::CheckSizes(), TGRSISelector::CheckSizes(), TDeadtimeScalerQueue::CheckStatus(), TRateScalerQueue::CheckStatus(), TDeadtimeScalerQueue::Clear(), TRateScalerQueue::Clear(), TDataFrameLibrary::Compile(), TPPG::Correct(), CorrectionFile(), ExampleEventHelper::CreateHistograms(), CrossTalkFix(), TFipps::CTCorrectedEnergy(), TGriffin::CTCorrectedEnergy(), DoAnalysis(), TMnemonic::EnumerateDigitizer(), TKinematics::Evslab(), TKinematics::Evslab_graph(), ExamineMidasFile(), TSourceCalibration::FindPeaks(), TSourceCalibration::FindPeaksFast(), GGaus::Fit(), GPeak::Fit(), TPeak::Fit(), TPeakFitter::Fit(), TSingleton< T >::Get(), TChannel::GetChannel(), TSRIM::GetEnergy(), GetRoughTimeDiff(), GetRoughTimeDiff(), TEpicsFrag::GetScalerAtTime(), GetTimeDiff(), GetTimeDiff(), TGRSIDataParser::GriffinDataToFragment(), TChannel::InitChannelInput(), TDataFrameLibrary::Load(), TParserLibrary::Load(), TGRSIProof::LoadLibsIntoProof(), main(), main(), MakeSpectra(), Match(), TGRSIInterruptHandler::Notify(), TCSM::OldBuilddEE(), TGRSIint::OpenRawFile(), TGRSIint::OpenRootFile(), TRunInfo::ParseInputData(), GGaus::Print(), GPeak::Print(), TAnalysisOptions::Print(), TBadFragment::Print(), TCalGraph::Print(), TGRSIDetectorInformation::Print(), TMidasEvent::Print(), TRunInfo::Print(), TSharc2Hit::Print(), TSharcHit::Print(), TSortingDiagnostics::Print(), ArgParseConfig< T >::printable(), Printaddress(), PrintError(), TGRSIint::PrintHelp(), TEpicsFrag::PrintScalerMap(), TRunInfo::PrintVersion(), TGRSIDataParser::Process(), TGRSISelector::Process(), GCanvas::Process1DKeyboardPress(), GCanvas::Process2DKeyboardPress(), TGRSIDataParser::ProcessGriffin(), QueueEvents(), TChannel::ReadCalFile(), TChannel::ReadCalFile(), TAnalysisOptions::ReadFromFile(), TGRSIOptions::ReadFromFile(), TRunInfo::ReadInfoFile(), TGRSIFrame::Run(), TChannelTab::SelectedTab(), TSourceCalibration::SelectedTab(), TGRSIDetectorInformation::Set(), TRunInfo::SetDate(), TMidasFile::SetFileOdb(), TRunInfo::SetFullVersion(), TMidasFile::SetGRIFFOdb(), TRunInfo::SetLibraryPath(), TRunInfo::SetLibraryVersion(), TPPG::SetOdbFromData(), TMidasFile::SetRunInfo(), TMidasFile::SetTIGDAQOdb(), TMidasFile::SetTIGOdb(), TGRSIDataParser::SetTIGTriggerID(), TGRSIint::SetupPipeline(), TRunInfo::SetVersion(), SmartMatch(), TDeadtimeScalerQueue::StatusUpdate(), TRateScalerQueue::StatusUpdate(), TGRSIDataParser::TigressDataToFragment(), TAnalysisHistLoop::Write(), TFragHistLoop::Write(), and WriteEvents().

◆ SHOW_CURSOR

#define SHOW_CURSOR   "\033[?25h"

◆ WHITE

#define WHITE   "\033[1;37m"

Definition at line 13 of file Globals.h.

◆ YELLOW

#define YELLOW   "\033[1;33m"

Definition at line 7 of file Globals.h.

Referenced by GPeak::Fit(), TPeak::Fit(), TPeakFitter::Fit(), and TRunInfo::PrintVersion().

Enumeration Type Documentation

◆ EVerbosity

enum EVerbosity : int
Enumerator
kQuiet 
kBasicFlow 
kSubroutines 
kLoops 
kAll 

Definition at line 143 of file Globals.h.

Function Documentation

◆ getexepath()

static std::string getexepath ( )
inlinestatic

Definition at line 151 of file Globals.h.

◆ hex()

◆ PrintGdbStacktrace()

static void PrintGdbStacktrace ( )
inlinestatic

Definition at line 262 of file Globals.h.

◆ PrintStacktrace()

static void PrintStacktrace ( std::ostream & out = std::cout,
int maxFrames = 63 )
inlinestatic

Definition at line 173 of file Globals.h.

◆ ProgramName()

const std::string & ProgramName ( )

Referenced by TGRSIint::PrintLogo().

◆ sh()

static std::string sh ( const std::string & cmd)
inlinestatic