Logo ROOT   6.10/09
Reference Guide
RooUnitTest.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, NIKHEF, verkerke@nikhef.nl *
7  * *
8  * Copyright (c) 2000-2011, Regents of the University of California *
9  * and Stanford University. All rights reserved. *
10  * *
11  * Redistribution and use in source and binary forms, *
12  * with or without modification, are permitted according to the terms *
13  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
14  *****************************************************************************/
15 
16 /**
17 \file RooUnitTest.cxx
18 \class RooUnitTest
19 \ingroup Roofitcore
20 
21 RooUnit test is an abstract base class for unit regression tests for
22 RooFit and RooStats tests performed in stressRooFit and stressRooStats
23 Implementations of this class must implement abstract method testCode()
24 which defines the regression test to be performed. Inside testCode()
25 the regression test can define objects on which the regression is performed.
26 These are:
27 Object | function
28 ----------------|------------
29  RooPlot | regPlot()
30  RooFitResult | regResult()
31  Double_t | regValue()
32  RooTable | regTable()
33  TH1/2/3 | regTH()
34  RooWorkspace | regWS()
35 **/
36 
37 #include "RooFit.h"
38 #include "RooUnitTest.h"
39 #include "TROOT.h"
40 #include "TClass.h"
41 #include "TSystem.h"
42 #include "RooHist.h"
43 #include "RooMsgService.h"
44 #include "RooDouble.h"
45 #include "RooTrace.h"
46 #include "RooRandom.h"
47 #include <math.h>
48 
50 ;
51 
52 using namespace std;
53 
55 
56 
57 ////////////////////////////////////////////////////////////////////////////////
58 
59 RooUnitTest::RooUnitTest(const char* name, TFile* refFile, Bool_t writeRef, Int_t verbose) : TNamed(name,name),
60  _refFile(refFile), _debug(kFALSE), _write(writeRef), _verb(verbose)
61 {
62 }
63 
64 
65 
66 ////////////////////////////////////////////////////////////////////////////////
67 
69 {
70 }
71 
72 
73 ////////////////////////////////////////////////////////////////////////////////
74 
75 void RooUnitTest::regPlot(RooPlot* frame, const char* refName)
76 {
77  if (_refFile) {
78  string refNameStr(refName) ;
79  frame->SetName(refName) ;
80  _regPlots.push_back(make_pair(frame,refNameStr)) ;
81  } else {
82  delete frame ;
83  }
84 }
85 
86 
87 ////////////////////////////////////////////////////////////////////////////////
88 
89 void RooUnitTest::regResult(RooFitResult* r, const char* refName)
90 {
91  if (_refFile) {
92  string refNameStr(refName) ;
93  _regResults.push_back(make_pair(r,refNameStr)) ;
94  } else {
95  delete r ;
96  }
97 }
98 
99 
100 ////////////////////////////////////////////////////////////////////////////////
101 
102 void RooUnitTest::regValue(Double_t d, const char* refName)
103 {
104  if (_refFile) {
105  string refNameStr(refName) ;
106  _regValues.push_back(make_pair(d,refNameStr)) ;
107  }
108 }
109 
110 
111 ////////////////////////////////////////////////////////////////////////////////
112 
113 void RooUnitTest::regTable(RooTable* t, const char* refName)
114 {
115  if (_refFile) {
116  string refNameStr(refName) ;
117  _regTables.push_back(make_pair(t,refNameStr)) ;
118  } else {
119  delete t ;
120  }
121 }
122 
123 
124 ////////////////////////////////////////////////////////////////////////////////
125 
126 void RooUnitTest::regWS(RooWorkspace* ws, const char* refName)
127 {
128  if (_refFile) {
129  string refNameStr(refName) ;
130  _regWS.push_back(make_pair(ws,refNameStr)) ;
131  } else {
132  delete ws ;
133  }
134 }
135 
136 
137 ////////////////////////////////////////////////////////////////////////////////
138 
139 void RooUnitTest::regTH(TH1* th, const char* refName)
140 {
141  if (_refFile) {
142  string refNameStr(refName) ;
143  _regTH.push_back(make_pair(th,refNameStr)) ;
144  } else {
145  delete th ;
146  }
147 }
148 
149 
150 ////////////////////////////////////////////////////////////////////////////////
151 
152 RooWorkspace* RooUnitTest::getWS(const char* refName)
153 {
154  RooWorkspace* ws = dynamic_cast<RooWorkspace*>(_refFile->Get(refName)) ;
155  if (!ws) {
156  cout << "RooUnitTest ERROR: cannot retrieve RooWorkspace " << refName
157  << " from reference file, skipping " << endl ;
158  return 0 ;
159  }
160 
161  return ws ;
162 }
163 
164 
165 ////////////////////////////////////////////////////////////////////////////////
166 
168 {
169  if (htest->GetDimension() != href->GetDimension()) {
170  return kFALSE ;
171  }
172 
173  // Use Kolmogorov distance as metric rather than probability
174  // because we expect histograms to be identical rather
175  // than drawn from the same parent distribution
176  Double_t kmax = htest->KolmogorovTest(href,"M") ;
177 
178  if (kmax>htol()) {
179 
180  cout << "KS distances = " << kmax << endl ;
181 
182  Int_t ntest = htest->GetNbinsX() +2 ;
183  Int_t nref = href->GetNbinsX() +2 ;
184  if (htest->GetDimension()>1) {
185  ntest *= htest->GetNbinsY() + 2 ;
186  nref *= href->GetNbinsY() + 2 ;
187  }
188  if (htest->GetDimension()>2) {
189  ntest *= htest->GetNbinsZ() + 2 ;
190  nref *= href->GetNbinsZ() + 2 ;
191  }
192 
193  if (ntest != nref) {
194  return kFALSE ;
195  }
196 
197  for (Int_t i=0 ; i<ntest ; i++) {
198  if (fabs(htest->GetBinContent(i)-href->GetBinContent(i))>htol()) {
199  cout << "htest[" << i << "] = " << htest->GetBinContent(i) << " href[" << i << "] = " << href->GetBinContent(i) << endl;
200  }
201  }
202 
203  return kFALSE ;
204  }
205 
206  return kTRUE ;
207 }
208 
209 
210 
211 ////////////////////////////////////////////////////////////////////////////////
212 
214 {
215  Bool_t ret = kTRUE ;
216 
217  list<pair<RooPlot*, string> >::iterator iter = _regPlots.begin() ;
218  while (iter!=_regPlots.end()) {
219 
220  if (!_write) {
221 
222  // Comparison mode
223 
224  // Retrieve benchmark
225  RooPlot* bmark = dynamic_cast<RooPlot*>(_refFile->Get(iter->second.c_str())) ;
226  if (!bmark) {
227  cout << "RooUnitTest ERROR: cannot retrieve RooPlot " << iter->second << " from reference file, skipping " << endl ;
228  ret = kFALSE ;
229  ++iter ;
230  continue ;
231  }
232 
233  if (_verb) {
234  cout << "comparing RooPlot " << iter->first << " to benchmark " << iter->second << " = " << bmark << endl ;
235  cout << "reference: " ; iter->first->Print() ;
236  cout << "benchmark: " ; bmark->Print() ;
237  }
238 
239  RooPlot* compPlot = _debug ? iter->first->emptyClone(Form("%s_comparison",iter->first->GetName())) : 0 ;
240  Bool_t anyFail=kFALSE ;
241 
242  Stat_t nItems = iter->first->numItems() ;
243  for (Stat_t i=0 ; i<nItems ; i++) {
244  // coverity[NULL_RETURNS]
245  TObject* obj = iter->first->getObject((Int_t)i) ;
246 
247  // Retrieve corresponding object from reference frame
248  TObject* objRef = bmark->findObject(obj->GetName()) ;
249 
250  if (!objRef) {
251  cout << "RooUnitTest ERROR: cannot retrieve object " << obj->GetName() << " from reference RooPlot " << iter->second << ", skipping" << endl ;
252  ret = kFALSE ;
253  break ;
254  }
255 
256  // Histogram comparisons
257  if (obj->IsA()==RooHist::Class()) {
258  RooHist* testHist = static_cast<RooHist*>(obj) ;
259  RooHist* refHist = static_cast<RooHist*>(objRef) ;
260  if (!testHist->isIdentical(*refHist,htol())) {
261  cout << "RooUnitTest ERROR: comparison of object " << obj->IsA()->GetName() << "::" << obj->GetName()
262  << " fails comparison with counterpart in reference RooPlot " << bmark->GetName() << endl ;
263 
264  if (compPlot) {
265  compPlot->addPlotable((RooHist*)testHist->Clone(),"P") ;
266  compPlot->getAttLine()->SetLineColor(kRed) ;
267  compPlot->getAttMarker()->SetMarkerColor(kRed) ;
268  compPlot->getAttLine()->SetLineWidth(1) ;
269 
270  compPlot->addPlotable((RooHist*)refHist->Clone(),"P") ;
271  compPlot->getAttLine()->SetLineColor(kBlue) ;
272  compPlot->getAttMarker()->SetMarkerColor(kBlue) ;
273  compPlot->getAttLine()->SetLineWidth(1) ;
274  }
275 
276  anyFail=kTRUE ;
277  ret = kFALSE ;
278  }
279  } else if (obj->IsA()==RooCurve::Class()) {
280  RooCurve* testCurve = static_cast<RooCurve*>(obj) ;
281  RooCurve* refCurve = static_cast<RooCurve*>(objRef) ;
282  if (!testCurve->isIdentical(*refCurve,ctol())) {
283  cout << "RooUnitTest ERROR: comparison of object " << obj->IsA()->GetName() << "::" << obj->GetName()
284  << " fails comparison with counterpart in reference RooPlot " << bmark->GetName() << endl ;
285 
286  if (compPlot) {
287  compPlot->addPlotable((RooCurve*)testCurve->Clone()) ;
288  compPlot->getAttLine()->SetLineColor(kRed) ;
289  compPlot->getAttLine()->SetLineWidth(1) ;
290  compPlot->getAttLine()->SetLineStyle(kSolid) ;
291 
292  compPlot->addPlotable((RooCurve*)refCurve->Clone()) ;
293  compPlot->getAttLine()->SetLineColor(kBlue) ;
294  compPlot->getAttLine()->SetLineWidth(1) ;
295  compPlot->getAttLine()->SetLineStyle(kDashed) ;
296  }
297 
298  anyFail=kTRUE ;
299  ret = kFALSE ;
300  }
301 
302  }
303 
304  }
305 
306  if (anyFail && compPlot) {
307  cout << "RooUnitTest INFO: writing comparison plot " << compPlot->GetName() << " of failed test to RooUnitTest_DEBUG.root" << endl ;
308  TFile fdbg("RooUnitTest_DEBUG.root","UPDATE") ;
309  compPlot->Write() ;
310  fdbg.Close() ;
311  } else {
312  delete compPlot ;
313  }
314 
315  // Delete RooPlot when comparison is finished to avoid noise in leak checking
316  delete iter->first ;
317 
318  } else {
319 
320  // Writing mode
321 
322  cout <<"RooUnitTest: Writing reference RooPlot " << iter->first << " as benchmark " << iter->second << endl ;
323  _refFile->cd() ;
324  iter->first->Write(iter->second.c_str()) ;
325  gMemDir->cd() ;
326  }
327 
328  ++iter ;
329  }
330 
331 
332  list<pair<RooFitResult*, string> >::iterator iter2 = _regResults.begin() ;
333  while (iter2!=_regResults.end()) {
334 
335  if (!_write) {
336 
337  // Comparison mode
338 
339  // Retrieve benchmark
340  RooFitResult* bmark = dynamic_cast<RooFitResult*>(_refFile->Get(iter2->second.c_str())) ;
341  if (!bmark) {
342  cout << "RooUnitTest ERROR: cannot retrieve RooFitResult " << iter2->second << " from reference file, skipping " << endl ;
343  ++iter2 ;
344  ret = kFALSE ;
345  continue ;
346  }
347 
348  if (_verb) {
349  cout << "comparing RooFitResult " << iter2->first << " to benchmark " << iter2->second << " = " << bmark << endl ;
350  }
351 
352  if (!iter2->first->isIdentical(*bmark,fptol(),fctol())) {
353  cout << "RooUnitTest ERROR: comparison of object " << iter2->first->IsA()->GetName() << "::" << iter2->first->GetName()
354  << " fails comparison with counterpart in reference RooFitResult " << bmark->GetName() << endl ;
355  ret = kFALSE ;
356  }
357 
358  // Delete RooFitResult when comparison is finished to avoid noise in leak checking
359  delete iter2->first ;
360 
361 
362  } else {
363 
364  // Writing mode
365 
366  cout <<"RooUnitTest: Writing reference RooFitResult " << iter2->first << " as benchmark " << iter2->second << endl ;
367  _refFile->cd() ;
368  iter2->first->Write(iter2->second.c_str()) ;
369  gMemDir->cd() ;
370  }
371 
372  ++iter2 ;
373  }
374 
375  list<pair<Double_t, string> >::iterator iter3 = _regValues.begin() ;
376  while (iter3!=_regValues.end()) {
377 
378  if (!_write) {
379 
380  // Comparison mode
381 
382  // Retrieve benchmark
383  RooDouble* ref = dynamic_cast<RooDouble*>(_refFile->Get(iter3->second.c_str())) ;
384  if (!ref) {
385  cout << "RooUnitTest ERROR: cannot retrieve RooDouble " << iter3->second << " from reference file, skipping " << endl ;
386  ++iter3 ;
387  ret = kFALSE ;
388  continue ;
389  }
390 
391  if (_verb) {
392  cout << "comparing value " << iter3->first << " to benchmark " << iter3->second << " = " << (Double_t)(*ref) << endl ;
393  }
394 
395  if (fabs(iter3->first - (Double_t)(*ref))>vtol() ) {
396  cout << "RooUnitTest ERROR: comparison of value " << iter3->first << " fails comparison with reference " << ref->GetName() << endl ;
397  ret = kFALSE ;
398  }
399 
400 
401  } else {
402 
403  // Writing mode
404 
405  cout <<"RooUnitTest: Writing reference Double_t " << iter3->first << " as benchmark " << iter3->second << endl ;
406  _refFile->cd() ;
407  RooDouble* rd = new RooDouble(iter3->first) ;
408  rd->Write(iter3->second.c_str()) ;
409  gMemDir->cd() ;
410  }
411 
412  ++iter3 ;
413  }
414 
415 
416  list<pair<RooTable*, string> >::iterator iter4 = _regTables.begin() ;
417  while (iter4!=_regTables.end()) {
418 
419  if (!_write) {
420 
421  // Comparison mode
422 
423  // Retrieve benchmark
424  RooTable* bmark = dynamic_cast<RooTable*>(_refFile->Get(iter4->second.c_str())) ;
425  if (!bmark) {
426  cout << "RooUnitTest ERROR: cannot retrieve RooTable " << iter4->second << " from reference file, skipping " << endl ;
427  ++iter4 ;
428  ret = kFALSE ;
429  continue ;
430  }
431 
432  if (_verb) {
433  cout << "comparing RooTable " << iter4->first << " to benchmark " << iter4->second << " = " << bmark << endl ;
434  }
435 
436  if (!iter4->first->isIdentical(*bmark)) {
437  cout << "RooUnitTest ERROR: comparison of object " << iter4->first->IsA()->GetName() << "::" << iter4->first->GetName()
438  << " fails comparison with counterpart in reference RooTable " << bmark->GetName() << endl ;
439  ret = kFALSE ;
440  }
441 
442  // Delete RooTable when comparison is finished to avoid noise in leak checking
443  delete iter4->first ;
444 
445 
446  } else {
447 
448  // Writing mode
449 
450  cout <<"RooUnitTest: Writing reference RooTable " << iter4->first << " as benchmark " << iter4->second << endl ;
451  _refFile->cd() ;
452  iter4->first->Write(iter4->second.c_str()) ;
453  gMemDir->cd() ;
454  }
455 
456  ++iter4 ;
457  }
458 
459 
460  list<pair<RooWorkspace*, string> >::iterator iter5 = _regWS.begin() ;
461  while (iter5!=_regWS.end()) {
462 
463  if (_write) {
464 
465  // Writing mode
466 
467  cout <<"RooUnitTest: Writing reference RooWorkspace " << iter5->first << " as benchmark " << iter5->second << endl ;
468  _refFile->cd() ;
469  iter5->first->Write(iter5->second.c_str()) ;
470  gMemDir->cd() ;
471  }
472 
473  ++iter5 ;
474  }
475 
476  /////////////////
477  list<pair<TH1*, string> >::iterator iter6 = _regTH.begin() ;
478  while (iter6!=_regTH.end()) {
479 
480  if (!_write) {
481 
482  // Comparison mode
483 
484  // Retrieve benchmark
485  TH1* bmark = dynamic_cast<TH1*>(_refFile->Get(iter6->second.c_str())) ;
486  if (!bmark) {
487  cout << "RooUnitTest ERROR: cannot retrieve TH1 " << iter6->second << " from reference file, skipping " << endl ;
488  ++iter6 ;
489  ret = kFALSE ;
490  continue ;
491  }
492 
493  if (_verb) {
494  cout << "comparing TH1 " << iter6->first << " to benchmark " << iter6->second << " = " << bmark << endl ;
495  }
496 
497  if (!areTHidentical(iter6->first,bmark)) {
498  // coverity[NULL_RETURNS]
499  cout << "RooUnitTest ERROR: comparison of object " << iter6->first->IsA()->GetName() << "::" << iter6->first->GetName()
500  << " fails comparison with counterpart in reference TH1 " << bmark->GetName() << endl ;
501 
502 
503  if (_debug) {
504  cout << "RooUnitTest INFO: writing THx " << iter6->first->GetName() << " and " << bmark->GetName()
505  << " of failed test to RooUnitTest_DEBUG.root" << endl ;
506  TFile fdbg("RooUnitTest_DEBUG.root","UPDATE") ;
507  iter6->first->SetName(Form("%s_test",iter6->first->GetName())) ;
508  iter6->first->Write() ;
509  bmark->SetName(Form("%s_ref",bmark->GetName())) ;
510  bmark->Write() ;
511  fdbg.Close() ;
512  }
513 
514  ret = kFALSE ;
515  }
516 
517  // Delete TH1 when comparison is finished to avoid noise in leak checking
518  delete iter6->first ;
519 
520 
521  } else {
522 
523  // Writing mode
524 
525  cout <<"RooUnitTest: Writing reference TH1 " << iter6->first << " as benchmark " << iter6->second << endl ;
526  _refFile->cd() ;
527  iter6->first->Write(iter6->second.c_str()) ;
528  gMemDir->cd() ;
529  }
530 
531  ++iter6 ;
532  }
533 
534 
535  /////////////////
536 
537  return ret ;
538 }
539 
540 
541 ////////////////////////////////////////////////////////////////////////////////
542 
544 {
546  for (Int_t i=0 ; i<RooMsgService::instance().numStreams() ; i++) {
549  }
550  }
551 }
552 
553 
554 ////////////////////////////////////////////////////////////////////////////////
555 
557 {
559  for (Int_t i=0 ; i<RooMsgService::instance().numStreams() ; i++) {
561  }
562 }
563 
564 
565 
566 ////////////////////////////////////////////////////////////////////////////////
567 
569 {
570  gMemDir->cd() ;
571 
572  if (_verb<2) {
573  setSilentMode() ;
574  } else {
575  cout << "*** Begin of output of Unit Test at normal verbosity *************" << endl ;
576  }
577 
579 
580  // Reset random generator seed to make results independent of test ordering
581  gRandom->SetSeed(12345) ;
583 
585  if (!testCode()) return kFALSE ;
587 
588  if (_verb<2) {
589  clearSilentMode() ;
590  } else {
591  cout << "*** End of output of Unit Test at normal verbosity ***************" << endl ;
592  }
593 
594  if (RooMsgService::instance().errorCount()>0) {
595  cout << "RooUnitTest: ERROR messages were logged, failing test" << endl ;
596  return kFALSE ;
597  }
598 
599  return runCompTests() ;
600 }
601 
602 
603 ////////////////////////////////////////////////////////////////////////////////
604 /// Set gMemDir to memDir
605 
607  gMemDir = memDir ;
608 }
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
Definition: TObject.cxx:778
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition: TAttLine.h:43
A RooCurve is a one-dimensional graphical representation of a real-valued function.
Definition: RooCurve.h:32
void SetName(const char *name)
Set the name of the RooPlot to &#39;name&#39;.
Definition: RooPlot.cxx:1077
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
Definition: RooPlot.h:127
virtual Double_t vtol()
Definition: RooUnitTest.h:66
Definition: Rtypes.h:56
void regWS(RooWorkspace *ws, const char *refName)
static void callgrind_zero()
Utility function to trigger zeroing of callgrind counters.
Definition: RooTrace.cxx:298
std::list< std::pair< RooFitResult *, std::string > > _regResults
Definition: RooUnitTest.h:79
std::list< std::pair< RooWorkspace *, std::string > > _regWS
Definition: RooUnitTest.h:82
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH1.cxx:4639
void addPlotable(RooPlotable *plotable, Option_t *drawOptions="", Bool_t invisible=kFALSE, Bool_t refreshNorm=kFALSE)
Add the specified plotable object to our plot.
Definition: RooPlot.cxx:447
Bool_t areTHidentical(TH1 *htest, TH1 *href)
virtual Int_t GetNbinsZ() const
Definition: TH1.h:279
Bool_t _write
Definition: RooUnitTest.h:76
TFile * _refFile
Definition: RooUnitTest.h:74
Int_t _verb
Definition: RooUnitTest.h:77
int Int_t
Definition: RtypesCore.h:41
StreamConfig & getStream(Int_t id)
bool Bool_t
Definition: RtypesCore.h:59
virtual Double_t htol()
Definition: RooUnitTest.h:58
void clearErrorCount()
static RooMsgService & instance()
Return reference to singleton instance.
STL namespace.
RooUnit test is an abstract base class for unit regression tests for RooFit and RooStats tests perfor...
Definition: RooUnitTest.h:36
RooDouble is a minimal implementation of a TObject holding a Double_t value.
Definition: RooDouble.h:22
Int_t numStreams() const
void setStreamStatus(Int_t id, Bool_t active)
(De)Activate stream with given unique ID
virtual Int_t GetDimension() const
Definition: TH1.h:263
A RooHist is a graphical representation of binned data based on the TGraphAsymmErrors class...
Definition: RooHist.h:26
void Class()
Definition: Class.C:29
TAttMarker * getAttMarker(const char *name=0) const
Return a pointer to the marker attributes of the named object in this plot, or zero if the named obje...
Definition: RooPlot.cxx:754
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
Definition: TRandom.cxx:568
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
Definition: TAttMarker.h:38
RooUnitTest(const char *name, TFile *refFile, Bool_t writeRef, Int_t verbose)
Definition: RooUnitTest.cxx:59
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
Definition: RooRandom.cxx:54
static TDirectory * gMemDir
Definition: RooUnitTest.h:72
RooWorkspace * getWS(const char *refName)
static void setMemDir(TDirectory *memDir)
Set gMemDir to memDir.
virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") const
Statistical test of compatibility in shape between this histogram and h2, using Kolmogorov test...
Definition: TH1.cxx:7362
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition: TAttLine.h:40
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
TRandom2 r(17)
std::list< std::pair< TH1 *, std::string > > _regTH
Definition: RooUnitTest.h:83
void regValue(Double_t value, const char *refName)
bool verbose
char * Form(const char *fmt,...)
virtual Double_t ctol()
Definition: RooUnitTest.h:62
Bool_t _debug
Definition: RooUnitTest.h:75
void clearSilentMode()
void setSilentMode(Bool_t flag)
R__EXTERN TRandom * gRandom
Definition: TRandom.h:62
virtual Bool_t testCode()=0
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
Definition: RooPlot.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:92
void regPlot(RooPlot *frame, const char *refName)
Definition: RooUnitTest.cxx:75
std::list< std::pair< RooTable *, std::string > > _regTables
Definition: RooUnitTest.h:81
virtual void SetName(const char *name)
Change the name of this histogram.
Definition: TH1.cxx:8073
void regTable(RooTable *t, const char *refName)
void setSilentMode()
#define ClassImp(name)
Definition: Rtypes.h:336
double Double_t
Definition: RtypesCore.h:55
Describe directory structure in memory.
Definition: TDirectory.h:34
The TH1 histogram class.
Definition: TH1.h:56
std::list< std::pair< Double_t, std::string > > _regValues
Definition: RooUnitTest.h:80
Bool_t isIdentical(const RooHist &other, Double_t tol=1e-6) const
Return kTRUE if contents of this RooHist is identical within given relative tolerance to that of &#39;oth...
Definition: RooHist.cxx:613
Bool_t isIdentical(const RooCurve &other, Double_t tol=1e-6) const
Return true if curve is identical to other curve allowing for given absolute tolerance on each point ...
Definition: RooCurve.cxx:864
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Definition: TAttLine.h:42
double Stat_t
Definition: RtypesCore.h:73
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
Definition: TNamed.cxx:65
TAttLine * getAttLine(const char *name=0) const
Return a pointer to the line attributes of the named object in this plot, or zero if the named object...
Definition: RooPlot.cxx:734
Mother of all ROOT objects.
Definition: TObject.h:37
virtual Double_t fctol()
Definition: RooUnitTest.h:65
std::list< std::pair< RooPlot *, std::string > > _regPlots
Definition: RooUnitTest.h:78
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
Definition: TDirectory.cxx:435
virtual Double_t fptol()
Definition: RooUnitTest.h:64
Bool_t runTest()
Definition: Rtypes.h:56
RooTable is the abstract interface for table objects.
Definition: RooTable.h:24
static void callgrind_dump()
Utility function to trigger dumping of callgrind counters.
Definition: RooTrace.cxx:310
virtual Int_t GetNbinsX() const
Definition: TH1.h:277
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:364
void regTH(TH1 *h, const char *refName)
const Bool_t kTRUE
Definition: RtypesCore.h:91
The RooWorkspace is a persistable container for RooFit projects.
Definition: RooWorkspace.h:42
TObject * findObject(const char *name, const TClass *clas=0) const
Find the named object in our list of items and return a pointer to it.
Definition: RooPlot.cxx:850
virtual Int_t GetNbinsY() const
Definition: TH1.h:278
Bool_t runCompTests()
void regResult(RooFitResult *r, const char *refName)
Definition: RooUnitTest.cxx:89