GSI Object Oriented Online Offline (Go4) GO4-6.4.5
Loading...
Searching...
No Matches
TGo4Log Class Reference

This class handles all logging messages inside Go4. More...

#include <TGo4Log.h>

Public Types

enum  { fguMESLEN = __MESSAGETEXTLENGTH__ }
 Maximum message length allowed. More...
enum  { fguMESLEN = __MESSAGETEXTLENGTH__ }
 Maximum message length allowed. More...

Public Member Functions

virtual ~TGo4Log ()
virtual ~TGo4Log ()

Static Public Member Functions

static void AutoEnable (Bool_t on=kTRUE)
 set boolean for user action
static void AutoEnable (Bool_t on=kTRUE)
 set boolean for user action
static void CloseLogfile ()
 Close logfile if existing.
static void CloseLogfile ()
 Close logfile if existing.
static void Debug (const char *text,...) GO4_PRINTF_ARGS
 User shortcut for message with prio 0.
static void Debug (const char *text,...) GO4_PRINTF_ARGS
 User shortcut for message with prio 0.
static void EnableRedirection ()
static void EnableRedirection ()
static void Error (const char *text,...) GO4_PRINTF_ARGS
 User shortcut for message with prio 3.
static void Error (const char *text,...) GO4_PRINTF_ARGS
 User shortcut for message with prio 3.
static const char * GetDefaultLogname ()
 Return default name of log file.
static const char * GetDefaultLogname ()
 Return default name of log file.
static Int_t GetIgnoreLevel ()
 Get threshold for output.
static Int_t GetIgnoreLevel ()
 Get threshold for output.
static const char * GetLogname ()
 get name of last opened logfile
static const char * GetLogname ()
 get name of last opened logfile
static const char * GO4INCPATH ()
 Return include path for this Go4 installation.
static const char * GO4INCPATH ()
 Return include path for this Go4 installation.
static const char * GO4SYS ()
 Return GO4SYS environment variable or Go4 top directory during compile (if GO4SYS) not set.
static const char * GO4SYS ()
 Return GO4SYS environment variable or Go4 top directory during compile (if GO4SYS) not set.
static void Info (const char *text,...) GO4_PRINTF_ARGS
 User shortcut for message with prio 1.
static void Info (const char *text,...) GO4_PRINTF_ARGS
 User shortcut for message with prio 1.
static TGo4LogInstance ()
static TGo4LogInstance ()
static Bool_t IsAutoEnabled ()
 get current user boolean
static Bool_t IsAutoEnabled ()
 get current user boolean
static Bool_t IsLogfileEnabled ()
 get current logfile state
static Bool_t IsLogfileEnabled ()
 get current logfile state
static Bool_t IsOutputEnabled ()
 get current output state
static Bool_t IsOutputEnabled ()
 get current output state
static void LogfileEnable (Bool_t on=kTRUE)
 switch writing to logfile on or off
static void LogfileEnable (Bool_t on=kTRUE)
 switch writing to logfile on or off
static const char * Message (Int_t prio, const char *text,...) GO4_PRINTF2_ARGS
 Display a message.
static const char * Message (Int_t prio, const char *text,...) GO4_PRINTF2_ARGS
 Display a message.
static void OpenLogfile (const char *name=nullptr, const char *headercomment=nullptr, Bool_t appendmode=kFALSE)
 Open file of name for logmessage output.
static void OpenLogfile (const char *name=nullptr, const char *headercomment=nullptr, Bool_t appendmode=kFALSE)
 Open file of name for logmessage output.
static void OutputEnable (Bool_t on=kTRUE)
 switch output on or off
static void OutputEnable (Bool_t on=kTRUE)
 switch output on or off
static void Printf (Bool_t _stdout, const char *text)
 Make direct printf without log file or logger.
static void Printf (Bool_t _stdout, const char *text)
 Make direct printf without log file or logger.
static void PrintRate (ULong64_t cnt, double rate)
 Printout rate and events count, handle redirection.
static void PrintRate (ULong64_t cnt, double rate)
 Printout rate and events count, handle redirection.
static void set_trace_level (int)
 dummy for compatibility
static void set_trace_level (int)
 dummy for compatibility
static void SetIgnoreLevel (Int_t level)
 Define threshold for output.
static void SetIgnoreLevel (Int_t level)
 Define threshold for output.
static void SetSniffer (TNamed *sniff)
static void SetSniffer (TNamed *sniff)
static void SetTracePriority (int)
 dummy for compatibility
static void SetTracePriority (int)
 dummy for compatibility
static void StartTracing ()
 For backward compatibility.
static void StartTracing ()
 For backward compatibility.
static void StopTracing ()
 For backward compatibility.
static void StopTracing ()
 For backward compatibility.
static TString subGO4SYS (const char *subdir)
 Return subdirectory in the GO4SYS.
static TString subGO4SYS (const char *subdir)
 Return subdirectory in the GO4SYS.
static void Warn (const char *text,...) GO4_PRINTF_ARGS
 User shortcut for message with prio 2.
static void Warn (const char *text,...) GO4_PRINTF_ARGS
 User shortcut for message with prio 2.
static void WriteLogfile (const char *text, Bool_t withtime=kTRUE)
 Write text to current logfile if this is open.
static void WriteLogfile (const char *text, Bool_t withtime=kTRUE)
 Write text to current logfile if this is open.

Static Public Attributes

static const char * fgcDEBUG = "d"
 System debug message indicator.
static const char * fgcDEFAULTLOG = "go4logfile.txt"
 Name of default logfile.
static const char * fgcERR = "!"
 Error message indicator.
static const char * fgcINFO = "*"
 Info message indicator.
static const char * fgcLEFT = "GO4-"
 Prompt character left side.
static const char * fgcRIGHT = " "
 Prompt character right side.
