ROOT
6.07/01
Reference Guide
|
Class RooNormSet cache manage the bookkeeping of multiple instances of sets of integration and normalization observables that effectively have the same definition.
In complex function expression many RooArgSets with the same contents may be passed to an object that caches intermediate results dependent on the normalization/integration set To avoid unnecessary cache faulting, This class tracks all instances with the same contents and reports to the owner if the present nset/iset is truely different from the current reference. Class RooNormSet only evaluates each RooArgSet pointer once, it therefore assumes that RooArgSets with normalization and/or integration sets are not changes during their lifetime.
Definition at line 32 of file RooNormSetCache.h.
Classes | |
struct | PairCmp |
Public Member Functions | |
RooNormSetCache (ULong_t max=32) | |
virtual | ~RooNormSetCache () |
Destructor. More... | |
void | add (const RooArgSet *set1, const RooArgSet *set2=0) |
Add given pair of RooArgSet pointers to our store. More... | |
Int_t | index (const RooArgSet *set1, const RooArgSet *set2=0, const TNamed *set2RangeName=0) |
Bool_t | contains (const RooArgSet *set1, const RooArgSet *set2=0, const TNamed *set2RangeName=0) |
Bool_t | containsSet1 (const RooArgSet *set1) |
const RooArgSet * | lastSet1 () const |
const RooArgSet * | lastSet2 () const |
const RooNameSet & | nameSet1 () const |
const RooNameSet & | nameSet2 () const |
Bool_t | autoCache (const RooAbsArg *self, const RooArgSet *set1, const RooArgSet *set2=0, const TNamed *set2RangeName=0, Bool_t autoRefill=kTRUE) |
If RooArgSets set1 and set2 or sets with similar contents have been seen by this cache manager before return kFALSE If not, return kTRUE. More... | |
void | clear () |
Clear contents. More... | |
Int_t | entries () const |
void | initialize (const RooNormSetCache &other) |
Protected Types | |
typedef std::pair< const RooArgSet *, const RooArgSet * > | Pair |
typedef std::vector< Pair > | PairVectType |
typedef std::map< Pair, ULong_t > | PairIdxMapType |
Protected Attributes | |
PairVectType | _pairs |
PairIdxMapType | _pairToIdx |
ULong_t | _max |
ULong_t | _next |
RooNameSet | _name1 |
RooNameSet | _name2 |
TNamed * | _set2RangeName |
#include <RooNormSetCache.h>
|
protected |
Definition at line 34 of file RooNormSetCache.h.
|
protected |
Definition at line 44 of file RooNormSetCache.h.
|
protected |
Definition at line 43 of file RooNormSetCache.h.
RooNormSetCache::RooNormSetCache | ( | ULong_t | max = 32 | ) |
Definition at line 48 of file RooNormSetCache.cxx.
|
virtual |
Destructor.
Definition at line 56 of file RooNormSetCache.cxx.
Add given pair of RooArgSet pointers to our store.
Definition at line 79 of file RooNormSetCache.cxx.
Referenced by autoCache().
Bool_t RooNormSetCache::autoCache | ( | const RooAbsArg * | self, |
const RooArgSet * | set1, | ||
const RooArgSet * | set2 = 0 , |
||
const TNamed * | set2RangeName = 0 , |
||
Bool_t | doRefill = kTRUE |
||
) |
If RooArgSets set1 and set2 or sets with similar contents have been seen by this cache manager before return kFALSE If not, return kTRUE.
If sets have not been seen and doRefill is true, update cache reference to current input sets.
Definition at line 113 of file RooNormSetCache.cxx.
void RooNormSetCache::clear | ( | ) |
Clear contents.
Definition at line 63 of file RooNormSetCache.cxx.
Referenced by autoCache(), and initialize().
|
inline |
Definition at line 65 of file RooNormSetCache.h.
Referenced by autoCache().
Definition at line 69 of file RooNormSetCache.h.
|
inline |
Definition at line 88 of file RooNormSetCache.h.
|
inline |
Definition at line 52 of file RooNormSetCache.h.
Referenced by contains().
|
inline |
Definition at line 90 of file RooNormSetCache.h.
|
inline |
Definition at line 78 of file RooNormSetCache.h.
|
inline |
Definition at line 79 of file RooNormSetCache.h.
|
inline |
Definition at line 80 of file RooNormSetCache.h.
|
inline |
Definition at line 81 of file RooNormSetCache.h.
|
protected |
Definition at line 96 of file RooNormSetCache.h.
Referenced by add().
|
protected |
Definition at line 99 of file RooNormSetCache.h.
Referenced by autoCache(), and nameSet1().
|
protected |
Definition at line 100 of file RooNormSetCache.h.
Referenced by autoCache(), and nameSet2().
|
protected |
Definition at line 97 of file RooNormSetCache.h.
|
protected |
Definition at line 94 of file RooNormSetCache.h.
Referenced by add(), clear(), entries(), lastSet1(), and lastSet2().
|
protected |
Definition at line 95 of file RooNormSetCache.h.
Referenced by add(), clear(), containsSet1(), and index().
|
protected |
Definition at line 101 of file RooNormSetCache.h.
Referenced by autoCache(), and index().