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
ClassImp
(
RooSTLRefCountList<RooAbsArg>
);
26
27
/// Converts RooLinkedList to RooSTLRefCountList<RooAbsArg>.
28
/// This converter only yields lists with T=RooAbsArg. This is ok because this
29
/// the old RefCountList was only holding these.
30
template
<>
31
RooSTLRefCountList<RooAbsArg>
RooSTLRefCountList<RooAbsArg>::convert
(
const
RooLinkedList
& old) {
32
RooSTLRefCountList<RooAbsArg>
newList;
33
newList.reserve(old.
GetSize
());
34
35
for
(
TObject
* elm : old) {
36
newList.Add(
static_cast<
RooAbsArg
*
>
(elm), old.
findLink
(elm)->
refCount
());
37
}
38
39
return
newList;
40
}
41
42
/// \endcond
RooAbsArg.h
RooLinkedListIter.h
RooLinkedList.h
RooSTLRefCountList.h
ClassImp
#define ClassImp(name)
Definition
Rtypes.h:382
RooAbsArg
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Definition
RooAbsArg.h:79
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:44
RooLinkedList::GetSize
Int_t GetSize() const
Definition
RooLinkedList.h:69
RooLinkedList::findLink
RooLinkedListElem * findLink(const TObject *arg) const
Find the element link containing the given object.
Definition
RooLinkedList.cxx:383
RooSTLRefCountList
Definition
RooLinkedList.h:33
TObject
Mother of all ROOT objects.
Definition
TObject.h:41
roofit
roofitcore
src
RooSTLRefCountList.cxx
ROOT master - Reference Guide Generated on Wed Oct 9 2024 09:08:40 (GVA Time) using Doxygen 1.9.8