16#ifndef ROO_NORMSET_CACHE
17#define ROO_NORMSET_CACHE
32 typedef std::pair<const RooArgSet*, const RooArgSet*>
Pair;
36 if (
a.first <
b.first)
return true;
37 if (
b.first <
a.first)
return false;
38 return a.second <
b.second;
51 const TNamed* set2RangeName = 0)
55 const Pair pair(set1, set2);
56 PairIdxMapType::const_iterator it =
_pairToIdx.lower_bound(pair);
64 const TNamed* set2RangeName = 0)
65 {
return (
index(set1,set2,set2RangeName) >= 0); }
70 PairIdxMapType::const_iterator it =
_pairToIdx.lower_bound(pair);
71 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 and a "shape" in RooFi...
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
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