ROOT  6.06/09
Reference Guide
RooMsgService.cxx
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * @(#)root/roofitcore:$Id$
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 
17 //////////////////////////////////////////////////////////////////////////////
18 //
19 // BEGIN_HTML
20 //
21 // The RooMsgService class is a singleton class that organizes informational, debugging,
22 // warning and errors messages generated by the RooFit core code.
23 // <p>
24 // Each message generated by the core
25 // has a message level (DEBUG,INFO,PROGRESS,WARNING,ERROR or FATAL), an originating object,
26 // and a 'topic'. Currently implemented topics are "Generation","Plotting",
27 // "Integration", "Minimization" and "Workspace" and "ChangeTracking".
28 // <p>
29 // The RooMsgService class allows to filter and redirect messages into 'streams'
30 // according to message level, topic, (base) class of originating object, name of originating
31 // object and based on attribute labels attached to individual objects.
32 // <p>
33 // The current default configuration creates streams for all messages at WARNING level
34 // or higher (e.g. ERROR and FATAL) and for all INFO message on topics Generation,Plotting,
35 // Integration and Minimization and redirects them to stdout. Users can create additional streams
36 // for logging of e.g. DEBUG messages on particular topics or objects and or redirect streams to
37 // C++ streams or files.
38 // <p>
39 // The singleton instance is accessible through RooMsgService::instance() ;
40 //
41 // END_HTML
42 //
43 
44 
45 #include <sys/types.h>
46 
47 #include "RooFit.h"
48 #include "RooAbsArg.h"
49 #include "TClass.h"
50 #include "TROOT.h"
51 
52 #include "RooMsgService.h"
53 #include "RooCmdArg.h"
54 #include "RooCmdConfig.h"
55 #include "RooGlobalFunc.h"
56 #include "RooSentinel.h"
57 #include "RooWorkspace.h"
58 
59 #include "TSystem.h"
60 #include "Riostream.h"
61 #include <iomanip>
62 #include <fstream>
63 using namespace std ;
64 using namespace RooFit ;
65 
67 ;
68 
69 RooMsgService* gMsgService = 0 ;
70 RooMsgService* RooMsgService::_instance = 0 ;
72 
73 
74 ////////////////////////////////////////////////////////////////////////////////
75 /// Cleanup function called by atexit() handler installed by RooSentinel
76 /// to delete all global object upon program termination
77 
79 {
80  if (_instance) {
81  delete _instance ;
82  _instance = 0 ;
83  }
84 }
85 
86 
87 
88 ////////////////////////////////////////////////////////////////////////////////
89 /// Constructor. Defines names of message levels
90 /// and mapping of topic codes to topic names
91 /// Install default message streams.
92 
94 {
95  _silentMode = kFALSE ;
96  _showPid = kFALSE ;
97  _globMinLevel = DEBUG ;
98  _lastMsgLevel = DEBUG ;
99 
100  _devnull = new ofstream("/dev/null") ;
101 
102  _levelNames[DEBUG]="DEBUG" ;
103  _levelNames[INFO]="INFO" ;
104  _levelNames[PROGRESS]="PROGRESS" ;
105  _levelNames[WARNING]="WARNING" ;
106  _levelNames[ERROR]="ERROR" ;
107  _levelNames[FATAL]="FATAL" ;
108 
109  _topicNames[Generation]="Generation" ;
110  _topicNames[Minimization]="Minization" ;
111  _topicNames[Plotting]="Plotting" ;
112  _topicNames[Fitting]="Fitting" ;
113  _topicNames[Integration]="Integration" ;
114  _topicNames[LinkStateMgmt]="LinkStateMgmt" ;
115  _topicNames[Eval]="Eval" ;
116  _topicNames[Caching]="Caching" ;
117  _topicNames[Optimization]="Optimization" ;
118  _topicNames[ObjectHandling]="ObjectHandling" ;
119  _topicNames[InputArguments]="InputArguments" ;
120  _topicNames[Tracing]="Tracing" ;
121  _topicNames[Contents]="Contents" ;
122  _topicNames[DataHandling]="DataHandling" ;
123  _topicNames[NumIntegration]="NumericIntegration" ;
124 
125  _instance = this ;
126  gMsgService = this ;
127 
128  _debugWorkspace = 0 ;
129  _debugCode = 0 ;
130 
131  // Old-style streams
132  addStream(RooFit::PROGRESS) ;
134 }
135 
136 
137 ////////////////////////////////////////////////////////////////////////////////
138 /// Destructor
139 
141 {
142  // Delete all ostreams we own ;
143  map<string,ostream*>::iterator iter = _files.begin() ;
144  for (; iter != _files.end() ; ++iter) {
145  delete iter->second ;
146  }
147 
148  if (_debugWorkspace) {
149  delete _debugWorkspace ;
150  }
151 
152  delete _devnull ;
153 }
154 
155 
156 
157 ////////////////////////////////////////////////////////////////////////////////
158 /// Returns true if any debug level stream is active
159 
161 {
162  return instance()._debugCount>0 ;
163 }
164 
165 
166 
167 ////////////////////////////////////////////////////////////////////////////////
168 
170 {
171  if (!_debugWorkspace) {
172  _debugWorkspace = new RooWorkspace("wdebug") ;
173  }
174  return _debugWorkspace ;
175 }
176 
177 
178 
179 ////////////////////////////////////////////////////////////////////////////////
180 /// Add a message logging stream for message with given RooFit::MsgLevel or higher (i.e. more severe)
181 /// This method accepts the following arguments to configure the stream
182 ///
183 /// Output Style options
184 /// --------------------
185 /// Prefix(Bool_t flag=kTRUE) -- Prefix all messages in this stream with Topic/Originator information
186 ///
187 /// Filtering options
188 /// -----------------
189 /// Topic(const char*) -- Restrict stream to messages on given topic
190 /// ObjectName(const char*) -- Restrict stream to messages from object with given name
191 /// ClassName(const char*) -- Restrict stream to messages from objects with given class name
192 /// BaseClassName(const char*)-- Restrict stream to messages from objects with given base class name
193 /// LabelName(const chat*) -- Restrict stream to messages from objects setAtrribute(const char*) tag with given name
194 ///
195 /// Output redirection options
196 /// --------------------------
197 /// OutputFile(const char*) -- Send output to file with given name. Multiple streams can write to same file.
198 /// OutputStream(ostream&) -- Send output to given C++ stream. Multiple message streams can write to same c++ stream
199 ///
200 /// The return value is the unique ID code of the defined stream
201 
202 Int_t RooMsgService::addStream(RooFit::MsgLevel level, const RooCmdArg& arg1, const RooCmdArg& arg2, const RooCmdArg& arg3,
203  const RooCmdArg& arg4, const RooCmdArg& arg5, const RooCmdArg& arg6)
204 {
205 
206  // Aggregate all arguments in a list
207  RooLinkedList l ;
208  l.Add((TObject*)&arg1) ; l.Add((TObject*)&arg2) ;
209  l.Add((TObject*)&arg3) ; l.Add((TObject*)&arg4) ;
210  l.Add((TObject*)&arg5) ; l.Add((TObject*)&arg6) ;
211 
212  // Define configuration for this method
213  RooCmdConfig pc(Form("RooMsgService::addReportingStream(%s)",GetName())) ;
214  pc.defineInt("prefix","Prefix",0,kTRUE) ;
215  pc.defineInt("color","Color",0,static_cast<Int_t>(kBlack)) ;
216  pc.defineInt("topic","Topic",0,0xFFFFF) ;
217  pc.defineString("objName","ObjectName",0,"") ;
218  pc.defineString("className","ClassName",0,"") ;
219  pc.defineString("baseClassName","BaseClassName",0,"") ;
220  pc.defineString("tagName","LabelName",0,"") ;
221  pc.defineString("outFile","OutputFile",0,"") ;
222  pc.defineObject("outStream","OutputStream",0,0) ;
223  pc.defineMutex("OutputFile","OutputStream") ;
224 
225  // Process & check varargs
226  pc.process(l) ;
227  if (!pc.ok(kTRUE)) {
228  return -1 ;
229  }
230 
231  // Extract values from named arguments
232  RooFit::MsgTopic topic = (RooFit::MsgTopic) pc.getInt("topic") ;
233  const char* objName = pc.getString("objName") ;
234  const char* className = pc.getString("className") ;
235  const char* baseClassName = pc.getString("baseClassName") ;
236  const char* tagName = pc.getString("tagName") ;
237  const char* outFile = pc.getString("outFile") ;
238  Bool_t prefix = pc.getInt("prefix") ;
239  Color_t color = static_cast<Color_t>(pc.getInt("color")) ;
240  ostream* os = reinterpret_cast<ostream*>(pc.getObject("outStream")) ;
241 
242  // Create new stream object
243  StreamConfig newStream ;
244 
245  // Store configuration info
246  newStream.active = kTRUE ;
247  newStream.minLevel = level ;
248  newStream.topic = topic ;
249  newStream.objectName = (objName ? objName : "" ) ;
250  newStream.className = (className ? className : "" ) ;
251  newStream.baseClassName = (baseClassName ? baseClassName : "" ) ;
252  newStream.tagName = (tagName ? tagName : "" ) ;
253  newStream.color = color ;
254  newStream.prefix = prefix ;
255  newStream.universal = (newStream.objectName=="" && newStream.className=="" && newStream.baseClassName=="" && newStream.tagName=="") ;
256 
257  // Update debug stream count
258  if (level==DEBUG) {
259  _debugCount++ ;
260  }
261 
262  // Configure output
263  if (os) {
264 
265  // To given non-owned stream
266  newStream.os = os ;
267 
268  } else if (string(outFile).size()>0) {
269 
270  // See if we already opened the file
271  ostream* os2 = _files["outFile"] ;
272 
273  if (!os2) {
274 
275  // To given file name, create owned stream for it
276  os2 = new ofstream(outFile) ;
277 
278  if (!*os2) {
279  cout << "RooMsgService::addReportingStream ERROR: cannot open output log file " << outFile << " reverting stream to stdout" << endl ;
280  delete os2 ;
281  newStream.os = &cout ;
282  } else {
283  newStream.os = os2 ;
284  }
285 
286  } else {
287  _files["outFile"] = os2 ;
288  newStream.os = os2 ;
289  }
290 
291 
292  } else {
293 
294  // To stdout
295  newStream.os = &cout ;
296 
297  }
298 
299 
300  // Add it to list of active streams ;
301  _streams.push_back(newStream) ;
302 
303  // Return stream identifier
304  return _streams.size()-1 ;
305 }
306 
307 
308 
309 ////////////////////////////////////////////////////////////////////////////////
310 /// Delete stream with given unique ID code
311 
313 {
314  vector<StreamConfig>::iterator iter = _streams.begin() ;
315  iter += id ;
316 
317  // Update debug stream count
318  if (iter->minLevel==DEBUG) {
319  _debugCount-- ;
320  }
321 
322  _streams.erase(iter) ;
323 }
324 
325 
326 
327 ////////////////////////////////////////////////////////////////////////////////
328 /// (De)Activate stream with given unique ID
329 
331 {
332  if (id<0 || id>=static_cast<Int_t>(_streams.size())) {
333  cout << "RooMsgService::setStreamStatus() ERROR: invalid stream ID " << id << endl ;
334  return ;
335  }
336 
337  // Update debug stream count
338  if (_streams[id].minLevel==DEBUG) {
339  _debugCount += flag ? 1 : -1 ;
340  }
341 
342  _streams[id].active = flag ;
343 }
344 
345 
346 
347 ////////////////////////////////////////////////////////////////////////////////
348 /// Get activation status of stream with given unique ID
349 
351 {
352  if (id<0 || id>= static_cast<Int_t>(_streams.size())) {
353  cout << "RooMsgService::getStreamStatus() ERROR: invalid stream ID " << id << endl ;
354  return kFALSE ;
355  }
356  return _streams[id].active ;
357 }
358 
359 
360 
361 ////////////////////////////////////////////////////////////////////////////////
362 /// Return reference to singleton instance
363 
365 {
366  if (!_instance) {
367  new RooMsgService() ;
369  }
370  return *_instance ;
371 }
372 
373 
374 
375 ////////////////////////////////////////////////////////////////////////////////
376 /// Save current state of message service
377 
379 {
380  _streamsSaved.push(_streams) ;
381 }
382 
383 
384 
385 ////////////////////////////////////////////////////////////////////////////////
386 /// Restore last saved state of message service
387 
389 {
390  _streams = _streamsSaved.top() ;
391  _streamsSaved.pop() ;
392 }
393 
394 
395 
396 ////////////////////////////////////////////////////////////////////////////////
397 /// Check if logging is active for given object/topic/RooFit::MsgLevel combination
398 
400 {
401  return (activeStream(self,topic,level)>=0) ;
402 }
403 
404 
405 ////////////////////////////////////////////////////////////////////////////////
406 /// Check if logging is active for given object/topic/RooFit::MsgLevel combination
407 
409 {
410  return (activeStream(self,topic,level)>=0) ;
411 }
412 
413 
414 ////////////////////////////////////////////////////////////////////////////////
415 /// Find appropriate logging stream for message from given object with given topic and message level
416 
418 {
419  if (level<_globMinLevel) return -1 ;
420  for (UInt_t i=0 ; i<_streams.size() ; i++) {
421  if (_streams[i].match(level,topic,self)) {
422  return i ;
423  }
424  }
425  return -1 ;
426 }
427 
428 
429 ////////////////////////////////////////////////////////////////////////////////
430 /// Find appropriate logging stream for message from given object with given topic and message level
431 
433 {
434  if (level<_globMinLevel) return -1 ;
435  for (UInt_t i=0 ; i<_streams.size() ; i++) {
436  if (_streams[i].match(level,topic,self)) {
437  return i ;
438  }
439  }
440  return -1 ;
441 }
442 
443 
444 ////////////////////////////////////////////////////////////////////////////////
445 /// Determine if message from given object at given level on given topic is logged
446 
448 {
449  if (!active) return kFALSE ;
450  if (level<minLevel) return kFALSE ;
451  if (!(topic&top)) return kFALSE ;
452 
453  if (universal) return kTRUE ;
454 
455  if (objectName.size()>0 && objectName != obj->GetName()) return kFALSE ;
456  if (className.size()>0 && className != obj->IsA()->GetName()) return kFALSE ;
457  if (baseClassName.size()>0 && !obj->IsA()->InheritsFrom(baseClassName.c_str())) return kFALSE ;
458  if (tagName.size()>0 && !obj->getAttribute(tagName.c_str())) return kFALSE ;
459 
460  return kTRUE ;
461 }
462 
463 
464 ////////////////////////////////////////////////////////////////////////////////
465 /// Determine if message from given object at given level on given topic is logged
466 
468 {
469  if (!active) return kFALSE ;
470  if (level<minLevel) return kFALSE ;
471  if (!(topic&top)) return kFALSE ;
472 
473  if (universal) return kTRUE ;
474 
475  if (objectName.size()>0 && objectName != obj->GetName()) return kFALSE ;
476  if (className.size()>0 && className != obj->IsA()->GetName()) return kFALSE ;
477  if (baseClassName.size()>0 && !obj->IsA()->InheritsFrom(baseClassName.c_str())) return kFALSE ;
478 
479  return kTRUE ;
480 }
481 
482 
483 
484 ////////////////////////////////////////////////////////////////////////////////
485 /// Log error message associated with RooAbsArg object self at given level and topic. If skipPrefix
486 /// is true the standard RooMsgService prefix is not added.
487 
488 ostream& RooMsgService::log(const RooAbsArg* self, RooFit::MsgLevel level, RooFit::MsgTopic topic, Bool_t skipPrefix)
489 {
490  if (level>=ERROR) {
491  _errorCount++ ;
492  }
493 
494  // Return C++ ostream associated with given message configuration
495  Int_t as = activeStream(self,topic,level) ;
496 
497  if (as==-1) {
498  return *_devnull ;
499  }
500 
501  // Flush any previous messages
502  (*_streams[as].os).flush() ;
503 
504  // Insert an endl if we switch from progress to another level
505  if (_lastMsgLevel==PROGRESS && level!=PROGRESS) {
506  (*_streams[as].os) << endl ;
507  }
508  _lastMsgLevel=level ;
509 
510  if (_streams[as].prefix && !skipPrefix) {
511  if (_showPid) {
512  (*_streams[as].os) << "pid" << gSystem->GetPid() << " " ;
513  }
514  (*_streams[as].os) << "[#" << as << "] " << _levelNames[level] << ":" << _topicNames[topic] << " -- " ;
515  }
516  return (*_streams[as].os) ;
517 }
518 
519 
520 
521 ////////////////////////////////////////////////////////////////////////////////
522 /// Log error message associated with TObject object self at given level and topic. If skipPrefix
523 /// is true the standard RooMsgService prefix is not added.
524 
525 ostream& RooMsgService::log(const TObject* self, RooFit::MsgLevel level, RooFit::MsgTopic topic, Bool_t skipPrefix)
526 {
527  if (level>=ERROR) {
528  _errorCount++ ;
529  }
530 
531  // Return C++ ostream associated with given message configuration
532  Int_t as = activeStream(self,topic,level) ;
533  if (as==-1) {
534  return *_devnull ;
535  }
536 
537  // Flush any previous messages
538  (*_streams[as].os).flush() ;
539 
540  if (_streams[as].prefix && !skipPrefix) {
541  if (_showPid) {
542  (*_streams[as].os) << "pid" << gSystem->GetPid() << " " ;
543  }
544  (*_streams[as].os) << "[#" << as << "] " << _levelNames[level] << ":" << _topicNames[topic] << " -- " ;
545  }
546  return (*_streams[as].os) ;
547 }
548 
549 
550 
551 ////////////////////////////////////////////////////////////////////////////////
552 /// Print configuration of message service. If "v" option is given also
553 /// inactive streams are listed
554 
555 void RooMsgService::Print(Option_t *options) const
556 {
557  Bool_t activeOnly = kTRUE ;
558  if (TString(options).Contains("V") || TString(options).Contains("v")) {
559  activeOnly = kFALSE ;
560  }
561 
562  cout << (activeOnly?"Active Message streams":"All Message streams") << endl ;
563  for (UInt_t i=0 ; i<_streams.size() ; i++) {
564 
565  // Skip passive streams in active only mode
566  if (activeOnly && !_streams[i].active) {
567  continue ;
568  }
569 
570 
571  map<int,string>::const_iterator is = _levelNames.find(_streams[i].minLevel) ;
572  cout << "[" << i << "] MinLevel = " << is->second ;
573 
574  cout << " Topic = " ;
575  if (_streams[i].topic != 0xFFFFF) {
576  map<int,string>::const_iterator iter = _topicNames.begin() ;
577  while(iter!=_topicNames.end()) {
578  if (iter->first & _streams[i].topic) {
579  cout << iter->second << " " ;
580  }
581  ++iter ;
582  }
583  } else {
584  cout << " Any " ;
585  }
586 
587 
588  if (_streams[i].objectName.size()>0) {
589  cout << " ObjectName = " << _streams[i].objectName ;
590  }
591  if (_streams[i].className.size()>0) {
592  cout << " ClassName = " << _streams[i].className ;
593  }
594  if (_streams[i].baseClassName.size()>0) {
595  cout << " BaseClassName = " << _streams[i].baseClassName ;
596  }
597  if (_streams[i].tagName.size()>0) {
598  cout << " TagLabel = " << _streams[i].tagName ;
599  }
600 
601  // Postfix status when printing all
602  if (!activeOnly && !_streams[i].active) {
603  cout << " (NOT ACTIVE)" ;
604  }
605 
606  cout << endl ;
607  }
608 
609 }
Bool_t getStreamStatus(Int_t id) const
Get activation status of stream with given unique ID.
#define DEBUG
virtual int GetPid()
Get process id.
Definition: TSystem.cxx:711
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:487
const char Option_t
Definition: RtypesCore.h:62
const char * getString(const char *name, const char *defaultValue="", Bool_t convEmptyToNull=kFALSE)
Return string property registered with name 'name'.
Definition: Rtypes.h:60
static Bool_t anyDebug()
Returns true if any debug level stream is active.
Basic string class.
Definition: TString.h:137
void deleteStream(Int_t id)
Delete stream with given unique ID code.
TString as(SEXP s)
Definition: RExports.h:85
Bool_t isActive(const RooAbsArg *self, RooFit::MsgTopic facility, RooFit::MsgLevel level)
Check if logging is active for given object/topic/RooFit::MsgLevel combination.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
ClassImp(RooMsgService)
static RooMsgService & instance()
Return reference to singleton instance.
STL namespace.
TObject * getObject(const char *name, TObject *obj=0)
Return TObject property registered with name 'name'.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
Definition: RooAbsArg.cxx:288
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. ...
void setStreamStatus(Int_t id, Bool_t active)
(De)Activate stream with given unique ID
Bool_t process(const RooCmdArg &arg)
Process given RooCmdArg.
static void cleanup()
Cleanup function called by atexit() handler installed by RooSentinel to delete all global object upon...
std::map< std::string, std::string >::const_iterator iter
Definition: TAlienJob.cxx:54
RooMsgService()
Constructor.
if on multiple lines(like in C++).**The" * configuration fragment. * * The "import myobject continue
Parses the configuration file.
Definition: HLFactory.cxx:368
Bool_t defineString(const char *name, const char *argName, Int_t stringNum, const char *defValue="", Bool_t appendMode=kFALSE)
Define Double_t property name 'name' mapped to Double_t in slot 'stringNum' in RooCmdArg with name ar...
void saveState()
Save current state of message service.
XFontStruct * id
Definition: TGX11.cxx:108
Bool_t defineInt(const char *name, const char *argName, Int_t intNum, Int_t defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
short Color_t
Definition: RtypesCore.h:79
static Int_t _debugCount
virtual void Add(TObject *arg)
Definition: RooLinkedList.h:62
void defineMutex(const char *argName1, const char *argName2)
Define arguments named argName1 and argName2 mutually exclusive.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
R__EXTERN TSystem * gSystem
Definition: TSystem.h:549
return
Definition: TBase64.cxx:62
RooCmdArg Topic(Int_t topic)
unsigned int UInt_t
Definition: RtypesCore.h:42
char * Form(const char *fmt,...)
TLine * l
Definition: textangle.C:4
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:51
Bool_t ok(Bool_t verbose) const
Return true of parsing was successful.
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.e.
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...
static void activate()
Install atexit handler that calls CleanupRooFitAtExit() on program termination.
Definition: RooSentinel.cxx:70
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:415
virtual ~RooMsgService()
Destructor.
Mother of all ROOT objects.
Definition: TObject.h:58
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.
Bool_t defineObject(const char *name, const char *argName, Int_t setNum, const TObject *obj=0, Bool_t isArray=kFALSE)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66
RooWorkspace * debugWorkspace()
void Print(Option_t *options=0) const
Print configuration of message service.
const Bool_t kTRUE
Definition: Rtypes.h:91
TObject * obj
void restoreState()
Restore last saved state of message service.