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) : TNamed(name,name),
58 _refFile(refFile), _debug(kFALSE), _write(writeRef), _verb(verbose)
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 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 kFALSE ;
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 cout << "KS distances = " << kmax << 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 kFALSE ;
193 }
194
195 for (Int_t i=0 ; i<ntest ; i++) {
196 if (fabs(htest->GetBinContent(i)-href->GetBinContent(i))>htol()) {
197 cout << "htest[" << i << "] = " << htest->GetBinContent(i) << " href[" << i << "] = " << href->GetBinContent(i) << endl;
198 }
199 }
200
201 return kFALSE ;
202 }
203
204 return kTRUE ;
205}
206
207
208
209////////////////////////////////////////////////////////////////////////////////
210
212{
213 Bool_t ret = kTRUE ;
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 cout << "RooUnitTest ERROR: cannot retrieve RooPlot " << iter->second << " from reference file, skipping " << endl ;
226 ret = kFALSE ;
227 ++iter ;
228 continue ;
229 }
230
231 if (_verb) {
232 cout << "comparing RooPlot " << iter->first << " to benchmark " << iter->second << " = " << bmark << endl ;
233 cout << "reference: " ; iter->first->Print() ;
234 cout << "benchmark: " ; bmark->Print() ;
235 }
236
237 RooPlot* compPlot = _debug ? iter->first->emptyClone(Form("%s_comparison",iter->first->GetName())) : 0 ;
238 Bool_t anyFail=kFALSE ;
239
240 Stat_t nItems = iter->first->numItems() ;
241 for (Stat_t i=0 ; i<nItems ; i++) {
242 // coverity[NULL_RETURNS]
243 TObject* obj = iter->first->getObject((Int_t)i) ;
244
245 // Retrieve corresponding object from reference frame
246 TObject* objRef = bmark->findObject(obj->GetName()) ;
247
248 if (!objRef) {
249 cout << "RooUnitTest ERROR: cannot retrieve object " << obj->GetName() << " from reference RooPlot " << iter->second << ", skipping" << endl ;
250 ret = kFALSE ;
251 break ;
252 }
253
254 // Histogram comparisons
255 if (obj->IsA()==RooHist::Class()) {
256 RooHist* testHist = static_cast<RooHist*>(obj) ;
257 RooHist* refHist = static_cast<RooHist*>(objRef) ;
258 if (!testHist->isIdentical(*refHist,htol())) {
259 cout << "RooUnitTest ERROR: comparison of object " << obj->IsA()->GetName() << "::" << obj->GetName()
260 << " fails comparison with counterpart in reference RooPlot " << bmark->GetName() << endl ;
261
262 if (compPlot) {
263 compPlot->addPlotable((RooHist*)testHist->Clone(),"P") ;
264 compPlot->getAttLine()->SetLineColor(kRed) ;
265 compPlot->getAttMarker()->SetMarkerColor(kRed) ;
266 compPlot->getAttLine()->SetLineWidth(1) ;
267
268 compPlot->addPlotable((RooHist*)refHist->Clone(),"P") ;
269 compPlot->getAttLine()->SetLineColor(kBlue) ;
270 compPlot->getAttMarker()->SetMarkerColor(kBlue) ;
271 compPlot->getAttLine()->SetLineWidth(1) ;
272 }
273
274 anyFail=kTRUE ;
275 ret = kFALSE ;
276 }
277 } else if (obj->IsA()==RooCurve::Class()) {
278 RooCurve* testCurve = static_cast<RooCurve*>(obj) ;
279 RooCurve* refCurve = static_cast<RooCurve*>(objRef) ;
280 if (!testCurve->isIdentical(*refCurve,ctol())) {
281 cout << "RooUnitTest ERROR: comparison of object " << obj->IsA()->GetName() << "::" << obj->GetName()
282 << " fails comparison with counterpart in reference RooPlot " << bmark->GetName() << endl ;
283
284 if (compPlot) {
285 compPlot->addPlotable((RooCurve*)testCurve->Clone()) ;
286 compPlot->getAttLine()->SetLineColor(kRed) ;
287 compPlot->getAttLine()->SetLineWidth(1) ;
288 compPlot->getAttLine()->SetLineStyle(kSolid) ;
289
290 compPlot->addPlotable((RooCurve*)refCurve->Clone()) ;
291 compPlot->getAttLine()->SetLineColor(kBlue) ;
292 compPlot->getAttLine()->SetLineWidth(1) ;
293 compPlot->getAttLine()->SetLineStyle(kDashed) ;
294 }
295
296 anyFail=kTRUE ;
297 ret = kFALSE ;
298 }
299
300 }
301
302 }
303
304 if (anyFail && compPlot) {
305 cout << "RooUnitTest INFO: writing comparison plot " << compPlot->GetName() << " of failed test to RooUnitTest_DEBUG.root" << endl ;
306 TFile fdbg("RooUnitTest_DEBUG.root","UPDATE") ;
307 compPlot->Write() ;
308 fdbg.Close() ;
309 } else {
310 delete compPlot ;
311 }
312
313 // Delete RooPlot when comparison is finished to avoid noise in leak checking
314 delete iter->first ;
315
316 } else {
317
318 // Writing mode
319
320 cout <<"RooUnitTest: Writing reference RooPlot " << iter->first << " as benchmark " << iter->second << endl ;
321 _refFile->cd() ;
322 iter->first->Write(iter->second.c_str()) ;
323 gMemDir->cd() ;
324 }
325
326 ++iter ;
327 }
328
329
330 list<pair<RooFitResult*, string> >::iterator iter2 = _regResults.begin() ;
331 while (iter2!=_regResults.end()) {
332
333 if (!_write) {
334
335 // Comparison mode
336
337 // Retrieve benchmark
338 RooFitResult* bmark = dynamic_cast<RooFitResult*>(_refFile->Get(iter2->second.c_str())) ;
339 if (!bmark) {
340 cout << "RooUnitTest ERROR: cannot retrieve RooFitResult " << iter2->second << " from reference file, skipping " << endl ;
341 ++iter2 ;
342 ret = kFALSE ;
343 continue ;
344 }
345
346 if (_verb) {
347 cout << "comparing RooFitResult " << iter2->first << " to benchmark " << iter2->second << " = " << bmark << endl ;
348 }
349
350 if (!iter2->first->isIdentical(*bmark,fptol(),fctol())) {
351 cout << "RooUnitTest ERROR: comparison of object " << iter2->first->IsA()->GetName() << "::" << iter2->first->GetName()
352 << " from result " << iter2->second
353 << " fails comparison with counterpart in reference RooFitResult " << bmark->GetName() << endl ;
354 ret = kFALSE ;
355 }
356
357 // Delete RooFitResult when comparison is finished to avoid noise in leak checking
358 delete iter2->first ;
359
360
361 } else {
362
363 // Writing mode
364
365 cout <<"RooUnitTest: Writing reference RooFitResult " << iter2->first << " as benchmark " << iter2->second << endl ;
366 _refFile->cd() ;
367 iter2->first->Write(iter2->second.c_str()) ;
368 gMemDir->cd() ;
369 }
370
371 ++iter2 ;
372 }
373
374 list<pair<Double_t, string> >::iterator iter3 = _regValues.begin() ;
375 while (iter3!=_regValues.end()) {
376
377 if (!_write) {
378
379 // Comparison mode
380
381 // Retrieve benchmark
382 RooDouble* ref = dynamic_cast<RooDouble*>(_refFile->Get(iter3->second.c_str())) ;
383 if (!ref) {
384 cout << "RooUnitTest ERROR: cannot retrieve RooDouble " << iter3->second << " from reference file, skipping " << endl ;
385 ++iter3 ;
386 ret = kFALSE ;
387 continue ;
388 }
389
390 if (_verb) {
391 cout << "comparing value " << iter3->first << " to benchmark " << iter3->second << " = " << (Double_t)(*ref) << endl ;
392 }
393
394 if (fabs(iter3->first - (Double_t)(*ref))>vtol() ) {
395 cout << "RooUnitTest ERROR: comparison of value " << iter3->first << " fails comparison with reference " << ref->GetName() << endl ;
396 ret = kFALSE ;
397 }
398
399
400 } else {
401
402 // Writing mode
403
404 cout <<"RooUnitTest: Writing reference Double_t " << iter3->first << " as benchmark " << iter3->second << endl ;
405 _refFile->cd() ;
406 RooDouble* rd = new RooDouble(iter3->first) ;
407 rd->Write(iter3->second.c_str()) ;
408 gMemDir->cd() ;
409 }
410
411 ++iter3 ;
412 }
413
414
415 list<pair<RooTable*, string> >::iterator iter4 = _regTables.begin() ;
416 while (iter4!=_regTables.end()) {
417
418 if (!_write) {
419
420 // Comparison mode
421
422 // Retrieve benchmark
423 RooTable* bmark = dynamic_cast<RooTable*>(_refFile->Get(iter4->second.c_str())) ;
424 if (!bmark) {
425 cout << "RooUnitTest ERROR: cannot retrieve RooTable " << iter4->second << " from reference file, skipping " << endl ;
426 ++iter4 ;
427 ret = kFALSE ;
428 continue ;
429 }
430
431 if (_verb) {
432 cout << "comparing RooTable " << iter4->first << " to benchmark " << iter4->second << " = " << bmark << endl ;
433 }
434
435 if (!iter4->first->isIdentical(*bmark)) {
436 cout << "RooUnitTest ERROR: comparison of object " << iter4->first->IsA()->GetName() << "::" << iter4->first->GetName()
437 << " fails comparison with counterpart in reference RooTable " << bmark->GetName() << endl ;
438 if (_verb) {
439 iter4->first->Print("V");
440 bmark->Print("V");
441 }
442 ret = false;
443 }
444
445 // Delete RooTable when comparison is finished to avoid noise in leak checking
446 delete iter4->first ;
447
448
449 } else {
450
451 // Writing mode
452
453 cout <<"RooUnitTest: Writing reference RooTable " << iter4->first << " as benchmark " << iter4->second << endl ;
454 _refFile->cd() ;
455 iter4->first->Write(iter4->second.c_str()) ;
456 gMemDir->cd() ;
457 }
458
459 ++iter4 ;
460 }
461
462
463 list<pair<RooWorkspace*, string> >::iterator iter5 = _regWS.begin() ;
464 while (iter5!=_regWS.end()) {
465
466 if (_write) {
467
468 // Writing mode
469
470 cout <<"RooUnitTest: Writing reference RooWorkspace " << iter5->first << " as benchmark " << iter5->second << endl ;
471 _refFile->cd() ;
472 iter5->first->Write(iter5->second.c_str()) ;
473 gMemDir->cd() ;
474 }
475
476 ++iter5 ;
477 }
478
479 /////////////////
480 list<pair<TH1*, string> >::iterator iter6 = _regTH.begin() ;
481 while (iter6!=_regTH.end()) {
482
483 if (!_write) {
484
485 // Comparison mode
486
487 // Retrieve benchmark
488 TH1* bmark = dynamic_cast<TH1*>(_refFile->Get(iter6->second.c_str())) ;
489 if (!bmark) {
490 cout << "RooUnitTest ERROR: cannot retrieve TH1 " << iter6->second << " from reference file, skipping " << endl ;
491 ++iter6 ;
492 ret = kFALSE ;
493 continue ;
494 }
495
496 if (_verb) {
497 cout << "comparing TH1 " << iter6->first << " to benchmark " << iter6->second << " = " << bmark << endl ;
498 }
499
500 if (!areTHidentical(iter6->first,bmark)) {
501 // coverity[NULL_RETURNS]
502 cout << "RooUnitTest ERROR: comparison of object " << iter6->first->IsA()->GetName() << "::" << iter6->first->GetName()
503 << " fails comparison with counterpart in reference TH1 " << bmark->GetName() << endl ;
504
505
506 if (_debug) {
507 cout << "RooUnitTest INFO: writing THx " << iter6->first->GetName() << " and " << bmark->GetName()
508 << " of failed test to RooUnitTest_DEBUG.root" << endl ;
509 TFile fdbg("RooUnitTest_DEBUG.root","UPDATE") ;
510 iter6->first->SetName(Form("%s_test",iter6->first->GetName())) ;
511 iter6->first->Write() ;
512 bmark->SetName(Form("%s_ref",bmark->GetName())) ;
513 bmark->Write() ;
514 fdbg.Close() ;
515 }
516
517 ret = kFALSE ;
518 }
519
520 // Delete TH1 when comparison is finished to avoid noise in leak checking
521 delete iter6->first ;
522
523
524 } else {
525
526 // Writing mode
527
528 cout <<"RooUnitTest: Writing reference TH1 " << iter6->first << " as benchmark " << iter6->second << endl ;
529 _refFile->cd() ;
530 iter6->first->Write(iter6->second.c_str()) ;
531 gMemDir->cd() ;
532 }
533
534 ++iter6 ;
535 }
536
537
538 /////////////////
539
540 return ret ;
541}
542
543
544////////////////////////////////////////////////////////////////////////////////
545
547{
549 for (Int_t i=0 ; i<RooMsgService::instance().numStreams() ; i++) {
552 }
553 }
554}
555
556
557////////////////////////////////////////////////////////////////////////////////
558
560{
562 for (Int_t i=0 ; i<RooMsgService::instance().numStreams() ; i++) {
564 }
565}
566
567
568
569////////////////////////////////////////////////////////////////////////////////
570
572{
573 gMemDir->cd() ;
574
575 if (_verb<2) {
576 setSilentMode() ;
577 } else {
578 cout << "*** Begin of output of Unit Test at normal verbosity *************" << endl ;
579 }
580
582
583 // Reset random generator seed to make results independent of test ordering
584 gRandom->SetSeed(12345) ;
586
588 if (!testCode()) return kFALSE ;
590
591 if (_verb<2) {
593 } else {
594 cout << "*** End of output of Unit Test at normal verbosity ***************" << endl ;
595 }
596
597 if (RooMsgService::instance().errorCount()>0) {
598 cout << "RooUnitTest: ERROR messages were logged, failing test" << endl ;
599 return kFALSE ;
600 }
601
602 return runCompTests() ;
603}
604
605
606////////////////////////////////////////////////////////////////////////////////
607/// Set gMemDir to memDir
608
610 gMemDir = memDir ;
611}
ROOT::R::TRInterface & r
Definition Object.C:4
#define d(i)
Definition RSha256.hxx:102
const Bool_t kFALSE
Definition RtypesCore.h:92
double Stat_t
Definition RtypesCore.h:77
const Bool_t kTRUE
Definition RtypesCore.h:91
#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) const
Return true if curve is identical to other curve allowing for given absolute tolerance on each point ...
Definition RooCurve.cxx:886
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) const
Return kTRUE if contents of this RooHist is identical within given relative tolerance to that of 'oth...
Definition RooHist.cxx:662
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:886
void SetName(const char *name)
Set the name of the RooPlot to 'name'.
Definition RooPlot.cxx:1220
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:866
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:570
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:982
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
Definition RooPlot.h:134
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:35
std::list< std::pair< TH1 *, std::string > > _regTH
Definition RooUnitTest.h:82
virtual Double_t fctol()
Definition RooUnitTest.h:64
Bool_t runCompTests()
Bool_t _debug
Definition RooUnitTest.h:74
void regValue(Double_t value, const char *refName)
virtual Double_t fptol()
Definition RooUnitTest.h:63
Bool_t areTHidentical(TH1 *htest, TH1 *href)
Bool_t _write
Definition RooUnitTest.h:75
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)
void regResult(RooFitResult *r, const char *refName)
virtual Bool_t testCode()=0
std::list< std::pair< RooWorkspace *, std::string > > _regWS
Definition RooUnitTest.h:81
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:79
std::list< std::pair< RooPlot *, std::string > > _regPlots
Definition RooUnitTest.h:77
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:78
Bool_t runTest()
virtual Double_t ctol()
Definition RooUnitTest.h:61
virtual Double_t htol()
Definition RooUnitTest.h:57
virtual Double_t vtol()
Definition RooUnitTest.h:65
std::list< std::pair< RooTable *, std::string > > _regTables
Definition RooUnitTest.h:80
TFile * _refFile
Definition RooUnitTest.h:73
void setSilentMode()
static TDirectory * gMemDir
Definition RooUnitTest.h:71
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(const char *path=nullptr) 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(const char *path=nullptr)
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:879
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:8800
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition TH1.cxx:4993
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:8068
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:37
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:798
virtual const char * GetName() const
Returns name of object.
Definition TObject.cxx:359
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
Definition TRandom.cxx:608
void ws()
Definition ws.C:66