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
26// The range casts are not used in this file, but if you want to work with
27// RooFit collections you also want to have static_range_cast and
28// dynamic_range_cast available without including RangeCast.h every time.
29#include "ROOT/RRangeCast.hxx"
30
31#include "ROOT/RSpan.hxx"
32
33#include <string>
34#include <unordered_map>
35#include <vector>
36#include <type_traits>
37
38
39// To make ROOT::RangeStaticCast available under the name static_range_cast.
40template <typename T, typename Range_t>
42{
43 return ROOT::RangeStaticCast<T>(std::forward<Range_t>(coll));
44}
45
46
47// To make ROOT::RangeDynCast available under the dynamic_range_cast.
48template <typename T, typename Range_t>
50{
51 return ROOT::RangeDynCast<T>(std::forward<Range_t>(coll));
52}
53
54
55class RooCmdArg;
56
57class RooAbsCollection : public TObject, public RooPrintable {
58public:
59 using Storage_t = std::vector<RooAbsArg*>;
60 using const_iterator = Storage_t::const_iterator;
61
62
63 // Constructors, assignment etc.
65 RooAbsCollection(const char *name);
66 virtual TObject* clone(const char* newname) const = 0 ;
67 virtual TObject* create(const char* newname) const = 0 ;
68 virtual TObject* Clone(const char* newname=0) const {
69 return clone(newname?newname:GetName()) ;
70 }
71 virtual ~RooAbsCollection();
72
73 // Create a copy of an existing list. New variables cannot be added
74 // to a copied list. The variables in the copied list are independent
75 // of the original variables.
76 RooAbsCollection(const RooAbsCollection& other, const char *name="");
78
79 void assign(const RooAbsCollection& other);
80 RooAbsCollection &assignValueOnly(const RooAbsCollection& other, bool forceIfSizeOne=false);
81 void assignFast(const RooAbsCollection& other, bool setValDirty=true) ;
82
83 // Move constructor
85
86 // Copy list and contents (and optionally 'deep' servers)
87 RooAbsCollection *snapshot(Bool_t deepCopy=kTRUE) const ;
89
90 /// Set the size at which the collection will automatically start using an extra
91 /// lookup table instead of performing a linear search.
92 void setHashTableSize(Int_t number) {
94 }
95 /// Query the size at which the collection will automatically start using an extra
96 /// lookup table instead of performing a linear search.
99 }
100
101 /// Const access to the underlying stl container.
102 Storage_t const& get() const { return _list; }
103
104 // List content management
105 virtual Bool_t add(const RooAbsArg& var, Bool_t silent=kFALSE) ;
106 virtual Bool_t addOwned(RooAbsArg& var, Bool_t silent=kFALSE);
107 virtual RooAbsArg *addClone(const RooAbsArg& var, Bool_t silent=kFALSE) ;
108 virtual Bool_t replace(const RooAbsArg& var1, const RooAbsArg& var2) ;
109 virtual Bool_t remove(const RooAbsArg& var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) ;
110 virtual void removeAll() ;
111
112 template<typename Iterator_t,
113 typename value_type = typename std::remove_pointer<typename std::iterator_traits<Iterator_t>::value_type>,
114 typename = std::enable_if<std::is_convertible<const value_type*, const RooAbsArg*>::value> >
115 bool add(Iterator_t beginIt, Iterator_t endIt, bool silent=false) {
116 bool result = false ;
117 _list.reserve(_list.size() + std::distance(beginIt, endIt));
118 for (auto it = beginIt; it != endIt; ++it) {
119 result |= add(**it,silent);
120 }
121 return result;
122 }
123 ////////////////////////////////////////////////////////////////////////////////
124 /// Add a collection of arguments to this collection by calling add()
125 /// for each element in the source collection
126 bool add(const RooAbsCollection& list, bool silent=kFALSE) {
127 return add(list._list.begin(), list._list.end(), silent);
128 }
129 virtual Bool_t addOwned(const RooAbsCollection& list, Bool_t silent=kFALSE);
130 virtual void addClone(const RooAbsCollection& list, Bool_t silent=kFALSE);
131 Bool_t replace(const RooAbsCollection &other);
132 Bool_t remove(const RooAbsCollection& list, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) ;
133 template<class forwardIt>
134 void remove(forwardIt rangeBegin, forwardIt rangeEnd, Bool_t silent = kFALSE, Bool_t matchByNameOnly = kFALSE) {
135 for (forwardIt it = rangeBegin; it != rangeEnd; ++it) {
136 static_assert(std::is_same<
137 typename std::iterator_traits<forwardIt>::value_type,
138 RooAbsArg*>::value, "Can only remove lists of RooAbsArg*.");
139 auto castedElm = static_cast<RooAbsArg*>(*it);
140 remove(*castedElm, silent, matchByNameOnly);
141 }
142 }
143
144 // Utilities functions when used as configuration object
145 Double_t getRealValue(const char* name, Double_t defVal=0, Bool_t verbose=kFALSE) const ;
146 const char* getCatLabel(const char* name, const char* defVal="", Bool_t verbose=kFALSE) const ;
147 Int_t getCatIndex(const char* name, Int_t defVal=0, Bool_t verbose=kFALSE) const ;
148 const char* getStringValue(const char* name, const char* defVal="", Bool_t verbose=kFALSE) const ;
149 Bool_t setRealValue(const char* name, Double_t newVal=0, Bool_t verbose=kFALSE) ;
150 Bool_t setCatLabel(const char* name, const char* newVal="", Bool_t verbose=kFALSE) ;
151 Bool_t setCatIndex(const char* name, Int_t newVal=0, Bool_t verbose=kFALSE) ;
152 Bool_t setStringValue(const char* name, const char* newVal="", Bool_t verbose=kFALSE) ;
153
154 // Group operations on AbsArgs
155 void setAttribAll(const Text_t* name, Bool_t value=kTRUE) ;
156
157 // List search methods
158 RooAbsArg *find(const char *name) const ;
159 RooAbsArg *find(const RooAbsArg&) const ;
160
161 /// Find object by name in the collection
162 TObject* FindObject(const char* name) const { return find(name); }
163
164 /// Find object in the collection, Note: matching by object name, like the find() method
165 TObject* FindObject(const TObject* obj) const { auto arg = dynamic_cast<const RooAbsArg*>(obj); return (arg) ? find(*arg) : nullptr; }
166
167 /// Check if collection contains an argument with the same name as var.
168 /// To check for a specific instance, use containsInstance().
169 Bool_t contains(const RooAbsArg& var) const {
170 return find(var) != nullptr;
171 }
172 /// Check if this exact instance is in this collection.
173 Bool_t containsInstance(const RooAbsArg& var) const {
174 return std::find(_list.begin(), _list.end(), &var) != _list.end();
175 }
176 RooAbsCollection* selectByAttrib(const char* name, Bool_t value) const ;
177 bool selectCommon(const RooAbsCollection& refColl, RooAbsCollection& outColl) const ;
178 RooAbsCollection* selectCommon(const RooAbsCollection& refColl) const ;
179 RooAbsCollection* selectByName(const char* nameList, Bool_t verbose=kFALSE) const ;
180 Bool_t equals(const RooAbsCollection& otherColl) const ;
181 bool hasSameLayout(const RooAbsCollection& other) const;
182
183 template<typename Iterator_t,
184 typename value_type = typename std::remove_pointer<typename std::iterator_traits<Iterator_t>::value_type>,
185 typename = std::enable_if<std::is_convertible<const value_type*, const RooAbsArg*>::value> >
186 bool overlaps(Iterator_t otherCollBegin, Iterator_t otherCollEnd) const {
187 for (auto it = otherCollBegin; it != otherCollEnd; ++it) {
188 if (find(**it)) {
189 return true ;
190 }
191 }
192 return false ;
193 }
194
195 ////////////////////////////////////////////////////////////////////////////////
196 /// Check if this and other collection have common entries
197 bool overlaps(const RooAbsCollection& otherColl) const {
198 return overlaps(otherColl._list.begin(), otherColl._list.end());
199 }
200
201 /// TIterator-style iteration over contained elements.
202 /// \note These iterators are slow. Use begin() and end() or
203 /// range-based for loop instead.
205 R__SUGGEST_ALTERNATIVE("begin(), end() and range-based for loops.") {
206 // Create and return an iterator over the elements in this collection
207 return new RooLinkedListIter(makeLegacyIterator(dir));
208 }
209
210 /// TIterator-style iteration over contained elements.
211 /// \note This iterator is slow. Use begin() and end() or range-based for loop instead.
213 R__SUGGEST_ALTERNATIVE("begin(), end() and range-based for loops.") {
215 }
216
217 /// One-time forward iterator.
218 /// \note Use begin() and end() or range-based for loop instead.
220 R__SUGGEST_ALTERNATIVE("begin(), end() and range-based for loops.") {
222 }
223
225 return _list.begin();
226 }
227
229 return _list.end();
230 }
231
232 Storage_t::const_reverse_iterator rbegin() const {
233 return _list.rbegin();
234 }
235
236 Storage_t::const_reverse_iterator rend() const {
237 return _list.rend();
238 }
239
240 Storage_t::size_type size() const {
241 return _list.size();
242 }
243
244 bool empty() const {
245 return _list.empty();
246 }
247
248 void reserve(Storage_t::size_type count) {
249 _list.reserve(count);
250 }
251
252 /// Clear contents. If the collection is owning, it will also delete the contents.
253 void clear() {
254 removeAll();
255 }
256
257 inline Int_t getSize() const {
258 // Return the number of elements in the collection
259 return _list.size();
260 }
261
262 inline RooAbsArg *first() const {
263 // Return the first element in this collection
264 return _list.front();
265 }
266
267 RooAbsArg * operator[](Storage_t::size_type i) const {
268 return _list[i];
269 }
270
271
272 /// Returns index of given arg, or -1 if arg is not in the collection.
273 inline Int_t index(const RooAbsArg* arg) const {
274 auto item = std::find(_list.begin(), _list.end(), arg);
275 return item != _list.end() ? item - _list.begin() : -1;
276 }
277
278 /// Returns index of given arg, or -1 if arg is not in the collection.
279 inline Int_t index(const RooAbsArg& arg) const {
280 return index(&arg);
281 }
282
283 Int_t index(const char* name) const;
284
285 inline virtual void Print(Option_t *options= 0) const {
286 // Printing interface (human readable)
288 }
289 std::string contentsString() const ;
290
291
292 virtual void printName(std::ostream& os) const ;
293 virtual void printTitle(std::ostream& os) const ;
294 virtual void printClassName(std::ostream& os) const ;
295 virtual void printValue(std::ostream& os) const ;
296 virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
297
298 virtual Int_t defaultPrintContents(Option_t* opt) const ;
299
300 // Latex printing methods
301 void printLatex(const RooCmdArg& arg1=RooCmdArg(), const RooCmdArg& arg2=RooCmdArg(),
302 const RooCmdArg& arg3=RooCmdArg(), const RooCmdArg& arg4=RooCmdArg(),
303 const RooCmdArg& arg5=RooCmdArg(), const RooCmdArg& arg6=RooCmdArg(),
304 const RooCmdArg& arg7=RooCmdArg(), const RooCmdArg& arg8=RooCmdArg()) const ;
305 void printLatex(std::ostream& ofs, Int_t ncol, const char* option="NEYU", Int_t sigDigit=1,
306 const RooLinkedList& siblingLists=RooLinkedList(), const RooCmdArg* formatCmd=0) const ;
307
308 void setName(const char *name) {
309 // Set name of collection
310 _name= name;
311 }
312 const char* GetName() const {
313 // Return namer of collection
314 return _name.Data() ;
315 }
316 Bool_t isOwning() const {
317 // Does collection own contents?
318 return _ownCont ;
319 }
320
321 Bool_t allInRange(const char* rangeSpec) const ;
322
323 void dump() const ;
324
327
328 void sort(Bool_t reverse = false);
329
330 virtual void RecursiveRemove(TObject *obj);
331
332 void useHashMapForFind(bool flag) const;
333
334 // For use in the RooArgList/Set(std::vector<RooAbsArgPtrOrDouble> const&) constructor.
335 // Can be replaced with std::variant when C++17 is the minimum supported standard.
337 RooAbsArgPtrOrDouble(RooAbsArg & arg) : ptr{&arg}, hasPtr{true} {}
338 RooAbsArgPtrOrDouble(double x) : val{x}, hasPtr{false} {}
339
340 RooAbsArg * ptr = nullptr;
341 double val = 0.0;
342 bool hasPtr = false;
343 };
344
345protected:
346 Storage_t _list; // Actual object storage
348
349 Bool_t _ownCont; // Flag to identify a list that owns its contents.
350 TString _name; // Our name.
351 Bool_t _allRRV ; // All contents are RRV
352
353 void safeDeleteList() ;
354
355 // Support for snapshot method
357
360
361 mutable TNamed* _structureTag{nullptr}; //! Structure tag
362 mutable TNamed* _typedStructureTag{nullptr}; //! Typed structure tag
363
365
366 void makeStructureTag() ;
367 void makeTypedStructureTag() ;
368
369 /// Determine whether it's possible to add a given RooAbsArg to the collection or not.
370 virtual bool canBeAdded(const RooAbsArg& arg, bool silent) const = 0;
371
372 template<class T>
373 static void assert_is_no_temporary(T &&) {
374 static_assert(!std::is_rvalue_reference<T&&>::value,
375 "A reference to a temporary RooAbsArg will be passed to a RooAbsCollection constructor! "
376 "This is not allowed, because the collection will not own the arguments. "
377 "Hence, the collection will contain dangling pointers when the temporary goes out of scope."
378 );
379 }
380
381private:
382 std::unique_ptr<LegacyIterator_t> makeLegacyIterator (bool forward = true) const;
383 mutable std::unique_ptr<std::unordered_map<const TNamed*, Storage_t::value_type>> _nameToItemMap; //!
385 void insert(RooAbsArg*);
386 RooAbsArg* tryFastFind(const TNamed* namePtr) const;
387
388 ClassDef(RooAbsCollection,3) // Collection of RooAbsArg objects
389};
390
391#endif
#define R__SUGGEST_ALTERNATIVE(ALTERNATIVE)
Definition: RConfig.hxx:523
ROOT::RRangeCast< T, true, Range_t > dynamic_range_cast(Range_t &&coll)
ROOT::RRangeCast< T, false, Range_t > static_range_cast(Range_t &&coll)
int Int_t
Definition: RtypesCore.h:45
char Text_t
Definition: RtypesCore.h:62
const Bool_t kFALSE
Definition: RtypesCore.h:101
bool Bool_t
Definition: RtypesCore.h:63
double Double_t
Definition: RtypesCore.h:59
const Bool_t kTRUE
Definition: RtypesCore.h:100
const char Option_t
Definition: RtypesCore.h:66
#define ClassDef(name, id)
Definition: Rtypes.h:325
static void indent(ostringstream &buf, int indent_level)
const Bool_t kIterForward
Definition: TCollection.h:42
char name[80]
Definition: TGX11.cxx:110
Wraps any collection that can be used in range-based loops and applies static_cast<T> or dynamic_cast...
Definition: RRangeCast.hxx:135
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition: RooAbsArg.h:72
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
void clearStructureTags()
Typed structure tag.
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
void remove(forwardIt rangeBegin, forwardIt rangeEnd, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Bool_t containsInstance(const RooAbsArg &var) const
Check if this exact instance is in this collection.
std::vector< RooAbsArg * > Storage_t
TNamed * _typedStructureTag
Structure tag.
Storage_t const & get() const
Const access to the underlying stl container.
RooAbsCollection & assignValueOnly(const RooAbsCollection &other, bool forceIfSizeOne=false)
Sets the value of any argument in our set that also appears in the other set.
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.
virtual TObject * create(const char *newname) const =0
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.
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.
TNamed * typedStructureTag()
bool empty() const
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()
Default constructor.
virtual Bool_t replace(const RooAbsArg &var1, const RooAbsArg &var2)
Replace var1 with var2 and return kTRUE for success.
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.
Int_t getSize() const
Storage_t::const_reverse_iterator rend() const
RooAbsArg * tryFastFind(const TNamed *namePtr) const
Perform a search in a hash map.
void sort(Bool_t reverse=false)
Sort collection using std::sort and name comparison.
Bool_t contains(const RooAbsArg &var) const
Check if collection contains an argument with the same name as var.
Bool_t addServerClonesToList(const RooAbsArg &var)
Add clones of servers of given argument to end of list.
virtual void printName(std::ostream &os) const
Return collection name.
bool overlaps(const RooAbsCollection &otherColl) const
Check if this and other collection have common entries.
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.
Storage_t::const_reverse_iterator rbegin() const
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents.
virtual RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE)
Add a clone of the specified argument to list.
Int_t index(const RooAbsArg *arg) const
Returns index of given arg, or -1 if arg is not in the collection.
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
RooFIter fwdIterator() const
One-time forward iterator.
TNamed * structureTag()
bool overlaps(Iterator_t otherCollBegin, Iterator_t otherCollEnd) const
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
const_iterator end() const
bool hasSameLayout(const RooAbsCollection &other) const
Check that all entries where the collections overlap have the same name.
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.
TObject * FindObject(const TObject *obj) const
Find object in the collection, Note: matching by object name, like the find() method.
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.
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
virtual ~RooAbsCollection()
Destructor.
Storage_t::size_type size() const
RooAbsArg * operator[](Storage_t::size_type i) const
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...
RooAbsArg * first() const
static void assert_is_no_temporary(T &&)
void reserve(Storage_t::size_type count)
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 ...
void clear()
Clear contents. If the collection is owning, it will also delete the contents.
TObject * FindObject(const char *name) const
Find object by name in the collection.
Bool_t allInRange(const char *rangeSpec) const
Return true if all contained object report to have their value inside the specified range.
bool add(const RooAbsCollection &list, bool silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
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 ...
Int_t index(const RooAbsArg &arg) const
Returns index of given arg, or -1 if arg is not in the collection.
const_iterator begin() const
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
std::unique_ptr< LegacyIterator_t > makeLegacyIterator(bool forward=true) const
Factory for legacy iterators.
bool add(Iterator_t beginIt, Iterator_t endIt, bool silent=false)
std::size_t _sizeThresholdForMapSearch
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...
std::unique_ptr< std::unordered_map< const TNamed *, Storage_t::value_type > > _nameToItemMap
void assignFast(const RooAbsCollection &other, bool setValDirty=true)
Functional equivalent of assign() but assumes this and other collection have same layout.
void dump() const
Base contents dumper for debugging purposes.
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...
Bool_t isOwning() const
virtual void printTitle(std::ostream &os) const
Return collection title.
Bool_t equals(const RooAbsCollection &otherColl) const
Check if this and other collection have identically-named contents.
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...
void useHashMapForFind(bool flag) const
Install an internal hash map for fast finding of elements by name.
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.
const char * GetName() const
Returns name of object.
virtual void printClassName(std::ostream &os) const
Return collection class name.
void setHashTableSize(Int_t number)
Set the size at which the collection will automatically start using an extra lookup table instead of ...
void assign(const RooAbsCollection &other)
Sets the value, cache and constant attribute of any argument in our set that also appears in the othe...
std::string contentsString() const
Return comma separated list of contained object names as STL string.
void setName(const char *name)
RooAbsCollection & operator=(const RooAbsCollection &other)
Assign values from the elements in other to our elements.
void safeDeleteList()
Examine client server dependencies in list and delete contents in safe order: any client is deleted b...
Int_t getHashTableSize() const
Query the size at which the collection will automatically start using an extra lookup table instead o...
RooLinkedListIter iterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
virtual void RecursiveRemove(TObject *obj)
If one of the TObject we have a referenced to is deleted, remove the reference.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
virtual TObject * clone(const char *newname) const =0
void insert(RooAbsArg *)
Insert an element into the owned collections.
TIterator * createIterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
RooAbsArg * find(const char *name) const
Find object with given name in list.
Storage_t::const_iterator const_iterator
virtual void printValue(std::ostream &os) const
Print value of collection, i.e.
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default RooPrinable print options for given Print() flag string For inline printing only show ...
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Definition: RooCmdArg.h:27
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
A wrapper around TIterator derivatives.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:38
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
Definition: RooPrintable.h:25
virtual StyleOption defaultPrintStyle(Option_t *opt) const
static std::ostream & defaultPrintStream(std::ostream *os=0)
Return a reference to the current default stream to use in Print().
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,...
TIterator and GenericRooFIter front end with STL back end.
Iterator abstract base class.
Definition: TIterator.h:30
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:136
const char * Data() const
Definition: TString.h:369
Double_t x[n]
Definition: legend1.C:17
for(Int_t i=0;i< n;i++)
Definition: legend1.C:18
double T(double x)
Definition: ChebyshevPol.h:34
std::pair< Double_t, Double_t > Range_t
Definition: TGLUtil.h:1195
void forward(const LAYERDATA &prevLayerData, LAYERDATA &currLayerData)
apply the weights (and functions) in forward direction of the DNN
Definition: NeuralNet.icc:546
static void output(int code)
Definition: gifencode.c:226