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 truly 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 25 of file RooNormSetCache.h.
Public Member Functions | |
RooNormSetCache (std::size_t max=32) | |
bool | autoCache (const RooAbsArg *self, const RooArgSet *set1, const RooArgSet *set2=nullptr, const TNamed *set2RangeName=nullptr, bool autoRefill=true) |
If RooArgSets set1 and set2 or sets with similar contents have been seen by this cache manager before return false If not, return true . | |
void | clear () |
Clear contents. | |
bool | contains (const RooArgSet *set1, const RooArgSet *set2=nullptr, const TNamed *set2RangeName=nullptr) |
const std::string & | nameSet1 () const |
const std::string & | nameSet2 () const |
Private Types | |
using | Pair_t = std::pair< Value_t, Value_t > |
using | Value_t = RooFit::UniqueId< RooArgSet >::Value_t |
Private Member Functions | |
void | add (const RooArgSet *set1, const RooArgSet *set2=nullptr) |
Add given pair of RooArgSet pointers to our store. | |
Private Attributes | |
std::size_t | _max |
! | |
std::string | _name1 |
! | |
std::string | _name2 |
! | |
std::deque< Pair_t > | _pairs |
! | |
std::set< Pair_t > | _pairSet |
! | |
TNamed * | _set2RangeName = nullptr |
! | |
#include <RooNormSetCache.h>
|
private |
Definition at line 52 of file RooNormSetCache.h.
|
private |
Definition at line 51 of file RooNormSetCache.h.
|
inline |
Definition at line 28 of file RooNormSetCache.h.
Add given pair of RooArgSet pointers to our store.
Definition at line 51 of file RooNormSetCache.cxx.
bool RooNormSetCache::autoCache | ( | const RooAbsArg * | self, |
const RooArgSet * | set1, | ||
const RooArgSet * | set2 = nullptr , |
||
const TNamed * | set2RangeName = nullptr , |
||
bool | doRefill = true |
||
) |
If RooArgSets set1 and set2 or sets with similar contents have been seen by this cache manager before return false
If not, return true
.
If sets have not been seen and doRefill is true, update cache reference to current input sets.
Definition at line 76 of file RooNormSetCache.cxx.
void RooNormSetCache::clear | ( | ) |
Clear contents.
Definition at line 42 of file RooNormSetCache.cxx.
|
inline |
Definition at line 30 of file RooNormSetCache.h.
|
inline |
Definition at line 38 of file RooNormSetCache.h.
|
inline |
Definition at line 39 of file RooNormSetCache.h.
|
private |
!
Definition at line 56 of file RooNormSetCache.h.
|
private |
!
Definition at line 58 of file RooNormSetCache.h.
|
private |
!
Definition at line 59 of file RooNormSetCache.h.
|
private |
!
Definition at line 54 of file RooNormSetCache.h.
|
private |
!
Definition at line 55 of file RooNormSetCache.h.
|
private |
!
Definition at line 60 of file RooNormSetCache.h.