ROOT logo
ROOT » ROOFIT » ROOFITCORE » RooObjCacheManager

class RooObjCacheManager: public RooCacheManager<RooAbsCacheElement>



Class RooObjCacheManager is an implementation of class RooCacheManager and specializes in the storage of cache elements that contain RooAbsArg objects. Caches with RooAbsArg derived payload require special care as server redirects cache operation mode changes and constant term optimization calls may need to be forwarded to such cache payload. This cache manager takes are of all these operations by forwarding these calls to the RooAbsCacheElement interface functions, which have a sensible default implementation.

Function Members (Methods)

public:
RooObjCacheManager(const RooObjCacheManager& other, RooAbsArg* owner = 0)
RooObjCacheManager(RooAbsArg* owner = 0, Int_t maxSize = 2, Bool_t clearCacheOnServerRedirect = kTRUE, Bool_t allowOptimize = kFALSE)
virtual~RooObjCacheManager()
Int_tRooCacheManager<RooAbsCacheElement>::cacheSize() const
static TClass*Class()
static Bool_tclearObsList()
static voiddoClearObsList(Bool_t flag)
virtual voidfindConstantNodes(const RooArgSet&, RooArgSet&, RooLinkedList&)
RooAbsCacheElement*RooCacheManager<RooAbsCacheElement>::getObj(const RooArgSet* nset, Int_t* sterileIndex = 0, const TNamed* isetRangeName = 0)
RooAbsCacheElement*RooCacheManager<RooAbsCacheElement>::getObj(const RooArgSet* nset, const RooArgSet* iset, Int_t* sterileIdx, const char* isetRangeName)
RooAbsCacheElement*RooCacheManager<RooAbsCacheElement>::getObj(const RooArgSet* nset, const RooArgSet* iset, Int_t* sterileIdx = 0, const TNamed* isetRangeName = 0)
RooAbsCacheElement*RooCacheManager<RooAbsCacheElement>::getObjByIndex(Int_t index) const
virtual voidinsertObjectHook(RooAbsCacheElement&)
virtual TClass*IsA() const
Int_tRooCacheManager<RooAbsCacheElement>::lastIndex() const
const RooNameSet*RooCacheManager<RooAbsCacheElement>::nameSet1ByIndex(Int_t index) const
const RooNameSet*RooCacheManager<RooAbsCacheElement>::nameSet2ByIndex(Int_t index) const
RooObjCacheManager&operator=(const RooObjCacheManager&)
virtual voidoperModeHook()
virtual voidoptimizeCacheMode(const RooArgSet&, RooArgSet&, RooLinkedList&)
virtual voidprintCompactTreeHook(ostream&, const char*)
virtual Bool_tredirectServersHook(const RooAbsCollection&, Bool_t, Bool_t, Bool_t)
voidRooCacheManager<RooAbsCacheElement>::reset()
voidsetClearOnRedirect(Bool_t flag)
Int_tRooCacheManager<RooAbsCacheElement>::setObj(const RooArgSet* nset, RooAbsCacheElement* obj, const TNamed* isetRangeName = 0)
Int_tRooCacheManager<RooAbsCacheElement>::setObj(const RooArgSet* nset, const RooArgSet* iset, RooAbsCacheElement* obj, const TNamed* isetRangeName = 0)
virtual voidShowMembers(TMemberInspector&)
virtual voidsterilize()
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidRooCacheManager<RooAbsCacheElement>::wireCache()

Data Members

protected:
Bool_t_allowOptimize
static Bool_t_clearObsListClear obslist on sterilize?
Bool_t_clearOnRedirect
Int_tRooCacheManager<RooAbsCacheElement>::_lastIndex! Last slot accessed
Int_tRooCacheManager<RooAbsCacheElement>::_maxSize! Maximum size
vector<RooNormSetCache>RooCacheManager<RooAbsCacheElement>::_nsetCache! Normalization/Integration set manager
vector<RooAbsCacheElement*>RooCacheManager<RooAbsCacheElement>::_object! Payload
Bool_t_optCacheModeSeen!
RooArgSet*_optCacheObservables! current optCacheObservables
RooAbsArg*RooAbsCache::_ownerPointer to owning RooAbsArg
Int_tRooCacheManager<RooAbsCacheElement>::_size! Actual use
Bool_tRooCacheManager<RooAbsCacheElement>::_wired! In wired mode, there is a single payload which is returned always

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

RooObjCacheManager(RooAbsArg* owner = 0, Int_t maxSize = 2, Bool_t clearCacheOnServerRedirect = kTRUE, Bool_t allowOptimize = kFALSE)
 Constructor of object cache manager for given owner. If clearCacheOnServerRedirect is true
 all cache elements will be cleared when a server redirect is intercepted by the cache manager.
 This is the default strategy and should only be overridden when you really understand
 what you're doing as properly implementing server redirect in cache elements can get very
 complicated, especially if there are (cyclical) reference back to the owning object
RooObjCacheManager(const RooObjCacheManager& other, RooAbsArg* owner = 0)
 Copy constructor
~RooObjCacheManager()
 Destructor
Bool_t redirectServersHook(const RooAbsCollection& , Bool_t , Bool_t , Bool_t )
 Intercept server redirect calls. If clearOnRedirect was set, sterilize
 the cache (i.e. keep the structure but delete all contents). If not
 forward serverRedirect to cache elements
void operModeHook()
 Intercept changes to cache operation mode and forward to cache elements
void optimizeCacheMode(const RooArgSet& , RooArgSet& , RooLinkedList& )
 Intercept calls to perform automatic optimization of cache mode operation.
 Forward calls to existing cache elements and save configuration of
 cache mode optimization so that it can be applied on new cache elements
 upon insertion
void sterilize()
void insertObjectHook(RooAbsCacheElement& )
 Set owner link on all object inserted into cache.
 Also if cache mode optimization was requested, apply
 it now to cache element being inserted
void printCompactTreeHook(ostream& , const char* )
 Add details on cache contents when printing in tree mode
void findConstantNodes(const RooArgSet& , RooArgSet& , RooLinkedList& )
 If clearOnRedirect is false, forward constant term optimization calls to
 cache elements
void doClearObsList(Bool_t flag)
{ _clearObsList = flag ; }
Bool_t clearObsList()
{ return _clearObsList ; }
void setClearOnRedirect(Bool_t flag)
{ _clearOnRedirect = flag ; }