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 30 of file RooNormSetCache.h.
Classes | |
struct | PairCmp |
Public Member Functions | |
RooNormSetCache (ULong_t max=32) | |
virtual | ~RooNormSetCache () |
Destructor. | |
void | add (const RooArgSet *set1, const RooArgSet *set2=0) |
Add given pair of RooArgSet pointers to our store. | |
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. | |
void | clear () |
Clear contents. | |
Bool_t | contains (const RooArgSet *set1, const RooArgSet *set2=0, const TNamed *set2RangeName=0) |
Bool_t | containsSet1 (const RooArgSet *set1) |
Int_t | entries () const |
Int_t | index (const RooArgSet *set1, const RooArgSet *set2=0, const TNamed *set2RangeName=0) |
void | initialize (const RooNormSetCache &other) |
const RooArgSet * | lastSet1 () const |
const RooArgSet * | lastSet2 () const |
const RooNameSet & | nameSet1 () const |
const RooNameSet & | nameSet2 () const |
Protected Types | |
typedef std::pair< const RooArgSet *, const RooArgSet * > | Pair |
typedef std::map< Pair, ULong_t > | PairIdxMapType |
typedef std::vector< Pair > | PairVectType |
Protected Attributes | |
ULong_t | _max |
RooNameSet | _name1 |
RooNameSet | _name2 |
ULong_t | _next |
PairVectType | _pairs |
PairIdxMapType | _pairToIdx |
TNamed * | _set2RangeName |
#include <RooNormSetCache.h>
|
protected |
Definition at line 32 of file RooNormSetCache.h.
|
protected |
Definition at line 42 of file RooNormSetCache.h.
|
protected |
Definition at line 41 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.
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.
|
inline |
Definition at line 63 of file RooNormSetCache.h.
Definition at line 67 of file RooNormSetCache.h.
|
inline |
Definition at line 86 of file RooNormSetCache.h.
|
inline |
Definition at line 50 of file RooNormSetCache.h.
|
inline |
Definition at line 88 of file RooNormSetCache.h.
|
inline |
Definition at line 76 of file RooNormSetCache.h.
|
inline |
Definition at line 77 of file RooNormSetCache.h.
|
inline |
Definition at line 78 of file RooNormSetCache.h.
|
inline |
Definition at line 79 of file RooNormSetCache.h.
|
protected |
Definition at line 94 of file RooNormSetCache.h.
|
protected |
Definition at line 97 of file RooNormSetCache.h.
|
protected |
Definition at line 98 of file RooNormSetCache.h.
|
protected |
Definition at line 95 of file RooNormSetCache.h.
|
protected |
Definition at line 92 of file RooNormSetCache.h.
|
protected |
Definition at line 93 of file RooNormSetCache.h.
|
protected |
Definition at line 99 of file RooNormSetCache.h.