static const char * fgcWARN = "#"
 Warning message indicator.

Private Member Functions

 TGo4Log ()
 TGo4Log ()

Static Private Member Functions

static void ProcessRedirection (int kind=0)
static void ProcessRedirection (int kind=0)

Static Private Attributes

static Bool_t fgbAutoMode = kFALSE
 User boolean to write log on demand or not.
static Bool_t fgbLogfileEnabled = kFALSE
 General switch on/off log file output.
static Bool_t fgbOutputEnabled = kTRUE
 General switch on/off log output.
static char fgcMessagetext [__MESSAGETEXTLENGTH__]
 Keeps latest message with all format indicators.
static Int_t fgiIgnoreLevel = 1
 all Messages with lower level are suppressed
static TString fgsGO4SYS = ""
static TNamed * fgSniffer = nullptr
 value of GO4SYS during run
static int fgStdPipe [2] = {-1, -1}
 optional object to get all output via SetTitle method
static int fgStdSave = -1
 redirected pipe for stdout
static TLogTimerfgTimer = nullptr
 saved file for stdout
static TGo4LogfgxInstance = nullptr
static void * fgxLogfile = nullptr
 optional logfile to store messages with time
static TString fgxLogName = TGo4Log::fgcDEFAULTLOG
 Name of last logfile set.
static TMutex * fgxMutex = nullptr
 we use own mutex to protect the logging instance

Friends

class TLogTimer

Detailed Description

This class handles all logging messages inside Go4.

Should replace the previous Trace mechanism.

Author
J. Adamczewski
Since
17-jun-2003

Definition at line 50 of file TGo4Log.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Maximum message length allowed.

Enumerator
fguMESLEN 

Definition at line 172 of file TGo4Log.h.

◆ anonymous enum

anonymous enum

Maximum message length allowed.

Enumerator
fguMESLEN 

Definition at line 172 of file TGo4Log.h.

Constructor & Destructor Documentation

◆ ~TGo4Log() [1/2]

TGo4Log::~TGo4Log ( )
virtual

Definition at line 85 of file TGo4Log.cxx.

References CloseLogfile().

◆ TGo4Log() [1/2]

TGo4Log::TGo4Log ( )
private

Definition at line 73 of file TGo4Log.cxx.

References fgcDEFAULTLOG, fgxMutex, IsLogfileEnabled(), LogfileEnable(), and OpenLogfile().

Referenced by Instance(), and ProcessRedirection().

◆ ~TGo4Log() [2/2]

virtual TGo4Log::~TGo4Log ( )
virtual

◆ TGo4Log() [2/2]

TGo4Log::TGo4Log ( )
private

Member Function Documentation

◆ AutoEnable() [1/2]

void TGo4Log::AutoEnable ( Bool_t on = kTRUE)
static

set boolean for user action

Definition at line 381 of file TGo4Log.cxx.

References fgbAutoMode.

Referenced by TGo4MainWindow::LogSettingsSlot().

◆ AutoEnable() [2/2]

void TGo4Log::AutoEnable ( Bool_t on = kTRUE)
static

set boolean for user action

◆ CloseLogfile() [1/2]

void TGo4Log::CloseLogfile ( )
static

Close logfile if existing.

Definition at line 452 of file TGo4Log.cxx.

References fgxLogfile.

Referenced by ~TGo4Log(), main(), OpenLogfile(), and TGo4Analysis::ProcessCrtlCSignal().

◆ CloseLogfile() [2/2]

void TGo4Log::CloseLogfile ( )
static

Close logfile if existing.

◆ Debug() [1/2]

void TGo4Log::Debug ( const char * text,
... )
static

User shortcut for message with prio 0.

Definition at line 289 of file TGo4Log.cxx.

References fgiIgnoreLevel, fguMESLEN, Instance(), and Message().

