Logo ROOT  
Reference Guide
RooHelpers::HijackMessageStream Class Reference

Hijacks all messages with given level and topic (and optionally object name) while alive.

Use this like an ostringstream afterwards. Useful for unit tests and debugging.

Definition at line 58 of file RooHelpers.h.

Public Member Functions

 HijackMessageStream (RooFit::MsgLevel level, RooFit::MsgTopic topics, const char *objectName=nullptr)
 Hijack all messages with given level and topics while this object is alive. More...
virtual ~HijackMessageStream ()

Private Attributes

std::vector< RooMsgService::StreamConfig_oldConf
RooFit::MsgLevel _oldKillBelow
Int_t _thisStream

#include <RooHelpers.h>

Inheritance diagram for RooHelpers::HijackMessageStream:

Constructor & Destructor Documentation

◆ HijackMessageStream()

RooHelpers::HijackMessageStream::HijackMessageStream ( RooFit::MsgLevel  level,
RooFit::MsgTopic  topics,
const char *  objectName = nullptr 

Hijack all messages with given level and topics while this object is alive.

[in]levelMinimum level to hijack. Higher levels also get captured.
[in]topicsTopics to hijack. Use | to combine different topics, and cast to RooFit::MsgTopic if necessary.
[in]objectNameOnly hijack messages from an object with the given name. Defaults to any object.

Definition at line 84 of file RooHelpers.cxx.

◆ ~HijackMessageStream()

RooHelpers::HijackMessageStream::~HijackMessageStream ( )

Definition at line 102 of file RooHelpers.cxx.

Member Data Documentation

◆ _oldConf

std::vector<RooMsgService::StreamConfig> RooHelpers::HijackMessageStream::_oldConf

Definition at line 66 of file RooHelpers.h.

◆ _oldKillBelow

RooFit::MsgLevel RooHelpers::HijackMessageStream::_oldKillBelow

Definition at line 65 of file RooHelpers.h.

◆ _thisStream

Int_t RooHelpers::HijackMessageStream::_thisStream

Definition at line 67 of file RooHelpers.h.

Libraries for RooHelpers::HijackMessageStream:

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