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 67 of file RooAbsCollection.cxx.
Public Member Functions | |
template<typename It_t > | |
HashAssistedFind (It_t first, It_t last) | |
Initialise 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 |
Initialise empty hash map for fast finding by name.
Definition at line 71 of file RooAbsCollection.cxx.
|
inline |
Definition at line 101 of file RooAbsCollection.cxx.
Definition at line 85 of file RooAbsCollection.cxx.
|
inline |
Definition at line 97 of file RooAbsCollection.cxx.
|
inline |
Definition at line 81 of file RooAbsCollection.cxx.
|
inline |
Definition at line 92 of file RooAbsCollection.cxx.
const std::size_t& RooFit::Detail::HashAssistedFind::currentRooNameRegCounter |
Definition at line 106 of file RooAbsCollection.cxx.
std::unordered_map<const TNamed *, const RooAbsArg * const> RooFit::Detail::HashAssistedFind::nameToItemMap |
Definition at line 105 of file RooAbsCollection.cxx.
std::size_t RooFit::Detail::HashAssistedFind::rooNameRegCounterWhereMapWasValid = 0 |
Definition at line 107 of file RooAbsCollection.cxx.