Referenced by TGo4AnalysisClient::TGo4AnalysisClient(), TGo4AnalysisClient::TGo4AnalysisClient(), TGo4BackStore::TGo4BackStore(), TGo4DisplayDrawerTimer::TGo4DisplayDrawerTimer(), TGo4DisplayLoggerTimer::TGo4DisplayLoggerTimer(), TGo4ExampleClient::TGo4ExampleClient(), TGo4ExampleServer::TGo4ExampleServer(), TGo4FileStore::TGo4FileStore(), TGo4FileStore::TGo4FileStore(), TGo4MainTree::TGo4MainTree(), TGo4MbsEventServer::TGo4MbsEventServer(), TGo4MbsEventServer::TGo4MbsEventServer(), TGo4MbsFile::TGo4MbsFile(), TGo4MbsFile::TGo4MbsFile(), TGo4MbsRandom::TGo4MbsRandom(), TGo4MbsRandom::TGo4MbsRandom(), TGo4MbsStream::TGo4MbsStream(), TGo4MbsStream::TGo4MbsStream(), TGo4MbsTransport::TGo4MbsTransport(), TGo4MbsTransport::TGo4MbsTransport(), TGo4RevServ::TGo4RevServ(), TGo4RevServ::TGo4RevServ(), TGo4Socket::TGo4Socket(), TGo4StepFactory::TGo4StepFactory(), TGo4StepFactory::TGo4StepFactory(), TGo4TaskHandler::TGo4TaskHandler(), TGo4TaskManager::TGo4TaskManager(), TGo4Thread::TGo4Thread(), TGo4ThreadManager::TGo4ThreadManager(), TGo4TreeStore::TGo4TreeStore(), TGo4TreeStore::TGo4TreeStore(), TGo4AnalysisProxy::~TGo4AnalysisProxy(), TGo4MbsSubEvent::~TGo4MbsSubEvent(), TGo4StepFactory::~TGo4StepFactory(), TGo4Thread::~TGo4Thread(), TGo4CompositeEvent::activateBranch(), TGo4BufferQueue::AddBuffer(), TGo4CompositeEvent::addEventElement(), TGo4Prefs::AddFile(), TGo4ClientTask::AddLocalCommand(), TGo4MbsFileParameter::AddMoreFile(), TGo4MbsEvent::AddSubEvent(), TGo4SimpleEvent::AddSubEvent(), TGo4MbsSource::BuildEvent(), TGo4MbsSource::BuildMbsEvent(), TGo4Thread::Cancel(), TGo4TaskHandlerRunnable::CheckStopBuffer(), TGo4TaskManager::ClientLogin(), TGo4AnalysisStepManager::CloseAnalysis(), TGo4TaskHandler::Connect(), TGo4TaskHandler::ConnectClientChannel(), TGo4HistogramServer::ConnectObjectClient(), TGo4ObjClient::ConnectServer(), TGo4TaskHandler::ConnectServerChannel(), TGo4AnalysisClient::Constructor(), CreateDefaultAnalysis(), TGo4EventServerFactory::CreateEventSource(), TGo4EventServerFactory::CreateEventStore(), TGo4EventServerFactory::CreateInputEvent(), Debug(), TGo4TaskHandler::DisConnect(), TGo4TaskManager::DisConnectClient(), TGo4ThreadHandler::DumpThreads(), TGo4ComAction1::ExeCom(), TGo4ComAction2::ExeCom(), TGo4ComAddTreeHistogram::ExeCom(), TGo4ComAutosave::ExeCom(), TGo4ComClearObject::ExeCom(), TGo4ComCloseAnalysis::ExeCom(), TGo4ComDeleteObject::ExeCom(), TGo4ComDisconnectSlave::ExeCom(), TGo4ComExecLine::ExeCom(), TGo4ComGetAnalysisStatus::ExeCom(), TGo4ComGetCurrentEvent::ExeCom(), TGo4ComGetEnvelope::ExeCom(), TGo4ComGetNamesList::ExeCom(), TGo4ComGetObjectStatus::ExeCom(), TGo4ComInitAnalysis::ExeCom(), TGo4ComLoadAnalysisStatus::ExeCom(), TGo4ComMasterQuit::ExeCom(), TGo4ComPrintConditions::ExeCom(), TGo4ComPrintDynList::ExeCom(), TGo4ComPrintHistograms::ExeCom(), TGo4ComQuit::ExeCom(), TGo4ComRemoveClient::ExeCom(), TGo4ComSaveAnalysisStatus::ExeCom(), TGo4ComServerQuit::ExeCom(), TGo4ComSetAnalysisStatus::ExeCom(), TGo4ComSetObject::ExeCom(), TGo4ComSetPrintEvent::ExeCom(), TGo4ComSetProtections::ExeCom(), TGo4ComStart::ExeCom(), TGo4ComStop::ExeCom(), TGo4Analysis::ExecuteLine(), GetClassesList(), TGo4CompositeEvent::getEventElement(), TGo4ServerProxy::GetLaunchString(), TGo4Task::GetStatus(), TGo4ControlException::Handle(), TGo4DynamicListException::Handle(), TGo4EventSourceException::Handle(), TGo4EventStoreException::Handle(), TGo4Exception::Handle(), TGo4RuntimeException::Handle(), TGo4TaskHandlerAbortException::Handle(), TGo4TerminateException::Handle(), TGo4Analysis::InitEventClasses(), TGo4AnalysisStepManager::InitEventClasses(), TGo4Task::Initialization(), TGo4ThreadManager::Initialization(), TGo4CommandInvoker::Invoke(), TGo4Task::NextStatus(), TGo4AppControlTimer::Notify(), TGo4MbsSource::Open(), TGo4Socket::Open(), TGo4TreeSource::Open(), TGo4MbsFile::OpenFile(), TGo4Runnable::PostRun(), TGo4Runnable::PreRun(), TGo4SimpleEvent::PrintEvent(), TGo4SimpleSubEvent::PrintEvent(), TGo4DabcAccess::ProcessCommandReply(), TGo4CompositeEvent::ProvideArray(), TGo4ClientTask::Quit(), TGo4ServerTask::Quit(), TGo4MbsSubEvent::ReAllocate(), TGo4ObjClient::ReceiveBuffer(), TGo4Socket::ReceiveBuffer(), TGo4Thread::ReCreate(), TGo4Socket::Recv(), TGo4Socket::RecvRaw(), TGo4ServerTask::RemoveClient(), TGo4ServerTask::RemoveCurrentClient(), TGo4Prefs::ReplaceEnvPars(), TGo4CommandRunnable::Run(), TGo4DataRunnable::Run(), TGo4StatusRunnable::Run(), TGo4TestRunnable::Run(), TGo4Socket::Send(), TGo4Socket::Send(), TGo4AnalysisClient::SendAnalysisClientStatus(), TGo4AnalysisClient::SendAnalysisStatus(), TGo4Socket::SendBuffer(), TGo4AnalysisClient::SendNamesList(), TGo4HistogramServer::SendObject(), TGo4Task::SendObject(), TGo4ServerTask::SendStatus(), TGo4Task::SendStatus(), TGo4ServerTask::SendStatusBuffer(), TGo4Task::SendStatusBuffer(), TGo4TaskManager::ServeClient(), TGo4TaskHandler::ServerRequest(), TGo4ServerTask::SetCurrentTask(), TGo4CommandProtoList::ShowCommands(), TGo4ServerTask::Shutdown(), TGo4ExampleClient::Start(), TGo4Slave::Start(), TGo4ExampleServer::StartWorkThreads(), TGo4TaskOwner::StartWorkThreads(), TGo4ExampleClient::Stop(), TGo4Slave::Stop(), TGo4ExampleServer::StopWorkThreads(), TGo4TaskOwner::StopWorkThreads(), TGo4BackStore::Store(), TGo4EventStore::Store(), TGo4EventStore::Store(), TGo4EventStore::Store(), TGo4FileStore::Store(), TGo4TreeStore::Store(), TGo4ThreadManager::Terminate(), TGo4AnalysisClient::TerminateFast(), TGo4Runnable::ThreadCatch(), TGo4Thread::Threadfunc(), TGo4Runnable::UnexpectedCatch(), and TGo4TaskHandler::WaitThreadStop().

