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