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 "TObject.h"
20 #include "TString.h"
21 #include "RooAbsArg.h"
22 #include "RooPrintable.h"
23 #include "RooCmdArg.h"
24 #include "RooLinkedListIter.h"
25 #include <string>
26 #include <unordered_map>
27 #include <vector>
28 
29 #include "ROOT/RSpan.hxx"
30 
31 class RooCmdArg;
32 
33 class RooAbsCollection : public TObject, public RooPrintable {
34 public:
35  using Storage_t = std::vector<RooAbsArg*>;
36  using const_iterator = Storage_t::const_iterator;
37 
38 
39  // Constructors, assignment etc.
41  RooAbsCollection(const char *name);
42  virtual TObject* clone(const char* newname) const = 0 ;
43  virtual TObject* create(const char* newname) const = 0 ;
44  virtual TObject* Clone(const char* newname=0) const {
45  return clone(newname?newname:GetName()) ;
46  }
47  virtual ~RooAbsCollection();
48 
49  // Create a copy of an existing list. New variables cannot be added
50  // to a copied list. The variables in the copied list are independent
51  // of the original variables.
52  RooAbsCollection(const RooAbsCollection& other, const char *name="");
55  void assignFast(const RooAbsCollection& other, Bool_t setValDirty=kTRUE) ;
56 
57  // Move constructor
59 
60  // Copy list and contents (and optionally 'deep' servers)
61  RooAbsCollection *snapshot(Bool_t deepCopy=kTRUE) const ;
63 
64  /// Set the size at which the collection will automatically start using an extra
65  /// lookup table instead of performing a linear search.
66  void setHashTableSize(Int_t number) {
68  }
69  /// Query the size at which the collection will automatically start using an extra
70  /// lookup table instead of performing a linear search.
73  }
74 
75  /// Const access to the underlying stl container.
76  Storage_t const& get() const { return _list; }
77 
78  // List content management
79  virtual Bool_t add(const RooAbsArg& var, Bool_t silent=kFALSE) ;
80  virtual Bool_t addOwned(RooAbsArg& var, Bool_t silent=kFALSE);
81  virtual RooAbsArg *addClone(const RooAbsArg& var, Bool_t silent=kFALSE) ;
82  virtual Bool_t replace(const RooAbsArg& var1, const RooAbsArg& var2) ;
83  virtual Bool_t remove(const RooAbsArg& var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) ;
84  virtual void removeAll() ;
85 
86  template<typename Iterator_t,
87  typename value_type = typename std::remove_pointer<typename std::iterator_traits<Iterator_t>::value_type>,
88  typename = std::enable_if<std::is_convertible<const value_type*, const RooAbsArg*>::value> >
89  bool add(Iterator_t beginIt, Iterator_t endIt, bool silent=false) {
90  bool result = false ;
91  _list.reserve(_list.size() + std::distance(beginIt, endIt));
92  for (auto it = beginIt; it != endIt; ++it) {
93  result |= add(**it,silent);
94  }
95  return result;
96  }
97  ////////////////////////////////////////////////////////////////////////////////
98  /// Add a collection of arguments to this collection by calling add()
99  /// for each element in the source collection
100  bool add(const RooAbsCollection& list, bool silent=kFALSE) {
101  return add(list._list.begin(), list._list.end(), silent);
102  }
103  virtual Bool_t addOwned(const RooAbsCollection& list, Bool_t silent=kFALSE);
104  virtual void addClone(const RooAbsCollection& list, Bool_t silent=kFALSE);
105  Bool_t replace(const RooAbsCollection &other);
106  Bool_t remove(const RooAbsCollection& list, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) ;
107  template<class forwardIt>
108  void remove(forwardIt rangeBegin, forwardIt rangeEnd, Bool_t silent = kFALSE, Bool_t matchByNameOnly = kFALSE) {
109  for (forwardIt it = rangeBegin; it != rangeEnd; ++it) {
110  static_assert(std::is_same<
111  typename std::iterator_traits<forwardIt>::value_type,
112  RooAbsArg*>::value, "Can only remove lists of RooAbsArg*.");
113  auto castedElm = static_cast<RooAbsArg*>(*it);
114  remove(*castedElm, silent, matchByNameOnly);
115  }
116  }
117 
118  // Utilities functions when used as configuration object
119  Double_t getRealValue(const char* name, Double_t defVal=0, Bool_t verbose=kFALSE) const ;
120  const char* getCatLabel(const char* name, const char* defVal="", Bool_t verbose=kFALSE) const ;
121  Int_t getCatIndex(const char* name, Int_t defVal=0, Bool_t verbose=kFALSE) const ;
122  const char* getStringValue(const char* name, const char* defVal="", Bool_t verbose=kFALSE) const ;
123  Bool_t setRealValue(const char* name, Double_t newVal=0, Bool_t verbose=kFALSE) ;
124  Bool_t setCatLabel(const char* name, const char* newVal="", Bool_t verbose=kFALSE) ;
125  Bool_t setCatIndex(const char* name, Int_t newVal=0, Bool_t verbose=kFALSE) ;
126  Bool_t setStringValue(const char* name, const char* newVal="", Bool_t verbose=kFALSE) ;
127 
128  // Group operations on AbsArgs
129  void setAttribAll(const Text_t* name, Bool_t value=kTRUE) ;
130 
131  // List search methods
132  RooAbsArg *find(const char *name) const ;
133  RooAbsArg *find(const RooAbsArg&) const ;
134 
135  /// Find object by name in the collection
136  TObject* FindObject(const char* name) const { return find(name); }
137 
138  /// Find object in the collection, Note: matching by object name, like the find() method
139  TObject* FindObject(const TObject* obj) const { auto arg = dynamic_cast<const RooAbsArg*>(obj); return (arg) ? find(*arg) : nullptr; }
140 
141  /// Check if collection contains an argument with the same name as var.
142  /// To check for a specific instance, use containsInstance().
143  Bool_t contains(const RooAbsArg& var) const {
144  return find(var) != nullptr;
145  }
146  /// Check if this exact instance is in this collection.
147  Bool_t containsInstance(const RooAbsArg& var) const {
148  return std::find(_list.begin(), _list.end(), &var) != _list.end();
149  }
150  RooAbsCollection* selectByAttrib(const char* name, Bool_t value) const ;
151  bool selectCommon(const RooAbsCollection& refColl, RooAbsCollection& outColl) const ;
152  RooAbsCollection* selectCommon(const RooAbsCollection& refColl) const ;
153  RooAbsCollection* selectByName(const char* nameList, Bool_t verbose=kFALSE) const ;
154  Bool_t equals(const RooAbsCollection& otherColl) const ;
155  bool hasSameLayout(const RooAbsCollection& other) const;
156 
157  template<typename Iterator_t,
158  typename value_type = typename std::remove_pointer<typename std::iterator_traits<Iterator_t>::value_type>,
159  typename = std::enable_if<std::is_convertible<const value_type*, const RooAbsArg*>::value> >
160  bool overlaps(Iterator_t otherCollBegin, Iterator_t otherCollEnd) const {
161  for (auto it = otherCollBegin; it != otherCollEnd; ++it) {
162  if (find(**it)) {
163  return true ;
164  }
165  }
166  return false ;
167  }
168 
169  ////////////////////////////////////////////////////////////////////////////////
170  /// Check if this and other collection have common entries
171  bool overlaps(const RooAbsCollection& otherColl) const {
172  return overlaps(otherColl._list.begin(), otherColl._list.end());
173  }
174 
175  /// TIterator-style iteration over contained elements.
176  /// \note These iterators are slow. Use begin() and end() or
177  /// range-based for loop instead.
179  R__SUGGEST_ALTERNATIVE("begin(), end() and range-based for loops.") {
180  // Create and return an iterator over the elements in this collection
181  return new RooLinkedListIter(makeLegacyIterator(dir));
182  }
183 
184  /// TIterator-style iteration over contained elements.
185  /// \note This iterator is slow. Use begin() and end() or range-based for loop instead.
187  R__SUGGEST_ALTERNATIVE("begin(), end() and range-based for loops.") {
189  }
190 
191  /// One-time forward iterator.
192  /// \note Use begin() and end() or range-based for loop instead.
194  R__SUGGEST_ALTERNATIVE("begin(), end() and range-based for loops.") {
195  return RooFIter(makeLegacyIterator());
196  }
197 
199  return _list.begin();
200  }
201 
202  const_iterator end() const {
203  return _list.end();
204  }
205 
206  Storage_t::const_reverse_iterator rbegin() const {
207  return _list.rbegin();
208  }
209 
210  Storage_t::const_reverse_iterator rend() const {
211  return _list.rend();
212  }
213 
214  Storage_t::size_type size() const {
215  return _list.size();
216  }
217 
218  bool empty() const {
219  return _list.empty();
220  }
221 
222  void reserve(Storage_t::size_type count) {
223  _list.reserve(count);
224  }
225 
226  /// Clear contents. If the collection is owning, it will also delete the contents.
227  void clear() {
228  removeAll();
229  }
230 
231  inline Int_t getSize() const {
232  // Return the number of elements in the collection
233  return _list.size();
234  }
235 
236  inline RooAbsArg *first() const {
237  // Return the first element in this collection
238  return _list.front();
239  }
240 
241  RooAbsArg * operator[](Storage_t::size_type i) const {
242  return _list[i];
243  }
244 
245 
246  /// Returns index of given arg, or -1 if arg is not in the collection.
247  inline Int_t index(const RooAbsArg* arg) const {
248  auto item = std::find(_list.begin(), _list.end(), arg);
249  return item != _list.end() ? item - _list.begin() : -1;
250  }
251 
252  /// Returns index of given arg, or -1 if arg is not in the collection.
253  inline Int_t index(const RooAbsArg& arg) const {
254  return index(&arg);
255  }
256 
257  Int_t index(const char* name) const;
258 
259  inline virtual void Print(Option_t *options= 0) const {
260  // Printing interface (human readable)
262  }
263  std::string contentsString() const ;
264 
265 
266  virtual void printName(std::ostream& os) const ;
267  virtual void printTitle(std::ostream& os) const ;
268  virtual void printClassName(std::ostream& os) const ;
269  virtual void printValue(std::ostream& os) const ;
270  virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
271 
272  virtual Int_t defaultPrintContents(Option_t* opt) const ;
273 
274  // Latex printing methods
275  void printLatex(const RooCmdArg& arg1=RooCmdArg(), const RooCmdArg& arg2=RooCmdArg(),
276  const RooCmdArg& arg3=RooCmdArg(), const RooCmdArg& arg4=RooCmdArg(),
277  const RooCmdArg& arg5=RooCmdArg(), const RooCmdArg& arg6=RooCmdArg(),
278  const RooCmdArg& arg7=RooCmdArg(), const RooCmdArg& arg8=RooCmdArg()) const ;
279  void printLatex(std::ostream& ofs, Int_t ncol, const char* option="NEYU", Int_t sigDigit=1,
280  const RooLinkedList& siblingLists=RooLinkedList(), const RooCmdArg* formatCmd=0) const ;
281 
282  void setName(const char *name) {
283  // Set name of collection
284  _name= name;
285  }
286  const char* GetName() const {
287  // Return namer of collection
288  return _name.Data() ;
289  }
290  Bool_t isOwning() const {
291  // Does collection own contents?
292  return _ownCont ;
293  }
294 
295  Bool_t allInRange(const char* rangeSpec) const ;
296 
297  void dump() const ;
298 
300  void takeOwnership() { _ownCont = kTRUE ; }
301 
302  void sort(Bool_t reverse = false);
303 
304  virtual void RecursiveRemove(TObject *obj);
305 
306  void useHashMapForFind(bool flag) const;
307 
308 protected:
309  Storage_t _list; // Actual object storage
311 
312  Bool_t _ownCont; // Flag to identify a list that owns its contents.
313  TString _name; // Our name.
314  Bool_t _allRRV ; // All contents are RRV
315 
316  void safeDeleteList() ;
317 
318  // Support for snapshot method
320 
323 
324  mutable TNamed* _structureTag{nullptr}; //! Structure tag
325  mutable TNamed* _typedStructureTag{nullptr}; //! Typed structure tag
326 
328 
329  void makeStructureTag() ;
330  void makeTypedStructureTag() ;
331 
332  /// Determine whether it's possible to add a given RooAbsArg to the collection or not.
333  virtual bool canBeAdded(const RooAbsArg& arg, bool silent) const = 0;
334 
335 private:
336  std::unique_ptr<LegacyIterator_t> makeLegacyIterator (bool forward = true) const;
337  mutable std::unique_ptr<std::unordered_map<const TNamed*, Storage_t::value_type>> _nameToItemMap; //!
338  std::size_t _sizeThresholdForMapSearch; //!
339  void insert(RooAbsArg*);
340  RooAbsArg* tryFastFind(const TNamed* namePtr) const;
341 
342  ClassDef(RooAbsCollection,3) // Collection of RooAbsArg objects
343 };
344 
345 #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:1427
RooCmdArg
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
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:1074
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
RooLinkedListIter.h
RooAbsCollection::_typedStructureTag
TNamed * _typedStructureTag
Structure tag.
Definition: RooAbsCollection.h:325
RooAbsCollection::first
RooAbsArg * first() const
Definition: RooAbsCollection.h:236
Option_t
const char Option_t
Definition: RtypesCore.h:66
RooAbsCollection::setStringValue
Bool_t setStringValue(const char *name, const char *newVal="", Bool_t verbose=kFALSE)
Set string value of a RooStringVar stored in set with given name to newVal.
Definition: RooAbsCollection.cxx:1004
TString::Data
const char * Data() const
Definition: TString.h:369
RooAbsCollection::setCatLabel
Bool_t setCatLabel(const char *name, const char *newVal="", Bool_t verbose=kFALSE)
Set state name of a RooAbsCategoryLValue stored in set with given name to newVal.
Definition: RooAbsCollection.cxx:917
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:344
RooAbsCollection::fwdIterator
RooFIter fwdIterator() const
One-time forward iterator.
Definition: RooAbsCollection.h:193
RooAbsCollection::FindObject
TObject * FindObject(const char *name) const
Find object by name in the collection.
Definition: RooAbsCollection.h:136
RooAbsCollection::getCatIndex
Int_t getCatIndex(const char *name, Int_t defVal=0, Bool_t verbose=kFALSE) const
Get index value of a RooAbsCategory stored in set with given name.
Definition: RooAbsCollection.cxx:939
RooAbsCollection::tryFastFind
RooAbsArg * tryFastFind(const TNamed *namePtr) const
Perform a search in a hash map.
Definition: RooAbsCollection.cxx:1503
output
static void output(int code)
Definition: gifencode.c:226
RooAbsArg.h
RooAbsCollection::rend
Storage_t::const_reverse_iterator rend() const
Definition: RooAbsCollection.h:210
RooPrintable.h
RooAbsCollection::setRealValue
Bool_t setRealValue(const char *name, Double_t newVal=0, Bool_t verbose=kFALSE)
Set value of a RooAbsRealLValye stored in set with given name to newVal No error messages are printed...
Definition: RooAbsCollection.cxx:874
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:585
R__SUGGEST_ALTERNATIVE
#define R__SUGGEST_ALTERNATIVE(ALTERNATIVE)
Definition: RConfig.hxx:523
RooAbsCollection::find
RooAbsArg * find(const char *name) const
Find object with given name in list.
Definition: RooAbsCollection.cxx:810
RooAbsCollection::printClassName
virtual void printClassName(std::ostream &os) const
Return collection class name.
Definition: RooAbsCollection.cxx:1061
RooAbsCollection::operator[]
RooAbsArg * operator[](Storage_t::size_type i) const
Definition: RooAbsCollection.h:241
RooAbsCollection::empty
bool empty() const
Definition: RooAbsCollection.h:218
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:1118
RooAbsCollection::canBeAdded
virtual bool canBeAdded(const RooAbsArg &arg, bool silent) const =0
Determine whether it's possible to add a given RooAbsArg to the collection or not.
RooAbsCollection::const_iterator
Storage_t::const_iterator const_iterator
Definition: RooAbsCollection.h:36
RooAbsCollection::makeTypedStructureTag
void makeTypedStructureTag()
Definition: RooAbsCollection.cxx:1419
RooAbsCollection::addServerClonesToList
Bool_t addServerClonesToList(const RooAbsArg &var)
Add clones of servers of given argument to end of list.
Definition: RooAbsCollection.cxx:295
RooAbsCollection::_name
TString _name
Definition: RooAbsCollection.h:313
TString
Basic string class.
Definition: TString.h:136
RooAbsCollection::GetName
const char * GetName() const
Returns name of object.
Definition: RooAbsCollection.h:286
RooPrintable
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
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:1483
RooAbsCollection::printTitle
virtual void printTitle(std::ostream &os) const
Return collection title.
Definition: RooAbsCollection.cxx:1051
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:324
RooAbsCollection::containsInstance
Bool_t containsInstance(const RooAbsArg &var) const
Check if this exact instance is in this collection.
Definition: RooAbsCollection.h:147
bool
TIterator
Iterator abstract base class.
Definition: TIterator.h:30
RooAbsCollection::_sizeThresholdForMapSearch
std::size_t _sizeThresholdForMapSearch
Definition: RooAbsCollection.h:338
RooAbsCollection::iterator
RooLinkedListIter iterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
Definition: RooAbsCollection.h:186
kIterForward
const Bool_t kIterForward
Definition: TCollection.h:40
RooAbsCollection::setName
void setName(const char *name)
Definition: RooAbsCollection.h:282
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:735
RooAbsCollection::_ownCont
Bool_t _ownCont
Definition: RooAbsCollection.h:312
RooAbsCollection::contains
Bool_t contains(const RooAbsArg &var) const
Check if collection contains an argument with the same name as var.
Definition: RooAbsCollection.h:143
RooLinkedListIter
A wrapper around TIterator derivatives.
Definition: RooLinkedListIter.h:204
RooAbsCollection::hasSameLayout
bool hasSameLayout(const RooAbsCollection &other) const
Check that all entries where the collections overlap have the same name.
Definition: RooAbsCollection.cxx:1534
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:71
RooAbsCollection::makeStructureTag
void makeStructureTag()
Definition: RooAbsCollection.cxx:1412
RooAbsCollection::setCatIndex
Bool_t setCatIndex(const char *name, Int_t newVal=0, Bool_t verbose=kFALSE)
Set index value of a RooAbsCategoryLValue stored in set with given name to newVal.
Definition: RooAbsCollection.cxx:960
RooAbsCollection::getRealValue
Double_t getRealValue(const char *name, Double_t defVal=0, Bool_t verbose=kFALSE) const
Get value of a RooAbsReal stored in set with given name.
Definition: RooAbsCollection.cxx:853
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:1153
RooAbsCollection::_structureTag
TNamed * _structureTag
Definition: RooAbsCollection.h:324
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:428
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
RooFIter
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
Definition: RooLinkedListIter.h:40
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
RooAbsCollection::get
Storage_t const & get() const
Const access to the underlying stl container.
Definition: RooAbsCollection.h:76
RooLinkedList
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:37
RooAbsCollection::isOwning
Bool_t isOwning() const
Definition: RooAbsCollection.h:290
RooAbsCollection::createIterator
TIterator * createIterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
Definition: RooAbsCollection.h:178
RooAbsCollection::replace
virtual Bool_t replace(const RooAbsArg &var1, const RooAbsArg &var2)
Replace var1 with var2 and return kTRUE for success.
Definition: RooAbsCollection.cxx:534
RooAbsCollection
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
Definition: RooAbsCollection.h:33
RooAbsCollection::add
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Definition: RooAbsCollection.cxx:455
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:1195
RooAbsCollection::_allRRV
Bool_t _allRRV
Definition: RooAbsCollection.h:314
RooAbsCollection::size
Storage_t::size_type size() const
Definition: RooAbsCollection.h:214
RooAbsCollection::printValue
virtual void printValue(std::ostream &os) const
Print value of collection, i.e.
Definition: RooAbsCollection.cxx:1093
RooAbsCollection::structureTag
TNamed * structureTag()
Definition: RooAbsCollection.h:321
RooAbsCollection::getCatLabel
const char * getCatLabel(const char *name, const char *defVal="", Bool_t verbose=kFALSE) const
Get state name of a RooAbsCategory stored in set with given name.
Definition: RooAbsCollection.cxx:896
RooAbsCollection::overlaps
bool overlaps(Iterator_t otherCollBegin, Iterator_t otherCollEnd) const
Definition: RooAbsCollection.h:160
RooAbsCollection::FindObject
TObject * FindObject(const TObject *obj) const
Find object in the collection, Note: matching by object name, like the find() method.
Definition: RooAbsCollection.h:139
RooAbsCollection::end
const_iterator end() const
Definition: RooAbsCollection.h:202
RooAbsCollection::typedStructureTag
TNamed * typedStructureTag()
Definition: RooAbsCollection.h:322
RooAbsCollection::addOwned
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Definition: RooAbsCollection.cxx:403
RooAbsCollection::releaseOwnership
void releaseOwnership()
Definition: RooAbsCollection.h:299
RooCmdArg.h
RooAbsCollection::~RooAbsCollection
virtual ~RooAbsCollection()
Destructor.
Definition: RooAbsCollection.cxx:140
RooAbsCollection::selectCommon
bool selectCommon(const RooAbsCollection &refColl, RooAbsCollection &outColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
Definition: RooAbsCollection.cxx:702
RooAbsCollection::begin
const_iterator begin() const
Definition: RooAbsCollection.h:198
Double_t
double Double_t
Definition: RtypesCore.h:59
RooAbsCollection::getStringValue
const char * getStringValue(const char *name, const char *defVal="", Bool_t verbose=kFALSE) const
Get string value of a RooStringVar stored in set with given name.
Definition: RooAbsCollection.cxx:982
TObject.h
RooAbsCollection::equals
Bool_t equals(const RooAbsCollection &otherColl) const
Check if this and other collection have identically-named contents.
Definition: RooAbsCollection.cxx:775
RooAbsCollection::rbegin
Storage_t::const_reverse_iterator rbegin() const
Definition: RooAbsCollection.h:206
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
Mother of all ROOT objects.
Definition: TObject.h:37
RooAbsCollection::remove
void remove(forwardIt rangeBegin, forwardIt rangeEnd, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Definition: RooAbsCollection.h:108
RooAbsCollection::overlaps
bool overlaps(const RooAbsCollection &otherColl) const
Check if this and other collection have common entries.
Definition: RooAbsCollection.h:171
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:44
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:337
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:66
RooAbsArg
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition: RooAbsArg.h:72
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:259
RooAbsCollection::safeDeleteList
void safeDeleteList()
Examine client server dependencies in list and delete contents in safe order: any client is deleted b...
Definition: RooAbsCollection.cxx:154
Text_t
char Text_t
Definition: RtypesCore.h:62
RSpan.hxx
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:1366
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:644
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:253
for
for(Int_t i=0;i< n;i++)
Definition: legend1.C:18
RooAbsCollection::Storage_t
std::vector< RooAbsArg * > Storage_t
Definition: RooAbsCollection.h:35
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:678
RooAbsCollection::takeOwnership
void takeOwnership()
Definition: RooAbsCollection.h:300
RooAbsCollection::printName
virtual void printName(std::ostream &os) const
Return collection name.
Definition: RooAbsCollection.cxx:1041
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:1458
RooAbsCollection::reserve
void reserve(Storage_t::size_type count)
Definition: RooAbsCollection.h:222
RooAbsCollection::sort
void sort(Bool_t reverse=false)
Sort collection using std::sort and name comparison.
Definition: RooAbsCollection.cxx:1435
RooAbsCollection::insert
void insert(RooAbsArg *)
Insert an element into the owned collections.
Definition: RooAbsCollection.cxx:1468
RooAbsCollection::getSize
Int_t getSize() const
Definition: RooAbsCollection.h:231
RooAbsCollection::_list
Storage_t _list
Definition: RooAbsCollection.h:309
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:247
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:370
RooAbsCollection::snapshot
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents.
Definition: RooAbsCollection.cxx:215
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:663
RooAbsCollection::clear
void clear()
Clear contents. If the collection is owning, it will also delete the contents.
Definition: RooAbsCollection.h:227
int
RooAbsCollection::contentsString
std::string contentsString() const
Return comma separated list of contained object names as STL string.
Definition: RooAbsCollection.cxx:1023
RooAbsCollection::clearStructureTags
void clearStructureTags()
Typed structure tag.
Definition: RooAbsCollection.h:327