◆ Debug() [2/2]

void TGo4Log::Debug ( const char * text,
... )
static

User shortcut for message with prio 0.

References Debug(), and GO4_PRINTF_ARGS.

◆ EnableRedirection() [1/2]

void TGo4Log::EnableRedirection ( )
static

Definition at line 98 of file TGo4Log.cxx.

References fgStdPipe, fgStdSave, fgTimer, and TLogTimer.

Referenced by main().

◆ EnableRedirection() [2/2]

void TGo4Log::EnableRedirection ( )
static

References TLogTimer.

◆ Error() [1/2]

void TGo4Log::Error ( const char * text,
... )
static

User shortcut for message with prio 3.

Definition at line 328 of file TGo4Log.cxx.

References fguMESLEN, Instance(), and Message().

Referenced by TGo4AnalysisClient::TGo4AnalysisClient(), TGo4BackStore::TGo4BackStore(), TGo4FileStore::TGo4FileStore(), TGo4HDF5Store::TGo4HDF5Store(), TMeshAnalysis::TMeshAnalysis(), TMeshAnalysis::TMeshAnalysis(), TXXXAnalysis::TXXXAnalysis(), TXXXCalibPar::TXXXCalibPar(), TXXXStore::TXXXStore(), TYYYAnalysis::TYYYAnalysis(), TYYYAnalysis::TYYYAnalysis(), TYYYEventSource::TYYYEventSource(), TGo4CompositeEvent::activateBranch(), TGo4TaskManager::AddClient(), TGo4CompositeEvent::addEventElement(), TGo4SimpleEvent::AddSubEvent(), TGo4DabcAccess::AssignObjectTo(), TGo4HDF5Source::BuildDataSet(), TGo4HDF5Store::BuildDataSet(), TGo4HDF5Adapter::BuildDataType(), TGo4HDF5Source::BuildEvent(), TXXXProc::BuildEvent(), TXXXUnpackProc::BuildEvent(), TYYYUnpackProc::BuildEvent(), TGo4HDF5BasicDataHandle::BuildReadDataset(), TGo4SimpleEventProcessor::BuildSimpleEvent(), TGo4HDF5Source::CloseCurrentFile(), TGo4ClientTask::ConnectServer(), CreateDefaultAnalysis(), TGo4StepFactory::CreateEventProcessor(), TGo4StepFactory::CreateEventSource(), TGo4StepFactory::CreateEventStore(), TGo4StepFactory::CreateInputEvent(), TGo4StepFactory::CreateOutputEvent(), Error(), TGo4Analysis::ExecuteScript(), TGo4AnalysisStepException::Handle(), TGo4EventElement::Init(), main(), TGo4Analysis::MakeEllipseCond(), TGo4Analysis::MakeGraph(), TGo4Analysis::MakeGraph(), TGo4Analysis::MakeListCond(), TGo4Analysis::MakeParameter(), TGo4ViewPanel::MakePictureForPad(), TGo4Analysis::MakePolyCond(), TGo4Analysis::MakeRollingGraph(), TGo4Analysis::MakeTH1(), TGo4Analysis::MakeTH2(), TGo4Analysis::MakeWinCond(), TGo4Analysis::MakeWinCond(), TGo4AppControlTimer::Notify(), TGo4HDF5Source::OpenFile(), TGo4HDF5Store::OpenFile(), TGo4CompositeEvent::operator[](), TGo4DabcAccess::ProcessCommandReply(), TGo4ViewPanel::ProcessPictureRedraw(), TGo4ViewPanel::ProduceSuperimposeObject(), TXXXCalibPar::ReadDatabase(), TGo4ObjClient::ReceiveObject(), TGo4ViewPanel::RedrawMultiGraph(), TGo4ObjClient::RequestNamesList(), TGo4ObjClient::RequestObject(), TGo4ViewPanel::SetPadDefaults(), TGo4HDF5Store::Store(), TMeshUnpackProc::UnpackBranch1(), TMeshUnpackProc::UnpackBranch2(), TMeshUnpackProc::UnpackBranch3(), TGo4CommandInvoker::UnRegister(), TMeshParameter::UpdateFrom(), TXXXCalibPar::UpdateFrom(), TYYYParameter::UpdateFrom(), and TGo4DabcProxy::UpdateHierarchy().

◆ Error() [2/2]

void TGo4Log::Error ( const char * text,
... )
static

User shortcut for message with prio 3.

References Error(), and GO4_PRINTF_ARGS.

◆ GetDefaultLogname() [1/2]

const char * TGo4Log::GetDefaultLogname ( )
static

Return default name of log file.

Definition at line 356 of file TGo4Log.cxx.

References fgcDEFAULTLOG.

Referenced by main().

◆ GetDefaultLogname() [2/2]

const char * TGo4Log::GetDefaultLogname ( )
static

Return default name of log file.

References __MESSAGETEXTLENGTH__, fgcDEBUG, fgcDEFAULTLOG, fgcERR, fgcINFO, fgcLEFT, fgcRIGHT, fgcWARN, and fguMESLEN.

◆ GetIgnoreLevel() [1/2]

Int_t TGo4Log::GetIgnoreLevel ( )
static

◆ GetIgnoreLevel() [2/2]

Int_t TGo4Log::GetIgnoreLevel ( )
static

