ROOT logo
ROOT » ROOFIT » ROOFITCORE » RooNormSetCache

class RooNormSetCache



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.

Function Members (Methods)

public:
RooNormSetCache(Int_t regSize = 10)
RooNormSetCache(const RooNormSetCache& other)
virtual~RooNormSetCache()
voidadd(const RooArgSet* set1, const RooArgSet* set2 = 0)
Bool_tautoCache(const RooAbsArg* self, const RooArgSet* set1, const RooArgSet* set2 = 0, const TNamed* set2RangeName = 0, Bool_t autoRefill = kTRUE)
static TClass*Class()
voidclear()
Bool_tcontains(const RooArgSet* set1, const RooArgSet* set2 = 0, const TNamed* set2RangeName = 0)
Bool_tcontainsSet1(const RooArgSet* set1)
Int_tentries() const
Int_tindex(const RooArgSet* set1, const RooArgSet* set2 = 0, const TNamed* set2RangeName = 0)
voidinitialize(const RooNormSetCache& other)
virtual TClass*IsA() const
const RooArgSet*lastSet1() const
const RooArgSet*lastSet2() const
const RooNameSet&nameSet1() const
const RooNameSet&nameSet2() const
RooNormSetCache&operator=(const RooNormSetCache&)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
protected:
voidexpand()

Data Members

protected:
RooSetPair*_asArr! do not persist
RooHashTable*_htable! do not persist
RooNameSet_name1!
RooNameSet_name2!
Int_t_nreg
Int_t_regSize
TNamed*_set2RangeName!

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

RooNormSetCache(Int_t regSize)
 Construct normalization set manager with given initial size
RooNormSetCache(const RooNormSetCache& other)
 Copy constructor
~RooNormSetCache()
 Destructor
void clear()
 Clear contents
void initialize(const RooNormSetCache& other)
 Initialize cache from contents of given other cache
void add(const RooArgSet* set1, const RooArgSet* set2 = 0)
 Add given pair of RooArgSet pointers to our store
void expand()
 Expand registry size by doubling capacity
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. If sets have not been seen and doRefill is true,
 update cache reference to current input sets.
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
{ return _nreg>0?_asArr[_nreg-1]._set1:0 ; }
const RooArgSet* lastSet2() const
{ return _nreg>0?_asArr[_nreg-1]._set2:0 ; }
const RooNameSet& nameSet1() const
{ return _name1 ; }
const RooNameSet& nameSet2() const
{ return _name2 ; }
Int_t entries() const
{ return _nreg ; }