Logo ROOT  
Reference Guide
RooAbsArg.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooAbsArg.h,v 1.93 2007/07/16 21:04:28 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_ARG
17#define ROO_ABS_ARG
18
19#include "TNamed.h"
20#include "TObjArray.h"
21#include "TRefArray.h"
22#include "RooPrintable.h"
23#include "RooSTLRefCountList.h"
24#include "RooAbsCache.h"
25#include "RooNameReg.h"
26#include "RooLinkedListIter.h"
27#include <map>
28#include <set>
29#include <deque>
30#include <stack>
31
32#include <iostream>
33
34#ifndef R__LESS_INCLUDES
35#include "TClass.h"
36#include "THashList.h"
37#endif
38
39
40class TTree ;
41class RooArgSet ;
42class RooAbsCollection ;
43class RooTreeData ;
44class RooTreeDataStore ;
46class RooAbsData ;
47class RooAbsDataStore ;
48class RooAbsProxy ;
49class RooArgProxy ;
50class RooSetProxy ;
51class RooListProxy ;
53class RooWorkspace ;
54
55class RooRefArray : public TObjArray {
56 public:
58 } ;
59 RooRefArray(const RooRefArray& other) : TObjArray(other) {
60 }
61 RooRefArray& operator=(const RooRefArray& other) = default;
62 virtual ~RooRefArray() {} ;
63 protected:
64 ClassDef(RooRefArray,1) // Helper class for proxy lists
65} ;
66
67class RooAbsArg;
68/// Print at the prompt
69namespace cling {
70std::string printValue(RooAbsArg*);
71}
72
73class RooAbsArg : public TNamed, public RooPrintable {
74public:
77
78 // Constructors, cloning and assignment
79 RooAbsArg() ;
80 virtual ~RooAbsArg();
81 RooAbsArg(const char *name, const char *title);
82 RooAbsArg(const RooAbsArg& other, const char* name=0) ;
83 RooAbsArg& operator=(const RooAbsArg& other);
84 virtual TObject* clone(const char* newname=0) const = 0 ;
85 virtual TObject* Clone(const char* newname = 0) const {
86 return clone(newname && newname[0] != '\0' ? newname : nullptr);
87 }
88 virtual RooAbsArg* cloneTree(const char* newname=0) const ;
89
90 // Accessors to client-server relation information
91
92 /// Does value or shape of this arg depend on any other arg?
93 virtual Bool_t isDerived() const {
94 return kTRUE ;
95 }
96 Bool_t isCloneOf(const RooAbsArg& other) const ;
97
98 /// Check whether this object depends on values from an element in the `serverList`.
99 ///
100 /// @param serverList Test if one of the elements in this list serves values to `this`.
101 /// @param ignoreArg Ignore values served by this object.
102 /// @return True if values are served.
103 Bool_t dependsOnValue(const RooAbsCollection& serverList, const RooAbsArg* ignoreArg=0) const {
104 return dependsOn(serverList,ignoreArg,kTRUE) ;
105 }
106 /// Check whether this object depends on values served from the object passed as `server`.
107 ///
108 /// @param server Test if `server` serves values to `this`.
109 /// @param ignoreArg Ignore values served by this object.
110 /// @return True if values are served.
111 Bool_t dependsOnValue(const RooAbsArg& server, const RooAbsArg* ignoreArg=0) const {
112 return dependsOn(server,ignoreArg,kTRUE) ;
113 }
114 Bool_t dependsOn(const RooAbsCollection& serverList, const RooAbsArg* ignoreArg=0, Bool_t valueOnly=kFALSE) const ;
115 Bool_t dependsOn(const RooAbsArg& server, const RooAbsArg* ignoreArg=0, Bool_t valueOnly=kFALSE) const ;
116 Bool_t overlaps(const RooAbsArg& testArg, Bool_t valueOnly=kFALSE) const ;
117 Bool_t hasClients() const { return !_clientList.empty(); }
118
119 ////////////////////////////////////////////////////////////////////////////
120 /// \name Legacy RooFit interface.
121 /// This is a collection of functions that remain supported, but more elegant
122 /// interfaces are usually available.
123 /// @{
124
125 /// Retrieve a client iterator.
126 inline TIterator* clientIterator() const
127 R__SUGGEST_ALTERNATIVE("Use clients() and begin(), end() or range-based loops.") {
128 // Return iterator over all client RooAbsArgs
130 }
132 R__SUGGEST_ALTERNATIVE("Use valueClients() and begin(), end() or range-based loops.") {
133 // Return iterator over all shape client RooAbsArgs
135 }
137 R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin(), end() or range-based loops.") {
138 // Return iterator over all shape client RooAbsArgs
140 }
141 inline TIterator* serverIterator() const
142 R__SUGGEST_ALTERNATIVE("Use servers() and begin(), end() or range-based loops.") {
143 // Return iterator over all server RooAbsArgs
145 }
146
148 R__SUGGEST_ALTERNATIVE("Use valueClients() and begin(), end() or range-based loops.") {
149 return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_clientListValue)));
150 }
152 R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin(), end() or range-based loops.") {
153 return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_clientListShape)));
154 }
156 R__SUGGEST_ALTERNATIVE("Use servers() and begin(), end() or range-based loops.") {
157 return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_serverList)));
158 }
159
160 // --- Obsolete functions for backward compatibility
161 /// \deprecated Use getObservables()
162 inline RooArgSet* getDependents(const RooArgSet& set) const { return getObservables(set) ; }
163 /// \deprecated Use getObservables()
164 inline RooArgSet* getDependents(const RooAbsData* set) const { return getObservables(set) ; }
165 /// \deprecated Use getObservables()
166 inline RooArgSet* getDependents(const RooArgSet* depList) const { return getObservables(depList) ; }
167 /// \deprecated Use observableOverlaps()
168 inline Bool_t dependentOverlaps(const RooAbsData* dset, const RooAbsArg& testArg) const { return observableOverlaps(dset,testArg) ; }
169 /// \deprecated Use observableOverlaps()
170 inline Bool_t dependentOverlaps(const RooArgSet* depList, const RooAbsArg& testArg) const { return observableOverlaps(depList, testArg) ; }
171 /// \deprecated Use checkObservables()
172 inline Bool_t checkDependents(const RooArgSet* nset) const { return checkObservables(nset) ; }
173 /// \deprecated Use recursiveCheckObservables()
174 inline Bool_t recursiveCheckDependents(const RooArgSet* nset) const { return recursiveCheckObservables(nset) ; }
175 // --- End obsolete functions for backward compatibility
176 /// @}
177 ////////////////////////////////////////////////////////////////////////////
178
179 ////////////////////////////////////////////////////////////////////////////
180 /// \name Client-Server Interface.
181 /// These functions allow RooFit to figure out who is serving values to whom.
182 /// @{
183
184 /// List of all clients of this object.
185 const RefCountList_t& clients() const {
186 return _clientList;
187 }
188 /// List of all value clients of this object. Value clients receive value updates.
190 return _clientListValue;
191 }
192 /// List of all shape clients of this object. Shape clients receive property information such as
193 /// changes of a value range.
195 return _clientListShape;
196 }
197
198 /// List of all servers of this object.
199 const RefCountList_t& servers() const {
200 return _serverList;
201 }
202 /// Return server of `this` with name `name`. Returns nullptr if not found.
203 inline RooAbsArg* findServer(const char *name) const {
204 const auto serverIt = _serverList.findByName(name);
205 return serverIt != _serverList.end() ? *serverIt : nullptr;
206 }
207 /// Return server of `this` that has the same name as `arg`. Returns `nullptr` if not found.
208 inline RooAbsArg* findServer(const RooAbsArg& arg) const {
209 const auto serverIt = _serverList.findByNamePointer(&arg);
210 return serverIt != _serverList.end() ? *serverIt : nullptr;
211 }
212 /// Return i-th server from server list.
213 inline RooAbsArg* findServer(Int_t index) const {
214 return _serverList.containedObjects()[index];
215 }
216 /// Check if `this` is serving values to `arg`.
217 inline Bool_t isValueServer(const RooAbsArg& arg) const {
219 }
220 /// Check if `this` is serving values to an object with name `name`.
221 inline Bool_t isValueServer(const char* name) const {
223 }
224 /// Check if `this` is serving shape to `arg`.
225 inline Bool_t isShapeServer(const RooAbsArg& arg) const {
227 }
228 /// Check if `this` is serving shape to an object with name `name`.
229 inline Bool_t isShapeServer(const char* name) const {
231 }
232 void leafNodeServerList(RooAbsCollection* list, const RooAbsArg* arg=0, Bool_t recurseNonDerived=kFALSE) const ;
233 void branchNodeServerList(RooAbsCollection* list, const RooAbsArg* arg=0, Bool_t recurseNonDerived=kFALSE) const ;
234 void treeNodeServerList(RooAbsCollection* list, const RooAbsArg* arg=0,
235 Bool_t doBranch=kTRUE, Bool_t doLeaf=kTRUE,
236 Bool_t valueOnly=kFALSE, Bool_t recurseNonDerived=kFALSE) const ;
237
238
239 /// Is this object a fundamental type that can be added to a dataset?
240 /// Fundamental-type subclasses override this method to return kTRUE.
241 /// Note that this test is subtlely different from the dynamic isDerived()
242 /// test, e.g. a constant is not derived but is also not fundamental.
243 inline virtual Bool_t isFundamental() const {
244 return kFALSE;
245 }
246
247 /// Create a fundamental-type object that stores our type of value. The
248 /// created object will have a valid value, but not necessarily the same
249 /// as our value. The caller is responsible for deleting the returned object.
250 virtual RooAbsArg *createFundamental(const char* newname=0) const = 0;
251
252 /// Is this argument an l-value, i.e., can it appear on the left-hand side
253 /// of an assignment expression? LValues are also special since they can
254 /// potentially be analytically integrated and generated.
255 inline virtual Bool_t isLValue() const {
256 return kFALSE;
257 }
258
259
260 // Parameter & observable interpretation of servers
261 friend class RooProdPdf ;
262 friend class RooAddPdf ;
263 friend class RooAddPdfOrig ;
264 RooArgSet* getVariables(Bool_t stripDisconnected=kTRUE) const ;
265 RooArgSet* getParameters(const RooAbsData* data, Bool_t stripDisconnected=kTRUE) const ;
266 /// Return the parameters of this p.d.f when used in conjuction with dataset 'data'
267 RooArgSet* getParameters(const RooAbsData& data, Bool_t stripDisconnected=kTRUE) const {
268 return getParameters(&data,stripDisconnected) ;
269 }
270 /// Return the parameters of the p.d.f given the provided set of observables
271 RooArgSet* getParameters(const RooArgSet& observables, Bool_t stripDisconnected=kTRUE) const {
272 return getParameters(&observables,stripDisconnected);
273 }
274 virtual RooArgSet* getParameters(const RooArgSet* depList, Bool_t stripDisconnected=kTRUE) const ;
275 /// Return the observables of this pdf given a set of observables
276 RooArgSet* getObservables(const RooArgSet& set, Bool_t valueOnly=kTRUE) const {
277 return getObservables(&set,valueOnly) ;
278 }
279 RooArgSet* getObservables(const RooAbsData* data) const ;
280 /// Return the observables of this pdf given the observables defined by `data`.
281 RooArgSet* getObservables(const RooAbsData& data) const {
282 return getObservables(&data) ;
283 }
284 RooArgSet* getObservables(const RooArgSet* depList, Bool_t valueOnly=kTRUE) const ;
285 Bool_t observableOverlaps(const RooAbsData* dset, const RooAbsArg& testArg) const ;
286 Bool_t observableOverlaps(const RooArgSet* depList, const RooAbsArg& testArg) const ;
287 virtual Bool_t checkObservables(const RooArgSet* nset) const ;
288 Bool_t recursiveCheckObservables(const RooArgSet* nset) const ;
289 RooArgSet* getComponents() const ;
290
291
292
293 void attachDataSet(const RooAbsData &set);
294 void attachDataStore(const RooAbsDataStore &set);
295
296 // I/O streaming interface (machine readable)
297 virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t verbose=kFALSE) = 0 ;
298 virtual void writeToStream(std::ostream& os, Bool_t compact) const = 0 ;
299
300 /// Print the object to the defaultPrintStream().
301 /// \param[in] options **V** print verbose. **T** print a tree structure with all children.
302 virtual void Print(Option_t *options= 0) const {
303 // Printing interface (human readable)
305 }
306
307 virtual void printName(std::ostream& os) const ;
308 virtual void printTitle(std::ostream& os) const ;
309 virtual void printClassName(std::ostream& os) const ;
310 virtual void printAddress(std::ostream& os) const ;
311 virtual void printArgs(std::ostream& os) const ;
312 virtual void printMetaArgs(std::ostream& /*os*/) const {} ;
313 virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const;
314 virtual void printTree(std::ostream& os, TString indent="") const ;
315
316 virtual Int_t defaultPrintContents(Option_t* opt) const ;
317
318 // Accessors to attributes
319 void setAttribute(const Text_t* name, Bool_t value=kTRUE) ;
320 Bool_t getAttribute(const Text_t* name) const ;
321 inline const std::set<std::string>& attributes() const {
322 // Returns set of names of boolean attributes defined
323 return _boolAttrib ;
324 }
325
326 void setStringAttribute(const Text_t* key, const Text_t* value) ;
327 const Text_t* getStringAttribute(const Text_t* key) const ;
328 inline const std::map<std::string,std::string>& stringAttributes() const {
329 // Returns std::map<string,string> with all string attributes defined
330 return _stringAttrib ;
331 }
332
333 // Accessors to transient attributes
334 void setTransientAttribute(const Text_t* name, Bool_t value=kTRUE) ;
336 inline const std::set<std::string>& transientAttributes() const {
337 // Return set of transient boolean attributes
338 return _boolAttribTransient ;
339 }
340
341 /// Check if the "Constant" attribute is set.
342 inline Bool_t isConstant() const {
343 return _isConstant ; //getAttribute("Constant") ;
344 }
346
347 // Sorting
348 Int_t Compare(const TObject* other) const ;
349 virtual Bool_t IsSortable() const {
350 // Object is sortable in ROOT container class
351 return kTRUE ;
352 }
353
354 //Debug hooks
355 static void verboseDirty(Bool_t flag) ;
356 void printDirty(Bool_t depth=kTRUE) const ;
357
358 static void setDirtyInhibit(Bool_t flag) ;
359
360 virtual bool operator==(const RooAbsArg& other) const = 0 ;
361 virtual bool isIdentical(const RooAbsArg& other, Bool_t assumeSameType=kFALSE) const = 0 ;
362
363 // Range management
364 virtual Bool_t inRange(const char*) const {
365 // Is value in range (dummy interface always returns true)
366 return kTRUE ;
367 }
368 virtual Bool_t hasRange(const char*) const {
369 // Has this argument a defined range (dummy interface always returns flase)
370 return kFALSE ;
371 }
372
373
375
376
377 friend class RooMinuit ;
378
379 // Cache mode optimization (tracks changes & do lazy evaluation vs evaluate always)
380 virtual void optimizeCacheMode(const RooArgSet& observables) ;
381 virtual void optimizeCacheMode(const RooArgSet& observables, RooArgSet& optNodes, RooLinkedList& processedNodes) ;
382
383
384 // Find constant terms in expression
385 Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheList) ;
386 Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheList, RooLinkedList& processedNodes) ;
387
388
389 // constant term optimization
390 virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE) ;
391 enum CacheMode { Always=0, NotAdvised=1, Never=2 } ;
392 virtual CacheMode canNodeBeCached() const { return Always ; }
393 virtual void setCacheAndTrackHints(RooArgSet& /*trackNodes*/ ) {} ;
394
395 void graphVizTree(const char* fileName, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ;
396 void graphVizTree(std::ostream& os, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ;
397
398/* TGraphStruct* graph(Bool_t useFactoryTag=kFALSE, Double_t textSize=0.03) ; */
399
400 void printComponentTree(const char* indent="",const char* namePat=0, Int_t nLevel=999) ;
401 void printCompactTree(const char* indent="",const char* fileName=0, const char* namePat=0, RooAbsArg* client=0) ;
402 void printCompactTree(std::ostream& os, const char* indent="", const char* namePat=0, RooAbsArg* client=0) ;
403 virtual void printCompactTreeHook(std::ostream& os, const char *ind="") ;
404
405 // Dirty state accessor
406 inline Bool_t isShapeDirty() const {
407 // Return true is shape has been invalidated by server value change
408 return isDerived()?_shapeDirty:kFALSE ;
409 }
410
411 inline Bool_t isValueDirty() const {
412 // Returns true of value has been invalidated by server value change
413 if (inhibitDirty()) return kTRUE ;
414 switch(_operMode) {
415 case AClean:
416 return kFALSE ;
417 case ADirty:
418 return kTRUE ;
419 case Auto:
420 if (_valueDirty) return isDerived() ;
421 return kFALSE ;
422 }
423 return kTRUE ; // we should never get here
424 }
425
427 // Returns true of value has been invalidated by server value change
428 if (inhibitDirty()) return kTRUE ;
429 switch(_operMode) {
430 case AClean:
431 return kFALSE ;
432 case ADirty:
433 return kTRUE ;
434 case Auto:
435 if (_valueDirty) {
437 return isDerived();
438 }
439 return kFALSE ;
440 }
441 return kTRUE ; // But we should never get here
442 }
443
444
446 // Returns true of value has been invalidated by server value change
447
448 if (inhibitDirty()) return kTRUE ;
449 switch(_operMode) {
450 case AClean:
451 return kFALSE ;
452 case ADirty:
453 return kTRUE ;
454 case Auto:
455 if (_valueDirty || _shapeDirty) {
458 return isDerived();
459 }
462 return kFALSE ;
463 }
464 return kTRUE ; // But we should never get here
465 }
466
467 // Cache management
468 void registerCache(RooAbsCache& cache) ;
469 void unRegisterCache(RooAbsCache& cache) ;
470 Int_t numCaches() const ;
471 RooAbsCache* getCache(Int_t index) const ;
472
473 enum OperMode { Auto=0, AClean=1, ADirty=2 } ;
474 inline OperMode operMode() const { return _operMode ; }
475 void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE) ;
476
477 Bool_t addOwnedComponents(const RooArgSet& comps) ;
478 const RooArgSet* ownedComponents() const { return _ownedComponents ; }
479
481
483
484
485 // Dirty state modifiers
486 /// Mark the element dirty. This forces a re-evaluation when a value is requested.
488 if (_operMode == Auto && !inhibitDirty())
489 setValueDirty(nullptr);
490 }
491 /// Notify that a shape-like property (*e.g.* binning) has changed.
492 void setShapeDirty() { setShapeDirty(nullptr); }
493
494 const char* aggregateCacheUniqueSuffix() const ;
495 virtual const char* cacheUniqueSuffix() const { return 0 ; }
496
497 void wireAllCaches() ;
498
499 inline const TNamed* namePtr() const {
500 return _namePtr ;
501 }
502
503 void SetName(const char* name) ;
504 void SetNameTitle(const char *name, const char *title) ;
505
506
507 // Server redirection interface
508 Bool_t redirectServers(const RooAbsCollection& newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t isRecursionStep=kFALSE) ;
509 Bool_t recursiveRedirectServers(const RooAbsCollection& newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE) ;
510 virtual Bool_t redirectServersHook(const RooAbsCollection& /*newServerList*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive*/) { return kFALSE ; } ;
511 virtual void serverNameChangeHook(const RooAbsArg* /*oldServer*/, const RooAbsArg* /*newServer*/) { } ;
512
513 void addServer(RooAbsArg& server, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE, std::size_t refCount = 1);
514 void addServerList(RooAbsCollection& serverList, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE) ;
515 void replaceServer(RooAbsArg& oldServer, RooAbsArg& newServer, Bool_t valueProp, Bool_t shapeProp) ;
516 void changeServer(RooAbsArg& server, Bool_t valueProp, Bool_t shapeProp) ;
517 void removeServer(RooAbsArg& server, Bool_t force=kFALSE) ;
518 RooAbsArg *findNewServer(const RooAbsCollection &newSet, Bool_t nameChange) const;
519
522
524 {
525 _myws = &ws;
526 return kFALSE;
527 };
528
529
530protected:
531 void graphVizAddConnections(std::set<std::pair<RooAbsArg*,RooAbsArg*> >&) ;
532
533 virtual void operModeHook() {} ;
534
535 virtual void optimizeDirtyHook(const RooArgSet* /*obs*/) {} ;
536
537 virtual Bool_t isValid() const ;
538
539 virtual void getParametersHook(const RooArgSet* /*nset*/, RooArgSet* /*list*/, Bool_t /*stripDisconnected*/) const {} ;
540 virtual void getObservablesHook(const RooArgSet* /*nset*/, RooArgSet* /*list*/) const {} ;
541
545 }
546
547 void clearValueDirty() const {
549 }
550 void clearShapeDirty() const {
552 }
553
554 /// Force element to re-evaluate itself when a value is requested.
555 void setValueDirty(const RooAbsArg* source);
556 /// Notify that a shape-like property (*e.g.* binning) has changed.
557 void setShapeDirty(const RooAbsArg* source);
558
559 virtual void ioStreamerPass2() ;
560 static void ioStreamerPass2Finalize() ;
561
562
563private:
564 void addParameters(RooArgSet& params, const RooArgSet* nset=0, Bool_t stripDisconnected=kTRUE) const;
565
567
568
569 protected:
570
571 // Client-Server relation and Proxy management
572 friend class RooArgSet ;
573 friend class RooAbsCollection ;
574 friend class RooCustomizer ;
575 friend class RooWorkspace ;
576 friend class RooExtendPdf ;
577 friend class RooRealIntegral ;
578 friend class RooAbsReal ;
579 friend class RooProjectedPdf ;
580 RefCountList_t _serverList ; // list of server objects
581 RefCountList_t _clientList; // list of client objects
582 RefCountList_t _clientListShape; // subset of clients that requested shape dirty flag propagation
583 RefCountList_t _clientListValue; // subset of clients that requested value dirty flag propagation
584
585 RooRefArray _proxyList ; // list of proxies
586 std::deque<RooAbsCache*> _cacheList ; // list of caches
587
588
589 // Proxy management
590 friend class RooAddModel ;
591 friend class RooArgProxy ;
592 friend class RooSetProxy ;
593 friend class RooListProxy ;
594 friend class RooObjectFactory ;
595 friend class RooHistPdf ;
596 friend class RooHistFunc ;
597 friend class RooHistFunc2 ;
598 void registerProxy(RooArgProxy& proxy) ;
599 void registerProxy(RooSetProxy& proxy) ;
600 void registerProxy(RooListProxy& proxy) ;
601 void unRegisterProxy(RooArgProxy& proxy) ;
602 void unRegisterProxy(RooSetProxy& proxy) ;
603 void unRegisterProxy(RooListProxy& proxy) ;
604 RooAbsProxy* getProxy(Int_t index) const ;
605 void setProxyNormSet(const RooArgSet* nset) ;
606 Int_t numProxies() const ;
607
608 // Attribute list
609 std::set<std::string> _boolAttrib ; // Boolean attributes
610 std::map<std::string,std::string> _stringAttrib ; // String attributes
611 std::set<std::string> _boolAttribTransient ; //! Transient boolean attributes (not copied in ctor)
612
613 void printAttribList(std::ostream& os) const;
614
615 // Hooks for RooTreeData interface
617 friend class RooTreeDataStore ;
618 friend class RooVectorDataStore ;
619 friend class RooTreeData ;
620 friend class RooDataSet ;
621 friend class RooRealMPFE ;
622 virtual void syncCache(const RooArgSet* nset=0) = 0 ;
623 virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE) = 0 ;
624
625 virtual void attachToTree(TTree& t, Int_t bufSize=32000) = 0 ;
626 virtual void attachToVStore(RooVectorDataStore& vstore) = 0 ;
627 /// Attach this argument to the data store such that it reads data from there.
628 void attachToStore(RooAbsDataStore& store) ;
629
630 virtual void setTreeBranchStatus(TTree& t, Bool_t active) = 0 ;
631 virtual void fillTreeBranch(TTree& t) = 0 ;
632 TString cleanBranchName() const ;
633
634 // Global
635 friend std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg);
636 friend std::istream& operator>>(std::istream& is, RooAbsArg &arg) ;
638
639 // Debug stuff
640 static Bool_t _verboseDirty ; // Static flag controlling verbose messaging for dirty state changes
641 static Bool_t _inhibitDirty ; // Static flag controlling global inhibit of dirty state propagation
642 Bool_t _deleteWatch ; //! Delete watch flag
643
644 Bool_t inhibitDirty() const ;
645
646 public:
649 protected:
650
651
652 mutable Bool_t _valueDirty ; // Flag set if value needs recalculating because input values modified
653 mutable Bool_t _shapeDirty ; // Flag set if value needs recalculating because input shapes modified
654 mutable bool _allBatchesDirty{true}; //! Mark batches as dirty (only meaningful for RooAbsReal).
655
656 mutable OperMode _operMode ; // Dirty state propagation mode
657 mutable Bool_t _fast ; // Allow fast access mode in getVal() and proxies
658
659 // Owned components
660 RooArgSet* _ownedComponents ; //! Set of owned component
661
662 mutable Bool_t _prohibitServerRedirect ; //! Prohibit server redirects -- Debugging tool
663
664 mutable RooExpensiveObjectCache* _eocache{nullptr}; // Pointer to global cache manager for any expensive components created by this object
665
666 mutable TNamed* _namePtr ; //! Do not persist. Pointer to global instance of string that matches object named
667 Bool_t _isConstant ; //! Cached isConstant status
668
669 mutable Bool_t _localNoInhibitDirty ; //! Prevent 'AlwaysDirty' mode for this node
670
671/* RooArgSet _leafNodeCache ; //! Cached leaf nodes */
672/* RooArgSet _branchNodeCache //! Cached branch nodes */
673
674 mutable RooWorkspace *_myws; //! In which workspace do I live, if any
675
676 /// \cond Internal
677 // Legacy streamers need the following statics:
678 friend class RooFitResult;
679
680 public:
681 static std::map<RooAbsArg*,std::unique_ptr<TRefArray>> _ioEvoList; // temporary holding list for proxies needed in schema evolution
682 protected:
683 static std::stack<RooAbsArg*> _ioReadStack ; // reading stack
684 /// \endcond
685
686 ClassDef(RooAbsArg,7) // Abstract variable
687};
688
689std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg);
690std::istream& operator>>(std::istream& is, RooAbsArg &arg);
691
692
693#endif
int Int_t
Definition: CPyCppyy.h:43
#define R__SUGGEST_ALTERNATIVE(ALTERNATIVE)
Definition: RConfig.hxx:530
std::ostream & operator<<(std::ostream &os, const RooAbsArg &arg)
std::istream & operator>>(std::istream &is, RooAbsArg &arg)
Istream operator.
Definition: RooAbsArg.cxx:1442
char Text_t
Definition: RtypesCore.h:60
const Bool_t kFALSE
Definition: RtypesCore.h:90
bool Bool_t
Definition: RtypesCore.h:61
const Bool_t kTRUE
Definition: RtypesCore.h:89
const char Option_t
Definition: RtypesCore.h:64
#define ClassDef(name, id)
Definition: Rtypes.h:322
static void indent(ostringstream &buf, int indent_level)
char name[80]
Definition: TGX11.cxx:109
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:73
RooExpensiveObjectCache & expensiveObjectCache() const
Definition: RooAbsArg.cxx:2168
virtual Bool_t IsSortable() const
Definition: RooAbsArg.h:349
const RooArgSet * ownedComponents() const
Definition: RooAbsArg.h:478
virtual Bool_t checkObservables(const RooArgSet *nset) const
Overloadable function in which derived classes can implement consistency checks of the variables.
Definition: RooAbsArg.cxx:695
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
Definition: RooAbsArg.cxx:2121
RooRefArray _proxyList
Definition: RooAbsArg.h:585
virtual bool isIdentical(const RooAbsArg &other, Bool_t assumeSameType=kFALSE) const =0
Bool_t _fast
Definition: RooAbsArg.h:657
virtual const char * cacheUniqueSuffix() const
Definition: RooAbsArg.h:495
void clearValueAndShapeDirty() const
Definition: RooAbsArg.h:542
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)=0
virtual Bool_t isValid() const
WVE (08/21/01) Probably obsolete now.
Definition: RooAbsArg.cxx:1278
TNamed * _namePtr
Definition: RooAbsArg.h:666
virtual Bool_t importWorkspaceHook(RooWorkspace &ws)
Definition: RooAbsArg.h:523
RooAbsArg * findServer(const RooAbsArg &arg) const
Return server of this that has the same name as arg. Returns nullptr if not found.
Definition: RooAbsArg.h:208
static void verboseDirty(Bool_t flag)
Activate verbose messaging related to dirty flag propagation.
Definition: RooAbsArg.cxx:239
void attachToStore(RooAbsDataStore &store)
Attach this argument to the data store such that it reads data from there.
Definition: RooAbsArg.cxx:2155
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default contents to print.
Definition: RooAbsArg.cxx:1349
const char * aggregateCacheUniqueSuffix() const
Definition: RooAbsArg.cxx:2180
Bool_t redirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t isRecursionStep=kFALSE)
Substitute our servers with those listed in newSet.
Definition: RooAbsArg.cxx:909
virtual Bool_t isLValue() const
Is this argument an l-value, i.e., can it appear on the left-hand side of an assignment expression?...
Definition: RooAbsArg.h:255
void changeServer(RooAbsArg &server, Bool_t valueProp, Bool_t shapeProp)
Change dirty flag propagation mask for specified server.
Definition: RooAbsArg.cxx:441
Bool_t isValueServer(const RooAbsArg &arg) const
Check if this is serving values to arg.
Definition: RooAbsArg.h:217
virtual Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Definition: RooAbsArg.h:510
const TNamed * namePtr() const
Definition: RooAbsArg.h:499
RooAbsArg * findServer(Int_t index) const
Return i-th server from server list.
Definition: RooAbsArg.h:213
virtual void getObservablesHook(const RooArgSet *, RooArgSet *) const
Definition: RooAbsArg.h:540
RooWorkspace * _myws
Prevent 'AlwaysDirty' mode for this node.
Definition: RooAbsArg.h:674
void printCompactTree(const char *indent="", const char *fileName=0, const char *namePat=0, RooAbsArg *client=0)
Print tree structure of expression tree on stdout, or to file if filename is specified.
Definition: RooAbsArg.cxx:1745
void attachDataStore(const RooAbsDataStore &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
Definition: RooAbsArg.cxx:1486
virtual bool operator==(const RooAbsArg &other) const =0
virtual void printClassName(std::ostream &os) const
Print object class name.
Definition: RooAbsArg.cxx:1309
RooArgSet * _ownedComponents
Definition: RooAbsArg.h:660
const RefCountList_t & valueClients() const
List of all value clients of this object. Value clients receive value updates.
Definition: RooAbsArg.h:189
std::deque< RooAbsCache * > _cacheList
Definition: RooAbsArg.h:586
void setShapeDirty()
Notify that a shape-like property (e.g. binning) has changed.
Definition: RooAbsArg.h:492
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
Definition: RooAbsArg.cxx:730
void registerProxy(RooArgProxy &proxy)
Register an RooArgProxy in the proxy list.
Definition: RooAbsArg.cxx:1119
friend class RooHistFunc2
Definition: RooAbsArg.h:597
RooAbsArg * findServer(const char *name) const
Return server of this with name name. Returns nullptr if not found.
Definition: RooAbsArg.h:203
virtual TObject * clone(const char *newname=0) const =0
Bool_t checkDependents(const RooArgSet *nset) const
Definition: RooAbsArg.h:172
RooFIter valueClientMIterator() const
Definition: RooAbsArg.h:147
Bool_t isShapeServer(const RooAbsArg &arg) const
Check if this is serving shape to arg.
Definition: RooAbsArg.h:225
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
Definition: RooAbsArg.cxx:289
friend class RooObjectFactory
Definition: RooAbsArg.h:594
static void ioStreamerPass2Finalize()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
Definition: RooAbsArg.cxx:2299
virtual CacheMode canNodeBeCached() const
Definition: RooAbsArg.h:392
void leafNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, Bool_t recurseNonDerived=kFALSE) const
Fill supplied list with all leaf nodes of the arg tree, starting with ourself as top node.
Definition: RooAbsArg.cxx:475
virtual void setTreeBranchStatus(TTree &t, Bool_t active)=0
RooArgSet * getDependents(const RooArgSet &set) const
Definition: RooAbsArg.h:162
void setProhibitServerRedirect(Bool_t flag)
Definition: RooAbsArg.h:480
RooArgSet * getParameters(const RooArgSet &observables, Bool_t stripDisconnected=kTRUE) const
Return the parameters of the p.d.f given the provided set of observables.
Definition: RooAbsArg.h:271
void setWorkspace(RooWorkspace &ws)
Definition: RooAbsArg.h:482
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Implement multi-line detailed printing.
Definition: RooAbsArg.cxx:1359
friend class RooAddPdfOrig
Definition: RooAbsArg.h:263
const RefCountList_t & servers() const
List of all servers of this object.
Definition: RooAbsArg.h:199
Bool_t isCloneOf(const RooAbsArg &other) const
Check if this object was created as a clone of 'other'.
Definition: RooAbsArg.cxx:247
Bool_t isShapeDirty() const
Definition: RooAbsArg.h:406
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)=0
static void setDirtyInhibit(Bool_t flag)
Control global dirty inhibit mode.
Definition: RooAbsArg.cxx:230
virtual RooAbsArg * createFundamental(const char *newname=0) const =0
Create a fundamental-type object that stores our type of value.
Bool_t findConstantNodes(const RooArgSet &observables, RooArgSet &cacheList)
Find branch nodes with all-constant parameters, and add them to the list of nodes that can be cached ...
Definition: RooAbsArg.cxx:1612
RooArgSet * getObservables(const RooAbsData &data) const
Return the observables of this pdf given the observables defined by data.
Definition: RooAbsArg.h:281
void graphVizAddConnections(std::set< std::pair< RooAbsArg *, RooAbsArg * > > &)
Utility function that inserts all point-to-point client-server connections between any two RooAbsArgs...
Definition: RooAbsArg.cxx:2017
void unRegisterProxy(RooArgProxy &proxy)
Remove proxy from proxy list.
Definition: RooAbsArg.cxx:1147
void printComponentTree(const char *indent="", const char *namePat=0, Int_t nLevel=999)
Print tree structure of expression tree on given ostream, only branch nodes are printed.
Definition: RooAbsArg.cxx:1805
Bool_t inhibitDirty() const
Delete watch flag.
Definition: RooAbsArg.cxx:82
RooSTLRefCountList< RooAbsArg > RefCountList_t
Definition: RooAbsArg.h:75
virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache)
Definition: RooAbsArg.h:521
const std::set< std::string > & attributes() const
Definition: RooAbsArg.h:321
std::set< std::string > _boolAttrib
Definition: RooAbsArg.h:609
void addServer(RooAbsArg &server, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE, std::size_t refCount=1)
Register another RooAbsArg as a server to us, ie, declare that we depend on it.
Definition: RooAbsArg.cxx:354
virtual void printTree(std::ostream &os, TString indent="") const
Print object tree structure.
Definition: RooAbsArg.cxx:1424
void unRegisterCache(RooAbsCache &cache)
Unregister a RooAbsCache. Called from the RooAbsCache destructor.
Definition: RooAbsArg.cxx:1881
virtual Bool_t isFundamental() const
Is this object a fundamental type that can be added to a dataset? Fundamental-type subclasses overrid...
Definition: RooAbsArg.h:243
virtual void printTitle(std::ostream &os) const
Print object title.
Definition: RooAbsArg.cxx:1299
Bool_t isValueOrShapeDirtyAndClear() const
Definition: RooAbsArg.h:445
RefCountList_t _clientListValue
Definition: RooAbsArg.h:583
void printAttribList(std::ostream &os) const
Transient boolean attributes (not copied in ctor)
Definition: RooAbsArg.cxx:1451
Bool_t dependentOverlaps(const RooAbsData *dset, const RooAbsArg &testArg) const
Definition: RooAbsArg.h:168
virtual void Print(Option_t *options=0) const
Print the object to the defaultPrintStream().
Definition: RooAbsArg.h:302
friend void RooRefArray::Streamer(TBuffer &)
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
Definition: RooAbsArg.cxx:302
void treeNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, Bool_t doBranch=kTRUE, Bool_t doLeaf=kTRUE, Bool_t valueOnly=kFALSE, Bool_t recurseNonDerived=kFALSE) const
Fill supplied list with nodes of the arg tree, following all server links, starting with ourself as t...
Definition: RooAbsArg.cxx:502
RooArgSet * getParameters(const RooAbsData *data, Bool_t stripDisconnected=kTRUE) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
Definition: RooAbsArg.cxx:544
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
Definition: RooAbsArg.cxx:257
virtual void writeToStream(std::ostream &os, Bool_t compact) const =0
Bool_t hasClients() const
Definition: RooAbsArg.h:117
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Return the observables of this pdf given a set of observables.
Definition: RooAbsArg.h:276
virtual void printAddress(std::ostream &os) const
Print class name of object.
Definition: RooAbsArg.cxx:1315
friend std::ostream & operator<<(std::ostream &os, const RooAbsArg &arg)
RooFIter serverMIterator() const
Definition: RooAbsArg.h:155
void setTransientAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
Definition: RooAbsArg.cxx:316
virtual void serverNameChangeHook(const RooAbsArg *, const RooAbsArg *)
Definition: RooAbsArg.h:511
virtual void printCompactTreeHook(std::ostream &os, const char *ind="")
Hook function interface for object to insert additional information when printed in the context of a ...
Definition: RooAbsArg.cxx:1859
virtual void setCacheAndTrackHints(RooArgSet &)
Definition: RooAbsArg.h:393
TIterator * serverIterator() const
Definition: RooAbsArg.h:141
TIterator * valueClientIterator() const
Definition: RooAbsArg.h:131
Bool_t _isConstant
Do not persist. Pointer to global instance of string that matches object named.
Definition: RooAbsArg.h:667
Bool_t isValueDirty() const
Definition: RooAbsArg.h:411
Bool_t overlaps(const RooAbsArg &testArg, Bool_t valueOnly=kFALSE) const
Test if any of the nodes of tree are shared with that of the given tree.
Definition: RooAbsArg.cxx:785
Int_t Compare(const TObject *other) const
Utility function used by TCollection::Sort to compare contained TObjects We implement comparison by n...
Definition: RooAbsArg.cxx:1505
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
Definition: RooAbsArg.cxx:1909
void clearValueDirty() const
Definition: RooAbsArg.h:547
virtual void ioStreamerPass2()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
Definition: RooAbsArg.cxx:2271
void wireAllCaches()
Definition: RooAbsArg.cxx:2198
Bool_t _valueDirty
Definition: RooAbsArg.h:652
virtual ~RooAbsArg()
Destructor.
Definition: RooAbsArg.cxx:188
virtual Bool_t isDerived() const
Does value or shape of this arg depend on any other arg?
Definition: RooAbsArg.h:93
const std::map< std::string, std::string > & stringAttributes() const
Definition: RooAbsArg.h:328
static Bool_t _inhibitDirty
Definition: RooAbsArg.h:641
RefCountListLegacyIterator_t * makeLegacyIterator(const RefCountList_t &list) const
Definition: RooAbsArg.cxx:2317
@ NotAdvised
Definition: RooAbsArg.h:391
Bool_t _localNoInhibitDirty
Cached isConstant status.
Definition: RooAbsArg.h:669
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
Definition: RooAbsArg.h:85
const std::set< std::string > & transientAttributes() const
Definition: RooAbsArg.h:336
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Interface function signaling a request to perform constant term optimization.
Definition: RooAbsArg.cxx:1705
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
Definition: RooAbsArg.cxx:1718
virtual void attachToTree(TTree &t, Int_t bufSize=32000)=0
Overloadable function for derived classes to implement attachment as branch to a TTree.
Definition: RooAbsArg.cxx:1267
OperMode _operMode
Mark batches as dirty (only meaningful for RooAbsReal).
Definition: RooAbsArg.h:656
RooLinkedList getCloningAncestors() const
Return ancestors in cloning chain of this RooAbsArg.
Definition: RooAbsArg.cxx:1919
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
Definition: RooAbsArg.h:487
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
Definition: RooAbsArg.cxx:2107
Bool_t recursiveCheckObservables(const RooArgSet *nset) const
Recursively call checkObservables on all nodes in the expression tree.
Definition: RooAbsArg.cxx:704
RooAbsCache * getCache(Int_t index) const
Return registered cache object by index.
Definition: RooAbsArg.cxx:1900
virtual void syncCache(const RooArgSet *nset=0)=0
void printDirty(Bool_t depth=kTRUE) const
Print information about current value dirty state information.
Definition: RooAbsArg.cxx:1517
bool _allBatchesDirty
Definition: RooAbsArg.h:654
static Bool_t _verboseDirty
Definition: RooAbsArg.h:640
void registerCache(RooAbsCache &cache)
Register RooAbsCache with this object.
Definition: RooAbsArg.cxx:1872
virtual void optimizeCacheMode(const RooArgSet &observables)
Activate cache mode optimization with given definition of observables.
Definition: RooAbsArg.cxx:1549
RefCountList_t _clientListShape
Definition: RooAbsArg.h:582
virtual void attachToVStore(RooVectorDataStore &vstore)=0
TString cleanBranchName() const
Construct a mangled name from the actual name that is free of any math symbols that might be interpre...
Definition: RooAbsArg.cxx:1830
void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Definition: RooAbsArg.cxx:2232
Bool_t recursiveCheckDependents(const RooArgSet *nset) const
Definition: RooAbsArg.h:174
Bool_t _prohibitServerRedirect
Set of owned component.
Definition: RooAbsArg.h:662
void removeServer(RooAbsArg &server, Bool_t force=kFALSE)
Unregister another RooAbsArg as a server to us, ie, declare that we no longer depend on its value and...
Definition: RooAbsArg.cxx:405
Int_t numProxies() const
Return the number of registered proxies.
Definition: RooAbsArg.cxx:1241
@ DeActivate
Definition: RooAbsArg.h:374
@ ValueChange
Definition: RooAbsArg.h:374
@ ConfigChange
Definition: RooAbsArg.h:374
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
Definition: RooAbsArg.cxx:280
virtual void printName(std::ostream &os) const
Print object name.
Definition: RooAbsArg.cxx:1289
RooArgSet * getParameters(const RooAbsData &data, Bool_t stripDisconnected=kTRUE) const
Return the parameters of this p.d.f when used in conjuction with dataset 'data'.
Definition: RooAbsArg.h:267
void replaceServer(RooAbsArg &oldServer, RooAbsArg &newServer, Bool_t valueProp, Bool_t shapeProp)
Replace 'oldServer' with 'newServer'.
Definition: RooAbsArg.cxx:430
virtual void getParametersHook(const RooArgSet *, RooArgSet *, Bool_t) const
Definition: RooAbsArg.h:539
virtual void printMetaArgs(std::ostream &) const
Definition: RooAbsArg.h:312
Bool_t isShapeServer(const char *name) const
Check if this is serving shape to an object with name name.
Definition: RooAbsArg.h:229
void addServerList(RooAbsCollection &serverList, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE)
Register a list of RooAbsArg as servers to us by calling addServer() for each arg in the list.
Definition: RooAbsArg.cxx:390
friend std::istream & operator>>(std::istream &is, RooAbsArg &arg)
Istream operator.
Definition: RooAbsArg.cxx:1442
Bool_t dependsOnValue(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0) const
Check whether this object depends on values from an element in the serverList.
Definition: RooAbsArg.h:103
void setProxyNormSet(const RooArgSet *nset)
Forward a change in the cached normalization argset to all the registered proxies.
Definition: RooAbsArg.cxx:1252
RefCountList_t _clientList
Definition: RooAbsArg.h:581
Bool_t dependsOnValue(const RooAbsArg &server, const RooAbsArg *ignoreArg=0) const
Check whether this object depends on values served from the object passed as server.
Definition: RooAbsArg.h:111
RooAbsProxy * getProxy(Int_t index) const
Return the nth proxy from the proxy list.
Definition: RooAbsArg.cxx:1228
const RefCountList_t & clients() const
List of all clients of this object.
Definition: RooAbsArg.h:185
RooFIter shapeClientMIterator() const
Definition: RooAbsArg.h:151
RooAbsArg & operator=(const RooAbsArg &other)
Assign all boolean and string properties of the original object.
Definition: RooAbsArg.cxx:156
const RefCountList_t & shapeClients() const
List of all shape clients of this object.
Definition: RooAbsArg.h:194
Bool_t isValueDirtyAndClear() const
Definition: RooAbsArg.h:426
Bool_t dependentOverlaps(const RooArgSet *depList, const RooAbsArg &testArg) const
Definition: RooAbsArg.h:170
RefCountList_t _serverList
Definition: RooAbsArg.h:580
void clearShapeDirty() const
Definition: RooAbsArg.h:550
RooExpensiveObjectCache * _eocache
Prohibit server redirects – Debugging tool.
Definition: RooAbsArg.h:664
RooArgSet * getComponents() const
Definition: RooAbsArg.cxx:674
RooArgSet * getDependents(const RooArgSet *depList) const
Definition: RooAbsArg.h:166
std::set< std::string > _boolAttribTransient
Definition: RooAbsArg.h:611
Bool_t _shapeDirty
Definition: RooAbsArg.h:653
void setLocalNoDirtyInhibit(Bool_t flag) const
Definition: RooAbsArg.h:647
RooAbsArg * findNewServer(const RooAbsCollection &newSet, Bool_t nameChange) const
Find the new server in the specified set that matches the old server.
Definition: RooAbsArg.cxx:1027
TIterator * shapeClientIterator() const
Definition: RooAbsArg.h:136
TIterator * clientIterator() const
Retrieve a client iterator.
Definition: RooAbsArg.h:126
Bool_t isConstant() const
Check if the "Constant" attribute is set.
Definition: RooAbsArg.h:342
virtual void fillTreeBranch(TTree &t)=0
void branchNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, Bool_t recurseNonDerived=kFALSE) const
Fill supplied list with all branch nodes of the arg tree starting with ourself as top node.
Definition: RooAbsArg.cxx:486
void graphVizTree(const char *fileName, const char *delimiter="\n", bool useTitle=false, bool useLatex=false)
Create a GraphViz .dot file visualizing the expression tree headed by this RooAbsArg object.
Definition: RooAbsArg.cxx:1946
virtual void operModeHook()
Definition: RooAbsArg.h:533
virtual void optimizeDirtyHook(const RooArgSet *)
Definition: RooAbsArg.h:535
Bool_t getTransientAttribute(const Text_t *name) const
Check if a named attribute is set.
Definition: RooAbsArg.cxx:338
std::map< std::string, std::string > _stringAttrib
Definition: RooAbsArg.h:610
RooArgSet * getDependents(const RooAbsData *set) const
Definition: RooAbsArg.h:164
virtual Bool_t inRange(const char *) const
Definition: RooAbsArg.h:364
Int_t numCaches() const
Return number of registered caches.
Definition: RooAbsArg.cxx:1891
RooAbsArg()
Default constructor.
Definition: RooAbsArg.cxx:91
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
Definition: RooAbsArg.cxx:1064
Bool_t isValueServer(const char *name) const
Check if this is serving values to an object with name name.
Definition: RooAbsArg.h:221
void attachDataSet(const RooAbsData &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
Definition: RooAbsArg.cxx:1467
virtual Bool_t hasRange(const char *) const
Definition: RooAbsArg.h:368
virtual void printArgs(std::ostream &os) const
Print object arguments, ie its proxies.
Definition: RooAbsArg.cxx:1326
TIteratorToSTLInterface< RefCountList_t::Container_t > RefCountListLegacyIterator_t
Definition: RooAbsArg.h:76
void SetName(const char *name)
Set the name of the TNamed.
Definition: RooAbsArg.cxx:2216
void addParameters(RooArgSet &params, const RooArgSet *nset=0, Bool_t stripDisconnected=kTRUE) const
INTERNAL helper function for getParameters()
Definition: RooAbsArg.cxx:553
Bool_t localNoDirtyInhibit() const
Definition: RooAbsArg.h:648
Bool_t _deleteWatch
Definition: RooAbsArg.h:642
OperMode operMode() const
Definition: RooAbsArg.h:474
Bool_t observableOverlaps(const RooAbsData *dset, const RooAbsArg &testArg) const
Test if any of the dependents of the arg tree (as determined by getObservables) overlaps with those o...
Definition: RooAbsArg.cxx:799
RooAbsCache is the abstract base class for data members of RooAbsArgs that cache other (composite) Ro...
Definition: RooAbsCache.h:27
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsDataStore is the abstract base class for data collection that use a TTree as internal storage m...
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:44
RooAbsProxy is the abstact interface for proxy classes.
Definition: RooAbsProxy.h:31
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:60
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
Definition: RooAddPdf.h:29
RooArgProxy is the abstract interface for RooAbsArg proxy classes.
Definition: RooArgProxy.h:24
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
RooCompositeDataStore combines several disjunct datasets into one.
RooCustomizer is a factory class to produce clones of a prototype composite PDF object with the same ...
Definition: RooCustomizer.h:32
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:33
RooExpensiveObjectCache is a singleton class that serves as repository for objects that are expensive...
RooExtendPdf is a wrapper around an existing PDF that adds a parameteric extended likelihood term to ...
Definition: RooExtendPdf.h:22
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
Definition: RooFitResult.h:40
RooHistFunc implements a real-valued function sampled from a multidimensional histogram.
Definition: RooHistFunc.h:29
RooHistPdf implements a probablity density function sampled from a multidimensional histogram.
Definition: RooHistPdf.h:28
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:35
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:25
RooMinuit is a wrapper class around TFitter/TMinuit that provides a seamless interface between the MI...
Definition: RooMinuit.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,...
RooProdPdf is an efficient implementation of a product of PDFs of the form.
Definition: RooProdPdf.h:31
Class RooProjectedPdf is a RooAbsPdf implementation that represent a projection of a given input p....
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
RooRealMPFE is the multi-processor front-end for parallel calculation of RooAbsReal objects.
Definition: RooRealMPFE.h:30
RooRefArray(const RooRefArray &other)
Definition: RooAbsArg.h:59
RooRefArray & operator=(const RooRefArray &other)=default
virtual ~RooRefArray()
Definition: RooAbsArg.h:62
Container_t::const_iterator findByNamePointer(const T *item) const
Find an item by comparing RooAbsArg::namePtr() adresses.
bool containsSameName(const char *name) const
Check if list contains an item using findByName().
Container_t::const_iterator end() const
End of contained objects.
bool empty() const
Check if empty.
Container_t::const_iterator findByName(const char *name) const
Find an item by comparing strings returned by RooAbsArg::GetName()
const Container_t & containedObjects() const
Direct reference to container of objects held by this list.
bool containsByNamePtr(const T *obj) const
Check if list contains an item using findByNamePointer().
RooSetProxy is the concrete proxy for RooArgSet objects.
Definition: RooSetProxy.h:24
RooTreeDataStore is a TTree-backed data storage.
RooTreeData is the abstract base class for data collection that use a TTree as internal storage mecha...
Definition: RooTreeData.h:25
RooVectorDataStore is the abstract base class for data collection that use a TTree as internal storag...
The RooWorkspace is a persistable container for RooFit projects.
Definition: RooWorkspace.h:43
Buffer base class used for serializing objects.
Definition: TBuffer.h:42
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
An array of TObjects.
Definition: TObjArray.h:37
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:131
A TTree represents a columnar dataset.
Definition: TTree.h:78
void ws()
Definition: ws.C:66