Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooNormSetCache Class Reference

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>

Member Typedef Documentation

◆ Pair_t

using RooNormSetCache::Pair_t = std::pair<Value_t,Value_t>
private

Definition at line 52 of file RooNormSetCache.h.

◆ Value_t

Definition at line 51 of file RooNormSetCache.h.

Constructor & Destructor Documentation

◆ RooNormSetCache()

RooNormSetCache::RooNormSetCache ( std::size_t  max = 32)
inline

Definition at line 28 of file RooNormSetCache.h.

Member Function Documentation

◆ add()

void RooNormSetCache::add ( const RooArgSet set1,
const RooArgSet set2 = nullptr 
)
private

Add given pair of RooArgSet pointers to our store.

Definition at line 51 of file RooNormSetCache.cxx.

◆ autoCache()

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.

◆ clear()

void RooNormSetCache::clear ( )

Clear contents.

Definition at line 42 of file RooNormSetCache.cxx.

◆ contains()

bool RooNormSetCache::contains ( const RooArgSet set1,
const RooArgSet set2 = nullptr,
const TNamed set2RangeName = nullptr 
)
inline

Definition at line 30 of file RooNormSetCache.h.

◆ nameSet1()

const std::string & RooNormSetCache::nameSet1 ( ) const
inline

Definition at line 38 of file RooNormSetCache.h.

◆ nameSet2()

const std::string & RooNormSetCache::nameSet2 ( ) const
inline

Definition at line 39 of file RooNormSetCache.h.

Member Data Documentation

◆ _max

std::size_t RooNormSetCache::_max
private

!

Definition at line 56 of file RooNormSetCache.h.

◆ _name1

std::string RooNormSetCache::_name1
private

!

Definition at line 58 of file RooNormSetCache.h.

◆ _name2

std::string RooNormSetCache::_name2
private

!

Definition at line 59 of file RooNormSetCache.h.

◆ _pairs

std::deque<Pair_t> RooNormSetCache::_pairs
private

!

Definition at line 54 of file RooNormSetCache.h.

◆ _pairSet

std::set<Pair_t> RooNormSetCache::_pairSet
private

!

Definition at line 55 of file RooNormSetCache.h.

◆ _set2RangeName

TNamed* RooNormSetCache::_set2RangeName = nullptr
private

!

Definition at line 60 of file RooNormSetCache.h.

Libraries for RooNormSetCache:

The documentation for this class was generated from the following files: