EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <EicRoot/blob/master/fairtools/FairLogger.h>
Public Member Functions | |
void | SetLogFileName (const char *name) |
void | SetLogToScreen (Bool_t log1) |
void | SetLogToFile (Bool_t log1) |
void | SetColoredLog (Bool_t log1) |
void | SetLogFileLevel (const char *level) |
void | SetLogScreenLevel (const char *level) |
void | SetLogVerbosityLevel (const char *vlevel) |
Bool_t | IsLogNeeded (FairLogLevel logLevel) |
void | Fatal (const char *file, const char *line, const char *func, const char *format,...) |
void | Error (const char *file, const char *line, const char *func, const char *format,...) |
void | Warning (const char *file, const char *line, const char *func, const char *format,...) |
void | Info (const char *file, const char *line, const char *func, const char *format,...) |
void | Debug (const char *file, const char *line, const char *func, const char *format,...) |
void | Debug1 (const char *file, const char *line, const char *func, const char *format,...) |
void | Debug2 (const char *file, const char *line, const char *func, const char *format,...) |
void | Debug3 (const char *file, const char *line, const char *func, const char *format,...) |
void | Debug4 (const char *file, const char *line, const char *func, const char *format,...) |
FairLogger & | GetOutputStream (FairLogLevel level, const char *file, const char *line, const char *func) |
std::ostream & | GetNullStream (FairLogLevel level) |
void | SetScreenStreamToCerr (bool errorStream) |
template<class T > | |
FairLogger & | operator<< (const T &t) |
Stream an object to the output stream. | |
FairLogger & | operator<< (std::ostream &(*manip)(std::ostream &)) |
Pass the ios_base manipulators. | |
Static Public Member Functions | |
static FairLogger * | GetLogger () |
static std::ostream & | endl (std::ostream &) |
End of the line. | |
static std::ostream & | flush (std::ostream &) |
Flush the streams. | |
Private Member Functions | |
FairLogger () | |
FairLogger (const FairLogger &) | |
FairLogger | operator= (const FairLogger &) |
~FairLogger () | |
void | Log (FairLogLevel level, const char *file, const char *line, const char *, const char *format, va_list arglist) |
void | LogFatalMessage (std::ostream &strm) |
void | OpenLogFile () |
void | CloseLogFile () |
FairLogLevel | ConvertToLogLevel (const char *level) const |
FairLogVerbosityLevel | ConvertToLogVerbosityLevel (const char *level) const |
void | GetTime () |
void | SetMinLogLevel () |
const char * | ConvertLogLevelToString (FairLogLevel level) const |
Private Attributes | |
const char * | fLogFileName |
Bool_t | fLogToScreen |
Bool_t | fLogToFile |
Bool_t | fLogColored |
FairLogLevel | fLogFileLevel |
FairLogLevel | fLogScreenLevel |
FairLogVerbosityLevel | fLogVerbosityLevel |
Int_t | fBufferSize |
Int_t | fBufferSizeNeeded |
std::vector< char > | fDynamicBuffer |
char * | fBufferPointer |
char | fTimeBuffer [fgkTimeBufferLength] |
FairLogLevel | fMinLogLevel |
FairLogLevel | fLevel |
std::ostream * | fScreenStream |
std::ostream * | fFileStream |
std::ostream * | fNullStream |
Bool_t | fLogFileOpen |
Bool_t | fIsNewLine |
Static Private Attributes | |
static FairLogger * | instance = NULL |
static const int | fgkTimeBufferLength = 80 |
Definition at line 71 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 71 of file FairLogger.h
|
private |
Definition at line 23 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 23 of file FairLogger.cxx
Referenced by GetLogger().
|
private |
|
private |
Definition at line 46 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 46 of file FairLogger.cxx
References CloseLogFile().
|
private |
Definition at line 214 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 214 of file FairLogger.cxx
References fFileStream.
Referenced by OpenLogFile(), SetLogFileName(), and ~FairLogger().
|
inlineprivate |
Definition at line 193 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 193 of file FairLogger.h
References LogLevelString.
|
private |
Definition at line 250 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 250 of file FairLogger.cxx
References DEBUG, DEBUG1, DEBUG2, DEBUG3, DEBUG4, endl(), ERROR, FAIRLOG, FATAL, INFO, and WARNING.
Referenced by SetLogFileLevel(), and SetLogScreenLevel().
|
private |
Definition at line 270 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 270 of file FairLogger.cxx
References endl(), ERROR, FAIRLOG, verbosityHIGH, verbosityLOW, and verbosityMEDIUM.
Referenced by SetLogVerbosityLevel().
void FairLogger::Debug | ( | const char * | file, |
const char * | line, | ||
const char * | func, | ||
const char * | format, | ||
... | |||
) |
Definition at line 101 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 101 of file FairLogger.cxx
References DEBUG, IsLogNeeded(), and Log().
Referenced by FairRootManager::ActivateBranch(), FairRuntimeDb::addContFactory(), PndStack::FillTrackArray(), FairRootManager::GetEventTime(), FairRootManager::OpenOutFile(), PndStack::Print(), FairRunInfo::PrintInfo(), FairRootManager::ReadMixedEvent(), FairRunAna::RunMixed(), FairRootManager::SetEventTime(), PndStack::UpdateTrackIndex(), FairRuntimeDb::writeContainer(), FairRunInfo::WriteHistosToFile(), FairRootManager::~FairRootManager(), FairRun::~FairRun(), and FairRunSim::~FairRunSim().
void FairLogger::Debug1 | ( | const char * | file, |
const char * | line, | ||
const char * | func, | ||
const char * | format, | ||
... | |||
) |
Definition at line 112 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 112 of file FairLogger.cxx
References DEBUG1, IsLogNeeded(), and Log().
void FairLogger::Debug2 | ( | const char * | file, |
const char * | line, | ||
const char * | func, | ||
const char * | format, | ||
... | |||
) |
Definition at line 123 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 123 of file FairLogger.cxx
References DEBUG2, IsLogNeeded(), and Log().
Referenced by FairRootManager::ActivateBranch(), FairModule::AddSensitiveVolume(), FairModule::ConstructOpGeometry(), FairModule::ExpandNode(), FairRootManager::GetObject(), and FairRootManager::GetObjectFromInTree().
void FairLogger::Debug3 | ( | const char * | file, |
const char * | line, | ||
const char * | func, | ||
const char * | format, | ||
... | |||
) |
Definition at line 134 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 134 of file FairLogger.cxx
References DEBUG3, IsLogNeeded(), and Log().
void FairLogger::Debug4 | ( | const char * | file, |
const char * | line, | ||
const char * | func, | ||
const char * | format, | ||
... | |||
) |
Definition at line 145 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 145 of file FairLogger.cxx
References DEBUG4, IsLogNeeded(), and Log().
|
static |
End of the line.
Definition at line 397 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 397 of file FairLogger.cxx
References FATAL, fFileStream, fIsNewLine, fLevel, fLogColored, fLogFileLevel, fLogScreenLevel, fLogToFile, fLogToScreen, flush(), fScreenStream, and LogFatalMessage().
Referenced by CbmMCEpoch::AddPoint(), ConvertToLogLevel(), ConvertToLogVerbosityLevel(), CbmStack::FillTrackArray(), CbmStack::GetCurrentTrack(), CbmModuleList::GetModuleName(), CbmMCTrack::GetNPoints(), CbmStack::GetParticle(), CbmRichReconstruction::InitExtrapolation(), CbmRichReconstruction::InitFinder(), CbmRichReconstruction::InitFitter(), CbmRichReconstruction::InitTrackAssign(), Log(), CbmStack::PopPrimaryForTracking(), CbmMCTrack::Print(), CbmStack::Print(), CbmMCTrack::SetNPoints(), CbmRichReconstruction::SetParContainers(), and CbmStack::UpdateTrackIndex().
void FairLogger::Error | ( | const char * | file, |
const char * | line, | ||
const char * | func, | ||
const char * | format, | ||
... | |||
) |
Definition at line 68 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 68 of file FairLogger.cxx
References ERROR, IsLogNeeded(), and Log().
Referenced by FairRootManager::CheckFriendChains(), CbmModule::ConstructGDMLGeometry(), FairParamList::fill(), FairParamList::fillObject(), PndStack::FillTrackArray(), FairPrimaryGenerator::GenerateEvent(), PndStack::GetParticle(), FairParSet::init(), PndFieldMap::Init(), PndFieldMap::PndFieldMap(), PndStack::PopPrimaryForTracking(), PndFieldMap::ReadRootFile(), FairParamList::replace(), PndFieldMap::SetField(), PndStack::SetGeneratorFlags(), FairRunAna::SetGeomFile(), PndStack::UpdateTrackIndex(), FairParSet::write(), and PndFieldMap::WriteAsciiFile().
void FairLogger::Fatal | ( | const char * | file, |
const char * | line, | ||
const char * | func, | ||
const char * | format, | ||
... | |||
) |
Definition at line 59 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 59 of file FairLogger.cxx
Referenced by EicStlFactory::_ConstructGeometry(), FairRootManager::AddBackgroundFile(), FairRunAna::AddBackgroundFile(), FairRootManager::AddFile(), FairRunAna::AddFriend(), FairRootManager::AddFriendsToChain(), FairRunAna::AddSignalFile(), EicTrackingDigiHitProducer::AssignDigiHitClassName(), FairModule::AssignMediumAtImport(), FairRootManager::BGWindowWidthNo(), FairRootManager::BGWindowWidthTime(), FairRootManager::CheckFriendChains(), CbmModule::ConstructGDMLGeometry(), EicFieldGradDetector::ConstructGeometry(), EicFieldMapDetector::ConstructGeometry(), EicCadFile::ConstructGeometry(), EicDetector::ConstructGeometry(), FairModule::ConstructRootGeometry(), EicStlFactory::DumpTmpStlFile(), EicMagneticFieldGrad::EicMagneticFieldGrad(), EicMagneticFieldMap::EicMagneticFieldMap(), EicStlFactory::EicStlFactory(), EicHtcTask::Exec(), FairPrimaryGenerator::GenerateEvent(), EicRunDigi::ImportRealHits(), FairRunAna::Init(), EicMediaHub::Init(), EicMagneticFieldMap::Initialize(), FairTask::InitTask(), FairRootManager::OpenInChain(), FairRootManager::OpenInTree(), FairRootManager::OpenOutFile(), FairRootManager::OpenSignalChain(), EicDetector::ProcessHits(), FairRootManager::Register(), FairTask::ReInitTask(), FairRunAna::RunWithTimeStamps(), FairRootManager::SetBackgroundFile(), FairModule::SetGeometryFileName(), FairRunAna::SetGeomFile(), FairRunAna::SetSignalFile(), and FairRootManager::SetSignalFile().
|
static |
Flush the streams.
Definition at line 422 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 422 of file FairLogger.cxx
References fFileStream, fLogToFile, fLogToScreen, and fScreenStream.
Referenced by endl(), and LogFatalMessage().
|
static |
Definition at line 51 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 51 of file FairLogger.cxx
References FairLogger(), and instance.
Referenced by EicCadFile::EicCadFile(), EicMagneticFieldGrad::EicMagneticFieldGrad(), EicMagneticFieldMap::EicMagneticFieldMap(), EicStlFactory::EicStlFactory(), EicMediaHub::Init(), and EicMagneticFieldMap::Initialize().
|
inline |
Definition at line 136 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 136 of file FairLogger.h
References fLevel, and fNullStream.
FairLogger & FairLogger::GetOutputStream | ( | FairLogLevel | level, |
const char * | file, | ||
const char * | line, | ||
const char * | func | ||
) |
Definition at line 308 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 308 of file FairLogger.cxx
References FATAL, fFileStream, fIsNewLine, fLevel, fLogColored, fLogFileLevel, fLogFileOpen, fLogScreenLevel, fLogToFile, fLogToScreen, fLogVerbosityLevel, fScreenStream, fTimeBuffer, GetTime(), LogLevelColor, LogLevelString, OpenLogFile(), pos(), s2, s3, verbosityHIGH, and verbosityMEDIUM.
Referenced by Log().
|
private |
Definition at line 284 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 284 of file FairLogger.cxx
References fTimeBuffer, and Acts::Test::time.
Referenced by GetOutputStream(), and LogFatalMessage().
void FairLogger::Info | ( | const char * | file, |
const char * | line, | ||
const char * | func, | ||
const char * | format, | ||
... | |||
) |
Definition at line 90 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 90 of file FairLogger.cxx
References INFO, IsLogNeeded(), and Log().
Referenced by FairRootManager::ActivateBranch(), FairRootManager::ActivateBranchInInTree(), FairRootManager::AddBackgroundFile(), FairMCApplication::AddIons(), FairRootManager::BGWindowWidthNo(), FairRunSim::CheckFlukaExec(), FairRootManager::CheckMaxEventNo(), FairIon::FairIon(), FairRootManager::ForceFill(), FairPrimaryGenerator::GenerateEvent(), FairRootManager::GetEmptyTClonesArray(), FairRootManager::GetGeoParameter(), FairRootManager::GetSignalChainNo(), FairRootManager::GetTClonesArray(), FairRunAna::Init(), FairRunSim::Init(), FairMCApplication::InitGeometry(), FairMCApplication::InitMC(), FairMCApplication::InitTasks(), FairRootManager::OpenInChain(), FairTrackPar::Print(), FairRootManager::PrintFriendList(), FairRootManager::ReadBKEvent(), FairRootManager::ReadEvent(), PndFieldMap::ReadRootFile(), FairRunAna::RunOnLmdFiles(), FairDetector::SaveGeoParams(), FairRunAna::SetBackgroundFile(), FairRootManager::SetBackgroundFile(), FairRunAna::SetContainerStatic(), FairModule::SetGeometryFileName(), FairRunAna::SetGeomFile(), FairRunSim::SetGeoModel(), FairRunSim::SetMaterials(), FairRunSim::SetMCConfig(), FairRunAna::SetSignalFile(), FairRootManager::Write(), PndFieldMap::WriteAsciiFile(), and FairRuntimeDb::writeContainer().
Bool_t FairLogger::IsLogNeeded | ( | FairLogLevel | logLevel | ) |
Definition at line 299 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 299 of file FairLogger.cxx
References fMinLogLevel.
Referenced by Debug(), Debug1(), Debug2(), Debug3(), Debug4(), Error(), Info(), and Warning().
|
private |
Definition at line 156 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 156 of file FairLogger.cxx
References endl(), fBufferPointer, fBufferSize, fBufferSizeNeeded, fDynamicBuffer, fLevel, fLogFileOpen, fLogToFile, GetOutputStream(), and OpenLogFile().
Referenced by Debug(), Debug1(), Debug2(), Debug3(), Debug4(), Error(), Fatal(), Info(), and Warning().
|
private |
Definition at line 433 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 433 of file FairLogger.cxx
References FATAL, fFileStream, fLogToFile, flush(), fScreenStream, fTimeBuffer, GetTime(), LogLevelColor, and LogLevelString.
Referenced by endl().
|
private |
Definition at line 219 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 219 of file FairLogger.cxx
References CloseLogFile(), fFileStream, fLogFileName, and fLogFileOpen.
Referenced by GetOutputStream(), Log(), and SetLogFileName().
|
inline |
Stream an object to the output stream.
Definition at line 145 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 145 of file FairLogger.h
References fFileStream, fLevel, fLogFileLevel, fLogScreenLevel, fLogToFile, fLogToScreen, and fScreenStream.
FairLogger & FairLogger::operator<< | ( | std::ostream &(*)(std::ostream &) | manip | ) |
Pass the ios_base manipulators.
Definition at line 384 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 384 of file FairLogger.cxx
References fFileStream, fLevel, fLogFileLevel, fLogScreenLevel, fLogToFile, fLogToScreen, and fScreenStream.
|
private |
|
inline |
Definition at line 92 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 92 of file FairLogger.h
References fLogColored.
|
inline |
Definition at line 94 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 94 of file FairLogger.h
References ConvertToLogLevel(), fLogFileLevel, and SetMinLogLevel().
Referenced by SetLogToFile().
void FairLogger::SetLogFileName | ( | const char * | name | ) |
Definition at line 200 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 200 of file FairLogger.cxx
References CloseLogFile(), fFileStream, fLogFileName, name, and OpenLogFile().
|
inline |
Definition at line 99 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 99 of file FairLogger.h
References ConvertToLogLevel(), fLogScreenLevel, and SetMinLogLevel().
Referenced by SetLogToScreen().
|
inline |
Definition at line 85 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 85 of file FairLogger.h
References fLogToFile, and SetLogFileLevel().
|
inline |
Definition at line 78 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 78 of file FairLogger.h
References fLogToScreen, and SetLogScreenLevel().
|
inline |
Definition at line 104 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 104 of file FairLogger.h
References ConvertToLogVerbosityLevel(), and fLogVerbosityLevel.
|
private |
Definition at line 294 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 294 of file FairLogger.cxx
References fLogFileLevel, fLogScreenLevel, and fMinLogLevel.
Referenced by SetLogFileLevel(), and SetLogScreenLevel().
void FairLogger::SetScreenStreamToCerr | ( | bool | errorStream | ) |
Definition at line 500 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 500 of file FairLogger.cxx
References fScreenStream.
void FairLogger::Warning | ( | const char * | file, |
const char * | line, | ||
const char * | func, | ||
const char * | format, | ||
... | |||
) |
Definition at line 79 of file FairLogger.cxx.
View newest version in sPHENIX GitHub at line 79 of file FairLogger.cxx
References IsLogNeeded(), Log(), and WARNING.
Referenced by FairModule::CheckIfSensitive(), FairRootManager::CheckMaxEventNo(), FairModule::ConstructASCIIGeometry(), FairModule::ConstructGeometry(), FairParamList::fillObject(), PndStack::GetCurrentTrack(), FairMCApplication::InitGeometry(), FairRootManager::RegisterWriteoutBuffer(), FairRunAna::RunWithTimeStamps(), FairModule::SetGeometryFileName(), and FairMCApplication::StopRun().
|
private |
Definition at line 206 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 206 of file FairLogger.h
Referenced by Log().
|
private |
Definition at line 203 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 203 of file FairLogger.h
Referenced by Log().
|
private |
Definition at line 204 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 204 of file FairLogger.h
Referenced by Log().
|
private |
Definition at line 205 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 205 of file FairLogger.h
Referenced by Log().
|
private |
Definition at line 213 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 213 of file FairLogger.h
Referenced by CloseLogFile(), endl(), flush(), GetOutputStream(), LogFatalMessage(), OpenLogFile(), operator<<(), and SetLogFileName().
|
staticprivate |
Definition at line 208 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 208 of file FairLogger.h
|
private |
Definition at line 216 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 216 of file FairLogger.h
Referenced by endl(), and GetOutputStream().
|
private |
Definition at line 211 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 211 of file FairLogger.h
Referenced by endl(), GetNullStream(), GetOutputStream(), Log(), and operator<<().
|
private |
Definition at line 199 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 199 of file FairLogger.h
Referenced by endl(), GetOutputStream(), and SetColoredLog().
|
private |
Definition at line 200 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 200 of file FairLogger.h
Referenced by endl(), GetOutputStream(), operator<<(), SetLogFileLevel(), and SetMinLogLevel().
|
private |
Definition at line 196 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 196 of file FairLogger.h
Referenced by OpenLogFile(), and SetLogFileName().
|
private |
Definition at line 215 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 215 of file FairLogger.h
Referenced by GetOutputStream(), Log(), and OpenLogFile().
|
private |
Definition at line 201 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 201 of file FairLogger.h
Referenced by endl(), GetOutputStream(), operator<<(), SetLogScreenLevel(), and SetMinLogLevel().
|
private |
Definition at line 198 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 198 of file FairLogger.h
Referenced by endl(), flush(), GetOutputStream(), Log(), LogFatalMessage(), operator<<(), and SetLogToFile().
|
private |
Definition at line 197 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 197 of file FairLogger.h
Referenced by endl(), flush(), GetOutputStream(), operator<<(), and SetLogToScreen().
|
private |
Definition at line 202 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 202 of file FairLogger.h
Referenced by GetOutputStream(), and SetLogVerbosityLevel().
|
private |
Definition at line 210 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 210 of file FairLogger.h
Referenced by IsLogNeeded(), and SetMinLogLevel().
|
private |
Definition at line 214 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 214 of file FairLogger.h
Referenced by GetNullStream().
|
private |
Definition at line 212 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 212 of file FairLogger.h
Referenced by endl(), flush(), GetOutputStream(), LogFatalMessage(), operator<<(), and SetScreenStreamToCerr().
|
private |
Definition at line 209 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 209 of file FairLogger.h
Referenced by GetOutputStream(), GetTime(), and LogFatalMessage().
|
staticprivate |
Definition at line 171 of file FairLogger.h.
View newest version in sPHENIX GitHub at line 171 of file FairLogger.h
Referenced by GetLogger().