Get threshold for output.

◆ GetLogname() [1/2]

const char * TGo4Log::GetLogname ( )
static

get name of last opened logfile

Definition at line 351 of file TGo4Log.cxx.

References fgxLogName.

Referenced by TGo4LogSettings::TGo4LogSettings().

◆ GetLogname() [2/2]

const char * TGo4Log::GetLogname ( )
static

get name of last opened logfile

◆ GO4INCPATH() [1/2]

const char * TGo4Log::GO4INCPATH ( )
static

Return include path for this Go4 installation.

Definition at line 187 of file TGo4Log.cxx.

Referenced by main().

◆ GO4INCPATH() [2/2]

const char * TGo4Log::GO4INCPATH ( )
static

Return include path for this Go4 installation.

◆ GO4SYS() [1/2]

const char * TGo4Log::GO4SYS ( )
static

Return GO4SYS environment variable or Go4 top directory during compile (if GO4SYS) not set.

Always add trailing slash into the end of the string.

Definition at line 164 of file TGo4Log.cxx.

References fgsGO4SYS.

Referenced by QWebCanvas::QWebCanvas(), TGo4Sniffer::CreateEngine(), TGo4CommandLine::enterPressedSlot(), TGo4Analysis::ExecuteLine(), TGo4ServerProxy::GetLaunchString(), TGo4AbstractInterface::ProduceLoadLibs(), and subGO4SYS().

◆ GO4SYS() [2/2]

const char * TGo4Log::GO4SYS ( )
static

Return GO4SYS environment variable or Go4 top directory during compile (if GO4SYS) not set.

Always add trailing slash into the end of the string.

◆ Info() [1/2]

void TGo4Log::Info ( const char * text,
... )
static

User shortcut for message with prio 1.

Definition at line 302 of file TGo4Log.cxx.

References fgiIgnoreLevel, fguMESLEN, Instance(), and Message().

Referenced by TGo4FileStore::TGo4FileStore(), TGo4FileStore::TGo4FileStore(), TGo4MainTree::TGo4MainTree(), TGo4TestThreadManager::TGo4TestThreadManager(), TGo4TreeStore::TGo4TreeStore(), TGo4TreeStore::TGo4TreeStore(), TMeshAnalysis::TMeshAnalysis(), TMeshB12AnlProc::TMeshB12AnlProc(), TMeshB1AnlProc::TMeshB1AnlProc(), TMeshB2AnlProc::TMeshB2AnlProc(), TMeshB3AnlProc::TMeshB3AnlProc(), TMeshFinalProc::TMeshFinalProc(), TMeshProviderProc::TMeshProviderProc(), TMeshUnpackProc::TMeshUnpackProc(), TXXXAnalysis::TXXXAnalysis(), TXXXAnlProc::TXXXAnlProc(), TXXXEvent::TXXXEvent(), TXXXEvent::TXXXEvent(), TXXXProc::TXXXProc(), TXXXProc::TXXXProc(), TXXXStore::TXXXStore(), TXXXUnpackProc::TXXXUnpackProc(), TYYYAnalysis::TYYYAnalysis(), TYYYUnpackProc::TYYYUnpackProc(), TGo4Display::~TGo4Display(), TMeshAnalysis::~TMeshAnalysis(), TXXXAnalysis::~TXXXAnalysis(), TXXXAnlProc::~TXXXAnlProc(), TXXXEvent::~TXXXEvent(), TXXXProc::~TXXXProc(), TXXXUnpackProc::~TXXXUnpackProc(), TYYYAnalysis::~TYYYAnalysis(), TGo4TaskManager::AddClient(), TGo4FileSource::BuildEvent(), TXXXProc::BuildEvent(), TGo4EventProcessor::Clear(), TGo4EventSource::Clear(), TGo4EventStore::Clear(), TYYYEventSource::Close(), TGo4FileSource::CloseCurrentFile(), TGo4HDF5Source::CloseCurrentFile(), TGo4ClientTask::ConnectServer(), CreateDefaultAnalysis(), TGo4StepFactory::CreateEventProcessor(), TGo4StepFactory::CreateEventSource(), TGo4StepFactory::CreateEventStore(), TGo4StepFactory::CreateInputEvent(), TGo4StepFactory::CreateOutputEvent(), TGo4TaskManager::DisConnectClient(), TGo4ComQuit::ExeCom(), TGo4Analysis::ExecuteScript(), TGo4FitPanel::Fitter_PrintParameters(), Info(), TGo4EventElement::Init(), TMeshB12OutputEvent::Init(), TMeshB1InputEvent::Init(), TMeshB1OutputEvent::Init(), TMeshB2InputEvent::Init(), TMeshB2OutputEvent::Init(), TMeshB3InputEvent::Init(), TMeshB3OutputEvent::Init(), TMeshFinalEvent::Init(), TMeshRawEvent::Init(), TGo4Analysis::InitEventClasses(), TGo4Analysis::LoadObjects(), main(), TGo4Analysis::MakeParameter(), TGo4Analysis::MakeTH1(), TGo4Analysis::MakeTH2(), TGo4MbsFile::NextEvent(), TGo4MbsSource::NextEvent(), TGo4MbsFile::Open(), TYYYEventSource::Open(), TGo4HDF5Source::OpenFile(), TGo4HDF5Store::OpenFile(), TGo4EventElement::PrintEvent(), TYYYRawEvent::ReAllocate(), TGo4AnalysisObjectManager::SetParameter(), TXXXStore::Store(), TGo4EventCalibration::UpdateFrom(), TYYYParameter::UpdateFrom(), TGo4Parameter::UpdateFromUrl(), TMeshAnalysis::UserEventFunc(), TXXXAnalysis::UserEventFunc(), TMeshAnalysis::UserPostLoop(), TXXXAnalysis::UserPostLoop(), TYYYAnalysis::UserPostLoop(), TMeshAnalysis::UserPreLoop(), TXXXAnalysis::UserPreLoop(), TYYYAnalysis::UserPreLoop(), and TGo4HDF5Store::WriteToStore().

