ROOT
master
Reference Guide
Loading...
Searching...
No Matches
RooSTLRefCountList.cxx
Go to the documentation of this file.
1
// Author: Stephan Hageboeck, CERN, 12/2018
2
/*****************************************************************************
3
* Project: RooFit *
4
* Authors: *
5
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
6
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
7
* *
8
* Copyright (c) 2000-2005, Regents of the University of California *
9
* and Stanford University. All rights reserved. *
10
* *
11
* Redistribution and use in source and binary forms, *
12
* with or without modification, are permitted according to the terms *
13
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
14
*****************************************************************************/
15
16
/// \cond ROOFIT_INTERNAL
17
18
#include "
RooSTLRefCountList.h
"
19
20
#include "
RooLinkedList.h
"
21
#include "
RooLinkedListIter.h
"
22
#include "
RooAbsArg.h
"
23
24
// Template specialisation used in RooAbsArg:
25
26
/// Converts RooLinkedList to RooSTLRefCountList<RooAbsArg>.
27
/// This converter only yields lists with T=RooAbsArg. This is ok because this
28
/// the old RefCountList was only holding these.
29
template
<>
30
RooSTLRefCountList<RooAbsArg>
RooSTLRefCountList<RooAbsArg>::convert
(
const
RooLinkedList
& old) {
31
RooSTLRefCountList<RooAbsArg>
newList
;
32
newList
.reserve(old.
GetSize
());
33
34
for
(
TObject
*
elm
: old) {
35
newList
.Add(
static_cast<
RooAbsArg
*
>
(
elm
), old.
findLink
(
elm
)->
refCount
());
36
}
37
38
return
newList
;
39
}
40
41
/// \endcond
RooAbsArg.h
RooLinkedListIter.h
RooLinkedList.h
RooSTLRefCountList.h
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
RooAbsArg
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Definition
RooAbsArg.h:77
RooLinkedListElem::refCount
Int_t refCount() const
Definition
RooLinkedListElem.h:79
RooLinkedList
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
Definition
RooLinkedList.h:45
RooLinkedList::GetSize
Int_t GetSize() const
Definition
RooLinkedList.h:70
RooLinkedList::findLink
RooLinkedListElem * findLink(const TObject *arg) const
Find the element link containing the given object.
Definition
RooLinkedList.cxx:380
TObject
Mother of all ROOT objects.
Definition
TObject.h:41
roofit
roofitcore
src
RooSTLRefCountList.cxx
ROOT master - Reference Guide Generated on Sun Mar 23 2025 04:31:12 (GVA Time) using Doxygen 1.10.0