Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooObjCacheManager.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id$
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_OBJ_CACHE_MANAGER
17#define ROO_OBJ_CACHE_MANAGER
18
19#include "Rtypes.h"
20
21#include "RooNormSetCache.h"
22#include "RooAbsReal.h"
23#include "RooArgSet.h"
24#include "RooArgList.h"
25#include "RooAbsCache.h"
26#include "RooAbsCacheElement.h"
27#include "RooCacheManager.h"
28
29
30class RooObjCacheManager : public RooCacheManager<RooAbsCacheElement> {
31
32public:
33
34 RooObjCacheManager(RooAbsArg* owner=0, Int_t maxSize=2, Bool_t clearCacheOnServerRedirect=kTRUE, Bool_t allowOptimize=kFALSE) ;
35 RooObjCacheManager(const RooObjCacheManager& other, RooAbsArg* owner=0) ;
36 virtual ~RooObjCacheManager() ;
37
38 virtual Bool_t redirectServersHook(const RooAbsCollection& /*newServerList*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive*/) ;
39 virtual void operModeHook() ;
40 virtual void optimizeCacheMode(const RooArgSet& /*obs*/, RooArgSet& /*optSet*/, RooLinkedList& /*processedNodes*/) ;
41 virtual void printCompactTreeHook(std::ostream&, const char *) ;
42 virtual void findConstantNodes(const RooArgSet& /*obs*/, RooArgSet& /*cacheList*/, RooLinkedList& /*processedNodes*/) ;
43
45
46 void sterilize() ;
47
48 static void doClearObsList(Bool_t flag) { _clearObsList = flag ; }
49 static Bool_t clearObsList() { return _clearObsList ; }
50
52
53protected:
54
58
59 RooArgSet* _optCacheObservables ; //! current optCacheObservables
60
61 static Bool_t _clearObsList ; // Clear obslist on sterilize?
62
63 ClassDef(RooObjCacheManager,3) // Cache manager for generic caches that contain RooAbsArg objects
64} ;
65
66
67
68#endif
const Bool_t kFALSE
Definition RtypesCore.h:101
const Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassDef(name, id)
Definition Rtypes.h:325
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition RooAbsArg.h:69
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:35
Template class RooCacheManager manages the storage of any type of data indexed on the choice of norma...
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Class RooObjCacheManager is an implementation of class RooCacheManager<RooAbsCacheElement> and specia...
virtual void optimizeCacheMode(const RooArgSet &, RooArgSet &, RooLinkedList &)
Intercept calls to perform automatic optimization of cache mode operation.
virtual void findConstantNodes(const RooArgSet &, RooArgSet &, RooLinkedList &)
If clearOnRedirect is false, forward constant term optimization calls to cache elements.
static Bool_t clearObsList()
static void doClearObsList(Bool_t flag)
virtual void printCompactTreeHook(std::ostream &, const char *)
Add details on cache contents when printing in tree mode.
static Bool_t _clearObsList
current optCacheObservables
virtual void insertObjectHook(RooAbsCacheElement &)
Set owner link on all object inserted into cache.
void sterilize()
Clear the cache payload but retain slot mapping w.r.t to normalization and integration sets.
virtual Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Intercept server redirect calls.
virtual void operModeHook()
Intercept changes to cache operation mode and forward to cache elements.
void setClearOnRedirect(Bool_t flag)
virtual ~RooObjCacheManager()
Destructor.
RooArgSet * _optCacheObservables