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 #include <string>
32 #include <iostream>
33 
34 #ifndef R__LESS_INCLUDES
35 #include "TClass.h"
36 #include "THashList.h"
37 #endif
38 
39 
40 class TTree ;
41 class RooArgSet ;
42 class RooAbsCollection ;
43 class RooTreeDataStore ;
44 class RooVectorDataStore ;
45 class RooAbsData ;
46 class RooAbsDataStore ;
47 class RooAbsProxy ;
48 class RooArgProxy ;
49 class RooSetProxy ;
50 class RooListProxy ;
52 class RooWorkspace ;
53 
54 class RooRefArray : public TObjArray {
55  public:
57  } ;
58  RooRefArray(const RooRefArray& other) : TObjArray(other) {
59  }
60  RooRefArray& operator=(const RooRefArray& other) = default;
61  virtual ~RooRefArray() {} ;
62  protected:
63  ClassDef(RooRefArray,1) // Helper class for proxy lists
64 } ;
65 
66 class RooAbsArg;
67 /// Print at the prompt
68 namespace cling {
69 std::string printValue(RooAbsArg*);
70 }
71 
72 class RooAbsArg : public TNamed, public RooPrintable {
73 public:
76 
77  // Constructors, cloning and assignment
78  RooAbsArg() ;
79  virtual ~RooAbsArg();
80  RooAbsArg(const char *name, const char *title);
81  RooAbsArg(const RooAbsArg& other, const char* name=0) ;
82  RooAbsArg& operator=(const RooAbsArg& other);
83  virtual TObject* clone(const char* newname=0) const = 0 ;
84  virtual TObject* Clone(const char* newname = 0) const {
85  return clone(newname && newname[0] != '\0' ? newname : nullptr);
86  }
87  virtual RooAbsArg* cloneTree(const char* newname=0) const ;
88 
89  // Accessors to client-server relation information
90 
91  /// Does value or shape of this arg depend on any other arg?
92  virtual Bool_t isDerived() const {
93  return kTRUE ;
94  }
95  Bool_t isCloneOf(const RooAbsArg& other) const ;
96 
97  /// Check whether this object depends on values from an element in the `serverList`.
98  ///
99  /// @param serverList Test if one of the elements in this list serves values to `this`.
100  /// @param ignoreArg Ignore values served by this object.
101  /// @return True if values are served.
102  Bool_t dependsOnValue(const RooAbsCollection& serverList, const RooAbsArg* ignoreArg=0) const {
103  return dependsOn(serverList,ignoreArg,kTRUE) ;
104  }
105  /// Check whether this object depends on values served from the object passed as `server`.
106  ///
107  /// @param server Test if `server` serves values to `this`.
108  /// @param ignoreArg Ignore values served by this object.
109  /// @return True if values are served.
110  Bool_t dependsOnValue(const RooAbsArg& server, const RooAbsArg* ignoreArg=0) const {
111  return dependsOn(server,ignoreArg,kTRUE) ;
112  }
113  Bool_t dependsOn(const RooAbsCollection& serverList, const RooAbsArg* ignoreArg=0, Bool_t valueOnly=kFALSE) const ;
114  Bool_t dependsOn(const RooAbsArg& server, const RooAbsArg* ignoreArg=0, Bool_t valueOnly=kFALSE) const ;
115  Bool_t overlaps(const RooAbsArg& testArg, Bool_t valueOnly=kFALSE) const ;
116  Bool_t hasClients() const { return !_clientList.empty(); }
117 
118  ////////////////////////////////////////////////////////////////////////////
119  /// \name Legacy RooFit interface.
120  /// This is a collection of functions that remain supported, but more elegant
121  /// interfaces are usually available.
122  /// @{
123 
124  /// Retrieve a client iterator.
125  inline TIterator* clientIterator() const
126  R__SUGGEST_ALTERNATIVE("Use clients() and begin(), end() or range-based loops.") {
127  // Return iterator over all client RooAbsArgs
129  }
131  R__SUGGEST_ALTERNATIVE("Use valueClients() and begin(), end() or range-based loops.") {
132  // Return iterator over all shape client RooAbsArgs
134  }
136  R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin(), end() or range-based loops.") {
137  // Return iterator over all shape client RooAbsArgs
139  }
140  inline TIterator* serverIterator() const
141  R__SUGGEST_ALTERNATIVE("Use servers() and begin(), end() or range-based loops.") {
142  // Return iterator over all server RooAbsArgs
144  }
145 
147  R__SUGGEST_ALTERNATIVE("Use valueClients() and begin(), end() or range-based loops.") {
148  return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_clientListValue)));
149  }
151  R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin(), end() or range-based loops.") {
152  return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_clientListShape)));
153  }
154  inline RooFIter serverMIterator() const
155  R__SUGGEST_ALTERNATIVE("Use servers() and begin(), end() or range-based loops.") {
156  return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_serverList)));
157  }
158 
159  // --- Obsolete functions for backward compatibility
160  /// \deprecated Use getObservables()
161  inline RooArgSet* getDependents(const RooArgSet& set) const { return getObservables(set) ; }
162  /// \deprecated Use getObservables()
163  inline RooArgSet* getDependents(const RooAbsData* set) const { return getObservables(set) ; }
164  /// \deprecated Use getObservables()
165  inline RooArgSet* getDependents(const RooArgSet* depList) const { return getObservables(depList) ; }
166  /// \deprecated Use observableOverlaps()
167  inline Bool_t dependentOverlaps(const RooAbsData* dset, const RooAbsArg& testArg) const { return observableOverlaps(dset,testArg) ; }
168  /// \deprecated Use observableOverlaps()
169  inline Bool_t dependentOverlaps(const RooArgSet* depList, const RooAbsArg& testArg) const { return observableOverlaps(depList, testArg) ; }
170  /// \deprecated Use checkObservables()
171  inline Bool_t checkDependents(const RooArgSet* nset) const { return checkObservables(nset) ; }
172  /// \deprecated Use recursiveCheckObservables()
173  inline Bool_t recursiveCheckDependents(const RooArgSet* nset) const { return recursiveCheckObservables(nset) ; }
174  // --- End obsolete functions for backward compatibility
175  /// @}
176  ////////////////////////////////////////////////////////////////////////////
177 
178  ////////////////////////////////////////////////////////////////////////////
179  /// \anchor clientServerInterface
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.
189  const RefCountList_t& valueClients() const {
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.
194  const RefCountList_t& shapeClients() const {
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 {
218  return _clientListValue.containsByNamePtr(&arg);
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 {
226  return _clientListShape.containsByNamePtr(&arg);
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  // Server redirection interface
261  Bool_t redirectServers(const RooAbsCollection& newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t isRecursionStep=kFALSE) ;
262  Bool_t recursiveRedirectServers(const RooAbsCollection& newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE) ;
263  virtual Bool_t redirectServersHook(const RooAbsCollection& /*newServerList*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive*/) { return kFALSE ; } ;
264  virtual void serverNameChangeHook(const RooAbsArg* /*oldServer*/, const RooAbsArg* /*newServer*/) { } ;
265 
266  void addServer(RooAbsArg& server, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE, std::size_t refCount = 1);
267  void addServerList(RooAbsCollection& serverList, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE) ;
268  void replaceServer(RooAbsArg& oldServer, RooAbsArg& newServer, Bool_t valueProp, Bool_t shapeProp) ;
269  void changeServer(RooAbsArg& server, Bool_t valueProp, Bool_t shapeProp) ;
270  void removeServer(RooAbsArg& server, Bool_t force=kFALSE) ;
271  RooAbsArg *findNewServer(const RooAbsCollection &newSet, Bool_t nameChange) const;
272 
273 
274  /// @}
275  ///////////////////////////////////////////////////////////////////////////////
276 
277 
278  // Parameter & observable interpretation of servers
279  friend class RooProdPdf ;
280  friend class RooAddPdf ;
281  friend class RooAddPdfOrig ;
282  RooArgSet* getVariables(Bool_t stripDisconnected=kTRUE) const ;
283  RooArgSet* getParameters(const RooAbsData* data, bool stripDisconnected=true) const ;
284  /// Return the parameters of this p.d.f when used in conjuction with dataset 'data'
285  RooArgSet* getParameters(const RooAbsData& data, bool stripDisconnected=true) const {
286  return getParameters(&data,stripDisconnected) ;
287  }
288  /// Return the parameters of the p.d.f given the provided set of observables
289  RooArgSet* getParameters(const RooArgSet& observables, bool stripDisconnected=true) const {
290  return getParameters(&observables,stripDisconnected);
291  }
292  RooArgSet* getParameters(const RooArgSet* observables, bool stripDisconnected=true) const;
293  virtual bool getParameters(const RooArgSet* observables, RooArgSet& outputSet, bool stripDisconnected=true) const;
294  /// Given a set of possible observables, return the observables that this PDF depends on.
295  RooArgSet* getObservables(const RooArgSet& set, Bool_t valueOnly=kTRUE) const {
296  return getObservables(&set,valueOnly) ;
297  }
298  RooArgSet* getObservables(const RooAbsData* data) const ;
299  /// Return the observables of this pdf given the observables defined by `data`.
300  RooArgSet* getObservables(const RooAbsData& data) const {
301  return getObservables(&data) ;
302  }
303  RooArgSet* getObservables(const RooArgSet* depList, bool valueOnly=true) const ;
304  bool getObservables(const RooAbsCollection* depList, RooArgSet& outputSet, bool valueOnly=true) const;
305  Bool_t observableOverlaps(const RooAbsData* dset, const RooAbsArg& testArg) const ;
306  Bool_t observableOverlaps(const RooArgSet* depList, const RooAbsArg& testArg) const ;
307  virtual Bool_t checkObservables(const RooArgSet* nset) const ;
308  Bool_t recursiveCheckObservables(const RooArgSet* nset) const ;
309  RooArgSet* getComponents() const ;
310 
311 
312 
313  void attachDataSet(const RooAbsData &set);
314  void attachDataStore(const RooAbsDataStore &set);
315 
316  // I/O streaming interface (machine readable)
317  virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t verbose=kFALSE) = 0 ;
318  virtual void writeToStream(std::ostream& os, Bool_t compact) const = 0 ;
319 
320  /// Print the object to the defaultPrintStream().
321  /// \param[in] options **V** print verbose. **T** print a tree structure with all children.
322  virtual void Print(Option_t *options= 0) const {
323  // Printing interface (human readable)
325  }
326 
327  virtual void printName(std::ostream& os) const ;
328  virtual void printTitle(std::ostream& os) const ;
329  virtual void printClassName(std::ostream& os) const ;
330  virtual void printAddress(std::ostream& os) const ;
331  virtual void printArgs(std::ostream& os) const ;
332  virtual void printMetaArgs(std::ostream& /*os*/) const {} ;
333  virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const;
334  virtual void printTree(std::ostream& os, TString indent="") const ;
335 
336  virtual Int_t defaultPrintContents(Option_t* opt) const ;
337 
338  // Accessors to attributes
339  void setAttribute(const Text_t* name, Bool_t value=kTRUE) ;
340  Bool_t getAttribute(const Text_t* name) const ;
341  inline const std::set<std::string>& attributes() const {
342  // Returns set of names of boolean attributes defined
343  return _boolAttrib ;
344  }
345 
346  void setStringAttribute(const Text_t* key, const Text_t* value) ;
347  const Text_t* getStringAttribute(const Text_t* key) const ;
348  inline const std::map<std::string,std::string>& stringAttributes() const {
349  // Returns std::map<string,string> with all string attributes defined
350  return _stringAttrib ;
351  }
352 
353  // Accessors to transient attributes
354  void setTransientAttribute(const Text_t* name, Bool_t value=kTRUE) ;
355  Bool_t getTransientAttribute(const Text_t* name) const ;
356  inline const std::set<std::string>& transientAttributes() const {
357  // Return set of transient boolean attributes
358  return _boolAttribTransient ;
359  }
360 
361  /// Check if the "Constant" attribute is set.
362  inline Bool_t isConstant() const {
363  return _isConstant ; //getAttribute("Constant") ;
364  }
366 
367  // Sorting
368  Int_t Compare(const TObject* other) const ;
369  virtual Bool_t IsSortable() const {
370  // Object is sortable in ROOT container class
371  return kTRUE ;
372  }
373 
374  virtual bool operator==(const RooAbsArg& other) const = 0 ;
375  virtual bool isIdentical(const RooAbsArg& other, Bool_t assumeSameType=kFALSE) const = 0 ;
376 
377  // Range management
378  virtual Bool_t inRange(const char*) const {
379  // Is value in range (dummy interface always returns true)
380  return kTRUE ;
381  }
382  virtual Bool_t hasRange(const char*) const {
383  // Has this argument a defined range (dummy interface always returns flase)
384  return kFALSE ;
385  }
386 
387 
389  enum CacheMode { Always=0, NotAdvised=1, Never=2 } ;
390  enum OperMode { Auto=0, AClean=1, ADirty=2 } ;
391 
392  ////////////////////////////////////////////////////////////////////////////
393  /// \anchor optimisationInterface
394  /// \name Optimisation interface
395  /// These functions allow RooFit to optimise a computation graph, to keep track
396  /// of cached values, and to invalidate caches.
397  /// @{
398 
399  // Cache mode optimization (tracks changes & do lazy evaluation vs evaluate always)
400  virtual void optimizeCacheMode(const RooArgSet& observables) ;
401  virtual void optimizeCacheMode(const RooArgSet& observables, RooArgSet& optNodes, RooLinkedList& processedNodes) ;
402 
403 
404  // Find constant terms in expression
405  Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheList) ;
406  Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheList, RooLinkedList& processedNodes) ;
407 
408 
409  // constant term optimization
410  virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE) ;
411 
412  virtual CacheMode canNodeBeCached() const { return Always ; }
413  virtual void setCacheAndTrackHints(RooArgSet& /*trackNodes*/ ) {} ;
414 
415  // Dirty state accessor
416  inline Bool_t isShapeDirty() const {
417  // Return true is shape has been invalidated by server value change
418  return isDerived()?_shapeDirty:kFALSE ;
419  }
420 
421  inline Bool_t isValueDirty() const {
422  // Returns true of value has been invalidated by server value change
423  if (inhibitDirty()) return kTRUE ;
424  switch(_operMode) {
425  case AClean:
426  return kFALSE ;
427  case ADirty:
428  return kTRUE ;
429  case Auto:
430  if (_valueDirty) return isDerived() ;
431  return kFALSE ;
432  }
433  return kTRUE ; // we should never get here
434  }
435 
436  inline Bool_t isValueDirtyAndClear() const {
437  // Returns true of value has been invalidated by server value change
438  if (inhibitDirty()) return kTRUE ;
439  switch(_operMode) {
440  case AClean:
441  return kFALSE ;
442  case ADirty:
443  return kTRUE ;
444  case Auto:
445  if (_valueDirty) {
446  _valueDirty = kFALSE ;
447  return isDerived();
448  }
449  return kFALSE ;
450  }
451  return kTRUE ; // But we should never get here
452  }
453 
454 
456  // Returns true of value has been invalidated by server value change
457 
458  if (inhibitDirty()) return kTRUE ;
459  switch(_operMode) {
460  case AClean:
461  return kFALSE ;
462  case ADirty:
463  return kTRUE ;
464  case Auto:
465  if (_valueDirty || _shapeDirty) {
466  _shapeDirty = kFALSE ;
467  _valueDirty = kFALSE ;
468  return isDerived();
469  }
470  _shapeDirty = kFALSE ;
471  _valueDirty = kFALSE ;
472  return kFALSE ;
473  }
474  return kTRUE ; // But we should never get here
475  }
476 
477  // Cache management
478  void registerCache(RooAbsCache& cache) ;
479  void unRegisterCache(RooAbsCache& cache) ;
480  Int_t numCaches() const ;
481  RooAbsCache* getCache(Int_t index) const ;
482 
483  /// Query the operation mode of this node.
484  inline OperMode operMode() const { return _operMode ; }
485  /// Set the operation mode of this node.
486  void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE) ;
487 
488  // Dirty state modifiers
489  /// Mark the element dirty. This forces a re-evaluation when a value is requested.
490  void setValueDirty() {
491  if (_operMode == Auto && !inhibitDirty())
492  setValueDirty(nullptr);
493  }
494  /// Notify that a shape-like property (*e.g.* binning) has changed.
495  void setShapeDirty() { setShapeDirty(nullptr); }
496 
497  const char* aggregateCacheUniqueSuffix() const ;
498  virtual const char* cacheUniqueSuffix() const { return 0 ; }
499 
500  void wireAllCaches() ;
501 
503  virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache) { _eocache = &cache; }
504 
505  /// Overwrite the current value stored in this object, making it look like this object computed that value.
506  /// \param[in] value Value to store.
507  /// \param[in] notifyClients Notify users of this object that they need to
508  /// recompute their values.
509  virtual void setCachedValue(double /*value*/, bool /*notifyClients*/ = true) {};
510 
511  /// @}
512  ////////////////////////////////////////////////////////////////////////////
513 
514  //Debug hooks
515  static void verboseDirty(Bool_t flag) ;
516  void printDirty(Bool_t depth=kTRUE) const ;
517  static void setDirtyInhibit(Bool_t flag) ;
518 
519  void graphVizTree(const char* fileName, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ;
520  void graphVizTree(std::ostream& os, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ;
521 
522  void printComponentTree(const char* indent="",const char* namePat=0, Int_t nLevel=999) ;
523  void printCompactTree(const char* indent="",const char* fileName=0, const char* namePat=0, RooAbsArg* client=0) ;
524  void printCompactTree(std::ostream& os, const char* indent="", const char* namePat=0, RooAbsArg* client=0) ;
525  virtual void printCompactTreeHook(std::ostream& os, const char *ind="") ;
526 
527  Bool_t addOwnedComponents(const RooArgSet& comps) ;
528  const RooArgSet* ownedComponents() const { return _ownedComponents ; }
529 
531 
533 
534  RooAbsProxy* getProxy(Int_t index) const ;
535  Int_t numProxies() const ;
536 
537  /// De-duplicated pointer to this object's name.
538  /// This can be used for fast name comparisons.
539  /// like `if (namePtr() == other.namePtr())`.
540  /// \note TNamed::GetName() will return a pointer that's
541  /// different for each object, but namePtr() always points
542  /// to a unique instance.
543  inline const TNamed* namePtr() const {
544  return _namePtr ;
545  }
546 
547  void SetName(const char* name) ;
548  void SetNameTitle(const char *name, const char *title) ;
549 
551  {
552  _myws = &ws;
553  return kFALSE;
554  };
555 
556 
557 protected:
558  void graphVizAddConnections(std::set<std::pair<RooAbsArg*,RooAbsArg*> >&) ;
559 
560  virtual void operModeHook() {} ;
561 
562  virtual void optimizeDirtyHook(const RooArgSet* /*obs*/) {} ;
563 
564  virtual Bool_t isValid() const ;
565 
566  virtual void getParametersHook(const RooArgSet* /*nset*/, RooArgSet* /*list*/, Bool_t /*stripDisconnected*/) const {} ;
567  virtual void getObservablesHook(const RooArgSet* /*nset*/, RooArgSet* /*list*/) const {} ;
568 
569  void clearValueAndShapeDirty() const {
572  }
573 
574  void clearValueDirty() const {
576  }
577  void clearShapeDirty() const {
579  }
580 
581  /// Force element to re-evaluate itself when a value is requested.
582  void setValueDirty(const RooAbsArg* source);
583  /// Notify that a shape-like property (*e.g.* binning) has changed.
584  void setShapeDirty(const RooAbsArg* source);
585 
586  virtual void ioStreamerPass2() ;
587  static void ioStreamerPass2Finalize() ;
588 
589 
590 private:
591  void addParameters(RooArgSet& params, const RooArgSet* nset=0, Bool_t stripDisconnected=kTRUE) const;
592 
594 
595 
596  protected:
597 
598  // Client-Server relation and Proxy management
599  friend class RooArgSet ;
600  friend class RooAbsCollection ;
601  friend class RooCustomizer ;
602  friend class RooWorkspace ;
603  friend class RooExtendPdf ;
604  friend class RooRealIntegral ;
605  friend class RooAbsReal ;
606  friend class RooProjectedPdf ;
607  RefCountList_t _serverList ; // list of server objects
608  RefCountList_t _clientList; // list of client objects
609  RefCountList_t _clientListShape; // subset of clients that requested shape dirty flag propagation
610  RefCountList_t _clientListValue; // subset of clients that requested value dirty flag propagation
611 
612  RooRefArray _proxyList ; // list of proxies
613  std::deque<RooAbsCache*> _cacheList ; // list of caches
614 
615 
616  // Proxy management
617  friend class RooAddModel ;
618  friend class RooArgProxy ;
619  friend class RooSetProxy ;
620  friend class RooListProxy ;
621  friend class RooObjectFactory ;
622  friend class RooHistPdf ;
623  friend class RooHistFunc ;
624  void registerProxy(RooArgProxy& proxy) ;
625  void registerProxy(RooSetProxy& proxy) ;
626  void registerProxy(RooListProxy& proxy) ;
627  void unRegisterProxy(RooArgProxy& proxy) ;
628  void unRegisterProxy(RooSetProxy& proxy) ;
629  void unRegisterProxy(RooListProxy& proxy) ;
630  void setProxyNormSet(const RooArgSet* nset) ;
631 
632  // Attribute list
633  std::set<std::string> _boolAttrib ; // Boolean attributes
634  std::map<std::string,std::string> _stringAttrib ; // String attributes
635  std::set<std::string> _boolAttribTransient ; //! Transient boolean attributes (not copied in ctor)
636 
637  void printAttribList(std::ostream& os) const;
638 
639  // Hooks for RooTreeData interface
640  friend class RooCompositeDataStore ;
641  friend class RooTreeDataStore ;
642  friend class RooVectorDataStore ;
643  friend class RooDataSet ;
644  friend class RooRealMPFE ;
645  virtual void syncCache(const RooArgSet* nset=0) = 0 ;
646  virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE) = 0 ;
647 
648  virtual void attachToTree(TTree& t, Int_t bufSize=32000) = 0 ;
649  virtual void attachToVStore(RooVectorDataStore& vstore) = 0 ;
650  /// Attach this argument to the data store such that it reads data from there.
651  void attachToStore(RooAbsDataStore& store) ;
652 
653  virtual void setTreeBranchStatus(TTree& t, Bool_t active) = 0 ;
654  virtual void fillTreeBranch(TTree& t) = 0 ;
655  TString cleanBranchName() const ;
656 
657  // Global
658  friend std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg);
659  friend std::istream& operator>>(std::istream& is, RooAbsArg &arg) ;
661 
662  // Debug stuff
663  static Bool_t _verboseDirty ; // Static flag controlling verbose messaging for dirty state changes
664  static Bool_t _inhibitDirty ; // Static flag controlling global inhibit of dirty state propagation
665  Bool_t _deleteWatch ; //! Delete watch flag
666 
667  Bool_t inhibitDirty() const ;
668 
669  public:
670  void setLocalNoDirtyInhibit(Bool_t flag) const { _localNoInhibitDirty = flag ; }
672  protected:
673 
674 
675  mutable Bool_t _valueDirty ; // Flag set if value needs recalculating because input values modified
676  mutable Bool_t _shapeDirty ; // Flag set if value needs recalculating because input shapes modified
677  mutable bool _allBatchesDirty{true}; //! Mark batches as dirty (only meaningful for RooAbsReal).
678 
679  mutable OperMode _operMode ; // Dirty state propagation mode
680  mutable Bool_t _fast ; // Allow fast access mode in getVal() and proxies
681 
682  // Owned components
683  RooArgSet* _ownedComponents ; //! Set of owned component
684 
685  mutable Bool_t _prohibitServerRedirect ; //! Prohibit server redirects -- Debugging tool
686 
687  mutable RooExpensiveObjectCache* _eocache{nullptr}; // Pointer to global cache manager for any expensive components created by this object
688 
689  mutable TNamed* _namePtr ; //! De-duplicated name pointer. This will be equal for all objects with the same name.
690  Bool_t _isConstant ; //! Cached isConstant status
691 
692  mutable Bool_t _localNoInhibitDirty ; //! Prevent 'AlwaysDirty' mode for this node
693 
694 /* RooArgSet _leafNodeCache ; //! Cached leaf nodes */
695 /* RooArgSet _branchNodeCache //! Cached branch nodes */
696 
697  mutable RooWorkspace *_myws; //! In which workspace do I live, if any
698 
699  /// \cond Internal
700  // Legacy streamers need the following statics:
701  friend class RooFitResult;
702 
703  public:
704  static std::map<RooAbsArg*,std::unique_ptr<TRefArray>> _ioEvoList; // temporary holding list for proxies needed in schema evolution
705  protected:
706  static std::stack<RooAbsArg*> _ioReadStack ; // reading stack
707  /// \endcond
708 
709  ClassDef(RooAbsArg,7) // Abstract variable
710 };
711 
712 std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg);
713 std::istream& operator>>(std::istream& is, RooAbsArg &arg);
714 
715 
716 #endif
RooAbsArg::Clone
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
Definition: RooAbsArg.h:84
RooSTLRefCountList::containsByNamePtr
bool containsByNamePtr(const T *obj) const
Check if list contains an item using findByNamePointer().
Definition: RooSTLRefCountList.h:162
RooAbsArg::getCache
RooAbsCache * getCache(Int_t index) const
Return registered cache object by index.
Definition: RooAbsArg.cxx:1999
RooAbsArg::serverIterator
TIterator * serverIterator() const
Definition: RooAbsArg.h:140
RooAbsArg::getObservables
RooArgSet * getObservables(const RooAbsData &data) const
Return the observables of this pdf given the observables defined by data.
Definition: RooAbsArg.h:300
RooAbsArg::numProxies
Int_t numProxies() const
Return the number of registered proxies.
Definition: RooAbsArg.cxx:1327
RooAbsArg::fillTreeBranch
virtual void fillTreeBranch(TTree &t)=0
RooAbsArg::ADirty
@ ADirty
Definition: RooAbsArg.h:390
RooRealMPFE
RooRealMPFE is the multi-processor front-end for parallel calculation of RooAbsReal objects.
Definition: RooRealMPFE.h:30
RooAbsArg::isValueServer
Bool_t isValueServer(const RooAbsArg &arg) const
Check if this is serving values to arg.
Definition: RooAbsArg.h:217
TRefArray.h
RooAbsArg::_inhibitDirty
static Bool_t _inhibitDirty
Definition: RooAbsArg.h:664
RooAbsArg::operMode
OperMode operMode() const
Query the operation mode of this node.
Definition: RooAbsArg.h:484
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
RooAbsArg::clientIterator
TIterator * clientIterator() const
Retrieve a client iterator.
Definition: RooAbsArg.h:125
RooLinkedListIter.h
RooAbsArg::ValueChange
@ ValueChange
Definition: RooAbsArg.h:388
RooAbsArg::DeActivate
@ DeActivate
Definition: RooAbsArg.h:388
RooAbsArg::getObservablesHook
virtual void getObservablesHook(const RooArgSet *, RooArgSet *) const
Definition: RooAbsArg.h:567
RooAbsArg::printTitle
virtual void printTitle(std::ostream &os) const
Print object title.
Definition: RooAbsArg.cxx:1385
RooAbsArg::shapeClientIterator
TIterator * shapeClientIterator() const
Definition: RooAbsArg.h:135
TObjArray
An array of TObjects.
Definition: TObjArray.h:37
RooAddPdf
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
Definition: RooAddPdf.h:31
RooAbsArg::_boolAttribTransient
std::set< std::string > _boolAttribTransient
Definition: RooAbsArg.h:635
RooAbsArg::isShapeServer
Bool_t isShapeServer(const char *name) const
Check if this is serving shape to an object with name name.
Definition: RooAbsArg.h:229
RooAbsArg::_localNoInhibitDirty
Bool_t _localNoInhibitDirty
Cached isConstant status.
Definition: RooAbsArg.h:692
RooAbsArg::ConfigChange
@ ConfigChange
Definition: RooAbsArg.h:388
Option_t
const char Option_t
Definition: RtypesCore.h:66
operator>>
std::istream & operator>>(std::istream &is, RooAbsArg &arg)
Istream operator.
Definition: RooAbsArg.cxx:1528
RooAbsData
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:49
RooAbsArg::_boolAttrib
std::set< std::string > _boolAttrib
Definition: RooAbsArg.h:633
RooAbsArg::printArgs
virtual void printArgs(std::ostream &os) const
Print object arguments, ie its proxies.
Definition: RooAbsArg.cxx:1412
RooAbsArg::stringAttributes
const std::map< std::string, std::string > & stringAttributes() const
Definition: RooAbsArg.h:348
RooAbsArg::recursiveCheckObservables
Bool_t recursiveCheckObservables(const RooArgSet *nset) const
Recursively call checkObservables on all nodes in the expression tree.
Definition: RooAbsArg.cxx:773
RooAbsArg::getComponents
RooArgSet * getComponents() const
Create a RooArgSet with all components (branch nodes) of the expression tree headed by this object.
Definition: RooAbsArg.cxx:746
RooAbsArg::Always
@ Always
Definition: RooAbsArg.h:389
RooAbsArg::getParameters
RooArgSet * getParameters(const RooAbsData *data, bool stripDisconnected=true) 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:578
RooAbsArg::isValueDirtyAndClear
Bool_t isValueDirtyAndClear() const
Definition: RooAbsArg.h:436
RooAbsArg::Auto
@ Auto
Definition: RooAbsArg.h:390
RooAbsArg::_isConstant
Bool_t _isConstant
De-duplicated name pointer. This will be equal for all objects with the same name.
Definition: RooAbsArg.h:690
RooAbsArg::unRegisterCache
void unRegisterCache(RooAbsCache &cache)
Unregister a RooAbsCache. Called from the RooAbsCache destructor.
Definition: RooAbsArg.cxx:1980
RooAbsArg::RooObjectFactory
friend class RooObjectFactory
Definition: RooAbsArg.h:621
RooAbsArg::ioStreamerPass2Finalize
static void ioStreamerPass2Finalize()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
Definition: RooAbsArg.cxx:2408
RooAbsArg::redirectServersHook
virtual Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Definition: RooAbsArg.h:263
RooAbsArg::dependsOnValue
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:102
RooAbsArg::cleanBranchName
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:1929
RooCustomizer
RooCustomizer is a factory class to produce clones of a prototype composite PDF object with the same ...
Definition: RooCustomizer.h:35
RooAbsArg::~RooAbsArg
virtual ~RooAbsArg()
Destructor.
Definition: RooAbsArg.cxx:222
RooAbsArg::findServer
RooAbsArg * findServer(Int_t index) const
Return i-th server from server list.
Definition: RooAbsArg.h:213
RooSetProxy
RooSetProxy is the concrete proxy for RooArgSet objects.
Definition: RooSetProxy.h:23
RooAbsArg::Print
virtual void Print(Option_t *options=0) const
Print the object to the defaultPrintStream().
Definition: RooAbsArg.h:322
RooAbsArg::graphVizTree
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:2047
RooAbsArg::printAttribList
void printAttribList(std::ostream &os) const
Transient boolean attributes (not copied in ctor)
Definition: RooAbsArg.cxx:1537
RooAbsArg::_serverList
RefCountList_t _serverList
Definition: RooAbsArg.h:607
TNamed.h
RooAbsArg::namePtr
const TNamed * namePtr() const
De-duplicated pointer to this object's name.
Definition: RooAbsArg.h:543
TTree
A TTree represents a columnar dataset.
Definition: TTree.h:79
RooAbsArg::ownedComponents
const RooArgSet * ownedComponents() const
Definition: RooAbsArg.h:528
RooAbsArg::writeToStream
virtual void writeToStream(std::ostream &os, Bool_t compact) const =0
RooAbsArg::SetName
void SetName(const char *name)
Set the name of the TNamed.
Definition: RooAbsArg.cxx:2325
RooAbsArg::createFundamental
virtual RooAbsArg * createFundamental(const char *newname=0) const =0
Create a fundamental-type object that stores our type of value.
RooAbsArg::isIdentical
virtual bool isIdentical(const RooAbsArg &other, Bool_t assumeSameType=kFALSE) const =0
RooAbsArg::RefCountListLegacyIterator_t
TIteratorToSTLInterface< RefCountList_t::Container_t > RefCountListLegacyIterator_t
Definition: RooAbsArg.h:75
RooAbsArg::ioStreamerPass2
virtual void ioStreamerPass2()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
Definition: RooAbsArg.cxx:2380
RooAbsArg::checkObservables
virtual Bool_t checkObservables(const RooArgSet *nset) const
Overloadable function in which derived classes can implement consistency checks of the variables.
Definition: RooAbsArg.cxx:764
RooPrintable.h
RooAbsArg::getTransientAttribute
Bool_t getTransientAttribute(const Text_t *name) const
Check if a named attribute is set.
Definition: RooAbsArg.cxx:372
R__SUGGEST_ALTERNATIVE
#define R__SUGGEST_ALTERNATIVE(ALTERNATIVE)
Definition: RConfig.hxx:523
RooAbsArg::printMultiline
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Implement multi-line detailed printing.
Definition: RooAbsArg.cxx:1445
RooExtendPdf
RooExtendPdf is a wrapper around an existing PDF that adds a parameteric extended likelihood term to ...
Definition: RooExtendPdf.h:22
RooAbsArg::defaultPrintContents
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default contents to print.
Definition: RooAbsArg.cxx:1435
RooAbsArg::isShapeServer
Bool_t isShapeServer(const RooAbsArg &arg) const
Check if this is serving shape to arg.
Definition: RooAbsArg.h:225
RooAbsArg::setOperMode
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Set the operation mode of this node.
Definition: RooAbsArg.cxx:1817
RooAbsArg::getParameters
RooArgSet * getParameters(const RooAbsData &data, bool stripDisconnected=true) const
Return the parameters of this p.d.f when used in conjuction with dataset 'data'.
Definition: RooAbsArg.h:285
RooRefArray::operator=
RooRefArray & operator=(const RooRefArray &other)=default
RooAbsArg::treeNodeServerList
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:536
RooAbsArg::_clientListShape
RefCountList_t _clientListShape
Definition: RooAbsArg.h:609
TClass.h
RooAbsArg::changeServer
void changeServer(RooAbsArg &server, Bool_t valueProp, Bool_t shapeProp)
Change dirty flag propagation mask for specified server.
Definition: RooAbsArg.cxx:475
indent
static void indent(ostringstream &buf, int indent_level)
Definition: TClingCallFunc.cxx:87
RooAbsArg::Compare
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:1591
RooAbsArg::isLValue
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
RooAbsArg::printCompactTree
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:1844
RooAbsReal
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:61
RooAbsArg::getProxy
RooAbsProxy * getProxy(Int_t index) const
Return the nth proxy from the proxy list.
Definition: RooAbsArg.cxx:1314
RooAbsArg::inhibitDirty
Bool_t inhibitDirty() const
Delete watch flag.
Definition: RooAbsArg.cxx:116
TBuffer
Buffer base class used for serializing objects.
Definition: TBuffer.h:43
RooAbsArg::isCloneOf
Bool_t isCloneOf(const RooAbsArg &other) const
Check if this object was created as a clone of 'other'.
Definition: RooAbsArg.cxx:281
RooAbsArg::CacheMode
CacheMode
Definition: RooAbsArg.h:389
RooAbsArg::attachToVStore
virtual void attachToVStore(RooVectorDataStore &vstore)=0
RooAbsArg::recursiveRedirectServers
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
Recursively replace all servers with the new servers in newSet.
Definition: RooAbsArg.cxx:1159
RooAbsArg::setExpensiveObjectCache
virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache)
Definition: RooAbsArg.h:503
RooRefArray::RooRefArray
RooRefArray()
Definition: RooAbsArg.h:56
TString
Basic string class.
Definition: TString.h:136
RooAbsArg::transientAttributes
const std::set< std::string > & transientAttributes() const
Definition: RooAbsArg.h:356
RooAbsArg::shapeClients
const RefCountList_t & shapeClients() const
List of all shape clients of this object.
Definition: RooAbsArg.h:194
RooAbsArg::Never
@ Never
Definition: RooAbsArg.h:389
RooAbsArg::expensiveObjectCache
RooExpensiveObjectCache & expensiveObjectCache() const
Definition: RooAbsArg.cxx:2277
RooPrintable
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
Definition: RooPrintable.h:25
RooAbsArg::_fast
Bool_t _fast
Definition: RooAbsArg.h:680
RooAbsArg::recursiveCheckDependents
Bool_t recursiveCheckDependents(const RooArgSet *nset) const
Definition: RooAbsArg.h:173
RooAbsArg::makeLegacyIterator
RefCountListLegacyIterator_t * makeLegacyIterator(const RefCountList_t &list) const
Definition: RooAbsArg.cxx:2426
RooSTLRefCountList.h
RooSTLRefCountList::empty
bool empty() const
Check if empty.
Definition: RooSTLRefCountList.h:114
RooAbsArg::valueClients
const RefCountList_t & valueClients() const
List of all value clients of this object. Value clients receive value updates.
Definition: RooAbsArg.h:189
RooAbsArg::branchNodeServerList
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:520
RooExpensiveObjectCache
RooExpensiveObjectCache is a singleton class that serves as repository for objects that are expensive...
Definition: RooExpensiveObjectCache.h:24
bool
TIterator
Iterator abstract base class.
Definition: TIterator.h:30
RooFitResult
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
Definition: RooFitResult.h:40
RooAbsArg::registerProxy
void registerProxy(RooArgProxy &proxy)
Register an RooArgProxy in the proxy list.
Definition: RooAbsArg.cxx:1205
RooAbsArg::getDependents
RooArgSet * getDependents(const RooArgSet &set) const
Definition: RooAbsArg.h:161
RooCompositeDataStore
RooCompositeDataStore combines several disjunct datasets into one.
Definition: RooCompositeDataStore.h:34
RooAbsArg::graphVizAddConnections
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:2126
RooRealIntegral
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
Definition: RooRealIntegral.h:34
RooSTLRefCountList::end
Container_t::const_iterator end() const
End of contained objects.
Definition: RooSTLRefCountList.h:84
RooAbsArg::findNewServer
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:1114
RooAbsArg::clients
const RefCountList_t & clients() const
List of all clients of this object.
Definition: RooAbsArg.h:185
RooAbsArg::optimizeDirtyHook
virtual void optimizeDirtyHook(const RooArgSet *)
Definition: RooAbsArg.h:562
RooAbsArg::serverNameChangeHook
virtual void serverNameChangeHook(const RooAbsArg *, const RooAbsArg *)
Definition: RooAbsArg.h:264
RooAbsArg::_namePtr
TNamed * _namePtr
Definition: RooAbsArg.h:689
RooAbsArg::setLocalNoDirtyInhibit
void setLocalNoDirtyInhibit(Bool_t flag) const
Definition: RooAbsArg.h:670
RooAbsArg::isDerived
virtual Bool_t isDerived() const
Does value or shape of this arg depend on any other arg?
Definition: RooAbsArg.h:92
RooAbsArg::clone
virtual TObject * clone(const char *newname=0) const =0
RooAbsArg::getCloningAncestors
RooLinkedList getCloningAncestors() const
Return ancestors in cloning chain of this RooAbsArg.
Definition: RooAbsArg.cxx:2018
RooAbsArg::getParameters
RooArgSet * getParameters(const RooArgSet &observables, bool stripDisconnected=true) const
Return the parameters of the p.d.f given the provided set of observables.
Definition: RooAbsArg.h:289
RooAbsArg::addParameters
void addParameters(RooArgSet &params, const RooArgSet *nset=0, Bool_t stripDisconnected=kTRUE) const
INTERNAL helper function for getParameters()
Definition: RooAbsArg.cxx:587
RooAbsArg::setStringAttribute
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
Definition: RooAbsArg.cxx:323
RooAbsArg::_eocache
RooExpensiveObjectCache * _eocache
Prohibit server redirects – Debugging tool.
Definition: RooAbsArg.h:687
RooAbsArg::_prohibitServerRedirect
Bool_t _prohibitServerRedirect
Set of owned component.
Definition: RooAbsArg.h:685
RooRefArray::~RooRefArray
virtual ~RooRefArray()
Definition: RooAbsArg.h:61
ws
void ws()
Definition: ws.C:66
RooAbsArg::replaceServer
void replaceServer(RooAbsArg &oldServer, RooAbsArg &newServer, Bool_t valueProp, Bool_t shapeProp)
Replace 'oldServer' with 'newServer'.
Definition: RooAbsArg.cxx:464
operator<<
std::ostream & operator<<(std::ostream &os, const RooAbsArg &arg)
Ostream operator.
Definition: RooAbsArg.cxx:1519
RooAbsArg::localNoDirtyInhibit
Bool_t localNoDirtyInhibit() const
Definition: RooAbsArg.h:671
RooAbsArg::findServer
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
RooAbsArg::SetNameTitle
void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Definition: RooAbsArg.cxx:2341
RooAbsArg::dependentOverlaps
Bool_t dependentOverlaps(const RooAbsData *dset, const RooAbsArg &testArg) const
Definition: RooAbsArg.h:167
RooAbsArg::operator=
RooAbsArg & operator=(const RooAbsArg &other)
Assign all boolean and string properties of the original object.
Definition: RooAbsArg.cxx:190
RooAbsArg::getDependents
RooArgSet * getDependents(const RooAbsData *set) const
Definition: RooAbsArg.h:163
RooArgProxy
RooArgProxy is the abstract interface for RooAbsArg proxy classes.
Definition: RooArgProxy.h:24
RooAbsArg::isValid
virtual Bool_t isValid() const
WVE (08/21/01) Probably obsolete now.
Definition: RooAbsArg.cxx:1364
RooRefArray
Definition: RooAbsArg.h:54
RooAbsArg::printComponentTree
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:1904
RooAbsArg::_valueDirty
Bool_t _valueDirty
Definition: RooAbsArg.h:675
RooAbsArg::syncCache
virtual void syncCache(const RooArgSet *nset=0)=0
RooAbsArg::removeServer
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:439
RooAbsArg::printAddress
virtual void printAddress(std::ostream &os) const
Print class name of object.
Definition: RooAbsArg.cxx:1401
RooAbsArg::isValueDirty
Bool_t isValueDirty() const
Definition: RooAbsArg.h:421
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
RooAbsArg::setProhibitServerRedirect
void setProhibitServerRedirect(Bool_t flag)
Definition: RooAbsArg.h:530
RooAbsArg::registerCache
void registerCache(RooAbsCache &cache)
Register RooAbsCache with this object.
Definition: RooAbsArg.cxx:1971
RooAbsArg::_operMode
OperMode _operMode
Mark batches as dirty (only meaningful for RooAbsReal).
Definition: RooAbsArg.h:679
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
RooAbsArg::hasRange
virtual Bool_t hasRange(const char *) const
Definition: RooAbsArg.h:382
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
RooAbsArg::setTreeBranchStatus
virtual void setTreeBranchStatus(TTree &t, Bool_t active)=0
RooAbsArg::clearValueAndShapeDirty
void clearValueAndShapeDirty() const
Definition: RooAbsArg.h:569
RooLinkedList
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:37
RooAbsArg::RefCountList_t
RooSTLRefCountList< RooAbsArg > RefCountList_t
Definition: RooAbsArg.h:74
RooAbsArg::attachDataStore
void attachDataStore(const RooAbsDataStore &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
Definition: RooAbsArg.cxx:1572
RooAbsArg::_clientList
RefCountList_t _clientList
Definition: RooAbsArg.h:608
RooAbsCollection
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
Definition: RooAbsCollection.h:33
RooAbsArg::verboseDirty
static void verboseDirty(Bool_t flag)
Activate verbose messaging related to dirty flag propagation.
Definition: RooAbsArg.cxx:273
RooAbsArg::AClean
@ AClean
Definition: RooAbsArg.h:390
RooAbsArg::setProxyNormSet
void setProxyNormSet(const RooArgSet *nset)
Forward a change in the cached normalization argset to all the registered proxies.
Definition: RooAbsArg.cxx:1338
RooAbsArg::getStringAttribute
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
Definition: RooAbsArg.cxx:336
RooAbsArg::optimizeCacheMode
virtual void optimizeCacheMode(const RooArgSet &observables)
Activate cache mode optimization with given definition of observables.
Definition: RooAbsArg.cxx:1635
RooSTLRefCountList< RooAbsArg >
RooSTLRefCountList::containedObjects
const Container_t & containedObjects() const
Direct reference to container of objects held by this list.
Definition: RooSTLRefCountList.h:95
RooAbsArg::_clientListValue
RefCountList_t _clientListValue
Definition: RooAbsArg.h:610
RooSTLRefCountList::findByNamePointer
Container_t::const_iterator findByNamePointer(const T *item) const
Find an item by comparing RooAbsArg::namePtr() adresses.
Definition: RooSTLRefCountList.h:144
RooAbsArg::printDirty
void printDirty(Bool_t depth=kTRUE) const
Print information about current value dirty state information.
Definition: RooAbsArg.cxx:1603
RooAbsArg::constOptimizeTestStatistic
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Interface function signaling a request to perform constant term optimization.
Definition: RooAbsArg.cxx:1804
RooAbsArg::attachDataSet
void attachDataSet(const RooAbsData &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
Definition: RooAbsArg.cxx:1553
RooListProxy
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:24
RooHistPdf
RooHistPdf implements a probablity density function sampled from a multidimensional histogram.
Definition: RooHistPdf.h:29
RooRefArray::RooRefArray
RooRefArray(const RooRefArray &other)
Definition: RooAbsArg.h:58
RooAbsArg::overlaps
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:854
RooTreeDataStore
RooTreeDataStore is a TTree-backed data storage.
Definition: RooTreeDataStore.h:32
RooAbsArg::servers
const RefCountList_t & servers() const
List of all servers of this object.
Definition: RooAbsArg.h:199
RooHistFunc
RooHistFunc implements a real-valued function sampled from a multidimensional histogram.
Definition: RooHistFunc.h:30
RooAbsArg::setWorkspace
void setWorkspace(RooWorkspace &ws)
Definition: RooAbsArg.h:532
THashList.h
RooAbsArg::operator<<
friend std::ostream & operator<<(std::ostream &os, const RooAbsArg &arg)
Ostream operator.
Definition: RooAbsArg.cxx:1519
RooAbsArg::isFundamental
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
RooAbsArg::copyCache
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)=0
RooAbsArg::printTree
virtual void printTree(std::ostream &os, TString indent="") const
Print object tree structure.
Definition: RooAbsArg.cxx:1510
RooAbsArg::_shapeDirty
Bool_t _shapeDirty
Definition: RooAbsArg.h:676
RooAbsArg::Activate
@ Activate
Definition: RooAbsArg.h:388
RooAbsArg::hasClients
Bool_t hasClients() const
Definition: RooAbsArg.h:116
RooAbsArg::addServer
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:388
RooAbsArg::RooAddPdfOrig
friend class RooAddPdfOrig
Definition: RooAbsArg.h:281
RooAbsArg::setCachedValue
virtual void setCachedValue(double, bool=true)
Overwrite the current value stored in this object, making it look like this object computed that valu...
Definition: RooAbsArg.h:509
RooAbsArg::clearShapeDirty
void clearShapeDirty() const
Definition: RooAbsArg.h:577
RooAbsArg::isShapeDirty
Bool_t isShapeDirty() const
Definition: RooAbsArg.h:416
RooAbsArg::cacheUniqueSuffix
virtual const char * cacheUniqueSuffix() const
Definition: RooAbsArg.h:498
RooSTLRefCountList::containsSameName
bool containsSameName(const char *name) const
Check if list contains an item using findByName().
Definition: RooSTLRefCountList.h:168
RooAbsArg::OperMode
OperMode
Definition: RooAbsArg.h:390
RooWorkspace
The RooWorkspace is a persistable container for RooFit projects.
Definition: RooWorkspace.h:43
RooAbsArg::readFromStream
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)=0
RooAbsArg::aggregateCacheUniqueSuffix
const char * aggregateCacheUniqueSuffix() const
Definition: RooAbsArg.cxx:2289
RooAbsArg::operator==
virtual bool operator==(const RooAbsArg &other) const =0
RooAbsArg::valueClientIterator
TIterator * valueClientIterator() const
Definition: RooAbsArg.h:130
RooAbsArg::setShapeDirty
void setShapeDirty()
Notify that a shape-like property (e.g. binning) has changed.
Definition: RooAbsArg.h:495
RooAbsArg::getObservables
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Given a set of possible observables, return the observables that this PDF depends on.
Definition: RooAbsArg.h:295
RooAbsArg::getParametersHook
virtual void getParametersHook(const RooArgSet *, RooArgSet *, Bool_t) const
Definition: RooAbsArg.h:566
RooAbsArg::addOwnedComponents
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
Definition: RooAbsArg.cxx:2216
RooAbsArg::_proxyList
RooRefArray _proxyList
Definition: RooAbsArg.h:612
RooAbsArg::leafNodeServerList
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:509
TObjArray.h
RooAbsArg::setTransientAttribute
void setTransientAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
Definition: RooAbsArg.cxx:350
RooAbsArg::attributes
const std::set< std::string > & attributes() const
Definition: RooAbsArg.h:341
RooAbsArg::operator>>
friend std::istream & operator>>(std::istream &is, RooAbsArg &arg)
Istream operator.
Definition: RooAbsArg.cxx:1528
RooAbsCache
RooAbsCache is the abstract base class for data members of RooAbsArgs that cache other (composite) Ro...
Definition: RooAbsCache.h:27
RooAbsArg::getDependents
RooArgSet * getDependents(const RooArgSet *depList) const
Definition: RooAbsArg.h:165
RooAddModel
RooAddModel is an efficient implementation of a sum of PDFs of the form.
Definition: RooAddModel.h:26
RooVectorDataStore
RooVectorDataStore uses std::vectors to store data columns.
Definition: RooVectorDataStore.h:37
RooAbsArg::_stringAttrib
std::map< std::string, std::string > _stringAttrib
Definition: RooAbsArg.h:634
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
RooAbsArg::Streamer
friend void RooRefArray::Streamer(TBuffer &)
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooAbsArg::setAttribute
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
Definition: RooAbsArg.cxx:291
RooAbsArg::valueClientMIterator
RooFIter valueClientMIterator() const
Definition: RooAbsArg.h:146
RooAbsArg::cloneTree
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
Definition: RooAbsArg.cxx:2230
RooAbsArg::NotAdvised
@ NotAdvised
Definition: RooAbsArg.h:389
RooAbsArg::importWorkspaceHook
virtual Bool_t importWorkspaceHook(RooWorkspace &ws)
Definition: RooAbsArg.h:550
name
char name[80]
Definition: TGX11.cxx:110
RooAbsArg::redirectServers
Bool_t redirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t isRecursionStep=kFALSE)
Replace all direct servers of this object with the new servers in newServerList.
Definition: RooAbsArg.cxx:995
RooAbsArg::dependsOn
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:799
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
RooAbsArg::wireAllCaches
void wireAllCaches()
Definition: RooAbsArg.cxx:2307
RooAbsArg::setCacheAndTrackHints
virtual void setCacheAndTrackHints(RooArgSet &)
Definition: RooAbsArg.h:413
RooDataSet
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:33
RooAbsArg
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition: RooAbsArg.h:72
RooAbsArg::isValueOrShapeDirtyAndClear
Bool_t isValueOrShapeDirtyAndClear() const
Definition: RooAbsArg.h:455
RooAbsArg::canNodeBeCached
virtual CacheMode canNodeBeCached() const
Definition: RooAbsArg.h:412
RooAbsArg::setValueDirty
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
Definition: RooAbsArg.h:490
RooAbsProxy
RooAbsProxy is the abstact interface for proxy classes.
Definition: RooAbsProxy.h:30
RooAbsArg::printClassName
virtual void printClassName(std::ostream &os) const
Print object class name.
Definition: RooAbsArg.cxx:1395
RooAbsArg::setDirtyInhibit
static void setDirtyInhibit(Bool_t flag)
Control global dirty inhibit mode.
Definition: RooAbsArg.cxx:264
RooAbsArg::isValueServer
Bool_t isValueServer(const char *name) const
Check if this is serving values to an object with name name.
Definition: RooAbsArg.h:221
RooAbsArg::shapeClientMIterator
RooFIter shapeClientMIterator() const
Definition: RooAbsArg.h:150
RooAbsArg::_deleteWatch
Bool_t _deleteWatch
Definition: RooAbsArg.h:665
RooAbsArg::getVariables
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
Definition: RooAbsArg.cxx:2008
RooAbsArg::_cacheList
std::deque< RooAbsCache * > _cacheList
Definition: RooAbsArg.h:613
RooAbsArg::findServer
RooAbsArg * findServer(const char *name) const
Return server of this with name name. Returns nullptr if not found.
Definition: RooAbsArg.h:203
RooAbsDataStore
RooAbsDataStore is the abstract base class for data collection that use a TTree as internal storage m...
Definition: RooAbsDataStore.h:34
RooAbsCache.h
RooAbsArg::ConstOpCode
ConstOpCode
Definition: RooAbsArg.h:388
Text_t
char Text_t
Definition: RtypesCore.h:62
RooAbsArg::_myws
RooWorkspace * _myws
Prevent 'AlwaysDirty' mode for this node.
Definition: RooAbsArg.h:697
RooAbsArg::operModeHook
virtual void operModeHook()
Definition: RooAbsArg.h:560
RooAbsArg::_ownedComponents
RooArgSet * _ownedComponents
Definition: RooAbsArg.h:683
RooPrintable::defaultPrintStyle
virtual StyleOption defaultPrintStyle(Option_t *opt) const
Definition: RooPrintable.cxx:241
RooAbsArg::_allBatchesDirty
bool _allBatchesDirty
Definition: RooAbsArg.h:677
RooAbsArg::numCaches
Int_t numCaches() const
Return number of registered caches.
Definition: RooAbsArg.cxx:1990
RooAbsArg::_verboseDirty
static Bool_t _verboseDirty
Definition: RooAbsArg.h:663
RooAbsArg::checkDependents
Bool_t checkDependents(const RooArgSet *nset) const
Definition: RooAbsArg.h:171
RooSTLRefCountList::findByName
Container_t::const_iterator findByName(const char *name) const
Find an item by comparing strings returned by RooAbsArg::GetName()
Definition: RooSTLRefCountList.h:131
RooAbsArg::unRegisterProxy
void unRegisterProxy(RooArgProxy &proxy)
Remove proxy from proxy list.
Definition: RooAbsArg.cxx:1233
RooAbsArg::IsSortable
virtual Bool_t IsSortable() const
Definition: RooAbsArg.h:369
RooProdPdf
RooProdPdf is an efficient implementation of a product of PDFs of the form.
Definition: RooProdPdf.h:37
RooProjectedPdf
Class RooProjectedPdf is a RooAbsPdf implementation that represent a projection of a given input p....
Definition: RooProjectedPdf.h:21
RooAbsArg::observableOverlaps
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:868
RooAbsArg::addServerList
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:424
RooAbsArg::attachToStore
void attachToStore(RooAbsDataStore &store)
Attach this argument to the data store such that it reads data from there.
Definition: RooAbsArg.cxx:2264
RooAbsArg::clearValueDirty
void clearValueDirty() const
Definition: RooAbsArg.h:574
RooAbsArg::dependsOnValue
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:110
RooNameReg.h
RooAbsArg::printCompactTreeHook
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:1958
RooAbsArg::printName
virtual void printName(std::ostream &os) const
Print object name.
Definition: RooAbsArg.cxx:1375
RooAbsArg::dependentOverlaps
Bool_t dependentOverlaps(const RooArgSet *depList, const RooAbsArg &testArg) const
Definition: RooAbsArg.h:169
RooAbsArg::findConstantNodes
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:1711
TIteratorToSTLInterface
TIterator and GenericRooFIter front end with STL back end.
Definition: RooLinkedListIter.h:98
RooAbsArg::isConstant
Bool_t isConstant() const
Check if the "Constant" attribute is set.
Definition: RooAbsArg.h:362
RooAbsArg::inRange
virtual Bool_t inRange(const char *) const
Definition: RooAbsArg.h:378
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:33
RooAbsArg::serverMIterator
RooFIter serverMIterator() const
Definition: RooAbsArg.h:154
RooAbsArg::RooAbsArg
RooAbsArg()
Default constructor.
Definition: RooAbsArg.cxx:125
int
RooAbsArg::getAttribute
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
Definition: RooAbsArg.cxx:314
RooAbsArg::attachToTree
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:1353
RooAbsArg::printMetaArgs
virtual void printMetaArgs(std::ostream &) const
Definition: RooAbsArg.h:332