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(ULong_t max = 32)
RooNormSetCache(const RooNormSetCache&)
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&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)

Data Members

protected:
ULong_t_max!
RooNameSet_name1!
RooNameSet_name2!
ULong_t_next!
map<pair<const RooArgSet*,const RooArgSet*>,unsigned long>_pairToIdx!
vector<pair<const RooArgSet*,const RooArgSet*> >_pairs!
TNamed*_set2RangeName!

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

RooNormSetCache(ULong_t max = 32)
~RooNormSetCache()
 Destructor
void clear()
 Clear contents
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. If sets have not been seen and doRefill is true,
 update cache reference to current input sets.
RooNormSetCache(ULong_t max = 32)
Int_t index(const RooArgSet* set1, const RooArgSet* set2 = 0, const TNamed* set2RangeName = 0)
 Match range name first
Bool_t contains(const RooArgSet* set1, const RooArgSet* set2 = 0, const TNamed* set2RangeName = 0)
{ return (index(set1,set2,set2RangeName) >= 0); }
Bool_t containsSet1(const RooArgSet* set1)
const RooArgSet* lastSet1() const
{ return _pairs.empty()?0:_pairs.back().first; }
const RooArgSet* lastSet2() const
{ return _pairs.empty()?0:_pairs.back().second; }
const RooNameSet& nameSet1() const
{ return _name1; }
const RooNameSet& nameSet2() const
{ return _name2; }
Int_t entries() const
{ return _pairs.size(); }
void initialize(const RooNormSetCache& other)
{ clear(); *this = other; }