70 _cacheMgr(other._cacheMgr,this),
71 _ipOrder(other._ipOrder),
72 _disableCache(other._disableCache)
118 return cache->
pdf() ;
133 return cache->
hist() ;
159 Int_t sterileIdx(-1) ;
165 cxcoutD(
Eval) <<
"RooAbsCachedPdf::getCache(" <<
GetName() <<
") cache " << cache <<
" pdf "
166 << cache->
pdf()->
GetName() <<
" requires recalculation as parameters changed" << endl ;
198 coutI(
Caching) <<
"RooAbsCachedPdf::getCache(" <<
GetName() <<
") creating new cache " << cache <<
" with pdf "
199 << cache->
pdf()->
GetName() <<
" for nset " << (nset?*nset:
RooArgSet()) <<
" with code " << code ;
217 _pdf(0), _paramTracker(0), _hist(0), _norm(0)
224 self.preferredObservableScanOrder(*nset2,orderedObs) ;
228 TString hname =
self.GetName() ;
231 hname.
Append(
"_CACHEHIST") ;
246 RooAbsArg& po =
self.pdfObservable(*harg) ;
249 pdfFinalObs.
add(po) ;
252 pdfFinalObs.
add(*tmp) ;
259 TString pdfname =
self.inputBaseName() ;
260 pdfname.
Append(
"_CACHE") ;
269 RooArgSet* params =
self.actualParameters(pdfFinalObs) ;
349 ret.
add(*_paramTracker) ;
368 delete _paramTracker ;
383 os << indent <<
"--- RooAbsCachedPdf begin cache ---" << endl ;
387 os <<
Form(
"[%d] Configuration for observables ",curElem) << _nset << endl ;
388 indent2 +=
Form(
"[%d] ",curElem) ;
389 _pdf->printCompactTree(os,indent2) ;
391 os <<
Form(
"[%d] Norm ",curElem) ;
395 if (curElem==maxElem) {
396 os << indent <<
"--- RooAbsCachedPdf end cache --- " << endl ;
442 std::vector<Int_t> codeList(2);
470 const std::vector<Int_t> codeList =
_anaReg.
retrieve(code-1,allVars,anaVars,normSet2,dummy) ;
480 while((arg=dynamic_cast<RooAbsLValue*>(iter->
Next()))) {
481 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 const char * inputBaseName() const =0
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 ~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...
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)
std::map< std::string, std::string >::const_iterator iter
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
ClassImp(RooAbsCachedPdf) RooAbsCachedPdf
Constructor.
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 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 void add(const RooArgSet &row, Double_t wgt=1.0)
virtual void fillCacheObject(PdfCacheElem &cache) const =0
char * Form(const char *fmt,...)
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...
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...
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.
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)
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.
virtual Double_t volume(const char *rangeName) const =0
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