◆ Info() [2/2]

void TGo4Log::Info ( const char * text,
... )
static

User shortcut for message with prio 1.

References GO4_PRINTF_ARGS, and Info().

◆ Instance() [1/2]

TGo4Log * TGo4Log::Instance ( )
static

Definition at line 90 of file TGo4Log.cxx.

References TGo4Log(), and fgxInstance.

Referenced by Debug(), Error(), Info(), main(), Message(), StartTracing(), StopTracing(), and Warn().

◆ Instance() [2/2]

TGo4Log * TGo4Log::Instance ( )
static

References TGo4Log().

◆ IsAutoEnabled() [1/2]

Bool_t TGo4Log::IsAutoEnabled ( )
static

◆ IsAutoEnabled() [2/2]

Bool_t TGo4Log::IsAutoEnabled ( )
static

get current user boolean

◆ IsLogfileEnabled() [1/2]

Bool_t TGo4Log::IsLogfileEnabled ( )
static

get current logfile state

Definition at line 376 of file TGo4Log.cxx.

References fgbLogfileEnabled.

Referenced by TGo4Log(), and TGo4LogSettings::TGo4LogSettings().

◆ IsLogfileEnabled() [2/2]

Bool_t TGo4Log::IsLogfileEnabled ( )
static

get current logfile state

◆ IsOutputEnabled() [1/2]

Bool_t TGo4Log::IsOutputEnabled ( )
static

get current output state

Definition at line 366 of file TGo4Log.cxx.

References fgbOutputEnabled.

Referenced by TGo4LogSettings::TGo4LogSettings(), TGo4Analysis::SendMessageToGUI(), and TGo4Task::SendStatusMessage().

◆ IsOutputEnabled() [2/2]

Bool_t TGo4Log::IsOutputEnabled ( )
static

get current output state

◆ LogfileEnable() [1/2]

void TGo4Log::LogfileEnable ( Bool_t on = kTRUE)
static

switch writing to logfile on or off

Definition at line 371 of file TGo4Log.cxx.

References fgbLogfileEnabled.

Referenced by TGo4Log(), TGo4MainWindow::LogSettingsSlot(), main(), and OpenLogfile().

◆ LogfileEnable() [2/2]

void TGo4Log::LogfileEnable ( Bool_t on = kTRUE)
static

switch writing to logfile on or off

◆ Message() [1/2]

const char * TGo4Log::Message ( Int_t prio,
const char * text,
... )
static

Display a message.

Argument pri defines message priority: 0: debug / trace output 1: info message 2: warning message >=3: error message Method returns formatted message string as printed out for further use

Definition at line 214 of file TGo4Log.cxx.

References __MESSAGETEXTLENGTH__, fgbLogfileEnabled, fgbOutputEnabled, fgcDEBUG, fgcERR, fgcINFO, fgcLEFT, fgcMessagetext, fgcRIGHT, fgcWARN, fgiIgnoreLevel, fgSniffer, fguMESLEN, Instance(), ProcessRedirection(), and WriteLogfile().

Referenced by Debug(), Error(), TGo4AbstractInterface::ExecuteLine(), TGo4ExportManager::Export(), TGo4ExportManager::Export(), TGo4ExportManager::Export(), TGo4ExportManager::Export(), TGo4ExportManager::Export(), TGo4ExportManager::Export(), TGo4ExportManager::ExportASCII(), TGo4ExportManager::ExportASCII(), TGo4BrowserProxy::ExportItemsTo(), TGo4ExportManager::ExportRadware(), TGo4ExportManager::ExportRadware(), TGo4ExportManager::ExportRadware(), TGo4ExportManager::ExportRoot(), TGo4ExportManager::ExportXML(), TGo4UserException::Handle(), TGo4ExportManager::ImportHistogram(), TGo4ExportManager::ImportHistogramGo4Ascii(), TGo4ExportManager::ImportHistogramOrtec(), TGo4BrowserProxy::ImportObjectFromFile(), Info(), TGo4Condition::Print(), TGo4Marker::Print(), TGo4ConditionInfo::PrintLog_clicked(), TGo4HistogramInfo::PrintLog_clicked(), TGo4Analysis::SendMessageToGUI(), TGo4Sniffer::SendStatusMessage(), TGo4Task::SendStatusMessage(), TGo4Analysis::ShutdownServer(), TGo4MainWindow::StatusMessage(), TGo4AnalysisWebStatus::UpdateFromUrl(), TGo4Condition::UpdateFromUrl(), TGo4PolyCond::UpdateFromUrl(), TGo4ShapedCond::UpdateFromUrl(), TGo4WinCond::UpdateFromUrl(), and Warn().

◆ Message() [2/2]

const char * TGo4Log::Message ( Int_t prio,
const char * text,
... )
static

Display a message.

Argument pri defines message priority: 0: debug / trace output 1: info message 2: warning message >=3: error message Method returns formatted message string as printed out for further use

References GO4_PRINTF2_ARGS.

◆ OpenLogfile() [1/2]

void TGo4Log::OpenLogfile ( const char * name = nullptr,
const char * headercomment = nullptr,
Bool_t appendmode = kFALSE )
static

Open file of name for logmessage output.

If name == nullptr, use defaultname containing pid. Optionally, headercomment text is set at beginning of file. If appendmode is true, existing file of same name is reused and extended by new messages.

Definition at line 391 of file TGo4Log.cxx.

References CloseLogfile(), fguMESLEN, fgxLogfile, fgxLogName, LogfileEnable(), and WriteLogfile().

