Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
21RooUnit test is an abstract base class for unit regression tests for
22RooFit and RooStats tests performed in stressRooFit and stressRooStats
23Implementations of this class must implement abstract method testCode()
24which defines the regression test to be performed. Inside testCode()
25the regression test can define objects on which the regression is performed.
26These are:
27Object | 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 "TDirectory.h"
40#include "TClass.h"
41#include "RooHist.h"
42#include "RooMsgService.h"
43#include "RooDouble.h"
44#include "RooTrace.h"
45#include "RooRandom.h"
46#include <cmath>
47
49
50using namespace std;
51
53
54
55////////////////////////////////////////////////////////////////////////////////
56
57RooUnitTest::RooUnitTest(const char* name, TFile* refFile, Bool_t writeRef, Int_t verbose, std::string const& batchMode) : TNamed(name,name),
58 _refFile(refFile), _debug(kFALSE), _write(writeRef), _verb(verbose), _batchMode(batchMode)
59{
60}
61
62
63
64////////////////////////////////////////////////////////////////////////////////
65
67{
68}
69
70
71////////////////////////////////////////////////////////////////////////////////
72
73void RooUnitTest::regPlot(RooPlot* frame, const char* refName)
74{
75 if (_refFile) {
76 string refNameStr(refName) ;
77 frame->SetName(refName) ;
78 _regPlots.push_back(make_pair(frame,refNameStr)) ;
79 } else {
80 delete frame ;
81 }
82}
83
84
85////////////////////////////////////////////////////////////////////////////////
86
87void RooUnitTest::regResult(RooFitResult* r, const char* refName)
88{
89 if (_refFile) {
90 string refNameStr(refName) ;
91 _regResults.push_back(make_pair(r,refNameStr)) ;
92 } else {
93 delete r ;
94 }
95}
96
97
98////////////////////////////////////////////////////////////////////////////////
99
100void RooUnitTest::regValue(Double_t d, const char* refName)
101{
102 if (_refFile) {
103 string refNameStr(refName) ;
104 _regValues.push_back(make_pair(d,refNameStr)) ;
105 }
106}
107
108
109////////////////////////////////////////////////////////////////////////////////
110
111void RooUnitTest::regTable(RooTable* t, const char* refName)
112{
113 if (_refFile) {
114 string refNameStr(refName) ;
115 _regTables.push_back(make_pair(t,refNameStr)) ;
116 } else {
117 delete t ;
118 }
119}
120
121
122////////////////////////////////////////////////////////////////////////////////
123
124void RooUnitTest::regWS(RooWorkspace* ws, const char* refName)
125{
126 if (_refFile) {
127 string refNameStr(refName) ;
128 _regWS.push_back(make_pair(ws,refNameStr)) ;
129 } else {
130 delete ws ;
131 }
132}
133
134
135////////////////////////////////////////////////////////////////////////////////
136
137void RooUnitTest::regTH(TH1* th, const char* refName)
138{
139 if (_refFile) {
140 string refNameStr(refName) ;
141 _regTH.push_back(make_pair(th,refNameStr)) ;
142 } else {
143 delete th ;
144 }
145}
146
147
148////////////////////////////////////////////////////////////////////////////////
149
150RooWorkspace* RooUnitTest::getWS(const char* refName)
151{
152 RooWorkspace* ws = dynamic_cast<RooWorkspace*>(_refFile->Get(refName)) ;
153 if (!ws) {
154 if(_verb >= 0) std::cout << "RooUnitTest ERROR: cannot retrieve RooWorkspace " << refName
155 << " from reference file, skipping " << endl ;
156 return 0 ;
157 }
158
159 return ws ;
160}
161
162
163////////////////////////////////////////////////////////////////////////////////
164
166{
167 if (htest->GetDimension() != href->GetDimension()) {
168 return false ;
169 }
170
171 // Use Kolmogorov distance as metric rather than probability
172 // because we expect histograms to be identical rather
173 // than drawn from the same parent distribution
174 Double_t kmax = htest->KolmogorovTest(href,"M") ;
175
176 if (kmax>htol()) {
177
178 if(_verb >= 0) std::cout << "KS distances = " << kmax << std::endl;
179
180 Int_t ntest = htest->GetNbinsX() +2 ;
181 Int_t nref = href->GetNbinsX() +2 ;
182 if (htest->GetDimension()>1) {
183 ntest *= htest->GetNbinsY() + 2 ;
184 nref *= href->GetNbinsY() + 2 ;
185 }
186 if (htest->GetDimension()>2) {
187 ntest *= htest->GetNbinsZ() + 2 ;
188 nref *= href->GetNbinsZ() + 2 ;
189 }
190
191 if (ntest != nref) {
192 return false ;
193 }
194
195 for (Int_t i=0 ; i<ntest ; i++) {
196 if (fabs(htest->GetBinContent(i)-href->GetBinContent(i))>htol()) {
197 if(_verb >= 0) std::cout << "htest[" << i << "] = " << htest->GetBinContent(i) << " href[" << i << "] = " << href->GetBinContent(i) << endl;
198 }
199 }
200
201 return false ;
202 }
203
204 return true ;
205}
206
207
208
209////////////////////////////////////////////////////////////////////////////////
210
212{
213 Bool_t ret = true ;
214
215 list<pair<RooPlot*, string> >::iterator iter = _regPlots.begin() ;
216 while (iter!=_regPlots.end()) {
217
218 if (!_write) {
219
220 // Comparison mode
221
222 // Retrieve benchmark
223 RooPlot* bmark = dynamic_cast<RooPlot*>(_refFile->Get(iter->second.c_str())) ;
224 if (!bmark) {
225 if(_verb >= 0) std::cout << "RooUnitTest ERROR: cannot retrieve RooPlot " << iter->second
226 << " from reference file, skipping " << std::endl;
227 ret = false ;
228 ++iter ;
229 continue ;
230 }
231
232 if (_verb > 0) {
233 cout << "comparing RooPlot " << iter->first << " to benchmark " << iter->second << " = " << bmark << endl ;
234 cout << "reference: " ; iter->first->Print() ;
235 cout << "benchmark: " ; bmark->Print() ;
236 }
237
238 RooPlot* compPlot = _debug ? iter->first->emptyClone(Form("%s_comparison",iter->first->GetName())) : 0 ;
239 Bool_t anyFail=false ;
240
241 Stat_t nItems = iter->first->numItems() ;
242 for (Stat_t i=0 ; i<nItems ; i++) {
243 // coverity[NULL_RETURNS]
244 TObject* obj = iter->first->getObject((Int_t)i) ;
245
246 // Retrieve corresponding object from reference frame
247 TObject* objRef = bmark->findObject(obj->GetName()) ;
248
249 if (!objRef) {
250 if(_verb >= 0) std::cout << "RooUnitTest ERROR: cannot retrieve reference object " << obj->GetName()
251 << " from benchmark RooPlot " << iter->second << ", skipping" << std::endl;
252 ret = false ;
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(),_verb >= 0)) {
261 if(_verb >= 0) std::cout << "RooUnitTest ERROR: comparison of object " << obj->IsA()->GetName() << "::" << obj->GetName()
262 << " fails comparison with counterpart in reference RooPlot " << bmark->GetName() << std::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=true ;
277 ret = false ;
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(),_verb >= 0)) {
283 if(_verb >= 0) std::cout << "RooUnitTest ERROR: comparison of object " << obj->IsA()->GetName() << "::" << obj->GetName()
284 << " fails comparison with counterpart in reference RooPlot " << bmark->GetName() << std::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=true ;
299 ret = false ;
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 std::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 if(_verb >= 0) std::cout << "RooUnitTest ERROR: cannot retrieve RooFitResult "
343 << iter2->second << " from reference file, skipping " << std::endl ;
344 ++iter2 ;
345 ret = false ;
346 continue ;
347 }
348
349 if (_verb > 0) {
350 cout << "comparing RooFitResult " << iter2->first << " to benchmark " << iter2->second << " = " << bmark << endl ;
351 }
352
353 if (!iter2->first->isIdentical(*bmark,fptol(),fctol(),_verb >= 0)) {
354 if(_verb >= 0) cout << "RooUnitTest ERROR: comparison of object " << iter2->first->IsA()->GetName() << "::" << iter2->first->GetName()
355 << " from result " << iter2->second
356 << " fails comparison with counterpart in reference RooFitResult " << bmark->GetName() << std::endl;
357 ret = false ;
358 }
359
360 // Delete RooFitResult when comparison is finished to avoid noise in leak checking
361 delete iter2->first ;
362
363
364 } else {
365
366 // Writing mode
367
368 std::cout <<"RooUnitTest: Writing reference RooFitResult " << iter2->first << " as benchmark " << iter2->second << endl ;
369 _refFile->cd() ;
370 iter2->first->Write(iter2->second.c_str()) ;
371 gMemDir->cd() ;
372 }
373
374 ++iter2 ;
375 }
376
377 list<pair<Double_t, string> >::iterator iter3 = _regValues.begin() ;
378 while (iter3!=_regValues.end()) {
379
380 if (!_write) {
381
382 // Comparison mode
383
384 // Retrieve benchmark
385 RooDouble* ref = dynamic_cast<RooDouble*>(_refFile->Get(iter3->second.c_str())) ;
386 if (!ref) {
387 if(_verb >= 0) std::cout << "RooUnitTest ERROR: cannot retrieve RooDouble " << iter3->second << " from reference file, skipping " << std::endl;
388 ++iter3 ;
389 ret = false ;
390 continue ;
391 }
392
393 if (_verb > 0) {
394 cout << "comparing value " << iter3->first << " to benchmark " << iter3->second << " = " << (Double_t)(*ref) << endl ;
395 }
396
397 if (fabs(iter3->first - (Double_t)(*ref))>vtol() ) {
398 if(_verb >= 0) cout << "RooUnitTest ERROR: comparison of value " << iter3->first << " fails comparison with reference " << ref->GetName() << endl ;
399 ret = false ;
400 }
401
402
403 } else {
404
405 // Writing mode
406
407 std::cout <<"RooUnitTest: Writing reference Double_t " << iter3->first << " as benchmark " << iter3->second << endl ;
408 _refFile->cd() ;
409 RooDouble* rd = new RooDouble(iter3->first) ;
410 rd->Write(iter3->second.c_str()) ;
411 gMemDir->cd() ;
412 }
413
414 ++iter3 ;
415 }
416
417
418 list<pair<RooTable*, string> >::iterator iter4 = _regTables.begin() ;
419 while (iter4!=_regTables.end()) {
420
421 if (!_write) {
422
423 // Comparison mode
424
425 // Retrieve benchmark
426 RooTable* bmark = dynamic_cast<RooTable*>(_refFile->Get(iter4->second.c_str())) ;
427 if (!bmark) {
428 if(_verb >= 0) cout << "RooUnitTest ERROR: cannot retrieve RooTable " << iter4->second << " from reference file, skipping " << endl ;
429 ++iter4 ;
430 ret = false ;
431 continue ;
432 }
433
434 if (_verb > 0) {
435 cout << "comparing RooTable " << iter4->first << " to benchmark " << iter4->second << " = " << bmark << endl ;
436 }
437
438 if (!iter4->first->isIdentical(*bmark, _verb >= 0)) {
439 if(_verb >= 0) std::cout << "RooUnitTest ERROR: comparison of object " << iter4->first->IsA()->GetName() << "::" << iter4->first->GetName()
440 << " fails comparison with counterpart in reference RooTable " << bmark->GetName() << endl ;
441 if (_verb > 0) {
442 iter4->first->Print("V");
443 bmark->Print("V");
444 }
445 ret = false;
446 }
447
448 // Delete RooTable when comparison is finished to avoid noise in leak checking
449 delete iter4->first ;
450
451
452 } else {
453
454 // Writing mode
455
456 std::cout <<"RooUnitTest: Writing reference RooTable " << iter4->first << " as benchmark " << iter4->second << endl ;
457 _refFile->cd() ;
458 iter4->first->Write(iter4->second.c_str()) ;
459 gMemDir->cd() ;
460 }
461
462 ++iter4 ;
463 }
464
465
466 list<pair<RooWorkspace*, string> >::iterator iter5 = _regWS.begin() ;
467 while (iter5!=_regWS.end()) {
468
469 if (_write) {
470
471 // Writing mode
472
473 std::cout <<"RooUnitTest: Writing reference RooWorkspace " << iter5->first << " as benchmark " << iter5->second << endl ;
474 _refFile->cd() ;
475 iter5->first->Write(iter5->second.c_str()) ;
476 gMemDir->cd() ;
477 }
478
479 ++iter5 ;
480 }
481
482 /////////////////
483 list<pair<TH1*, string> >::iterator iter6 = _regTH.begin() ;
484 while (iter6!=_regTH.end()) {
485
486 if (!_write) {
487
488 // Comparison mode
489
490 // Retrieve benchmark
491 TH1* bmark = dynamic_cast<TH1*>(_refFile->Get(iter6->second.c_str())) ;
492 if (!bmark) {
493 if(_verb >= 0) cout << "RooUnitTest ERROR: cannot retrieve TH1 " << iter6->second << " from reference file, skipping " << endl ;
494 ++iter6 ;
495 ret = false ;
496 continue ;
497 }
498
499 if (_verb > 0) {
500 cout << "comparing TH1 " << iter6->first << " to benchmark " << iter6->second << " = " << bmark << endl ;
501 }
502
503 if (!areTHidentical(iter6->first,bmark)) {
504 // coverity[NULL_RETURNS]
505 if(_verb >= 0) cout << "RooUnitTest ERROR: comparison of object " << iter6->first->IsA()->GetName() << "::" << iter6->first->GetName()
506 << " fails comparison with counterpart in reference TH1 " << bmark->GetName() << endl ;
507
508
509 if (_debug) {
510 cout << "RooUnitTest INFO: writing THx " << iter6->first->GetName() << " and " << bmark->GetName()
511 << " of failed test to RooUnitTest_DEBUG.root" << endl ;
512 TFile fdbg("RooUnitTest_DEBUG.root","UPDATE") ;
513 iter6->first->SetName(Form("%s_test",iter6->first->GetName())) ;
514 iter6->first->Write() ;
515 bmark->SetName(Form("%s_ref",bmark->GetName())) ;
516 bmark->Write() ;
517 fdbg.Close() ;
518 }
519
520 ret = false ;
521 }
522
523 // Delete TH1 when comparison is finished to avoid noise in leak checking
524 delete iter6->first ;
525
526
527 } else {
528
529 // Writing mode
530
531 std::cout <<"RooUnitTest: Writing reference TH1 " << iter6->first << " as benchmark " << iter6->second << endl ;
532 _refFile->cd() ;
533 iter6->first->Write(iter6->second.c_str()) ;
534 gMemDir->cd() ;
535 }
536
537 ++iter6 ;
538 }
539
540
541 /////////////////
542
543 return ret ;
544}
545
546
547////////////////////////////////////////////////////////////////////////////////
548
550{
552 for (Int_t i=0 ; i<RooMsgService::instance().numStreams() ; i++) {
555 }
556 }
557}
558
559
560////////////////////////////////////////////////////////////////////////////////
561
563{
565 for (Int_t i=0 ; i<RooMsgService::instance().numStreams() ; i++) {
567 }
568}
569
570
571
572////////////////////////////////////////////////////////////////////////////////
573
575{
576 gMemDir->cd() ;
577
578 if (_verb<2) {
579 setSilentMode() ;
580 } else {
581 std::cout << "*** Begin of output of Unit Test at normal verbosity *************" << endl ;
582 }
583
585
586 // Reset random generator seed to make results independent of test ordering
587 gRandom->SetSeed(12345) ;
589
591 if (!testCode()) return false ;
593
594 if (_verb<2) {
596 } else {
597 std::cout << "*** End of output of Unit Test at normal verbosity ***************" << endl ;
598 }
599
600 if (RooMsgService::instance().errorCount()>0) {
601 if(_verb >= 0) std::cout << "RooUnitTest: ERROR messages were logged, failing test" << endl ;
602 return false ;
603 }
604
605 return runCompTests() ;
606}
607
608
609////////////////////////////////////////////////////////////////////////////////
610/// Set gMemDir to memDir
611
613 gMemDir = memDir ;
614}
ROOT::R::TRInterface & r
Definition Object.C:4
#define d(i)
Definition RSha256.hxx:102
const Bool_t kFALSE
Definition RtypesCore.h:101
double Stat_t
Definition RtypesCore.h:86
#define ClassImp(name)
Definition Rtypes.h:364
@ kRed
Definition Rtypes.h:66
@ kBlue
Definition Rtypes.h:66
@ kDashed
Definition TAttLine.h:48
@ kSolid
Definition TAttLine.h:48
char name[80]
Definition TGX11.cxx:110
R__EXTERN TRandom * gRandom
Definition TRandom.h:62
char * Form(const char *fmt,...)
A RooCurve is a one-dimensional graphical representation of a real-valued function.
Definition RooCurve.h:32
Bool_t isIdentical(const RooCurve &other, Double_t tol=1e-6, bool verbose=true) const
Return true if curve is identical to other curve allowing for given absolute tolerance on each point ...
Definition RooCurve.cxx:887
RooDouble is a minimal implementation of a TObject holding a Double_t value.
Definition RooDouble.h:22
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
A RooHist is a graphical representation of binned data based on the TGraphAsymmErrors class.
Definition RooHist.h:27
Bool_t isIdentical(const RooHist &other, Double_t tol=1e-6, bool verbose=true) const
Return kTRUE if contents of this RooHist is identical within given relative tolerance to that of 'oth...
Definition RooHist.cxx:657
void setStreamStatus(Int_t id, Bool_t active)
(De)Activate stream with given unique ID
static RooMsgService & instance()
Return reference to singleton instance.
void clearErrorCount()
StreamConfig & getStream(Int_t id)
Int_t numStreams() const
void setSilentMode(Bool_t flag)
A RooPlot is a plot frame and a container for graphics objects within that frame.
Definition RooPlot.h:44
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:856
void SetName(const char *name)
Set the name of the RooPlot to 'name'.
Definition RooPlot.cxx:1235
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:836
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:540
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:952
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
Definition RooPlot.h:131
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
Definition RooRandom.cxx:53
RooTable is the abstract interface for table objects.
Definition RooTable.h:23
static void callgrind_zero()
Utility function to trigger zeroing of callgrind counters.
Definition RooTrace.cxx:298
static void callgrind_dump()
Utility function to trigger dumping of callgrind counters.
Definition RooTrace.cxx:310
RooUnit test is an abstract base class for unit regression tests for RooFit and RooStats tests perfor...
Definition RooUnitTest.h:37
std::list< std::pair< TH1 *, std::string > > _regTH
Definition RooUnitTest.h:85
virtual Double_t fctol()
Definition RooUnitTest.h:66
Bool_t runCompTests()
Bool_t _debug
Definition RooUnitTest.h:76
void regValue(Double_t value, const char *refName)
virtual Double_t fptol()
Definition RooUnitTest.h:65
Bool_t areTHidentical(TH1 *htest, TH1 *href)
Bool_t _write
Definition RooUnitTest.h:77
void regWS(RooWorkspace *ws, const char *refName)
void regTH(TH1 *h, const char *refName)
RooUnitTest(const char *name, TFile *refFile, Bool_t writeRef, Int_t verbose, std::string const &batchMode="off")
void regResult(RooFitResult *r, const char *refName)
virtual Bool_t testCode()=0
std::list< std::pair< RooWorkspace *, std::string > > _regWS
Definition RooUnitTest.h:84
static void setMemDir(TDirectory *memDir)
Set gMemDir to memDir.
RooWorkspace * getWS(const char *refName)
std::list< std::pair< Double_t, std::string > > _regValues
Definition RooUnitTest.h:82
std::list< std::pair< RooPlot *, std::string > > _regPlots
Definition RooUnitTest.h:80
void regPlot(RooPlot *frame, const char *refName)
void regTable(RooTable *t, const char *refName)
std::list< std::pair< RooFitResult *, std::string > > _regResults
Definition RooUnitTest.h:81
Bool_t runTest()
virtual Double_t ctol()
Definition RooUnitTest.h:63
virtual Double_t htol()
Definition RooUnitTest.h:59
virtual Double_t vtol()
Definition RooUnitTest.h:67
std::list< std::pair< RooTable *, std::string > > _regTables
Definition RooUnitTest.h:83
TFile * _refFile
Definition RooUnitTest.h:75
void setSilentMode()
static TDirectory * gMemDir
Definition RooUnitTest.h:73
void clearSilentMode()
The RooWorkspace is a persistable container for RooFit projects.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Definition TAttLine.h:42
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition TAttLine.h:43
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition TAttLine.h:40
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
Definition TAttMarker.h:38
Bool_t cd() override
Change current directory to "this" directory.
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
Describe directory structure in memory.
Definition TDirectory.h:45
virtual Bool_t cd()
Change current directory to "this" directory.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition TFile.h:54
void Close(Option_t *option="") override
Close a file.
Definition TFile.cxx:899
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:58
virtual Int_t GetNbinsY() const
Definition TH1.h:297
virtual Int_t GetNbinsZ() const
Definition TH1.h:298
virtual Int_t GetDimension() const
Definition TH1.h:282
virtual Int_t GetNbinsX() const
Definition TH1.h:296
virtual void SetName(const char *name)
Change the name of this histogram.
Definition TH1.cxx:8790
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition TH1.cxx:4994
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:8050
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
virtual void Print(Option_t *option="") const
Print TNamed name and title.
Definition TNamed.cxx:128
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
Definition TNamed.cxx:74
virtual const char * GetName() const
Returns name of object.
Definition TNamed.h:47
Mother of all ROOT objects.
Definition TObject.h:41
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:868
virtual const char * GetName() const
Returns name of object.
Definition TObject.cxx:429
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
Definition TRandom.cxx:608
void ws()
Definition ws.C:66