Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::Logging::NamedOutputDecorator Exception Referencefinal

decorate debug message with a name More...

#include <acts/blob/sPHENIX/Core/include/Acts/Utilities/Logger.hpp>

+ Inheritance diagram for Acts::Logging::NamedOutputDecorator:
+ Collaboration diagram for Acts::Logging::NamedOutputDecorator:

Public Member Functions

 NamedOutputDecorator (std::unique_ptr< OutputPrintPolicy > wrappee, const std::string &name, unsigned int maxWidth=15)
 constructor
 
void flush (const Level &lvl, const std::string &input) override
 flush the debug message to the destination stream
 
std::unique_ptr
< OutputPrintPolicy
clone (const std::string &name) const override
 
const std::string & name () const override
 
- Public Member Functions inherited from Acts::Logging::OutputDecorator
 OutputDecorator (std::unique_ptr< OutputPrintPolicy > wrappee)
 constructor wrapping actual output print policy
 
- Public Member Functions inherited from Acts::Logging::OutputPrintPolicy
virtual ~OutputPrintPolicy ()=default
 virtual default destructor
 

Private Attributes

std::string m_name
 name to be prepended
 
unsigned int m_maxWidth
 maximum width of field for printing the name
 

Additional Inherited Members

- Protected Attributes inherited from Acts::Logging::OutputDecorator
std::unique_ptr
< OutputPrintPolicy
m_wrappee
 wrapped object for printing the debug message
 

Detailed Description

decorate debug message with a name

The debug message is complemented with a name.

Definition at line 373 of file Logger.hpp.

View newest version in sPHENIX GitHub at line 373 of file Logger.hpp

Constructor & Destructor Documentation

Acts::Logging::NamedOutputDecorator::NamedOutputDecorator ( std::unique_ptr< OutputPrintPolicy wrappee,
const std::string &  name,
unsigned int  maxWidth = 15 
)
inline

constructor

Parameters
[in]wrappeeoutput print policy object to be wrapped
[in]namename to be added to debug message
[in]maxWidthmaximum width of field used for name

Definition at line 380 of file Logger.hpp.

View newest version in sPHENIX GitHub at line 380 of file Logger.hpp

Member Function Documentation

std::unique_ptr<OutputPrintPolicy> Acts::Logging::NamedOutputDecorator::clone ( const std::string &  name) const
inlineoverridevirtual

Make a copy of this print policy with a new name

Parameters
namethe new name
Returns
the copy

Implements Acts::Logging::OutputPrintPolicy.

Definition at line 403 of file Logger.hpp.

View newest version in sPHENIX GitHub at line 403 of file Logger.hpp

References m_maxWidth, Acts::Logging::OutputDecorator::m_wrappee, and name().

+ Here is the call graph for this function:

void Acts::Logging::NamedOutputDecorator::flush ( const Level lvl,
const std::string &  input 
)
inlineoverridevirtual

flush the debug message to the destination stream

Parameters
[in]lvldebug level of debug message
[in]inputtext of debug message

This function prepends the given name to the debug message and then delegates the flushing of the whole message to its wrapped object.

Reimplemented from Acts::Logging::OutputDecorator.

Definition at line 393 of file Logger.hpp.

View newest version in sPHENIX GitHub at line 393 of file Logger.hpp

References Acts::Logging::OutputDecorator::flush(), digitization_config::input, left(), m_maxWidth, m_name, and os.

+ Here is the call graph for this function:

const std::string& Acts::Logging::NamedOutputDecorator::name ( ) const
inlineoverridevirtual

Get this named output decorators name

Returns
the name

Reimplemented from Acts::Logging::OutputDecorator.

Definition at line 411 of file Logger.hpp.

View newest version in sPHENIX GitHub at line 411 of file Logger.hpp

References m_name.

Referenced by clone().

+ Here is the caller graph for this function:

Member Data Documentation

unsigned int Acts::Logging::NamedOutputDecorator::m_maxWidth
private

maximum width of field for printing the name

Definition at line 418 of file Logger.hpp.

View newest version in sPHENIX GitHub at line 418 of file Logger.hpp

Referenced by clone(), and flush().

std::string Acts::Logging::NamedOutputDecorator::m_name
private

name to be prepended

Definition at line 415 of file Logger.hpp.

View newest version in sPHENIX GitHub at line 415 of file Logger.hpp

Referenced by flush(), and name().


The documentation for this exception was generated from the following file: