66 _cacheMgr(other._cacheMgr,this),
67 _ipOrder(other._ipOrder),
68 _disableCache(other._disableCache)
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 ;
215 funcname.
Append(
"_CACHE") ;
245 if (_sourceClone) {
delete _sourceClone ; }
246 delete _paramTracker ;
279 name.Append(payloadUS) ;
310 ret.
add(*_paramTracker) ;
312 ret.
add(*_sourceClone) ;
324 os <<
indent <<
"--- RooAbsCachedReal begin cache ---" << endl ;
328 indent2 +=
Form(
"[%d] ",curElem) ;
329 func()->printCompactTree(os,indent2) ;
331 if (curElem==maxElem) {
332 os <<
indent <<
"--- RooAbsCachedReal end cache --- " << endl ;
static void indent(ostringstream &buf, int indent_level)
char * Form(const char *fmt,...)
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
RooExpensiveObjectCache & expensiveObjectCache() const
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Set the operation mode of this node.
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
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.
OperMode operMode() const
Query the operation mode of this node.
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
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.
RooAbsReal * _sourceClone
virtual RooArgList containedArgs(Action)
Return list of contained RooAbsArg objects.
RooChangeTracker * paramTracker()
FuncCacheElem(const RooAbsCachedReal &self, const RooArgSet *nset)
Constructor of cache storage unit class.
RooAbsCachedReal is the abstract base class for functions that need or want to cache their evaluate()...
virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Forward call to implementation in relevant RooHistFunc instance.
void setInterpolationOrder(Int_t order)
Set interpolation order of RooHistFunct representing cache histogram.
virtual void fillCacheObject(FuncCacheElem &cache) const =0
virtual const char * inputBaseName() const =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...
virtual FuncCacheElem * createCache(const RooArgSet *nset) const
Interface function to create an internal cache object that represent each cached function configurati...
TString cacheNameSuffix(const RooArgSet &nset) const
Construct unique suffix name for cache p.d.f object.
FuncCacheElem * getCache(const RooArgSet *nset) const
Retrieve cache corresponding to observables in nset.
Bool_t _disableCache
Map for analytical integration codes.
virtual Double_t getValV(const RooArgSet *set=0) const
Implementation of getVal() overriding default implementation of RooAbsReal.
RooObjCacheManager _cacheMgr
void clearCacheObject(FuncCacheElem &cache) const
Mark all bins as unitialized (value -1)
Int_t _ipOrder
The cache manager.
Int_t getInterpolationOrder() const
virtual RooArgSet * actualParameters(const RooArgSet &nset) const =0
std::map< Int_t, std::pair< const RooArgSet *, const RooArgSet * > > _anaIntMap
virtual const char * payloadUniqueSuffix() const
virtual RooArgSet * actualObservables(const RooArgSet &nset) const =0
virtual ~RooAbsCachedReal()
Destructor.
virtual const char * binningName() const
RooFIter fwdIterator() const
One-time forward iterator.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
RooAbsArg * first() const
TIterator * createIterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
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 Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
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...
virtual Double_t getValV(const RooArgSet *normalisationSet=nullptr) const
Return value of object.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
T * getObjByIndex(Int_t index) const
Retrieve payload object by slot index.
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 changed since last call with clearState=kTRUE.
RooArgSet parameters() const
The RooDataHist is a container class to hold N-dimensional binned data.
virtual void add(const RooArgSet &row, Double_t wgt=1.0)
Add wgt to the bin content enclosed by the coordinates passed in row.
void setAllWeights(Double_t value)
Set all the event weight of all bins to the specified value.
void reset() override
Reset all bin weights to zero.
const RooArgSet * get() const override
Get bin centre of current bin.
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,...
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooAbsArg * next()
Return next element or nullptr if at end.
void setInterpolationOrder(Int_t order)
Set histogram interpolation order.
Iterator abstract base class.
virtual TObject * Next()=0
virtual const char * GetName() const
Returns name of object.
const char * Data() const
TString & Append(const char *cs)