|
SLIC
6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
|
A class for streaming messages to a log. More...
#include <LogStream.hh>
Public Member Functions | |
| LogStream & | always () |
| void | always (const std::string &mesg) |
| int | bad () const |
| void | clear (std::ios_base::iostate _i=std::ios_base::failbit) |
| LogStream & | debug () |
| void | debug (const std::string &mesg) |
| int | eof () const |
| LogStream & | error () |
| void | error (const std::string &mesg) |
| LogStream & | fatal () |
| void | fatal (const std::string &mesg) |
| char | fill () const |
| char | fill (char v) |
| long | flags () const |
| long | flags (std::ios_base::fmtflags v) |
| LOG::ELevel | getCurrentLevel () const |
| const std::string & | getName () const |
| LOG::ELevel | getOutputLevel () const |
| ostream & | getOutputStream () const |
| int | good () const |
| bool | isActive () const |
| void | log (const std::string &mesg) |
| void | log (const std::string &message, const LOG::ELevel &level) |
| LogStream & | okay () |
| void | okay (const std::string &mesg) |
| LogStream & | operator<< (const LOG::ELevel &level) |
| LogStream & | operator<< (const LOG::EManip &x) |
| template<typename T > | |
| LogStream & | operator<< (const std::vector< T > &v) |
| template<typename T > | |
| LogStream & | operator<< (const T &arg) |
| LogStream & | operator<< (ios &(*manip)(std::ios &)) |
| LogStream & | operator<< (std::ios_base &(*manip)(std::ios_base &)) |
| int | precision () const |
| int | precision (int v) |
| int | rdstate () const |
| void | setCurrentLevel (LOG::ELevel level) |
| long | setf (std::ios_base::fmtflags _f, std::ios_base::fmtflags _m) |
| long | setf (std::ios_base::fmtflags v) |
| void | setOutputFile (const std::string &file) |
| void | setOutputLevel (const LOG::ELevel &outputLevel) |
| void | unsetf (std::ios_base::fmtflags _l) |
| LogStream & | verbose () |
| void | verbose (const std::string &mesg) |
| LogStream & | warning () |
| void | warning (const std::string &mesg) |
| int | width () const |
| int | width (int v) |
Protected Member Functions | |
| LogStream () | |
| LogStream (std::string name, LOG::ELevel level, ostream *os=&std::cout) | |
| virtual | ~LogStream () |
Private Member Functions | |
| void | setActive (bool active) |
Private Attributes | |
| bool | m_active |
| LOG::ELevel | m_currentMessageLevel |
| std::ofstream * | m_fos |
| std::string | m_name |
| ostream * | m_os |
| LOG::ELevel | m_outputLevel |
Friends | |
| class | LogManager |
A class for streaming messages to a log.
Definition at line 71 of file LogStream.hh.
|
inlineprotected |
Class constructor.
| [in] | name | The name of the LogStream. |
| [in] | level | The level of the logger. |
| [in] | os | The output stream for printing message. |
Definition at line 81 of file LogStream.hh.
|
inlineprotected |
Class constructor providing default arguments.
Definition at line 89 of file LogStream.hh.
|
inlineprotectedvirtual |
Class destructor.
Definition at line 97 of file LogStream.hh.
|
inline |
Set the current level to always.
Definition at line 278 of file LogStream.hh.
References LOG::always.
Referenced by PhysicsListManager::printAvailablePhysicsLists().
|
inline |
Log a message at always level.
| [in] | mesg | The message. |
Definition at line 351 of file LogStream.hh.
References LOG::always, and LogStream::log().
|
inline |
Return non-zero if error bits are set; otherwise return zero.
Definition at line 568 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Set a new value for the internal error state flags.
| [in] | _i | The new error state flag value. |
Definition at line 596 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Set the current level to debug.
Definition at line 230 of file LogStream.hh.
References LOG::debug.
|
inline |
Log a message at debug level.
| [in] | mesg | The message. |
Definition at line 303 of file LogStream.hh.
References LOG::debug, and LogStream::log().
|
inline |
Return zero if EOF has not been reached; otherwise return non-zero.
Definition at line 560 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Set the current level to error.
Definition at line 262 of file LogStream.hh.
References LOG::error.
Referenced by LcioHitsCollectionBuilder::addParticleContributions(), LcioHitsCollectionBuilder::createHit(), and EventSourceManager::setupEventSource().
|
inline |
Log a message at error level.
| [in] | mesg | The message. |
Definition at line 335 of file LogStream.hh.
References LOG::error, and LogStream::log().
|
inline |
Set the current level to fatal.
Definition at line 270 of file LogStream.hh.
References LOG::fatal.
|
inline |
Log a message at fatal level.
| [in] | mesg | The message. |
Definition at line 343 of file LogStream.hh.
References LOG::fatal, and LogStream::log().
|
inline |
Get the fill char.
Definition at line 510 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Set the fill char.
Definition at line 519 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Get the current set of flags.
Definition at line 484 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Set the formatting flags.
| [in] | v | The formatting flags. |
Definition at line 493 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Get the current log level for messages.
Definition at line 151 of file LogStream.hh.
References LogStream::m_currentMessageLevel.
Referenced by LogStream::operator<<().
|
inline |
Get the name of the LogStream.
Definition at line 111 of file LogStream.hh.
References LogStream::m_name.
Referenced by LogMessenger::defineCommands(), and LogStream::operator<<().
|
inline |
Get the output level which determines which messages will be shown.
Definition at line 127 of file LogStream.hh.
References LogStream::m_outputLevel.
Referenced by LogStream::log(), and LogStream::operator<<().
|
inline |
Get the output stream.
Definition at line 143 of file LogStream.hh.
References LogStream::m_os.
Referenced by LogStream::bad(), LogStream::clear(), MCParticleManager::createPrimary(), LogStream::eof(), LogStream::fill(), LogStream::flags(), LogStream::good(), LogStream::operator<<(), LogStream::precision(), CommandLineProcessor::printOptions(), LogStream::rdstate(), LogStream::setf(), LogStream::unsetf(), and LogStream::width().
|
inline |
Return 0 if no error bits are set.
Definition at line 552 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Get whether this LogStream is active or not.
Definition at line 119 of file LogStream.hh.
References LogStream::m_active.
Referenced by LogStream::bad(), LogStream::clear(), LogStream::eof(), LogStream::fill(), LogStream::flags(), LogStream::good(), LogStream::operator<<(), LogStream::precision(), LogStream::rdstate(), LogStream::setf(), LogStream::unsetf(), and LogStream::width().
|
inline |
Log a message at the current level (NOT output level).
| [in] | mesg | The message. |
Definition at line 295 of file LogStream.hh.
References LogStream::getOutputLevel(), and LogStream::log().
|
inline |
Log a message at a certain level.
| [in] | mesg | The message contents. |
| [in] | level | The log level. |
Definition at line 287 of file LogStream.hh.
References LOG::done, and LOG::level.
Referenced by LogStream::always(), LogStream::debug(), LogStream::error(), LogStream::fatal(), LogStream::log(), LogStream::okay(), LogStream::verbose(), and LogStream::warning().
|
inline |
Set the current level to okay.
Definition at line 246 of file LogStream.hh.
References LOG::okay.
Referenced by LcioManager::makeAutoname(), LcioManager::openLcioFile(), LcioManager::setDetectorName(), LcioManager::setFilename(), LcioManager::setPath(), and EventSourceManager::setupEventSource().
|
inline |
Log a message at okay level.
| [in] | mesg | The message. |
Definition at line 319 of file LogStream.hh.
References LogStream::log(), and LOG::okay.
|
inline |
Set the log level via streamer. Subsequent messages will be placed onto the LogStream if the level is less than or equal to the current output level. Otherwise they will be discarded.
| [in] | level | The log level. |
Definition at line 170 of file LogStream.hh.
References LogStream::getCurrentLevel(), LogStream::getOutputLevel(), LOG::level, LogStream::setActive(), and LogStream::setCurrentLevel().
|
inline |
Handle ios manipulators for the LogStream.
| [in] | x | The ios manipulator. |
Definition at line 189 of file LogStream.hh.
References LOG::done, LOG::endl, TimeUtil::getAscTime(), LogStream::getName(), LogStream::getOutputStream(), LOG::head, LogStream::isActive(), LOG::level, levelNames, LogStream::m_currentMessageLevel, LOG::name, LOG::sep, and LOG::time.
|
inline |
Specialization stream operator for vectors.
| [in] | v | The input vector. |
Definition at line 454 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Templated stream operator.
| [in] | arg | The templated argument. |
Definition at line 441 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Handle STL Setiosflags manipulator.
| [in] | The | ios manipulator. |
| [in] | The | ios manipulator. |
| [in] | The | ios manipulator. |
| [in] | The | ios manipulator. |
| [in] | The | ios manipulator. |
| [in] | manip | The ios class modifier. |
Definition at line 416 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Handle ios base class modifiers.
| [in] | manip | The ios base class modifier. |
Definition at line 428 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Get the precision.
Definition at line 527 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Set the precision.
| [in] | v | The precision. |
Definition at line 536 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Get the read state.
Definition at line 544 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inlineprivate |
Set whether this LogStream is active.
| [in] | active | The setting for enabling this LogStream to print messages. |
Definition at line 608 of file LogStream.hh.
References LogStream::m_active.
Referenced by LogStream::operator<<().
|
inline |
Set the current log level for messages.
| [in] | level | The log level. |
Definition at line 159 of file LogStream.hh.
References LOG::level, and LogStream::m_currentMessageLevel.
Referenced by LogStream::operator<<().
|
inline |
Set the format flags.
| [in] | _f | The format flags. |
| [in] | _m | The mask containing the flags to be modified. |
Definition at line 578 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Set the formatting flags.
| [in] | v | The formatting flags. |
Definition at line 502 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Redirect the messages to a file.
| [in] | file | The file name. |
Definition at line 220 of file LogStream.hh.
References LogStream::m_fos, and LogStream::m_os.
Referenced by LogMessenger::SetNewValue().
|
inline |
Set the output level.
| [in] | outputLevel | The output level. |
Definition at line 135 of file LogStream.hh.
References LogStream::m_outputLevel.
Referenced by EventSourceManager::EventSourceManager(), HepPDTManager::HepPDTManager(), and LogMessenger::SetNewValue().
|
inline |
Clears the format flags selected by the mask.
| [in] | _l | The mask specifying which format flags to clear. |
Definition at line 586 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Set the current level to verbose.
Definition at line 238 of file LogStream.hh.
References LOG::verbose.
Referenced by Module::Module(), Module::~Module(), SlicApplication::run(), LcioHitsCollectionBuilder::setLongFlag(), LcioHitsCollectionBuilder::setPDGFlag(), and LcioManager::setRunNumber().
|
inline |
Log a message at verbose level.
| [in] | mesg | The message. |
Definition at line 311 of file LogStream.hh.
References LogStream::log(), and LOG::verbose.
|
inline |
Set the current level to warning.
Definition at line 254 of file LogStream.hh.
References LOG::warning.
Referenced by SlicApplication::initialize(), LcioManager::makeAutoname(), ModuleRegistry::registerModule(), and EventSourceManager::setupEventSource().
|
inline |
Log a message at warning level.
| [in] | mesg | The message. |
Definition at line 327 of file LogStream.hh.
References LogStream::log(), and LOG::warning.
|
inline |
Get the current width setting.
| [in] | The | width setting. |
Definition at line 467 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
inline |
Set the current width.
| [in] | The | width setting. |
Definition at line 476 of file LogStream.hh.
References LogStream::getOutputStream(), and LogStream::isActive().
|
friend |
Give the LogManager full access to protected constructors.
Definition at line 103 of file LogStream.hh.
|
private |
Definition at line 617 of file LogStream.hh.
Referenced by LogStream::isActive(), and LogStream::setActive().
|
private |
Definition at line 615 of file LogStream.hh.
Referenced by LogStream::getCurrentLevel(), LogStream::operator<<(), and LogStream::setCurrentLevel().
|
private |
Definition at line 618 of file LogStream.hh.
Referenced by LogStream::setOutputFile().
|
private |
Definition at line 613 of file LogStream.hh.
Referenced by LogStream::getName().
|
private |
Definition at line 616 of file LogStream.hh.
Referenced by LogStream::getOutputStream(), and LogStream::setOutputFile().
|
private |
Definition at line 614 of file LogStream.hh.
Referenced by LogStream::getOutputLevel(), and LogStream::setOutputLevel().