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)
222 self.preferredObservableScanOrder(*nset2,orderedObs) ;
226 TString hname =
self.GetName() ;
229 hname.
Append(
"_CACHEHIST") ;
244 RooAbsArg& po =
self.pdfObservable(*harg) ;
247 pdfFinalObs.
add(po) ;
250 pdfFinalObs.
add(*tmp) ;
257 TString pdfname =
self.inputBaseName() ;
258 pdfname.
Append(
"_CACHE") ;
267 RooArgSet* params =
self.actualParameters(pdfFinalObs) ;
381 os << indent <<
"--- RooAbsCachedPdf begin cache ---" << endl ;
385 os <<
Form(
"[%d] Configuration for observables ",curElem) <<
_nset << endl ;
386 indent2 +=
Form(
"[%d] ",curElem) ;
389 os <<
Form(
"[%d] Norm ",curElem) ;
393 if (curElem==maxElem) {
394 os << indent <<
"--- RooAbsCachedPdf end cache --- " << endl ;
440 std::vector<Int_t> codeList(2);
468 const std::vector<Int_t> codeList =
_anaReg.
retrieve(code-1,allVars,anaVars,normSet2,dummy) ;
478 while((arg=dynamic_cast<RooAbsLValue*>(iter->
Next()))) {
479 ret *= arg->
volume(rangeName) ;
Bool_t haveUnitNorm() const
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
virtual Bool_t forceAnalyticalInt(const RooAbsArg &dep) const
Force RooRealIntegral to offer all our actual observable for internal integration.
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, which is interpreted as an OR of 'enum ContentsOptions' values and in the style given by 'enum StyleOption'.
virtual const char * binningName() const
void setInterpolationOrder(Int_t order)
virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Implements internal (analytical) integration capabilities.
RooChangeTracker * _paramTracker
virtual Bool_t isFundamental() const
virtual Double_t getValV(const RooArgSet *set=0) const
Implementation of getVal() overriding default implementation of RooAbsPdf.
RooAbsPdf * getCachePdf(const RooArgSet &nset) const
Bool_t hasChanged(Bool_t clearState)
Returns true if state has changes since last call with clearState=kTRUE If clearState is true...
virtual RooArgList containedArgs(Action)
Returns all RooAbsArg objects contained in the cache element.
virtual const char * payloadUniqueSuffix() const
RooExpensiveObjectCache & expensiveObjectCache() const
PdfCacheElem(const RooAbsCachedPdf &self, const RooArgSet *nset)
Constructor of cache object which owns RooDataHist cache histogram, RooHistPdf pdf that represents is...
virtual RooArgSet * actualObservables(const RooArgSet &nset) const =0
virtual ~PdfCacheElem()
Cache element destructor.
const TObject * retrieveObject(const char *name, TClass *tclass, const RooArgSet ¶ms)
Retrieve object from cache that was registered under given name with given parameters, if current parameter values match those that were stored in the registry for this object.
Iterator abstract base class.
PdfCacheElem * getCache(const RooArgSet *nset, Bool_t recalculate=kTRUE) const
Retrieve cache object associated with given choice of observables.
TString cacheNameSuffix(const RooArgSet &nset) const
Construct string with unique suffix for cache objects based on observable names that define cache con...
RooDataSet is a container class to hold N-dimensional binned data.
void printCompactTree(const char *indent="", const char *fileName=0, const char *namePat=0, RooAbsArg *client=0)
Print tree structure of expression tree on stdout, or to file if filename is specified.
Int_t getInterpolationOrder() const
RooArgSet parameters() const
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
virtual ~RooAbsCachedPdf()
Destructor.
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
TIterator * createIterator(Bool_t dir=kIterForward) const
virtual Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
Advertises internal (analytical) integration capabilities.
TString & Append(const char *cs)
Double_t getVal(const RooArgSet *set=0) const
Bool_t _disableCache
Map for analytical integration codes.
virtual PdfCacheElem * createCache(const RooArgSet *nset) const
void addServerList(RooAbsCollection &serverList, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE)
Register a list of RooAbsArg as servers to us by calls addServer() for each arg in the list...
virtual Double_t volume(const char *rangeName) const =0
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 ...
virtual const char * inputBaseName() const =0
virtual void add(const RooArgSet &row, Double_t wgt=1.0)
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
char * Form(const char *fmt,...)
virtual void fillCacheObject(PdfCacheElem &cache) const =0
virtual const char * GetName() const
Returns name of object.
static void indent(ostringstream &buf, int indent_level)
const std::vector< Int_t > & retrieve(Int_t masterCode) const
Retrieve the array of integer codes associated with the given master code.
virtual Double_t getValV(const RooArgSet *set=0) const
Return current value, normalizated by integrating over the observables in 'nset'. ...
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...
RooAbsCachedPdf is the abstract base class for p.d.f.s that need or want to cache their evaluate() ou...
RooDataHist * getCacheHist(const RooArgSet &nset) const
static RooMathCoreReg dummy
void setValueDirty() const
virtual void printCompactTreeHook(std::ostream &, const char *, Int_t, Int_t)
Print contents of cache when printing self as part of object tree.
Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Analytical integral with normalization (see RooAbsReal::analyticalIntegralWN() for further informatio...
RooChangeTracker is a meta object that tracks value changes in a given set of RooAbsArgs by registeri...
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
T * getObjByIndex(Int_t index) const
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
virtual void reset()
Reset all bin weights to zero.
virtual TObject * Next()=0
void setInterpolationOrder(Int_t order)
Change the interpolation order that is used in RooHistPdf cache representation smoothing the RooDataH...
void clearCacheObject(PdfCacheElem &cache) const
Mark all bins of given cache as unitialized (value -1)
virtual RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE)
Add clone of specified element to an owning set.
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=0)
Abstract base class for objects that are lvalues, i.e.
RooObjCacheManager _cacheMgr
RooChangeTracker * paramTracker()
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
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...
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add element to non-owning set.
virtual TString histNameSuffix() const