class RooMsgService: public TObject



The RooMsgService class is a singleton class that organizes informational, debugging, warning and errors messages generated by the RooFit core code.

Each message generated by the core has a message level (DEBUG,INFO,PROGRESS,WARNING,ERROR or FATAL), an originating object, and a 'topic'. Currently implemented topics are "Generation","Plotting", "Integration", "Minimization" and "Workspace" and "ChangeTracking".

The RooMsgService class allows to filter and redirect messages into 'streams' according to message level, topic, (base) class of originating object, name of originating object and based on attribute labels attached to individual objects.

The current default configuration creates streams for all messages at WARNING level or higher (e.g. ERROR and FATAL) and for all INFO message on topics Generation,Plotting, Integration and Minimization and redirects them to stdout. Users can create additional streams for logging of e.g. DEBUG messages on particular topics or objects and or redirect streams to C++ streams or files.

The singleton instance is accessible through RooMsgService::instance() ;


Function Members (Methods)

public:
virtual~RooMsgService()
voidTObject::AbstractMethod(const char* method) const
Int_taddStream(RooMsgService::MsgLevel level, const RooCmdArg& arg1 = RooCmdArg(), const RooCmdArg& arg2 = RooCmdArg(), const RooCmdArg& arg3 = RooCmdArg(), const RooCmdArg& arg4 = RooCmdArg(), const RooCmdArg& arg5 = RooCmdArg(), const RooCmdArg& arg6 = RooCmdArg())
static Bool_tanyDebug()
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
static voidcleanup()
virtual voidTObject::Clear(Option_t* = "")
voidclearErrorCount()
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
voiddeleteStream(Int_t id)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
Int_terrorCount() const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
RooMsgService::StreamConfiggetStream(Int_t id)
Bool_tgetStreamStatus(Int_t id) const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
RooMsgService::MsgLevelglobalKillBelow() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
static RooMsgService&instance()
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tisActive(const RooAbsArg* self, RooMsgService::MsgTopic facility, RooMsgService::MsgLevel level)
Bool_tisActive(const TObject* self, RooMsgService::MsgTopic facility, RooMsgService::MsgLevel level)
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
ostream&log(const RooAbsArg* self, RooMsgService::MsgLevel level, RooMsgService::MsgTopic facility, Bool_t forceSkipPrefix = kFALSE)
ostream&log(const TObject* self, RooMsgService::MsgLevel level, RooMsgService::MsgTopic facility, Bool_t forceSkipPrefix = kFALSE)
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
Int_tnumStreams() const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
RooMsgService&operator=(const RooMsgService&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* options = 0) const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidsetGlobalKillBelow(RooMsgService::MsgLevel level)
static voidTObject::SetObjectStat(Bool_t stat)
voidsetSilentMode(Bool_t flag)
voidsetStreamStatus(Int_t id, Bool_t active)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
voidshowPid(Bool_t flag)
Bool_tsilentMode() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
RooMsgService()
RooMsgService(const RooMsgService&)
Int_tactiveStream(const RooAbsArg* self, RooMsgService::MsgTopic facility, RooMsgService::MsgLevel level)
Int_tactiveStream(const TObject* self, RooMsgService::MsgTopic facility, RooMsgService::MsgLevel level)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
enum MsgLevel { DEBUG
INFO
PROGRESS
WARNING
ERROR
FATAL
};
enum MsgTopic { Generation
Minimization
Plotting
Fitting
Integration
LinkStateMgmt
Eval
Caching
Optimization
ObjectHandling
InputArguments
Tracing
Contents
DataHandling
NumIntegration
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
public:
static Int_t_debugCount
map<int,std::string>_levelNames
map<int,std::string>_topicNames
protected:
ostream*_devnull
Int_t_errorCount
map<std::string,std::ostream*>_files
RooMsgService::MsgLevel_globMinLevel
static RooMsgService*_instance
Bool_t_showPid
Bool_t_silentMode
vector<StreamConfig>_streams

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void cleanup()
 Cleanup function called by atexit() handler installed by RooSentinel
 to delete all global object upon program termination
RooMsgService(const RooMsgService& )
 Constructor. Defines names of message levels
 and mapping of topic codes to topic names
 Install default message streams.
~RooMsgService()
 Destructor
Bool_t anyDebug()
 Returns true if any debug level stream is active
Int_t addStream(RooMsgService::MsgLevel level, const RooCmdArg& arg1 = RooCmdArg(), const RooCmdArg& arg2 = RooCmdArg(), const RooCmdArg& arg3 = RooCmdArg(), const RooCmdArg& arg4 = RooCmdArg(), const RooCmdArg& arg5 = RooCmdArg(), const RooCmdArg& arg6 = RooCmdArg())
 Add a message logging stream for message with given MsgLevel or higher (i.e. more severe)
 This method accepts the following arguments to configure the stream

