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 65 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 |
Initialise empty hash map for fast finding by name.
Definition at line 69 of file RooAbsCollection.cxx.
Definition at line 99 of file RooAbsCollection.cxx.
Definition at line 83 of file RooAbsCollection.cxx.
Definition at line 95 of file RooAbsCollection.cxx.
|
inline |
Definition at line 79 of file RooAbsCollection.cxx.
|
inline |
Definition at line 90 of file RooAbsCollection.cxx.
| const std::size_t& RooFit::Detail::HashAssistedFind::currentRooNameRegCounter |
Definition at line 104 of file RooAbsCollection.cxx.
| std::unordered_map<const TNamed *, const RooAbsArg * const> RooFit::Detail::HashAssistedFind::nameToItemMap |
Definition at line 103 of file RooAbsCollection.cxx.
| std::size_t RooFit::Detail::HashAssistedFind::rooNameRegCounterWhereMapWasValid = 0 |
Definition at line 105 of file RooAbsCollection.cxx.