ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
thread-safe output stream More...
#include <acts/blob/master/Core/include/Acts/Utilities/Logger.hpp>
Public Member Functions | |
OutStream (OutputFunc output) | |
construct stream object | |
OutStream (const OutStream ©) | |
copy constructor | |
~OutStream () | |
destructor | |
template<typename T > | |
OutStream & | operator<< (T &&input) |
stream input operator forwarded to internal cache | |
template<typename T > | |
OutStream & | operator<< (T &(*f)(T &)) |
forward stream modifiers to internal cache | |
Private Types | |
using | OutputFunc = std::function< void(const std::ostringstream &)> |
function type for output flushing | |
Private Attributes | |
std::ostringstream | m_stream |
internal cache of stream | |
OutputFunc | m_outputFunctor |
output function called for flushing cache upon destruction | |
thread-safe output stream
This classes caches the output internally and only flushes it to the destination stream once it is destroyed. Using local instances of this class therefore provides a thread-safe way for printing debug messages.
Definition at line 201 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 201 of file Logger.hpp
|
private |
function type for output flushing
Definition at line 203 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 203 of file Logger.hpp
|
inlineexplicit |
construct stream object
[in] | output | function object called for flushing the internal cache |
Definition at line 210 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 210 of file Logger.hpp
|
inline |
copy constructor
[in] | copy | stream object to copy |
Definition at line 216 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 216 of file Logger.hpp
References m_stream.
|
inline |
destructor
When calling the destructor, the internal cache is flushed using the function provided during construction.
Definition at line 225 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 225 of file Logger.hpp
References m_outputFunctor, and m_stream.
stream input operator forwarded to internal cache
T | input type |
[in] | input | content added to the stream |
Definition at line 233 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 233 of file Logger.hpp
forward stream modifiers to internal cache
T | stream type |
[in] | f | stream modifier |
Definition at line 244 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 244 of file Logger.hpp
|
private |
output function called for flushing cache upon destruction
Definition at line 254 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 254 of file Logger.hpp
Referenced by ~OutStream().
|
private |
internal cache of stream
Definition at line 251 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 251 of file Logger.hpp
Referenced by operator<<(), OutStream(), and ~OutStream().