73  _devnull = 
new ofstream(
"/dev/null") ;
 
  112  for (
auto item : 
_files) {
 
  130  map<string,ostream*>::iterator iter = 
_files.begin() ;
 
  131  for (; iter != 
_files.end() ; ++iter) {
 
  132    delete iter->second ;
 
  201  pc.defineInt(
"prefix",
"Prefix",0,
kTRUE) ;
 
  203  pc.defineInt(
"topic",
"Topic",0,0xFFFFF) ;
 
  204  pc.defineString(
"objName",
"ObjectName",0,
"") ;
 
  205  pc.defineString(
"className",
"ClassName",0,
"") ;
 
  206  pc.defineString(
"baseClassName",
"BaseClassName",0,
"") ;
 
  207  pc.defineString(
"tagName",
"LabelName",0,
"") ;
 
  208  pc.defineString(
"outFile",
"OutputFile",0,
"") ;
 
  209  pc.defineObject(
"outStream",
"OutputStream",0,0) ;
 
  210  pc.defineMutex(
"OutputFile",
"OutputStream") ;
 
  220  const char* objName =  
pc.getString(
"objName") ;
 
  221  const char* className =  
pc.getString(
"className") ;
 
  222  const char* baseClassName =  
pc.getString(
"baseClassName") ;
 
  223  const char* tagName =  
pc.getString(
"tagName") ;
 
  224  const char* outFile = 
pc.getString(
"outFile") ;
 
  225  Bool_t prefix = 
pc.getInt(
"prefix") ;
 
  227  ostream* os = 
reinterpret_cast<ostream*
>(
pc.getObject(
"outStream")) ;
 
  235  newStream.
topic = topic ;
 
  236  newStream.
objectName = (objName ? objName : 
"" ) ;
 
  237  newStream.
className = (className ? className : 
"" ) ;
 
  238  newStream.
baseClassName = (baseClassName ? baseClassName : 
"" ) ;
 
  239  newStream.
tagName = (tagName ? tagName : 
"" ) ;
 
  240  newStream.
color = color ;
 
  241  newStream.
prefix = prefix ;
 
  255  } 
else if (
string(outFile).size()>0) {
 
  258    ostream* os2 = 
_files[
"outFile"] ;
 
  263      os2 = 
new ofstream(outFile) ;
 
  266   cout << 
"RooMsgService::addReportingStream ERROR: cannot open output log file " << outFile << 
" reverting stream to stdout" << endl ;
 
  268   newStream.
os = &cout ;
 
  282    newStream.
os = &cout ;
 
  301  vector<StreamConfig>::iterator iter = 
_streams.begin() ;
 
  305  if (iter->minLevel==
DEBUG) {
 
  320    cout << 
"RooMsgService::setStreamStatus() ERROR: invalid stream ID " << 
id << endl ;
 
  340    cout << 
"RooMsgService::getStreamStatus() ERROR: invalid stream ID " << 
id << endl ;
 
  405    if (
_streams[i].match(level,topic,self)) {
 
  420    if (
_streams[i].match(level,topic,self)) {
 
  453  if (!active) 
return kFALSE ;
 
  454  if (level<minLevel) 
return kFALSE ;
 
  455  if (!(topic&top)) 
return kFALSE ;
 
  457  if (universal) 
return kTRUE ;
 
  459  if (objectName.size()>0 && objectName != obj->
GetName()) 
return kFALSE ;
 
  460  if (className.size()>0 && className != obj->IsA()->
GetName()) 
return kFALSE ;
 
  461  if (baseClassName.size()>0 && !obj->IsA()->
InheritsFrom(baseClassName.c_str())) 
return kFALSE ;
 
  542  if (
TString(options).Contains(
"V") || 
TString(options).Contains(
"v")) {
 
  546  cout << (activeOnly?
"Active Message streams":
"All Message streams") << endl ;
 
  550    if (activeOnly && !
_streams[i].active) {
 
  556    cout << 
"[" << i << 
"] MinLevel = " << is->second ;
 
  558    cout << 
" Topic = " ;
 
  560      map<int,string>::const_iterator iter = 
_topicNames.begin() ;
 
  562   if (iter->first & 
_streams[i].topic) {
 
  563     cout << iter->second << 
" " ;
 
  572    if (
_streams[i].objectName.size()>0) {
 
  573      cout << 
" ObjectName = " << 
_streams[i].objectName ;
 
  575    if (
_streams[i].className.size()>0) {
 
  576      cout << 
" ClassName = " << 
_streams[i].className ;
 
  578    if (
_streams[i].baseClassName.size()>0) {
 
  579      cout << 
" BaseClassName = " << 
_streams[i].baseClassName ;
 
  582      cout << 
" TagLabel = " << 
_streams[i].tagName ;
 
  586    if (!activeOnly && !
_streams[i].active) {
 
  587      cout << 
" (NOT ACTIVE)"  ;
 
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
The RooMsgService class is a singleton class that organizes informational, debugging,...
std::vector< StreamConfig > _streams
void restoreState()
Restore last saved state of message service.
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.
static RooMsgService & instance()
Return reference to singleton instance.
RooFit::MsgLevel _globMinLevel
Bool_t isActive(const RooAbsArg *self, RooFit::MsgTopic facility, RooFit::MsgLevel level)
Check if logging is active for given object/topic/RooFit::MsgLevel combination.
std::stack< std::vector< StreamConfig > > _streamsSaved
RooMsgService()
Constructor.
RooWorkspace * debugWorkspace()
void saveState()
Save current state of message service.
std::map< int, std::string > _topicNames
std::ostream & log(const RooAbsArg *self, RooFit::MsgLevel level, RooFit::MsgTopic facility, Bool_t forceSkipPrefix=kFALSE)
Log error message associated with RooAbsArg object self at given level and topic.
Int_t addStream(RooFit::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 RooFit::MsgLevel or higher (i....
RooWorkspace * _debugWorkspace
static Bool_t anyDebug()
Returns true if any debug level stream is active.
Int_t activeStream(const RooAbsArg *self, RooFit::MsgTopic facility, RooFit::MsgLevel level)
Find appropriate logging stream for message from given object with given topic and message level.
virtual ~RooMsgService()
Destructor.
void deleteStream(Int_t id)
Delete stream with given unique ID code.
std::map< std::string, std::ostream * > _files
std::map< int, std::string > _levelNames
void Print(Option_t *options=0) const
Print configuration of message service.
RooFit::MsgLevel _lastMsgLevel
The RooWorkspace is a persistable container for RooFit projects.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual int GetPid()
Get process id.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
RooCmdArg Topic(Int_t topic)
MsgLevel
Verbosity level for RooMsgService::StreamConfig in RooMsgService.
MsgTopic
Topics for a RooMsgService::StreamConfig in RooMsgService.
static constexpr double pc
RooFit::MsgLevel minLevel
std::string baseClassName
Bool_t match(RooFit::MsgLevel level, RooFit::MsgTopic facility, const RooAbsArg *obj)
Determine if message from given object at given level on given topic is logged.