68 _cacheMgr(other._cacheMgr,this),
69 _ipOrder(other._ipOrder),
70 _disableCache(other._disableCache)
116 return cache->
pdf() ;
131 return cache->
hist() ;
157 Int_t sterileIdx(-1) ;
163 cxcoutD(
Eval) <<
"RooAbsCachedPdf::getCache(" <<
GetName() <<
") cache " << cache <<
" pdf "
164 << cache->
pdf()->
GetName() <<
" requires recalculation as parameters changed" << endl ;
196 coutI(
Caching) <<
"RooAbsCachedPdf::getCache(" <<
GetName() <<
") creating new cache " << cache <<
" with pdf "
197 << cache->
pdf()->
GetName() <<
" for nset " << (nset?*nset:
RooArgSet()) <<
" with code " << code ;
215 _pdf(0), _paramTracker(0), _hist(0), _norm(0)
229 hname.
Append(
"_CACHEHIST") ;
247 pdfFinalObs.
add(po) ;
250 pdfFinalObs.
add(*tmp) ;
258 pdfname.
Append(
"_CACHE") ;
296 name.Append(
"_Obs[") ;
315 name.Append(payloadUS) ;
347 ret.
add(*_paramTracker) ;
366 delete _paramTracker ;
381 os <<
indent <<
"--- RooAbsCachedPdf begin cache ---" << endl ;
385 os <<
Form(
"[%d] Configuration for observables ",curElem) << _nset << endl ;
386 indent2 +=
Form(
"[%d] ",curElem) ;
387 _pdf->printCompactTree(os,indent2) ;
389 os <<
Form(
"[%d] Norm ",curElem) ;
393 if (curElem==maxElem) {
394 os <<
indent <<
"--- RooAbsCachedPdf end cache --- " << endl ;
440 std::vector<Int_t> codeList(2);
479 ret *= arg->
volume(rangeName) ;
static RooMathCoreReg dummy
static void indent(ostringstream &buf, int indent_level)
char * Form(const char *fmt,...)
const std::vector< Int_t > & retrieve(Int_t masterCode) const
Retrieve the array of integer codes associated with the given master code.
Int_t store(const std::vector< Int_t > &codeList, RooArgSet *set1=0, RooArgSet *set2=0, RooArgSet *set3=0, RooArgSet *set4=0)
Store given arrays of integer codes, and up to four RooArgSets in the registry (each setX pointer may...
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
RooExpensiveObjectCache & expensiveObjectCache() const
virtual Bool_t isFundamental() const
Is this object a fundamental type that can be added to a dataset? Fundamental-type subclasses overrid...
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
void addServerList(RooAbsCollection &serverList, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE)
Register a list of RooAbsArg as servers to us by calling addServer() for each arg in the list.
void setValueDirty() const
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
virtual RooArgList containedArgs(Action)
Returns all RooAbsArg objects contained in the cache element.
RooChangeTracker * paramTracker()
PdfCacheElem(const RooAbsCachedPdf &self, const RooArgSet *nset)
Constructor of cache object which owns RooDataHist cache histogram, RooHistPdf pdf that represents is...
virtual ~PdfCacheElem()
Cache element destructor.
RooChangeTracker * _paramTracker
virtual void printCompactTreeHook(std::ostream &, const char *, Int_t, Int_t)
Print contents of cache when printing self as part of object tree.
RooAbsCachedPdf is the abstract base class for p.d.f.s that need or want to cache their evaluate() ou...
Int_t getInterpolationOrder() const
virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Implements internal (analytical) integration capabilities.
TString cacheNameSuffix(const RooArgSet &nset) const
Construct string with unique suffix for cache objects based on observable names that define cache con...
virtual RooAbsArg & pdfObservable(RooAbsArg &histObservable) const
virtual PdfCacheElem * createCache(const RooArgSet *nset) const
void setInterpolationOrder(Int_t order)
Change the interpolation order that is used in RooHistPdf cache representation smoothing the RooDataH...
virtual RooArgSet * actualParameters(const RooArgSet &nset) const =0
virtual TString histNameSuffix() const
virtual const char * binningName() const
virtual const char * inputBaseName() const =0
virtual Double_t getValV(const RooArgSet *set=0) const
Implementation of getVal() overriding default implementation of RooAbsPdf.
Bool_t _disableCache
Map for analytical integration codes.
PdfCacheElem * getCache(const RooArgSet *nset, Bool_t recalculate=kTRUE) const
Retrieve cache object associated with given choice of observables.
virtual Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
Advertises internal (analytical) integration capabilities.
virtual ~RooAbsCachedPdf()
Destructor.
virtual Bool_t forceAnalyticalInt(const RooAbsArg &dep) const
Force RooRealIntegral to offer all our actual observable for internal integration.
RooAbsPdf * getCachePdf(const RooArgSet &nset) const
RooDataHist * getCacheHist(const RooArgSet &nset) const
virtual void fillCacheObject(PdfCacheElem &cache) const =0
void clearCacheObject(PdfCacheElem &cache) const
Mark all bins of given cache as unitialized (value -1)
RooObjCacheManager _cacheMgr
virtual const char * payloadUniqueSuffix() const
virtual RooArgSet * actualObservables(const RooArgSet &nset) const =0
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
TIterator * createIterator(Bool_t dir=kIterForward) const R__SUGGEST_ALTERNATIVE("begin()
TIterator-style iteration over contained elements.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
Abstract base class for objects that are lvalues, i.e.
virtual Double_t volume(const char *rangeName) const =0
Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Analytical integral with normalization (see RooAbsReal::analyticalIntegralWN() for further informatio...
virtual Double_t getValV(const RooArgSet *set=0) const
Return current value, normalized by integrating over the observables in nset.
virtual Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
Variant of getAnalyticalIntegral that is also passed the normalization set that should be applied to ...
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
virtual void preferredObservableScanOrder(const RooArgSet &obs, RooArgSet &orderedObs) const
Interface method for function objects to indicate their preferred order of observables for scanning t...
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
virtual void addClone(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
T * getObjByIndex(Int_t index) const
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=0)
RooChangeTracker is a meta object that tracks value changes in a given set of RooAbsArgs by registeri...
Bool_t hasChanged(Bool_t clearState)
Returns true if state has changes since last call with clearState=kTRUE If clearState is true,...
RooArgSet parameters() const
The RooDataHist is a container class to hold N-dimensional binned data.
virtual void reset()
Reset all bin weights to zero.
virtual void add(const RooArgSet &row, Double_t wgt=1.0)
void setAllWeights(Double_t value)
Set all the event weight of all bins to the specified value.
Bool_t registerObject(const char *ownerName, const char *objectName, TObject &cacheObject, TIterator *paramIter)
Register object associated with given name and given associated parameters with given values in cache...
const TObject * retrieveObject(const char *name, TClass *tclass, const RooArgSet ¶ms)
Retrieve object from cache that was registered under given name with given parameters,...
Bool_t haveUnitNorm() const
void setInterpolationOrder(Int_t order)
virtual void printStream(std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
Print description of object on ostream, printing contents set by contents integer,...
Iterator abstract base class.
virtual TObject * Next()=0
virtual const char * GetName() const
Returns name of object.
TString & Append(const char *cs)