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) ;
296 name.Append(
"_Obs[") ;
315 name.Append(payloadUS) ;
381 os << indent <<
"--- RooAbsCachedPdf begin cache ---" << endl ;
384 TString indent2(indent) ;
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) ;
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
virtual const char * GetName() const
Returns name of object.
TIterator * createIterator(Bool_t dir=kIterForward) const
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 Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
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...
PdfCacheElem * getCache(const RooArgSet *nset, Bool_t recalculate=kTRUE) const
Retrieve cache object associated with given choice of observables.
void setInterpolationOrder(Int_t order)
Double_t getVal(const RooArgSet *set=0) const
virtual PdfCacheElem * createCache(const RooArgSet *nset) const
RooChangeTracker * _paramTracker
virtual const char * inputBaseName() const =0
Bool_t hasChanged(Bool_t clearState)
Returns true if state has changes since last call with clearState=kTRUE If clearState is true...
T * getObjByIndex(Int_t index) const
virtual RooArgList containedArgs(Action)
Returns all RooAbsArg objects contained in the cache element.
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.
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.
virtual TString histNameSuffix() const
Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Analytical integral with normalization (see RooAbsReal::analyticalIntegralWN() for further informatio...
void clearCacheObject(PdfCacheElem &cache) const
Mark all bins of given cache as unitialized (value -1)
RooAbsPdf * getCachePdf(const RooArgSet &nset) const
void setValueDirty() const
RooDataSet is a container class to hold N-dimensional binned data.
virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Implements internal (analytical) integration capabilities.
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.
virtual Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
Advertises internal (analytical) integration capabilities.
virtual ~RooAbsCachedPdf()
Destructor.
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
Bool_t _disableCache
Map for analytical integration codes.
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...
virtual Bool_t isFundamental() const
virtual const char * payloadUniqueSuffix() 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 const char * binningName() const
virtual Bool_t forceAnalyticalInt(const RooAbsArg &dep) const
Force RooRealIntegral to offer all our actual observable for internal integration.
virtual Double_t getValV(const RooArgSet *set=0) const
Implementation of getVal() overriding default implementation of RooAbsPdf.
virtual Double_t getValV(const RooArgSet *set=0) const
Return current value, normalizated by integrating over the observables in 'nset'. ...
RooArgSet parameters() const
virtual void add(const RooArgSet &row, Double_t wgt=1.0)
RooExpensiveObjectCache & expensiveObjectCache() const
RooDataHist * getCacheHist(const RooArgSet &nset) const
virtual void fillCacheObject(PdfCacheElem &cache) 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 ...
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
char * Form(const char *fmt,...)
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...
Bool_t haveUnitNorm() const
static RooMathCoreReg dummy
TString cacheNameSuffix(const RooArgSet &nset) const
Construct string with unique suffix for cache objects based on observable names that define cache con...
virtual void printCompactTreeHook(std::ostream &, const char *, Int_t, Int_t)
Print contents of cache when printing self as part of object tree.
RooChangeTracker is a meta object that tracks value changes in a given set of RooAbsArgs by registeri...
const char * GetName() const
Returns name of object.
virtual RooArgSet * actualObservables(const RooArgSet &nset) const =0
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
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...
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.
Int_t getInterpolationOrder() const
virtual Double_t volume(const char *rangeName) const =0
const std::vector< Int_t > & retrieve(Int_t masterCode) const
Retrieve the array of integer codes associated with the given master code.
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...