16#ifndef ROO_NORMSET_CACHE
17#define ROO_NORMSET_CACHE
33 typedef std::pair<const RooArgSet*, const RooArgSet*>
Pair;
37 if (
a.first <
b.first)
return true;
38 if (
b.first <
a.first)
return false;
39 return a.second <
b.second;
52 const TNamed* set2RangeName = 0)
56 const Pair pair(set1, set2);
57 PairIdxMapType::const_iterator it =
_pairToIdx.lower_bound(pair);
65 const TNamed* set2RangeName = 0)
66 {
return (
index(set1,set2,set2RangeName) >= 0); }
71 PairIdxMapType::const_iterator it =
_pairToIdx.lower_bound(pair);
72 if (
_pairToIdx.end() != it && it->first.first == set1)
#define ClassDef(name, id)
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooNameSet is a utility class that stores the names the objects in a RooArget.
Class RooNormSet cache manage the bookkeeping of multiple instances of sets of integration and normal...
const RooArgSet * lastSet1() const
Int_t index(const RooArgSet *set1, const RooArgSet *set2=0, const TNamed *set2RangeName=0)
void clear()
Clear contents.
virtual ~RooNormSetCache()
Destructor.
std::pair< const RooArgSet *, const RooArgSet * > Pair
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...
PairIdxMapType _pairToIdx
RooNormSetCache(ULong_t max=32)
void initialize(const RooNormSetCache &other)
Bool_t containsSet1(const RooArgSet *set1)
void add(const RooArgSet *set1, const RooArgSet *set2=0)
Add given pair of RooArgSet pointers to our store.
Bool_t contains(const RooArgSet *set1, const RooArgSet *set2=0, const TNamed *set2RangeName=0)
const RooNameSet & nameSet1() const
const RooArgSet * lastSet2() const
std::map< Pair, ULong_t > PairIdxMapType
std::vector< Pair > PairVectType
const RooNameSet & nameSet2() const
The TNamed class is the base class for all named ROOT classes.
bool operator()(const Pair &a, const Pair &b) const