 Output Style options

 Prefix(Bool_t flag=kTRUE) -- Prefix all messages in this stream with Topic/Originator information

 Filtering options

 Topic(const char*)        -- Restrict stream to messages on given topic
 ObjectName(const char*)   -- Restrict stream to messages from object with given name
 ClassName(const char*)    -- Restrict stream to messages from objects with given class name
 BaseClassName(const char*)-- Restrict stream to messages from objects with given base class name
 LabelName(const chat*)    -- Restrict stream to messages from objects setAtrribute(const char*) tag with given name

 Output redirection options

 OutputFile(const char*)  -- Send output to file with given name. Multiple streams can write to same file.
 OutputStream(ostream&)   -- Send output to given C++ stream. Multiple message streams can write to same c++ stream

 The return value is the unique ID code of the defined stream
void deleteStream(Int_t id)
 Delete stream with given unique ID code
void setStreamStatus(Int_t id, Bool_t active)
 (De)Activate stream with given unique ID
Bool_t getStreamStatus(Int_t id) const
 Get activation status of stream with given unique ID
RooMsgService& instance()
 Return reference to singleton instance
Bool_t isActive(const RooAbsArg* self, MsgTopic topic, MsgLevel level)
 Check if logging is active for given object/topic/MsgLevel combination
Bool_t isActive(const TObject* self, MsgTopic topic, MsgLevel level)
 Check if logging is active for given object/topic/MsgLevel combination
Int_t activeStream(const RooAbsArg* self, MsgTopic topic, MsgLevel level)
 Find appropriate logging stream for message from given object with given topic and message level
Int_t activeStream(const TObject* self, MsgTopic topic, MsgLevel level)
 Find appropriate logging stream for message from given object with given topic and message level
ostream& log(const RooAbsArg* self, MsgLevel level, MsgTopic topic, Bool_t skipPrefix)
 Log error message associated with RooAbsArg object self at given level and topic. If skipPrefix
 is true the standard RooMsgService prefix is not added.
ostream& log(const TObject* self, MsgLevel level, MsgTopic topic, Bool_t skipPrefix)
 Log error message associated with TObject object self at given level and topic. If skipPrefix
 is true the standard RooMsgService prefix is not added.
void Print(Option_t* options = 0) const
 Print configuration of message service. If "v" option is given also
 inactive streams are listed
StreamConfig getStream(Int_t id)
{ return _streams[id] ; }
Int_t numStreams()
{ return _streams.size() ; }
void setGlobalKillBelow(RooMsgService::MsgLevel level)
{ _globMinLevel = level ; }
MsgLevel globalKillBelow()
{ return _globMinLevel ; }
void showPid(Bool_t flag)
{ _showPid = flag ; }
Bool_t silentMode()
 Print level support for RooFit-related messages that are not routed through RooMsgService (such as Minuit printouts)
{ return _silentMode ; }
void setSilentMode(Bool_t flag)
{ _silentMode = flag ; }
Int_t errorCount()
{ return _errorCount ; }
void clearErrorCount()
{ _errorCount = 0 ; }
RooMsgService(const RooMsgService& )
 Private ctor -- singleton class

Last change: Wed Jun 25 08:33:27 2008
Last generated: 2008-06-25 08:33
Copyright (c) 2000-2005, Regents of the University of California *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.