Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooHistFunc.cxx
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * @(#)root/roofit:$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 RooHistFunc.cxx
19\class RooHistFunc
20\ingroup Roofitcore
21
22RooHistFunc implements a real-valued function sampled from a
23multidimensional histogram. The histogram can have an arbitrary number of real or
24discrete dimensions and may have negative values.
25**/
26
27#include "RooFit.h"
28#include "Riostream.h"
29#include "TBuffer.h"
30
31#include "RooHistFunc.h"
32#include "RooDataHist.h"
33#include "RooMsgService.h"
34#include "RooRealVar.h"
35#include "RooCategory.h"
36#include "RooWorkspace.h"
37#include "RooHistPdf.h"
38
39#include "TError.h"
40
41using namespace std;
42
44;
45
46
47
48////////////////////////////////////////////////////////////////////////////////
49/// Default constructor
50
52 _dataHist(0),
53 _intOrder(0),
54 _cdfBoundaries(kFALSE),
55 _totVolume(0),
56 _unitNorm(kFALSE)
57{
59}
60
61
62////////////////////////////////////////////////////////////////////////////////
63/// Constructor from a RooDataHist. The variable listed in 'vars' control the dimensionality of the
64/// function. Any additional dimensions present in 'dhist' will be projected out. RooDataHist dimensions
65/// can be either real or discrete. See RooDataHist::RooDataHist for details on the binning.
66/// RooHistFunc neither owns or clone 'dhist' and the user must ensure the input histogram exists
67/// for the entire life span of this function.
68
69RooHistFunc::RooHistFunc(const char *name, const char *title, const RooArgSet& vars,
70 const RooDataHist& dhist, Int_t intOrder) :
71 RooAbsReal(name,title),
72 _depList("depList","List of dependents",this),
73 _dataHist((RooDataHist*)&dhist),
74 _codeReg(10),
75 _intOrder(intOrder),
76 _cdfBoundaries(kFALSE),
77 _totVolume(0),
78 _unitNorm(kFALSE)
79{
81 _depList.add(vars) ;
82
83 // Verify that vars and dhist.get() have identical contents
84 const RooArgSet* dvars = dhist.get() ;
85 if (vars.getSize()!=dvars->getSize()) {
86 coutE(InputArguments) << "RooHistFunc::ctor(" << GetName()
87 << ") ERROR variable list and RooDataHist must contain the same variables." << endl ;
88 assert(0) ;
89 }
90
91 for (const auto arg : vars) {
92 if (!dvars->find(arg->GetName())) {
93 coutE(InputArguments) << "RooHistFunc::ctor(" << GetName()
94 << ") ERROR variable list and RooDataHist must contain the same variables." << endl ;
95 assert(0) ;
96 }
97 }
98
100}
101
102
103
104////////////////////////////////////////////////////////////////////////////////
105/// Constructor from a RooDataHist. The variable listed in 'vars' control the dimensionality of the
106/// function. Any additional dimensions present in 'dhist' will be projected out. RooDataHist dimensions
107/// can be either real or discrete. See RooDataHist::RooDataHist for details on the binning.
108/// RooHistFunc neither owns or clone 'dhist' and the user must ensure the input histogram exists
109/// for the entire life span of this function.
110
111RooHistFunc::RooHistFunc(const char *name, const char *title, const RooArgList& funcObs, const RooArgList& histObs,
112 const RooDataHist& dhist, Int_t intOrder) :
113 RooAbsReal(name,title),
114 _depList("depList","List of dependents",this),
115 _dataHist((RooDataHist*)&dhist),
116 _codeReg(10),
117 _intOrder(intOrder),
118 _cdfBoundaries(kFALSE),
119 _totVolume(0),
120 _unitNorm(kFALSE)
121{
122 _histObsList.addClone(histObs) ;
123 _depList.add(funcObs) ;
124
125 // Verify that vars and dhist.get() have identical contents
126 const RooArgSet* dvars = dhist.get() ;
127 if (histObs.getSize()!=dvars->getSize()) {
128 coutE(InputArguments) << "RooHistFunc::ctor(" << GetName()
129 << ") ERROR variable list and RooDataHist must contain the same variables." << endl ;
130 assert(0) ;
131 }
132
133 for (const auto arg : histObs) {
134 if (!dvars->find(arg->GetName())) {
135 coutE(InputArguments) << "RooHistFunc::ctor(" << GetName()
136 << ") ERROR variable list and RooDataHist must contain the same variables." << endl ;
137 assert(0) ;
138 }
139 }
140
142}
143
144
145
146////////////////////////////////////////////////////////////////////////////////
147/// Copy constructor
148
149RooHistFunc::RooHistFunc(const RooHistFunc& other, const char* name) :
150 RooAbsReal(other,name),
151 _depList("depList",this,other._depList),
152 _dataHist(other._dataHist),
153 _codeReg(other._codeReg),
154 _intOrder(other._intOrder),
155 _cdfBoundaries(other._cdfBoundaries),
156 _totVolume(other._totVolume),
157 _unitNorm(other._unitNorm)
158{
160
162}
163
164
165
166////////////////////////////////////////////////////////////////////////////////
167
169{
171}
172
173
174
175
176////////////////////////////////////////////////////////////////////////////////
177/// Return the current value: The value of the bin enclosing the current coordinates
178/// of the dependents, normalized by the histograms contents. Interpolation
179/// is applied if the RooHistFunc is configured to do that
180
182{
183 // Transfer values from
184 if (_depList.getSize()>0) {
185 for (auto i = 0u; i < _histObsList.size(); ++i) {
186 const auto harg = _histObsList[i];
187 const auto parg = _depList[i];
188
189 if (harg != parg) {
190 parg->syncCache() ;
191 harg->copyCache(parg,kTRUE) ;
192 if (!harg->inRange(0)) {
193 return 0 ;
194 }
195 }
196 }
197 }
198
200 return ret ;
201}
202
203////////////////////////////////////////////////////////////////////////////////
204/// Only handle case of maximum in all variables
205
207{
208 RooAbsCollection* common = _depList.selectCommon(vars) ;
209 if (common->getSize()==_depList.getSize()) {
210 delete common ;
211 return 1;
212 }
213 delete common ;
214 return 0 ;
215}
216
217////////////////////////////////////////////////////////////////////////////////
218
220{
221 R__ASSERT(code==1) ;
222
223 Double_t max(-1) ;
224 for (Int_t i=0 ; i<_dataHist->numEntries() ; i++) {
225 _dataHist->get(i) ;
226 Double_t wgt = _dataHist->weight() ;
227 if (wgt>max) max=wgt ;
228 }
229
230 return max*1.05 ;
231}
232
233////////////////////////////////////////////////////////////////////////////////
234/// Return the total volume spanned by the observables of the RooDataHist
235
237{
238 // Return previously calculated value, if any
239 if (_totVolume>0) {
240 return _totVolume ;
241 }
242 _totVolume = 1. ;
243 for (const auto arg : _depList) {
244 RooRealVar* real = dynamic_cast<RooRealVar*>(arg) ;
245 if (real) {
246 _totVolume *= (real->getMax()-real->getMin()) ;
247 } else {
248 RooCategory* cat = dynamic_cast<RooCategory*>(arg) ;
249 if (cat) {
250 _totVolume *= cat->numTypes() ;
251 }
252 }
253 }
254
255 return _totVolume ;
256}
257
258
259////////////////////////////////////////////////////////////////////////////////
260/// Determine integration scenario. If no interpolation is used,
261/// RooHistFunc can perform all integrals over its dependents
262/// analytically via partial or complete summation of the input
263/// histogram. If interpolation is used, only the integral
264/// over all RooHistPdf observables is implemented.
265
266Int_t RooHistFunc::getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName) const
267{
268 return RooHistPdf::getAnalyticalIntegral(allVars, analVars, rangeName, _histObsList, _depList, _intOrder);
269}
270
271
272////////////////////////////////////////////////////////////////////////////////
273/// Return integral identified by 'code'. The actual integration
274/// is deferred to RooDataHist::sum() which implements partial
275/// or complete summation over the histograms contents
276
277Double_t RooHistFunc::analyticalIntegral(Int_t code, const char* rangeName) const
278{
279 return RooHistPdf::analyticalIntegral(code, rangeName, _histObsList, _depList, *_dataHist, true);
280}
281
282
283////////////////////////////////////////////////////////////////////////////////
284/// Return sampling hint for making curves of (projections) of this function
285/// as the recursive division strategy of RooCurve cannot deal efficiently
286/// with the vertical lines that occur in a non-interpolated histogram
287
289{
290 // No hints are required when interpolation is used
291 if (_intOrder>1) {
292 return 0 ;
293 }
294
295
296 // Find histogram observable corresponding to pdf observable
297 RooAbsArg* hobs(0) ;
298 for (auto i = 0u; i < _histObsList.size(); ++i) {
299 const auto harg = _histObsList[i];
300 const auto parg = _depList[i];
301 if (string(parg->GetName())==obs.GetName()) {
302 hobs=harg ;
303 }
304 }
305 if (!hobs) {
306 return 0 ;
307 }
308
309 // Check that observable is in dataset, if not no hint is generated
310 RooAbsLValue* lvarg = dynamic_cast<RooAbsLValue*>(_dataHist->get()->find(hobs->GetName())) ;
311 if (!lvarg) {
312 return 0 ;
313 }
314
315 // Retrieve position of all bin boundaries
316 const RooAbsBinning* binning = lvarg->getBinningPtr(0) ;
317 Double_t* boundaries = binning->array() ;
318
319 list<Double_t>* hint = new list<Double_t> ;
320
321 // Widen range slighty
322 xlo = xlo - 0.01*(xhi-xlo) ;
323 xhi = xhi + 0.01*(xhi-xlo) ;
324
325 Double_t delta = (xhi-xlo)*1e-8 ;
326
327 // Construct array with pairs of points positioned epsilon to the left and
328 // right of the bin boundaries
329 for (Int_t i=0 ; i<binning->numBoundaries() ; i++) {
330 if (boundaries[i]>=xlo && boundaries[i]<=xhi) {
331 hint->push_back(boundaries[i]-delta) ;
332 hint->push_back(boundaries[i]+delta) ;
333 }
334 }
335
336 return hint ;
337}
338
339
340////////////////////////////////////////////////////////////////////////////////
341/// Return sampling hint for making curves of (projections) of this function
342/// as the recursive division strategy of RooCurve cannot deal efficiently
343/// with the vertical lines that occur in a non-interpolated histogram
344
345std::list<Double_t>* RooHistFunc::binBoundaries(RooAbsRealLValue& obs, Double_t xlo, Double_t xhi) const
346{
347 // No hints are required when interpolation is used
348 if (_intOrder>1) {
349 return 0 ;
350 }
351
352 // Find histogram observable corresponding to pdf observable
353 RooAbsArg* hobs(0) ;
354 for (auto i = 0u; i < _histObsList.size(); ++i) {
355 const auto harg = _histObsList[i];
356 const auto parg = _depList[i];
357 if (string(parg->GetName())==obs.GetName()) {
358 hobs=harg ;
359 }
360 }
361
362 // cout << "RooHistFunc::bb(" << GetName() << ") histObs = " << _histObsList << endl ;
363 // cout << "RooHistFunc::bb(" << GetName() << ") pdfObs = " << _depList << endl ;
364
365 RooAbsRealLValue* transform(0) ;
366 if (!hobs) {
367
368 // Considering alternate: input observable is histogram observable and pdf observable is transformation in terms of it
369 RooAbsArg* pobs(0) ;
370 for (auto i = 0u; i < _histObsList.size(); ++i) {
371 const auto harg = _histObsList[i];
372 const auto parg = _depList[i];
373 if (string(harg->GetName())==obs.GetName()) {
374 pobs=parg ;
375 hobs=harg ;
376 }
377 }
378
379 // Not found, or check that matching pdf observable is an l-value dependent on histogram observable fails
380 if (!hobs || !(pobs->dependsOn(obs) && dynamic_cast<RooAbsRealLValue*>(pobs))) {
381 cout << "RooHistFunc::binBoundaries(" << GetName() << ") obs = " << obs.GetName() << " hobs is not found, returning null" << endl ;
382 return 0 ;
383 }
384
385 // Now we are in business - we are in a situation where the pdf observable LV(x), mapping to a histogram observable x
386 // We can return bin boundaries by mapping the histogram boundaties through the inverse of the LV(x) transformation
387 transform = dynamic_cast<RooAbsRealLValue*>(pobs) ;
388 }
389
390
391 // cout << "hobs = " << hobs->GetName() << endl ;
392 // cout << "transform = " << (transform?transform->GetName():"<none>") << endl ;
393
394 // Check that observable is in dataset, if not no hint is generated
395 RooAbsArg* xtmp = _dataHist->get()->find(hobs->GetName()) ;
396 if (!xtmp) {
397 cout << "RooHistFunc::binBoundaries(" << GetName() << ") hobs = " << hobs->GetName() << " is not found in dataset?" << endl ;
398 _dataHist->get()->Print("v") ;
399 return 0 ;
400 }
401 RooAbsLValue* lvarg = dynamic_cast<RooAbsLValue*>(_dataHist->get()->find(hobs->GetName())) ;
402 if (!lvarg) {
403 cout << "RooHistFunc::binBoundaries(" << GetName() << ") hobs = " << hobs->GetName() << " but is not an LV, returning null" << endl ;
404 return 0 ;
405 }
406
407 // Retrieve position of all bin boundaries
408 const RooAbsBinning* binning = lvarg->getBinningPtr(0) ;
409 Double_t* boundaries = binning->array() ;
410
411 list<Double_t>* hint = new list<Double_t> ;
412
413 Double_t delta = (xhi-xlo)*1e-8 ;
414
415 // Construct array with pairs of points positioned epsilon to the left and
416 // right of the bin boundaries
417 for (Int_t i=0 ; i<binning->numBoundaries() ; i++) {
418 if (boundaries[i]>xlo-delta && boundaries[i]<xhi+delta) {
419
420 Double_t boundary = boundaries[i] ;
421 if (transform) {
422 transform->setVal(boundary) ;
423 //cout << "transform bound " << boundary << " using " << transform->GetName() << " result " << obs.getVal() << endl ;
424 hint->push_back(obs.getVal()) ;
425 } else {
426 hint->push_back(boundary) ;
427 }
428 }
429 }
430
431 return hint ;
432}
433
434
435
436////////////////////////////////////////////////////////////////////////////////
437/// Check if our datahist is already in the workspace.
438/// In case of error, return true.
440{
441 // Check if dataset with given name already exists
442 RooAbsData* wsdata = ws.embeddedData(_dataHist->GetName()) ;
443
444 if (wsdata) {
445 // If our data is exactly the same, we are done:
446 if (static_cast<RooDataHist*>(wsdata) == _dataHist)
447 return false;
448
449 // Yes it exists - now check if it is identical to our internal histogram
450 if (wsdata->InheritsFrom(RooDataHist::Class())) {
451
452 // Check if histograms are identical
453 if (areIdentical((RooDataHist&)*wsdata,*_dataHist)) {
454
455 // Exists and is of correct type, and identical -- adjust internal pointer to WS copy
456 _dataHist = (RooDataHist*) wsdata ;
457 } else {
458
459 // not identical, clone rename and import
460 TString uniqueName = Form("%s_%s",_dataHist->GetName(),GetName()) ;
461 Bool_t flag = ws.import(*_dataHist,RooFit::Rename(uniqueName.Data()),RooFit::Embedded()) ;
462 if (flag) {
463 coutE(ObjectHandling) << " RooHistPdf::importWorkspaceHook(" << GetName() << ") unable to import clone of underlying RooDataHist with unique name " << uniqueName << ", abort" << endl ;
464 return kTRUE ;
465 }
466 _dataHist = (RooDataHist*) ws.embeddedData(uniqueName.Data()) ;
467 }
468
469 } else {
470
471 // Exists and is NOT of correct type: clone rename and import
472 TString uniqueName = Form("%s_%s",_dataHist->GetName(),GetName()) ;
473 Bool_t flag = ws.import(*_dataHist,RooFit::Rename(uniqueName.Data()),RooFit::Embedded()) ;
474 if (flag) {
475 coutE(ObjectHandling) << " RooHistPdf::importWorkspaceHook(" << GetName() << ") unable to import clone of underlying RooDataHist with unique name " << uniqueName << ", abort" << endl ;
476 return kTRUE ;
477 }
478 _dataHist = (RooDataHist*) ws.embeddedData(uniqueName.Data()) ;
479
480 }
481 return kFALSE ;
482 }
483
484 // We need to import our datahist into the workspace
485 ws.import(*_dataHist,RooFit::Embedded()) ;
486
487 // Redirect our internal pointer to the copy in the workspace
488 _dataHist = (RooDataHist*) ws.embeddedData(_dataHist->GetName()) ;
489 return kFALSE ;
490}
491
492
493////////////////////////////////////////////////////////////////////////////////
494
496{
497 if (fabs(dh1.sumEntries()-dh2.sumEntries())>1e-8) return kFALSE ;
498 if (dh1.numEntries() != dh2.numEntries()) return kFALSE ;
499 for (int i=0 ; i < dh1.numEntries() ; i++) {
500 dh1.get(i) ;
501 dh2.get(i) ;
502 if (fabs(dh1.weight()-dh2.weight())>1e-8) return kFALSE ;
503 }
504 if (!(RooNameSet(*dh1.get())==RooNameSet(*dh2.get()))) return kFALSE ;
505 return kTRUE ;
506}
507
508
509
510////////////////////////////////////////////////////////////////////////////////
511/// Stream an object of class RooHistFunc.
512
514{
515 if (R__b.IsReading()) {
516 R__b.ReadClassBuffer(RooHistFunc::Class(),this);
517 // WVE - interim solution - fix proxies here
518 _proxyList.Clear() ;
520 } else {
521 R__b.WriteClassBuffer(RooHistFunc::Class(),this);
522 }
523}
524
525
526////////////////////////////////////////////////////////////////////////////////
527/// Schema evolution: if histObsList wasn't filled from persistence (v1)
528/// then fill it here. Can't be done in regular schema evolution in LinkDef
529/// as _depList content is not guaranteed to be initialized there
530
532{
533 if (_histObsList.getSize()==0) {
535 }
536}
537
#define e(i)
Definition RSha256.hxx:103
#define coutE(a)
#define TRACE_DESTROY
Definition RooTrace.h:24
#define TRACE_CREATE
Definition RooTrace.h:23
const Bool_t kFALSE
Definition RtypesCore.h:92
const Bool_t kTRUE
Definition RtypesCore.h:91
#define ClassImp(name)
Definition Rtypes.h:364
#define R__ASSERT(e)
Definition TError.h:120
char name[80]
Definition TGX11.cxx:110
char * Form(const char *fmt,...)
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition RooAbsArg.h:72
RooRefArray _proxyList
Definition RooAbsArg.h:619
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
void registerProxy(RooArgProxy &proxy)
Register an RooArgProxy in the proxy list.
friend void RooRefArray::Streamer(TBuffer &)
RooAbsBinning is the abstract base class for RooRealVar binning definitions.
virtual Double_t * array() const =0
virtual Int_t numBoundaries() const =0
Int_t numTypes(const char *=0) const
Return number of types defined (in range named rangeName if rangeName!=0)
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
Int_t getSize() const
Storage_t::size_type size() const
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:49
Abstract base class for objects that are lvalues, i.e.
virtual const RooAbsBinning * getBinningPtr(const char *rangeName) const =0
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual Double_t getMax(const char *name=0) const
Get maximum of currently defined range.
virtual void setVal(Double_t value)=0
Set the current value of the object. Needs to be overridden by implementations.
virtual Double_t getMin(const char *name=0) const
Get miniminum of currently defined range.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition RooAbsReal.h:61
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
Definition RooAbsReal.h:91
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:21
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:29
RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE) override
Add clone of specified element to an owning set.
RooCategory is an object to represent discrete states.
Definition RooCategory.h:27
The RooDataHist is a container class to hold N-dimensional binned data.
Definition RooDataHist.h:37
double weight(std::size_t i) const
Return weight of i-th bin.
Definition RooDataHist.h:98
Double_t sumEntries() const override
Sum the weights of all bins.
Int_t numEntries() const override
Return the number of bins.
const RooArgSet * get() const override
Get bin centre of current bin.
Definition RooDataHist.h:74
RooHistFunc implements a real-valued function sampled from a multidimensional histogram.
Definition RooHistFunc.h:30
virtual Int_t getMaxVal(const RooArgSet &vars) const
Only handle case of maximum in all variables.
Bool_t _cdfBoundaries
Definition RooHistFunc.h:99
RooDataHist * _dataHist
Definition RooHistFunc.h:96
Double_t evaluate() const
Return the current value: The value of the bin enclosing the current coordinates of the dependents,...
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Determine integration scenario.
Bool_t importWorkspaceHook(RooWorkspace &ws)
Check if our datahist is already in the workspace.
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
Return sampling hint for making curves of (projections) of this function as the recursive division st...
RooHistFunc()
Default constructor.
Double_t totVolume() const
Return the total volume spanned by the observables of the RooDataHist.
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Return integral identified by 'code'.
virtual void ioStreamerPass2()
Schema evolution: if histObsList wasn't filled from persistence (v1) then fill it here.
Bool_t areIdentical(const RooDataHist &dh1, const RooDataHist &dh2)
virtual ~RooHistFunc()
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
Int_t _intOrder
Auxiliary class keeping tracking of analytical integration code.
Definition RooHistFunc.h:98
Double_t _totVolume
RooSetProxy _depList
Definition RooHistFunc.h:95
RooArgSet _histObsList
Definition RooHistFunc.h:94
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
Return sampling hint for making curves of (projections) of this function as the recursive division st...
static Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName, RooArgSet const &histObsList, RooSetProxy const &pdfObsList, Int_t intOrder)
static Double_t analyticalIntegral(Int_t code, const char *rangeName, RooArgSet const &histObsList, RooSetProxy const &pdfObsList, RooDataHist &dataHist, bool histFuncMode)
RooNameSet is a utility class that stores the names the objects in a RooArget.
Definition RooNameSet.h:24
RooRealVar represents a variable that can be changed from the outside.
Definition RooRealVar.h:39
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Overloaded RooArgSet::add() method inserts 'var' into set and registers 'var' as server to owner with...
The RooWorkspace is a persistable container for RooFit projects.
Buffer base class used for serializing objects.
Definition TBuffer.h:43
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
Bool_t IsReading() const
Definition TBuffer.h:86
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual const char * GetName() const
Returns name of object.
Definition TNamed.h:47
virtual void Clear(Option_t *option="")
Remove all objects from the array.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition TObject.cxx:445
Basic string class.
Definition TString.h:136
const char * Data() const
Definition TString.h:369
RooCmdArg Embedded(Bool_t flag=kTRUE)
RooCmdArg Rename(const char *suffix)
void ws()
Definition ws.C:66