Helper for hash-map-assisted finding of elements by name.
Create this helper if finding of elements by name is needed. Upon creation, this object checks the global RooNameReg::renameCounter() and tracks elements of this collection by name. If an element gets renamed, this counter will be increased, and the name to object map becomes invalid. In this case, it has to be recreated.
Definition at line 77 of file RooAbsCollection.cxx.
Public Member Functions | |
template<typename It_t > | |
HashAssistedFind (It_t first, It_t last) | |
Inititalise empty hash map for fast finding by name. | |
void | erase (const RooAbsArg *elm) |
RooAbsArg * | find (const TNamed *nptr) const |
void | insert (const RooAbsArg *elm) |
bool | isValid () const |
void | replace (const RooAbsArg *out, const RooAbsArg *in) |
Public Attributes | |
const std::size_t & | currentRooNameRegCounter |
std::unordered_map< const TNamed *, const RooAbsArg *const > | nameToItemMap |
std::size_t | rooNameRegCounterWhereMapWasValid = 0 |
|
inline |
Inititalise empty hash map for fast finding by name.
Definition at line 81 of file RooAbsCollection.cxx.
Definition at line 111 of file RooAbsCollection.cxx.
Definition at line 95 of file RooAbsCollection.cxx.
Definition at line 107 of file RooAbsCollection.cxx.
|
inline |
Definition at line 91 of file RooAbsCollection.cxx.
|
inline |
Definition at line 102 of file RooAbsCollection.cxx.
const std::size_t& RooFit::Detail::HashAssistedFind::currentRooNameRegCounter |
Definition at line 116 of file RooAbsCollection.cxx.
std::unordered_map<const TNamed *, const RooAbsArg * const> RooFit::Detail::HashAssistedFind::nameToItemMap |
Definition at line 115 of file RooAbsCollection.cxx.
std::size_t RooFit::Detail::HashAssistedFind::rooNameRegCounterWhereMapWasValid = 0 |
Definition at line 117 of file RooAbsCollection.cxx.