128 return new FuncCacheElem(const_cast<RooAbsCachedReal&>(*
this),nset) ;
139 Int_t sterileIdx(-1) ;
143 ccoutD(
Eval) <<
"RooAbsCachedReal::getCache(" <<
GetName() <<
") cached function " 144 << cache->
func()->
GetName() <<
" requires recalculation as parameters changed" << endl ;
156 while ( (arg=iarg.next()) ) {
179 ccoutD(
Caching) <<
"RooAbsCachedReal("<<
this<<
")::getCache(" <<
GetName() <<
") creating new cache " << cache->func()->GetName() <<
" for nset " << (nset?*nset:
RooArgSet()) <<
" with code " << code << endl ;
203 self.preferredObservableScanOrder(*nset2,orderedObs) ;
206 TString hname =
self.inputBaseName() ;
207 hname.Append(
"_CACHEHIST") ;
211 _hist->removeSelfFromDir() ;
213 RooArgSet* observables=
self.actualObservables(*nset2) ;
216 TString funcname =
self.inputBaseName() ;
217 funcname.Append(
"_CACHE") ;
223 _func->setValueDirty() ;
226 RooArgSet* params =
self.actualParameters(orderedObs) ;
227 string name=
Form(
"%s_CACHEPARAMS",_func->GetName()) ;
233 _func->addServerList(*params) ;
247 if (_sourceClone) {
delete _sourceClone ; }
248 delete _paramTracker ;
262 name.Append(
"_Obs[") ;
281 name.Append(payloadUS) ;
312 ret.
add(*_paramTracker) ;
314 ret.
add(*_sourceClone) ;
326 os << indent <<
"--- RooAbsCachedReal begin cache ---" << endl ;
329 TString indent2(indent) ;
330 indent2 +=
Form(
"[%d] ",curElem) ;
331 func()->printCompactTree(os,indent2) ;
333 if (curElem==maxElem) {
334 os << indent <<
"--- RooAbsCachedReal end cache --- " << endl ;
virtual const char * GetName() const
Returns name of object.
void setInterpolationOrder(Int_t order)
Set interpolation order of RooHistFunct representing cache histogram.
TIterator * createIterator(Bool_t dir=kIterForward) const
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
virtual const RooArgSet * get() const
void setInterpolationOrder(Int_t order)
virtual Double_t getValV(const RooArgSet *set=0) const
Implementation of getVal() overriding default implementation of RooAbsReal.
Double_t getVal(const RooArgSet *set=0) const
TString cacheNameSuffix(const RooArgSet &nset) const
Construct unique suffix name for cache p.d.f object.
Bool_t _disableCache
Map for analytical integration codes.
Bool_t hasChanged(Bool_t clearState)
Returns true if state has changes since last call with clearState=kTRUE If clearState is true...
std::map< Int_t, std::pair< const RooArgSet *, const RooArgSet * > > _anaIntMap
T * getObjByIndex(Int_t index) const
void clearCacheObject(FuncCacheElem &cache) const
Mark all bins as unitialized (value -1)
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.
void setValueDirty() const
RooDataSet is a container class to hold N-dimensional binned data.
virtual Double_t getValV(const RooArgSet *set=0) const
Return value of object.
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
virtual Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
Return analytical integration capabilities of the RooHistFunc that corresponds to the set of observab...
RooChangeTracker * paramTracker()
virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Forward call to implementation in relevant RooHistFunc instance.
RooArgSet parameters() const
RooAbsCachedReal is the abstract base class for functions that need or want to cache their evaluate()...
virtual void add(const RooArgSet &row, Double_t wgt=1.0)
RooExpensiveObjectCache & expensiveObjectCache() const
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,...)
virtual RooArgList containedArgs(Action)
Return list of contained RooAbsArg objects.
friend class FuncCacheElem
OperMode operMode() const
FuncCacheElem(const RooAbsCachedReal &self, const RooArgSet *nset)
Constructor of cache storage unit class.
FuncCacheElem * getCache(const RooArgSet *nset) const
Retrieve cache corresponding to observables in nset.
virtual const char * binningName() const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Int_t getInterpolationOrder() const
RooFIter fwdIterator() const
Int_t _ipOrder
The cache manager.
RooObjCacheManager _cacheMgr
RooChangeTracker is a meta object that tracks value changes in a given set of RooAbsArgs by registeri...
virtual void fillCacheObject(FuncCacheElem &cache) const =0
virtual void printCompactTreeHook(std::ostream &, const char *, Int_t, Int_t)
Print contents of cache when printing self as part of object tree.
virtual const char * payloadUniqueSuffix() const
virtual void reset()
Reset all bin weights to zero.
virtual TObject * Next()=0
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=0)
virtual FuncCacheElem * createCache(const RooArgSet *nset) const
Interface function to create an internal cache object that represent each cached function configurati...
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 ~RooAbsCachedReal()
Destructor.
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 Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral. ...