Referenced by TGo4Log(), TGo4MainWindow::LogSettingsSlot(), and main().

◆ OpenLogfile() [2/2]

void TGo4Log::OpenLogfile ( const char * name = nullptr,
const char * headercomment = nullptr,
Bool_t appendmode = kFALSE )
static

Open file of name for logmessage output.

If name == nullptr, use defaultname containing pid. Optionally, headercomment text is set at beginning of file. If appendmode is true, existing file of same name is reused and extended by new messages.

◆ OutputEnable() [1/2]

void TGo4Log::OutputEnable ( Bool_t on = kTRUE)
static

switch output on or off

Definition at line 361 of file TGo4Log.cxx.

References fgbOutputEnabled.

Referenced by TGo4MainWindow::LogSettingsSlot(), TGo4Analysis::SendMessageToGUI(), and TGo4Task::SendStatusMessage().

◆ OutputEnable() [2/2]

void TGo4Log::OutputEnable ( Bool_t on = kTRUE)
static

switch output on or off

◆ Printf() [1/2]

void TGo4Log::Printf ( Bool_t _stdout,
const char * text )
static

Make direct printf without log file or logger.

Definition at line 262 of file TGo4Log.cxx.

References ProcessRedirection().

Referenced by Printf().

◆ Printf() [2/2]

void TGo4Log::Printf ( Bool_t _stdout,
const char * text )
static

Make direct printf without log file or logger.

References Printf().

◆ PrintRate() [1/2]

void TGo4Log::PrintRate ( ULong64_t cnt,
double rate )
static

Printout rate and events count, handle redirection.

Definition at line 278 of file TGo4Log.cxx.

References ProcessRedirection().

Referenced by PrintRate(), TGo4Analysis::RunImplicitLoop(), and TGo4AnalysisClient::UpdateRate().

◆ PrintRate() [2/2]

void TGo4Log::PrintRate ( ULong64_t cnt,
double rate )
static

Printout rate and events count, handle redirection.

References PrintRate().

◆ ProcessRedirection() [1/2]

void TGo4Log::ProcessRedirection ( int kind = 0)
staticprivate

Definition at line 126 of file TGo4Log.cxx.

References fgSniffer, fgStdPipe, and fgStdSave.

Referenced by Message(), TLogTimer::Notify(), Printf(), and PrintRate().

◆ ProcessRedirection() [2/2]

◆ set_trace_level() [1/2]

void TGo4Log::set_trace_level ( int )
inlinestatic

dummy for compatibility

Definition at line 136 of file TGo4Log.h.

References set_trace_level().

Referenced by set_trace_level().

◆ set_trace_level() [2/2]

void TGo4Log::set_trace_level ( int )
inlinestatic

dummy for compatibility

Definition at line 136 of file TGo4Log.h.

References set_trace_level().

◆ SetIgnoreLevel() [1/2]

void TGo4Log::SetIgnoreLevel ( Int_t level)
static

Define threshold for output.

Definition at line 340 of file TGo4Log.cxx.

References fgiIgnoreLevel.

Referenced by TGo4MainWindow::LogSettingsSlot(), main(), StartTracing(), and StopTracing().

◆ SetIgnoreLevel() [2/2]

void TGo4Log::SetIgnoreLevel ( Int_t level)
static

Define threshold for output.

◆ SetSniffer() [1/2]

void TGo4Log::SetSniffer ( TNamed * sniff)
static

Definition at line 159 of file TGo4Log.cxx.

References fgSniffer.

Referenced by TGo4Sniffer::TGo4Sniffer(), and TGo4Sniffer::~TGo4Sniffer().

◆ SetSniffer() [2/2]

void TGo4Log::SetSniffer ( TNamed * sniff)
static

◆ SetTracePriority() [1/2]

void TGo4Log::SetTracePriority ( int )
inlinestatic

dummy for compatibility

Definition at line 139 of file TGo4Log.h.

◆ SetTracePriority() [2/2]

void TGo4Log::SetTracePriority ( int )
inlinestatic

dummy for compatibility

Definition at line 139 of file TGo4Log.h.

◆ StartTracing() [1/2]

void TGo4Log::StartTracing ( )
inlinestatic

For backward compatibility.

Definition at line 142 of file TGo4Log.h.

References Instance(), and SetIgnoreLevel().

◆ StartTracing() [2/2]

void TGo4Log::StartTracing ( )
inlinestatic

For backward compatibility.

Definition at line 142 of file TGo4Log.h.

References Instance(), and SetIgnoreLevel().

◆ StopTracing() [1/2]

void TGo4Log::StopTracing ( )
inlinestatic

For backward compatibility.

Definition at line 145 of file TGo4Log.h.

References Instance(), and SetIgnoreLevel().

◆ StopTracing() [2/2]

void TGo4Log::StopTracing ( )
inlinestatic

For backward compatibility.

Definition at line 145 of file TGo4Log.h.

References Instance(), and SetIgnoreLevel().

◆ subGO4SYS() [1/2]

◆ subGO4SYS() [2/2]

TString TGo4Log::subGO4SYS ( const char * subdir)
static

Return subdirectory in the GO4SYS.

Always add trailing slash into the end of the string.

◆ Warn() [1/2]

◆ Warn() [2/2]

void TGo4Log::Warn ( const char * text,
... )
static

User shortcut for message with prio 2.

References GO4_PRINTF_ARGS, and Warn().

◆ WriteLogfile() [1/2]

void TGo4Log::WriteLogfile ( const char * text,
Bool_t withtime = kTRUE )
static

Write text to current logfile if this is open.

Prefix current datime in each line if "withtime" is true

Definition at line 428 of file TGo4Log.cxx.

References fgbLogfileEnabled, and fgxLogfile.

