18#ifndef ROOFIT_ROOFITCORE_INC_ROOSTLREFCOUNTLIST_H_
19#define ROOFIT_ROOFITCORE_INC_ROOSTLREFCOUNTLIST_H_
44 using Container_t = std::vector<T*>;
51 if(_renameCounter ==
nullptr) _renameCounter =
82 std::size_t refCount(
typename Container_t::const_iterator item)
const {
90 template<
typename Obj_t>
91 std::size_t refCount(
const Obj_t * obj)
const {
96 typename Container_t::const_iterator begin()
const {
101 typename Container_t::const_iterator
end()
const {
106 typename Container_t::value_type operator[](std::size_t
index)
const {
118 std::size_t
size()
const {
124 void reserve(std::size_t
amount) {
126 _refCount.reserve(
amount);
138 template<
typename Obj_t>
145 typename Container_t::const_iterator
findByName(
const char *
name)
const {
165 return element->namePtr() == namePtr;
175 if(namePtr != (*first)->namePtr())
return nullptr;
182 template<
typename Obj_t>
207 int Remove(
const T * obj,
bool force =
false) {
215 if (
force || --_refCount[pos] == 0) {
219 _refCount.erase(_refCount.begin() + pos);
250 return _refCount[pos];
258 void RemoveAll(
const T * obj) {
278 [](
const auto&
x,
TNamed const*
npt) ->
bool {
279 return x->namePtr() < npt;
296 for(std::size_t i = 0; i <
_storage.size(); ++i) {
300 [](
auto&
a,
auto&
b) {
301 return a->namePtr() != b->namePtr() ? a->namePtr() < b->namePtr() : a < b;
307 std::vector<UInt_t> _refCount;
314 static std::size_t
const* _renameCounter;
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDef(name, id)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Binding & operator=(OUT(*fun)(void))
const_iterator begin() const
const_iterator end() const
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
static const std::size_t & renameCounter()
renamed in this RooFit process.
The TNamed class is the base class for all named ROOT classes.
void convert(R1 const &, R2 const)
TMatrixT< Element > & Add(TMatrixT< Element > &target, Element scalar, const TMatrixT< Element > &source)
Modify addition: target += scalar * source.