ROOT logo
ROOT » ROOFIT » ROOFITCORE » RooCacheManager<RooAbsCacheElement>

class RooCacheManager<RooAbsCacheElement>: public RooAbsCache



Template class RooCacheManager manages the storage of any type of data indexed on the choice of normalization and optionally the set of integrated observables. The purpose of this class is to faciliate storage of intermediate results in operator p.d.f.s whose value and inner working are often highly dependent on the user provided choice of normalization in getVal(). For efficiency reasons these normalization set pointer are derefenced as little as possible. This class contains a lookup table for RooArgSet pointer pairs -> normalization lists. Distinct pointer pairs that represent the same normalization/projection are recognized and will all point to the same normalization list. Lists for up to 'maxSize' different normalization/ projection configurations can be cached.


Function Members (Methods)

public:
RooCacheManager<RooAbsCacheElement>(Int_t maxSize = 10)
RooCacheManager<RooAbsCacheElement>(RooAbsArg* owner, Int_t maxSize = 10)
RooCacheManager<RooAbsCacheElement>(const RooCacheManager<RooAbsCacheElement>& other, RooAbsArg* owner = 0)
virtual~RooCacheManager<RooAbsCacheElement>()
Int_tcacheSize() const
static TClass*Class()
virtual voidRooAbsCache::findConstantNodes(const RooArgSet&, RooArgSet&, RooLinkedList&)
RooAbsCacheElement*getObj(const RooArgSet* nset, Int_t* sterileIndex = 0, const TNamed* isetRangeName = 0)
RooAbsCacheElement*getObj(const RooArgSet* nset, const RooArgSet* iset, Int_t* sterileIdx = 0, const TNamed* isetRangeName = 0)
RooAbsCacheElement*getObjByIndex(Int_t index) const
virtual voidinsertObjectHook(RooAbsCacheElement&)
virtual TClass*IsA() const
Int_tlastIndex() const
const RooNameSet*nameSet1ByIndex(Int_t index) const
const RooNameSet*nameSet2ByIndex(Int_t index) const
RooCacheManager<RooAbsCacheElement>&operator=(const RooCacheManager<RooAbsCacheElement>&)
virtual voidoperModeHook()
virtual voidRooAbsCache::optimizeCacheMode(const RooArgSet&, RooArgSet&, RooLinkedList&)
virtual voidprintCompactTreeHook(ostream&, const char*)
virtual Bool_tredirectServersHook(const RooAbsCollection&, Bool_t, Bool_t, Bool_t)
voidreset()
Int_tsetObj(const RooArgSet* nset, RooAbsCacheElement* obj, const TNamed* isetRangeName = 0)
Int_tsetObj(const RooArgSet* nset, const RooArgSet* iset, RooAbsCacheElement* obj, const TNamed* isetRangeName = 0)
virtual voidShowMembers(TMemberInspector& insp)
virtual voidsterilize()
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)

Data Members

protected:
Int_t_lastIndexLast slot accessed
Int_t_maxSizeMaximum size
RooNormSetCache*_nsetCache! Normalization/Integration set manager
RooAbsCacheElement**_object! Payload
RooAbsArg*RooAbsCache::_ownerPointer to owning RooAbsArg
Int_t_sizeActual use

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void RooCacheManager<T> reset()
 Clear the cache
void RooCacheManager<T> sterilize()
 Clear the cache payload but retain slot mapping w.r.t to
 normalization and integration sets.
Int_t RooCacheManager<T> setObj(const RooArgSet* nset, const RooArgSet* iset, RooAbsCacheElement* obj, const TNamed* isetRangeName = 0)
 Insert payload object 'obj' in cache indexed on nset,iset and isetRangeName
T* RooCacheManager<T> getObj(const RooArgSet* nset, const RooArgSet* iset, Int_t* sterileIdx = 0, const TNamed* isetRangeName = 0)
 Retrieve payload object indexed on nset,uset amd isetRangeName
 If sterileIdx is not null, it is set to the index of the sterile
 slot in cacse such a slot is recycled
T* RooCacheManager<T> getObjByIndex(Int_t index) const
 Retrieve payload object by slot index
const RooNameSet* RooCacheManager<T> nameSet1ByIndex(Int_t index) const
 Retrieve RooNameSet associated with slot at given index
const RooNameSet* RooCacheManager<T> nameSet2ByIndex(Int_t index) const
 Retrieve RooNameSet associated with slot at given index
T* getObj(const RooArgSet* nset, Int_t* sterileIndex = 0, const TNamed* isetRangeName = 0)
 Getter function without integration set
Int_t setObj(const RooArgSet* nset, RooAbsCacheElement* obj, const TNamed* isetRangeName = 0)
 Setter function without integration set
Int_t lastIndex() const
 Return index of slot used in last get or set operation
Int_t cacheSize() const
 Return size of cache
Bool_t redirectServersHook(const RooAbsCollection& , Bool_t , Bool_t , Bool_t )
 Interface function to intercept server redirects
void operModeHook()
 Interface function to intercept cache operation mode changes
void printCompactTreeHook(ostream& , const char* )
 Interface function to cache add contents to output in tree printing mode
void insertObjectHook(RooAbsCacheElement& )
 Interface function to perform post-insert operations on cached object