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