Logo ROOT   6.08/07
Reference Guide
List of all members | Classes | Public Member Functions | Protected Types | Protected Attributes | List of all members
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 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...
 
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...
 
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 RooArgSetlastSet1 () const
 
const RooArgSetlastSet2 () const
 
const RooNameSetnameSet1 () const
 
const RooNameSetnameSet2 () const
 

Protected Types

typedef std::pair< const RooArgSet *, const RooArgSet * > Pair
 
typedef std::map< Pair, ULong_tPairIdxMapType
 
typedef std::vector< PairPairVectType
 

Protected Attributes

ULong_t _max
 
RooNameSet _name1
 
RooNameSet _name2
 
ULong_t _next
 
PairVectType _pairs
 
PairIdxMapType _pairToIdx
 
TNamed_set2RangeName
 

#include <RooNormSetCache.h>

Member Typedef Documentation

◆ Pair

typedef std::pair<const RooArgSet*, const RooArgSet*> RooNormSetCache::Pair
protected

Definition at line 34 of file RooNormSetCache.h.

◆ PairIdxMapType

typedef std::map<Pair, ULong_t> RooNormSetCache::PairIdxMapType
protected

Definition at line 44 of file RooNormSetCache.h.

◆ PairVectType

typedef std::vector<Pair> RooNormSetCache::PairVectType
protected

Definition at line 43 of file RooNormSetCache.h.

Constructor & Destructor Documentation

◆ RooNormSetCache()

RooNormSetCache::RooNormSetCache ( ULong_t  max = 32)

Definition at line 48 of file RooNormSetCache.cxx.

◆ ~RooNormSetCache()

RooNormSetCache::~RooNormSetCache ( )
virtual

Destructor.

Definition at line 56 of file RooNormSetCache.cxx.

Member Function Documentation

◆ add()

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

Add given pair of RooArgSet pointers to our store.

Definition at line 79 of file RooNormSetCache.cxx.

◆ 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.

◆ clear()

void RooNormSetCache::clear ( )

Clear contents.

Definition at line 63 of file RooNormSetCache.cxx.

◆ contains()

Bool_t RooNormSetCache::contains ( const RooArgSet set1,
const RooArgSet set2 = 0,
const TNamed set2RangeName = 0 
)
inline

Definition at line 65 of file RooNormSetCache.h.

◆ containsSet1()

Bool_t RooNormSetCache::containsSet1 ( const RooArgSet set1)
inline

Definition at line 69 of file RooNormSetCache.h.

◆ entries()

Int_t RooNormSetCache::entries ( ) const
inline

Definition at line 88 of file RooNormSetCache.h.

◆ index()

Int_t RooNormSetCache::index ( const RooArgSet set1,
const RooArgSet set2 = 0,
const TNamed set2RangeName = 0 
)
inline

Definition at line 52 of file RooNormSetCache.h.

◆ initialize()

void RooNormSetCache::initialize ( const RooNormSetCache other)
inline

Definition at line 90 of file RooNormSetCache.h.

◆ lastSet1()

const RooArgSet* RooNormSetCache::lastSet1 ( ) const
inline

Definition at line 78 of file RooNormSetCache.h.

◆ lastSet2()

const RooArgSet* RooNormSetCache::lastSet2 ( ) const
inline

Definition at line 79 of file RooNormSetCache.h.

◆ nameSet1()

const RooNameSet& RooNormSetCache::nameSet1 ( ) const
inline

Definition at line 80 of file RooNormSetCache.h.

◆ nameSet2()

const RooNameSet& RooNormSetCache::nameSet2 ( ) const
inline

Definition at line 81 of file RooNormSetCache.h.

Member Data Documentation

◆ _max

ULong_t RooNormSetCache::_max
protected

Definition at line 96 of file RooNormSetCache.h.

◆ _name1

RooNameSet RooNormSetCache::_name1
protected

Definition at line 99 of file RooNormSetCache.h.

◆ _name2

RooNameSet RooNormSetCache::_name2
protected

Definition at line 100 of file RooNormSetCache.h.

◆ _next

ULong_t RooNormSetCache::_next
protected

Definition at line 97 of file RooNormSetCache.h.

◆ _pairs

PairVectType RooNormSetCache::_pairs
protected

Definition at line 94 of file RooNormSetCache.h.

◆ _pairToIdx

PairIdxMapType RooNormSetCache::_pairToIdx
protected

Definition at line 95 of file RooNormSetCache.h.

◆ _set2RangeName

TNamed* RooNormSetCache::_set2RangeName
protected

Definition at line 101 of file RooNormSetCache.h.


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