ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConf::TrigConfMessaging Class Reference

Class to provide easy access to TrigConf::MsgStream for TrigConf classes. More...

#include <TrigConfMessaging.h>

Inherited by AthenaL1TopoHistSvc::AthenaL1TopoHistSvcImpl, MuctpiXMLHelper [private], MuctpiXMLParser [private], StandaloneL1TopoHistSvc::StandaloneL1TopoHistSvcImpl, TCS::ConfigurableAlg, TCS::GlobalDecision, TCS::GlobalOutput, TCS::TopoCoreSimResult, TCS::TopoInputEvent, TCS::TopoSteering, TrigConf::DBLoader, TrigConf::JsonFileLoader, TrigConf::JsonFileWriterHLT, TrigConf::JsonFileWriterL1, TrigConf::SessionMgr, TrigConf::StorageMgr, and TrigConf::TrigDBLoader.

Collaboration diagram for TrigConf::TrigConfMessaging:

Public Member Functions

 TrigConfMessaging (const std::string &name)
 Constructor with parameters.
virtual ~TrigConfMessaging ()=default
 Destructor.
bool msgLvl (const MSGTC::Level lvl) const
 Test the output level.
MsgStreamTCmsg () const
 The standard message stream.
MsgStreamTCmsg (const MSGTC::Level lvl) const
 The standard message stream.
const std::string & getName () const
 name accessor

Private Member Functions

 TrigConfMessaging ()=delete
 TrigConfMessaging (const TrigConfMessaging &rhs)=delete
TrigConfMessagingoperator= (const TrigConfMessaging &rhs)=delete

Private Attributes

boost::thread_specific_ptr< MsgStreamTCm_msg_tls
 MsgStreamTC instance (a std::cout like with print-out levels)
std::string m_name

Detailed Description

Class to provide easy access to TrigConf::MsgStream for TrigConf classes.

This is a copy&paste of AthMessaging and used in exactly the same way but without introducing Gaudi/Athena dependencies.

Definition at line 28 of file TrigConfMessaging.h.

Constructor & Destructor Documentation

◆ TrigConfMessaging() [1/3]

TrigConf::TrigConfMessaging::TrigConfMessaging ( const std::string & name)
inline

Constructor with parameters.

Parameters
nameComponent name used in the messages

Definition at line 34 of file TrigConfMessaging.h.

34 :
35 m_name(name)
36 {}

◆ ~TrigConfMessaging()

virtual TrigConf::TrigConfMessaging::~TrigConfMessaging ( )
virtualdefault

Destructor.

◆ TrigConfMessaging() [2/3]

TrigConf::TrigConfMessaging::TrigConfMessaging ( )
privatedelete

◆ TrigConfMessaging() [3/3]

TrigConf::TrigConfMessaging::TrigConfMessaging ( const TrigConfMessaging & rhs)
privatedelete

Member Function Documentation

◆ getName()

const std::string & TrigConf::TrigConfMessaging::getName ( ) const
inline

name accessor

Returns
the name

Definition at line 101 of file TrigConfMessaging.h.

101 {
102 return m_name;
103 }

◆ msg() [1/2]

MsgStreamTC & TrigConf::TrigConfMessaging::msg ( ) const
inline

The standard message stream.

Returns a reference to the message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 86 of file TrigConfMessaging.h.

87 {
88 MsgStreamTC* ms = m_msg_tls.get();
89 if (!ms) {
90 ms = new MsgStreamTC(m_name);
91 m_msg_tls.reset(ms);
92 }
93 return *ms;
94 }
boost::thread_specific_ptr< MsgStreamTC > m_msg_tls
MsgStreamTC instance (a std::cout like with print-out levels)

◆ msg() [2/2]

MsgStreamTC & TrigConf::TrigConfMessaging::msg ( const MSGTC::Level lvl) const
inline

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 96 of file TrigConfMessaging.h.

97 {
98 return msg() << lvl;
99 }
MsgStreamTC & msg() const
The standard message stream.

◆ msgLvl()

bool TrigConf::TrigConfMessaging::msgLvl ( const MSGTC::Level lvl) const
inline

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicting if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 75 of file TrigConfMessaging.h.

76 {
77 if (msg().level() <= lvl) {
78 msg() << lvl;
79 return true;
80 }
81 else {
82 return false;
83 }
84 }

◆ operator=()

TrigConfMessaging & TrigConf::TrigConfMessaging::operator= ( const TrigConfMessaging & rhs)
privatedelete

Member Data Documentation

◆ m_msg_tls

boost::thread_specific_ptr<MsgStreamTC> TrigConf::TrigConfMessaging::m_msg_tls
mutableprivate

MsgStreamTC instance (a std::cout like with print-out levels)

Definition at line 71 of file TrigConfMessaging.h.

◆ m_name

std::string TrigConf::TrigConfMessaging::m_name
private

Definition at line 72 of file TrigConfMessaging.h.


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