22namespace TestStatistics {
62 <<
"enableConstantTermsOptimization(function: " << function->GetName()
63 <<
", dataset: " << dataset->
GetName()
64 <<
") WARNING Cache-and-track optimization (Optimize level 2) is only available for datasets"
65 <<
" implemented in terms of RooVectorDataStore - ignoring this option for current dataset" << std::endl;
72 function->branchNodeServerList(&
branches);
81 trackNodes.setAttribAll(
"CacheAndTrack",
true);
106 <<
" The following expressions have been identified as constant and will be precalculated and cached: "
111 <<
" expressions have been identified as constant and will be precalculated and cached." << std::endl;
116 oocoutI(
nullptr,
Minimization) <<
" The following expressions will be evaluated in cache-and-track mode: "
120 <<
" expressions will be evaluated in cache-and-track-mode." << std::endl;
157 if (observables ==
nullptr) {
158 ownedObservables = std::unique_ptr<RooArgSet>{function->getObservables(dataset)};
161 function->optimizeCacheMode(*observables);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Abstract base class for binned and unbinned datasets.
virtual const RooArgSet * get() const
RooAbsDataStore * store()
void setDirtyProp(bool flag)
Control propagation of dirty flags from observables in dataset.
virtual void setArgStatus(const RooArgSet &set, bool active)
virtual void cacheArgs(const RooAbsArg *owner, RooArgSet &varSet, const RooArgSet *nset=nullptr, bool skipZeroWeights=false)
Internal method – Cache given set of functions with data.
virtual void optimizeReadingWithCaching(RooAbsArg &arg, const RooArgSet &cacheList, const RooArgSet &keepObsList)
Prepare dataset for use with cached constant terms listed in 'cacheList' of expression 'arg'.
virtual void resetCache()
Internal method – Remove cached function values.
Abstract base class for objects that represent a real value and implements functionality common to al...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Uses std::vector to store data columns.
const char * GetName() const override
Returns name of object.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
static void disableConstantTermsOptimization(RooAbsReal *function, RooArgSet *norm_set, RooAbsData *dataset, RooArgSet *observables=nullptr)
static void optimizeCaching(RooAbsReal *function, RooArgSet *norm_set, RooAbsData *dataset, RooArgSet *observables=nullptr)
static RooArgSet requiredExtraObservables()
static void enableConstantTermsOptimization(RooAbsReal *function, RooArgSet *norm_set, RooAbsData *dataset, bool applyTrackingOpt)