Referenced by main(), Message(), OpenLogfile(), and WriteLogfile().

◆ WriteLogfile() [2/2]

void TGo4Log::WriteLogfile ( const char * text,
Bool_t withtime = kTRUE )
static

Write text to current logfile if this is open.

Prefix current datime in each line if "withtime" is true

References WriteLogfile().

◆ TLogTimer

TLogTimer
friend

Definition at line 182 of file TGo4Log.h.

References TLogTimer.

Referenced by EnableRedirection(), ProcessRedirection(), and TLogTimer.

Field Documentation

◆ fgbAutoMode

Bool_t TGo4Log::fgbAutoMode = kFALSE
staticprivate

User boolean to write log on demand or not.

Definition at line 203 of file TGo4Log.h.

Referenced by AutoEnable(), IsAutoEnabled(), and ProcessRedirection().

◆ fgbLogfileEnabled

Bool_t TGo4Log::fgbLogfileEnabled = kFALSE
staticprivate

General switch on/off log file output.

Definition at line 200 of file TGo4Log.h.

Referenced by IsLogfileEnabled(), LogfileEnable(), Message(), ProcessRedirection(), and WriteLogfile().

◆ fgbOutputEnabled

Bool_t TGo4Log::fgbOutputEnabled = kTRUE
staticprivate

General switch on/off log output.

Definition at line 197 of file TGo4Log.h.

Referenced by IsOutputEnabled(), Message(), OutputEnable(), and ProcessRedirection().

◆ fgcDEBUG

const char * TGo4Log::fgcDEBUG = "d"
static

System debug message indicator.

Definition at line 157 of file TGo4Log.h.

Referenced by GetDefaultLogname(), and Message().

◆ fgcDEFAULTLOG

const char * TGo4Log::fgcDEFAULTLOG = "go4logfile.txt"
static

Name of default logfile.

Definition at line 169 of file TGo4Log.h.

Referenced by TGo4Log(), and GetDefaultLogname().

◆ fgcERR

const char * TGo4Log::fgcERR = "!"
static

Error message indicator.

Definition at line 166 of file TGo4Log.h.

Referenced by GetDefaultLogname(), and Message().

◆ fgcINFO

const char * TGo4Log::fgcINFO = "*"
static

Info message indicator.

Definition at line 160 of file TGo4Log.h.

Referenced by GetDefaultLogname(), and Message().

◆ fgcLEFT

const char * TGo4Log::fgcLEFT = "GO4-"
static

Prompt character left side.

Definition at line 151 of file TGo4Log.h.

Referenced by GetDefaultLogname(), and Message().

◆ fgcMessagetext

char TGo4Log::fgcMessagetext
staticprivate

Keeps latest message with all format indicators.

Definition at line 206 of file TGo4Log.h.

Referenced by Message(), and ProcessRedirection().

◆ fgcRIGHT

const char * TGo4Log::fgcRIGHT = " "
static

Prompt character right side.

Definition at line 154 of file TGo4Log.h.

Referenced by GetDefaultLogname(), and Message().

◆ fgcWARN

const char * TGo4Log::fgcWARN = "#"
static

Warning message indicator.

Definition at line 163 of file TGo4Log.h.

Referenced by GetDefaultLogname(), and Message().

◆ fgiIgnoreLevel

Int_t TGo4Log::fgiIgnoreLevel = 1
staticprivate

all Messages with lower level are suppressed

Definition at line 194 of file TGo4Log.h.

Referenced by Debug(), GetIgnoreLevel(), Info(), Message(), ProcessRedirection(), SetIgnoreLevel(), and Warn().

◆ fgsGO4SYS

TString TGo4Log::fgsGO4SYS = ""
staticprivate

Definition at line 214 of file TGo4Log.h.

Referenced by GO4SYS(), and ProcessRedirection().

◆ fgSniffer

TNamed * TGo4Log::fgSniffer = nullptr
staticprivate

value of GO4SYS during run

Definition at line 216 of file TGo4Log.h.

Referenced by Message(), ProcessRedirection(), and SetSniffer().

◆ fgStdPipe

int TGo4Log::fgStdPipe = {-1, -1}
staticprivate

optional object to get all output via SetTitle method

Definition at line 55 of file TGo4Log.h.

Referenced by EnableRedirection(), and ProcessRedirection().

◆ fgStdSave

int TGo4Log::fgStdSave = -1
staticprivate

redirected pipe for stdout

Definition at line 219 of file TGo4Log.h.

Referenced by EnableRedirection(), and ProcessRedirection().

◆ fgTimer

TLogTimer * TGo4Log::fgTimer = nullptr
staticprivate

saved file for stdout

Definition at line 221 of file TGo4Log.h.

Referenced by EnableRedirection(), and ProcessRedirection().

◆ fgxInstance

TGo4Log * TGo4Log::fgxInstance = nullptr
staticprivate

Definition at line 188 of file TGo4Log.h.

Referenced by Instance(), and ProcessRedirection().

◆ fgxLogfile

void * TGo4Log::fgxLogfile = nullptr
staticprivate

optional logfile to store messages with time

Definition at line 209 of file TGo4Log.h.

Referenced by CloseLogfile(), OpenLogfile(), ProcessRedirection(), and WriteLogfile().

◆ fgxLogName

TString TGo4Log::fgxLogName = TGo4Log::fgcDEFAULTLOG
staticprivate

Name of last logfile set.

Definition at line 212 of file TGo4Log.h.

Referenced by GetLogname(), OpenLogfile(), and ProcessRedirection().

◆ fgxMutex

TMutex * TGo4Log::fgxMutex = nullptr
staticprivate

we use own mutex to protect the logging instance

Definition at line 191 of file TGo4Log.h.

Referenced by TGo4Log(), and ProcessRedirection().


The documentation for this class was generated from the following files: