Logo ROOT  
Reference Guide
RooAbsCollection.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooAbsCollection.h,v 1.26 2007/08/09 19:55:47 wouter Exp $
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 #ifndef ROO_ABS_COLLECTION
17 #define ROO_ABS_COLLECTION
18 
19 #include "TString.h"
20 #include "RooAbsArg.h"
21 #include "RooPrintable.h"
22 #include "RooCmdArg.h"
23 #include "RooLinkedListIter.h"
24 #include <string>
25 #include <unordered_map>
26 #include <vector>
27 
28 class RooCmdArg;
29 
30 class RooAbsCollection : public TObject, public RooPrintable {
31 public:
32  using Storage_t = std::vector<RooAbsArg*>;
33  using const_iterator = Storage_t::const_iterator;
34 
35 
36  // Constructors, assignment etc.
38  RooAbsCollection(const char *name);
39  virtual TObject* clone(const char* newname) const = 0 ;
40  virtual TObject* create(const char* newname) const = 0 ;
41  virtual TObject* Clone(const char* newname=0) const {
42  return clone(newname?newname:GetName()) ;
43  }
44  virtual ~RooAbsCollection();
45 
46  // Create a copy of an existing list. New variables cannot be added
47  // to a copied list. The variables in the copied list are independent
48  // of the original variables.
49  RooAbsCollection(const RooAbsCollection& other, const char *name="");
52  void assignFast(const RooAbsCollection& other, Bool_t setValDirty=kTRUE) ;
53 
54  // Copy list and contents (and optionally 'deep' servers)
55  RooAbsCollection *snapshot(Bool_t deepCopy=kTRUE) const ;
57 
58  /// Set the size at which the collection will automatically start using an extra
59  /// lookup table instead of performing a linear search.
60  void setHashTableSize(Int_t number) {
62  }
63  /// Query the size at which the collection will automatically start using an extra
64  /// lookup table instead of performing a linear search.
67  }
68 
69  // List content management
70  virtual Bool_t add(const RooAbsArg& var, Bool_t silent=kFALSE) ;
71  virtual Bool_t addOwned(RooAbsArg& var, Bool_t silent=kFALSE);
72  virtual RooAbsArg *addClone(const RooAbsArg& var, Bool_t silent=kFALSE) ;
73  virtual Bool_t replace(const RooAbsArg& var1, const RooAbsArg& var2) ;
74  virtual Bool_t remove(const RooAbsArg& var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) ;
75  virtual void removeAll() ;
76 
77  virtual Bool_t add(const RooAbsCollection& list, Bool_t silent=kFALSE) ;
78  virtual Bool_t addOwned(const RooAbsCollection& list, Bool_t silent=kFALSE);
79  virtual void addClone(const RooAbsCollection& list, Bool_t silent=kFALSE);
80  Bool_t replace(const RooAbsCollection &other);
81  Bool_t remove(const RooAbsCollection& list, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) ;
82  template<class forwardIt>
83  void remove(forwardIt rangeBegin, forwardIt rangeEnd, Bool_t silent = kFALSE, Bool_t matchByNameOnly = kFALSE) {
84  for (forwardIt it = rangeBegin; it != rangeEnd; ++it) {
85  static_assert(std::is_same<
86  typename std::iterator_traits<forwardIt>::value_type,
87  RooAbsArg*>::value, "Can only remove lists of RooAbsArg*.");
88  auto castedElm = static_cast<RooAbsArg*>(*it);
89  remove(*castedElm, silent, matchByNameOnly);
90  }
91  }
92 
93  // Group operations on AbsArgs
94  void setAttribAll(const Text_t* name, Bool_t value=kTRUE) ;
95 
96  // List search methods
97  RooAbsArg *find(const char *name) const ;
98  RooAbsArg *find(const RooAbsArg&) const ;
99 
100  /// Check if collection contains an argument with the same name as var.
101  /// To check for a specific instance, use containsInstance().
102  Bool_t contains(const RooAbsArg& var) const {
103  return find(var) != nullptr;
104  }
105  /// Check if this exact instance is in this collection.
106  Bool_t containsInstance(const RooAbsArg& var) const {
107  return std::find(_list.begin(), _list.end(), &var) != _list.end();
108  }
109  RooAbsCollection* selectByAttrib(const char* name, Bool_t value) const ;
110  RooAbsCollection* selectCommon(const RooAbsCollection& refColl) const ;
111  RooAbsCollection* selectByName(const char* nameList, Bool_t verbose=kFALSE) const ;
112  Bool_t equals(const RooAbsCollection& otherColl) const ;
113  Bool_t overlaps(const RooAbsCollection& otherColl) const ;
114 
115  /// TIterator-style iteration over contained elements.
116  /// \note These iterators are slow. Use begin() and end() or
117  /// range-based for loop instead.
119  R__SUGGEST_ALTERNATIVE("begin(), end() and range-based for loops.") {
120  // Create and return an iterator over the elements in this collection
121  return new RooLinkedListIter(makeLegacyIterator(dir));
122  }
123 
124  /// TIterator-style iteration over contained elements.
125  /// \note This iterator is slow. Use begin() and end() or range-based for loop instead.
127  R__SUGGEST_ALTERNATIVE("begin(), end() and range-based for loops.") {
129  }
130 
131  /// One-time forward iterator.
132  /// \note Use begin() and end() or range-based for loop instead.
134  R__SUGGEST_ALTERNATIVE("begin(), end() and range-based for loops.") {
135  return RooFIter(makeLegacyIterator());
136  }
137 
139  return _list.begin();
140  }
141 
142  const_iterator end() const {
143  return _list.end();
144  }
145 
146  Storage_t::const_reverse_iterator rbegin() const {
147  return _list.rbegin();
148  }
149 
150  Storage_t::const_reverse_iterator rend() const {
151  return _list.rend();
152  }
153 
154  Storage_t::size_type size() const {
155  return _list.size();
156  }
157 
158  bool empty() const {
159  return _list.empty();
160  }
161 
162  void reserve(Storage_t::size_type count) {
163  _list.reserve(count);
164  }
165 
166  /// Clear contents. If the collection is owning, it will also delete the contents.
167  void clear() {
168  removeAll();
169  }
170 
171  inline Int_t getSize() const {
172  // Return the number of elements in the collection
173  return _list.size();
174  }
175 
176  inline RooAbsArg *first() const {
177  // Return the first element in this collection
178  return _list.front();
179  }
180 
181  RooAbsArg * operator[](Storage_t::size_type i) const {
182  return _list[i];
183  }
184 
185 
186  /// Returns index of given arg, or -1 if arg is not in the collection.
187  inline Int_t index(const RooAbsArg* arg) const {
188  auto item = std::find(_list.begin(), _list.end(), arg);
189  return item != _list.end() ? item - _list.begin() : -1;
190  }
191 
192  /// Returns index of given arg, or -1 if arg is not in the collection.
193  inline Int_t index(const RooAbsArg& arg) const {
194  return index(&arg);
195  }
196 
197  Int_t index(const char* name) const;
198 
199  inline virtual void Print(Option_t *options= 0) const {
200  // Printing interface (human readable)
202  }
203  std::string contentsString() const ;
204 
205 
206  virtual void printName(std::ostream& os) const ;
207  virtual void printTitle(std::ostream& os) const ;
208  virtual void printClassName(std::ostream& os) const ;
209  virtual void printValue(std::ostream& os) const ;
210  virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
211 
212  virtual Int_t defaultPrintContents(Option_t* opt) const ;
213 
214  // Latex printing methods
215  void printLatex(const RooCmdArg& arg1=RooCmdArg(), const RooCmdArg& arg2=RooCmdArg(),
216  const RooCmdArg& arg3=RooCmdArg(), const RooCmdArg& arg4=RooCmdArg(),
217  const RooCmdArg& arg5=RooCmdArg(), const RooCmdArg& arg6=RooCmdArg(),
218  const RooCmdArg& arg7=RooCmdArg(), const RooCmdArg& arg8=RooCmdArg()) const ;
219  void printLatex(std::ostream& ofs, Int_t ncol, const char* option="NEYU", Int_t sigDigit=1,
220  const RooLinkedList& siblingLists=RooLinkedList(), const RooCmdArg* formatCmd=0) const ;
221 
222  void setName(const char *name) {
223  // Set name of collection
224  _name= name;
225  }
226  const char* GetName() const {
227  // Return namer of collection
228  return _name.Data() ;
229  }
230  Bool_t isOwning() const {
231  // Does collection own contents?
232  return _ownCont ;
233  }
234 
235  Bool_t allInRange(const char* rangeSpec) const ;
236 
237  void dump() const ;
238 
240  void takeOwnership() { _ownCont = kTRUE ; }
241 
242  void sort(Bool_t reverse = false);
243 
244  virtual void RecursiveRemove(TObject *obj);
245 
246  void useHashMapForFind(bool flag) const;
247 
248 protected:
249  Storage_t _list; // Actual object storage
251 
252  Bool_t _ownCont; // Flag to identify a list that owns its contents.
253  TString _name; // Our name.
254  Bool_t _allRRV ; // All contents are RRV
255 
256  void safeDeleteList() ;
257 
258  // Support for snapshot method
260 
263 
264  mutable TNamed* _structureTag{nullptr}; //! Structure tag
265  mutable TNamed* _typedStructureTag{nullptr}; //! Typed structure tag
266 
268 
269  void makeStructureTag() ;
270  void makeTypedStructureTag() ;
271 
272 private:
273  std::unique_ptr<LegacyIterator_t> makeLegacyIterator (bool forward = true) const;
274  mutable std::unique_ptr<std::unordered_map<const TNamed*, Storage_t::value_type>> _nameToItemMap; //!
275  std::size_t _sizeThresholdForMapSearch; //!
276  void insert(RooAbsArg*);
277  RooAbsArg* tryFastFind(const TNamed* namePtr) const;
278 
279  ClassDef(RooAbsCollection,3) // Collection of RooAbsArg objects
280 };
281 
282 #endif
RooAbsCollection::RecursiveRemove
virtual void RecursiveRemove(TObject *obj)
If one of the TObject we have a referenced to is deleted, remove the reference.
Definition: RooAbsCollection.cxx:1258
RooCmdArg
Definition: RooCmdArg.h:27
RooAbsCollection::defaultPrintContents
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default RooPrinable print options for given Print() flag string For inline printing only show ...
Definition: RooAbsCollection.cxx:905
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooLinkedListIter.h
RooAbsCollection::_typedStructureTag
TNamed * _typedStructureTag
Structure tag.
Definition: RooAbsCollection.h:265
RooAbsCollection::first
RooAbsArg * first() const
Definition: RooAbsCollection.h:176
TString::Data
const char * Data() const
Definition: TString.h:369
RooAbsCollection::assignValueOnly
RooAbsCollection & assignValueOnly(const RooAbsCollection &other, Bool_t oneSafe=kFALSE)
The assignment operator sets the value of any argument in our set that also appears in the other set.
Definition: RooAbsCollection.cxx:330
RooAbsCollection::fwdIterator
RooFIter fwdIterator() const
One-time forward iterator.
Definition: RooAbsCollection.h:133
RooAbsCollection::tryFastFind
RooAbsArg * tryFastFind(const TNamed *namePtr) const
Perform a search in a hash map.
Definition: RooAbsCollection.cxx:1334
output
static void output(int code)
Definition: gifencode.c:226
RooAbsArg.h
RooAbsCollection::rend
Storage_t::const_reverse_iterator rend() const
Definition: RooAbsCollection.h:150
RooPrintable.h
RooAbsCollection::remove
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
Definition: RooAbsCollection.cxx:584
R__SUGGEST_ALTERNATIVE
#define R__SUGGEST_ALTERNATIVE(ALTERNATIVE)
Definition: RConfig.hxx:530
RooAbsCollection::find
RooAbsArg * find(const char *name) const
Find object with given name in list.
Definition: RooAbsCollection.cxx:813
RooAbsCollection::printClassName
virtual void printClassName(std::ostream &os) const
Return collection class name.
Definition: RooAbsCollection.cxx:892
RooAbsCollection::operator[]
RooAbsArg * operator[](Storage_t::size_type i) const
Definition: RooAbsCollection.h:181
RooAbsCollection::empty
bool empty() const
Definition: RooAbsCollection.h:158
indent
static void indent(ostringstream &buf, int indent_level)
Definition: TClingCallFunc.cxx:87
RooAbsCollection::printMultiline
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Implement multiline printing of collection, one line for each contained object showing the requested ...
Definition: RooAbsCollection.cxx:949
RooAbsCollection::const_iterator
Storage_t::const_iterator const_iterator
Definition: RooAbsCollection.h:33
RooAbsCollection::makeTypedStructureTag
void makeTypedStructureTag()
Definition: RooAbsCollection.cxx:1250
RooAbsCollection::addServerClonesToList
Bool_t addServerClonesToList(const RooAbsArg &var)
Add clones of servers of given argument to end of list.
Definition: RooAbsCollection.cxx:281
RooAbsCollection::_name
TString _name
Definition: RooAbsCollection.h:253
TString
Definition: TString.h:136
RooAbsCollection::GetName
const char * GetName() const
Returns name of object.
Definition: RooAbsCollection.h:226
RooPrintable
Definition: RooPrintable.h:25
TString.h
RooAbsCollection::useHashMapForFind
void useHashMapForFind(bool flag) const
Install an internal hash map for fast finding of elements by name.
Definition: RooAbsCollection.cxx:1314
RooAbsCollection::printTitle
virtual void printTitle(std::ostream &os) const
Return collection title.
Definition: RooAbsCollection.cxx:882
RooAbsCollection::operator=
RooAbsCollection & operator=(const RooAbsCollection &other)
The assignment operator sets the value of any argument in our set that also appears in the other set.
Definition: RooAbsCollection.cxx:310
RooAbsCollection::containsInstance
Bool_t containsInstance(const RooAbsArg &var) const
Check if this exact instance is in this collection.
Definition: RooAbsCollection.h:106
bool
TIterator
Definition: TIterator.h:30
RooAbsCollection::_sizeThresholdForMapSearch
std::size_t _sizeThresholdForMapSearch
Definition: RooAbsCollection.h:275
RooAbsCollection::iterator
RooLinkedListIter iterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
Definition: RooAbsCollection.h:126
kIterForward
const Bool_t kIterForward
Definition: TCollection.h:40
RooAbsCollection::setName
void setName(const char *name)
Definition: RooAbsCollection.h:222
RooAbsCollection::selectByName
RooAbsCollection * selectByName(const char *nameList, Bool_t verbose=kFALSE) const
Create a subset of the current collection, consisting only of those elements with names matching the ...
Definition: RooAbsCollection.cxx:723
RooAbsCollection::_ownCont
Bool_t _ownCont
Definition: RooAbsCollection.h:252
RooAbsCollection::contains
Bool_t contains(const RooAbsArg &var) const
Check if collection contains an argument with the same name as var.
Definition: RooAbsCollection.h:102
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
RooLinkedListIter
A wrapper around TIterator derivatives.
Definition: RooLinkedListIter.h:204
RooAbsCollection::getHashTableSize
Int_t getHashTableSize() const
Query the size at which the collection will automatically start using an extra lookup table instead o...
Definition: RooAbsCollection.h:65
RooAbsCollection::makeStructureTag
void makeStructureTag()
Definition: RooAbsCollection.cxx:1243
RooAbsCollection::create
virtual TObject * create(const char *newname) const =0
RooAbsCollection::RooAbsCollection
RooAbsCollection()
Default constructor.
Definition: RooAbsCollection.cxx:70
RooAbsCollection::dump
void dump() const
Base contents dumper for debugging purposes.
Definition: RooAbsCollection.cxx:984
RooAbsCollection::_structureTag
TNamed * _structureTag
Definition: RooAbsCollection.h:264
RooPrintable::defaultPrintStream
static std::ostream & defaultPrintStream(std::ostream *os=0)
Return a reference to the current default stream to use in Print().
Definition: RooPrintable.cxx:272
RooAbsCollection::addClone
virtual RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE)
Add a clone of the specified argument to list.
Definition: RooAbsCollection.cxx:412
TNamed
Definition: TNamed.h:29
RooFIter
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
Definition: RooLinkedListIter.h:39
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooAbsCollection::selectCommon
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
Definition: RooAbsCollection.cxx:700
RooLinkedList
Definition: RooLinkedList.h:35
RooAbsCollection::isOwning
Bool_t isOwning() const
Definition: RooAbsCollection.h:230
RooAbsCollection::createIterator
TIterator * createIterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
Definition: RooAbsCollection.h:118
RooAbsCollection::replace
virtual Bool_t replace(const RooAbsArg &var1, const RooAbsArg &var2)
Replace var1 with var2 and return kTRUE for success.
Definition: RooAbsCollection.cxx:533
RooAbsCollection
Definition: RooAbsCollection.h:30
RooAbsCollection::add
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Definition: RooAbsCollection.cxx:437
RooAbsCollection::printLatex
void printLatex(const RooCmdArg &arg1=RooCmdArg(), const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg()) const
Output content of collection as LaTex table.
Definition: RooAbsCollection.cxx:1026
RooAbsCollection::_allRRV
Bool_t _allRRV
Definition: RooAbsCollection.h:254
RooAbsCollection::size
Storage_t::size_type size() const
Definition: RooAbsCollection.h:154
RooAbsCollection::printValue
virtual void printValue(std::ostream &os) const
Print value of collection, i.e.
Definition: RooAbsCollection.cxx:924
RooAbsCollection::structureTag
TNamed * structureTag()
Definition: RooAbsCollection.h:261
RooAbsCollection::end
const_iterator end() const
Definition: RooAbsCollection.h:142
RooAbsCollection::typedStructureTag
TNamed * typedStructureTag()
Definition: RooAbsCollection.h:262
RooAbsCollection::addOwned
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Definition: RooAbsCollection.cxx:389
RooAbsCollection::releaseOwnership
void releaseOwnership()
Definition: RooAbsCollection.h:239
RooCmdArg.h
RooAbsCollection::~RooAbsCollection
virtual ~RooAbsCollection()
Destructor.
Definition: RooAbsCollection.cxx:126
RooAbsCollection::begin
const_iterator begin() const
Definition: RooAbsCollection.h:138
RooAbsCollection::equals
Bool_t equals(const RooAbsCollection &otherColl) const
Check if this and other collection have identically-named contents.
Definition: RooAbsCollection.cxx:763
RooAbsCollection::rbegin
Storage_t::const_reverse_iterator rbegin() const
Definition: RooAbsCollection.h:146
TMVA::DNN::forward
void forward(const LAYERDATA &prevLayerData, LAYERDATA &currLayerData)
apply the weights (and functions) in forward direction of the DNN
Definition: NeuralNet.icc:546
TObject
Definition: TObject.h:37
RooAbsCollection::remove
void remove(forwardIt rangeBegin, forwardIt rangeEnd, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Definition: RooAbsCollection.h:83
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooAbsCollection::Clone
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
Definition: RooAbsCollection.h:41
name
char name[80]
Definition: TGX11.cxx:110
RooPrintable::printStream
virtual void printStream(std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
Print description of object on ostream, printing contents set by contents integer,...
Definition: RooPrintable.cxx:75
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooAbsCollection::_nameToItemMap
std::unique_ptr< std::unordered_map< const TNamed *, Storage_t::value_type > > _nameToItemMap
Definition: RooAbsCollection.h:274
RooAbsCollection::setHashTableSize
void setHashTableSize(Int_t number)
Set the size at which the collection will automatically start using an extra lookup table instead of ...
Definition: RooAbsCollection.h:60
RooAbsArg
Definition: RooAbsArg.h:73
RooAbsCollection::Print
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
Definition: RooAbsCollection.h:199
RooAbsCollection::safeDeleteList
void safeDeleteList()
Examine client server dependencies in list and delete contents in safe order: any client is deleted b...
Definition: RooAbsCollection.cxx:140
Text_t
char Text_t
Definition: RtypesCore.h:62
RooAbsCollection::allInRange
Bool_t allInRange(const char *rangeSpec) const
Return true if all contained object report to have their value inside the specified range.
Definition: RooAbsCollection.cxx:1197
RooPrintable::defaultPrintStyle
virtual StyleOption defaultPrintStyle(Option_t *opt) const
Definition: RooPrintable.cxx:241
RooAbsCollection::removeAll
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
Definition: RooAbsCollection.cxx:643
RooAbsCollection::index
Int_t index(const RooAbsArg &arg) const
Returns index of given arg, or -1 if arg is not in the collection.
Definition: RooAbsCollection.h:193
RooAbsCollection::overlaps
Bool_t overlaps(const RooAbsCollection &otherColl) const
Check if this and other collection have common entries.
Definition: RooAbsCollection.cxx:784
for
for(Int_t i=0;i< n;i++)
Definition: legend1.C:18
RooAbsCollection::Storage_t
std::vector< RooAbsArg * > Storage_t
Definition: RooAbsCollection.h:32
RooAbsCollection::selectByAttrib
RooAbsCollection * selectByAttrib(const char *name, Bool_t value) const
Create a subset of the current collection, consisting only of those elements with the specified attri...
Definition: RooAbsCollection.cxx:677
RooAbsCollection::takeOwnership
void takeOwnership()
Definition: RooAbsCollection.h:240
RooAbsCollection::printName
virtual void printName(std::ostream &os) const
Return collection name.
Definition: RooAbsCollection.cxx:872
TIteratorToSTLInterface
TIterator and GenericRooFIter front end with STL back end.
Definition: RooLinkedListIter.h:98
RooAbsCollection::makeLegacyIterator
std::unique_ptr< LegacyIterator_t > makeLegacyIterator(bool forward=true) const
Factory for legacy iterators.
Definition: RooAbsCollection.cxx:1289
RooAbsCollection::reserve
void reserve(Storage_t::size_type count)
Definition: RooAbsCollection.h:162
RooAbsCollection::sort
void sort(Bool_t reverse=false)
Sort collection using std::sort and name comparison.
Definition: RooAbsCollection.cxx:1266
RooAbsCollection::insert
void insert(RooAbsArg *)
Insert an element into the owned collections.
Definition: RooAbsCollection.cxx:1299
RooAbsCollection::getSize
Int_t getSize() const
Definition: RooAbsCollection.h:171
RooAbsCollection::_list
Storage_t _list
Definition: RooAbsCollection.h:249
RooAbsCollection::index
Int_t index(const RooAbsArg *arg) const
Returns index of given arg, or -1 if arg is not in the collection.
Definition: RooAbsCollection.h:187
RooAbsCollection::assignFast
void assignFast(const RooAbsCollection &other, Bool_t setValDirty=kTRUE)
Functional equivalent of operator=() but assumes this and other collection have same layout.
Definition: RooAbsCollection.cxx:356
RooAbsCollection::snapshot
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents.
Definition: RooAbsCollection.cxx:201
RooAbsCollection::clone
virtual TObject * clone(const char *newname) const =0
RooAbsCollection::setAttribAll
void setAttribAll(const Text_t *name, Bool_t value=kTRUE)
Set given attribute in each element of the collection by calling each elements setAttribute() functio...
Definition: RooAbsCollection.cxx:662
RooAbsCollection::clear
void clear()
Clear contents. If the collection is owning, it will also delete the contents.
Definition: RooAbsCollection.h:167
int
RooAbsCollection::contentsString
std::string contentsString() const
Return comma separated list of contained object names as STL string.
Definition: RooAbsCollection.cxx:854
RooAbsCollection::clearStructureTags
void clearStructureTags()
Typed structure tag.
Definition: RooAbsCollection.h:267