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_t stripDisconnected=kTRUE) const ;
284  /// Return the parameters of this p.d.f when used in conjuction with dataset 'data'
285  RooArgSet* getParameters(const RooAbsData& data, Bool_t stripDisconnected=kTRUE) 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_t stripDisconnected=kTRUE) const {
290  return getParameters(&observables,stripDisconnected);
291  }
292  virtual RooArgSet* getParameters(const RooArgSet* depList, Bool_t stripDisconnected=kTRUE) const ;
293  /// Return the observables of this pdf given a set of observables
294  RooArgSet* getObservables(const RooArgSet& set, Bool_t valueOnly=kTRUE) const {
295  return getObservables(&set,valueOnly) ;
296  }
297  RooArgSet* getObservables(const RooAbsData* data) const ;
298  /// Return the observables of this pdf given the observables defined by `data`.
299  RooArgSet* getObservables(const RooAbsData& data) const {
300  return getObservables(&data) ;
301  }
302  RooArgSet* getObservables(const RooArgSet* depList, Bool_t valueOnly=kTRUE) const ;
303  Bool_t observableOverlaps(const RooAbsData* dset, const RooAbsArg& testArg) const ;
304  Bool_t observableOverlaps(const RooArgSet* depList, const RooAbsArg& testArg) const ;
305  virtual Bool_t checkObservables(const RooArgSet* nset) const ;
306  Bool_t recursiveCheckObservables(const RooArgSet* nset) const ;
307  RooArgSet* getComponents() const ;
308 
309 
310 
311  void attachDataSet(const RooAbsData &set);
312  void attachDataStore(const RooAbsDataStore &set);
313 
314  // I/O streaming interface (machine readable)
315  virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t verbose=kFALSE) = 0 ;
316  virtual void writeToStream(std::ostream& os, Bool_t compact) const = 0 ;
317 
318  /// Print the object to the defaultPrintStream().
319  /// \param[in] options **V** print verbose. **T** print a tree structure with all children.
320  virtual void Print(Option_t *options= 0) const {
321  // Printing interface (human readable)
323  }
324 
325  virtual void printName(std::ostream& os) const ;
326  virtual void printTitle(std::ostream& os) const ;
327  virtual void printClassName(std::ostream& os) const ;
328  virtual void printAddress(std::ostream& os) const ;
329  virtual void printArgs(std::ostream& os) const ;
330  virtual void printMetaArgs(std::ostream& /*os*/) const {} ;
331  virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const;
332  virtual void printTree(std::ostream& os, TString indent="") const ;
333 
334  virtual Int_t defaultPrintContents(Option_t* opt) const ;
335 
336  // Accessors to attributes
337  void setAttribute(const Text_t* name, Bool_t value=kTRUE) ;
338  Bool_t getAttribute(const Text_t* name) const ;
339  inline const std::set<std::string>& attributes() const {
340  // Returns set of names of boolean attributes defined
341  return _boolAttrib ;
342  }
343 
344  void setStringAttribute(const Text_t* key, const Text_t* value) ;
345  const Text_t* getStringAttribute(const Text_t* key) const ;
346  inline const std::map<std::string,std::string>& stringAttributes() const {
347  // Returns std::map<string,string> with all string attributes defined
348  return _stringAttrib ;
349  }
350 
351  // Accessors to transient attributes
352  void setTransientAttribute(const Text_t* name, Bool_t value=kTRUE) ;
353  Bool_t getTransientAttribute(const Text_t* name) const ;
354  inline const std::set<std::string>& transientAttributes() const {
355  // Return set of transient boolean attributes
356  return _boolAttribTransient ;
357  }
358 
359  /// Check if the "Constant" attribute is set.
360  inline Bool_t isConstant() const {
361  return _isConstant ; //getAttribute("Constant") ;
362  }
364 
365  // Sorting
366  Int_t Compare(const TObject* other) const ;
367  virtual Bool_t IsSortable() const {
368  // Object is sortable in ROOT container class
369  return kTRUE ;
370  }
371 
372  virtual bool operator==(const RooAbsArg& other) const = 0 ;
373  virtual bool isIdentical(const RooAbsArg& other, Bool_t assumeSameType=kFALSE) const = 0 ;
374 
375  // Range management
376  virtual Bool_t inRange(const char*) const {
377  // Is value in range (dummy interface always returns true)
378  return kTRUE ;
379  }
380  virtual Bool_t hasRange(const char*) const {
381  // Has this argument a defined range (dummy interface always returns flase)
382  return kFALSE ;
383  }
384 
385 
387  enum CacheMode { Always=0, NotAdvised=1, Never=2 } ;
388  enum OperMode { Auto=0, AClean=1, ADirty=2 } ;
389 
390  ////////////////////////////////////////////////////////////////////////////
391  /// \anchor optimisationInterface
392  /// \name Optimisation interface
393  /// These functions allow RooFit to optimise a computation graph, to keep track
394  /// of cached values, and to invalidate caches.
395  /// @{
396 
397  // Cache mode optimization (tracks changes & do lazy evaluation vs evaluate always)
398  virtual void optimizeCacheMode(const RooArgSet& observables) ;
399  virtual void optimizeCacheMode(const RooArgSet& observables, RooArgSet& optNodes, RooLinkedList& processedNodes) ;
400 
401 
402  // Find constant terms in expression
403  Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheList) ;
404  Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheList, RooLinkedList& processedNodes) ;
405 
406 
407  // constant term optimization
408  virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE) ;
409 
410  virtual CacheMode canNodeBeCached() const { return Always ; }
411  virtual void setCacheAndTrackHints(RooArgSet& /*trackNodes*/ ) {} ;
412 
413  // Dirty state accessor
414  inline Bool_t isShapeDirty() const {
415  // Return true is shape has been invalidated by server value change
416  return isDerived()?_shapeDirty:kFALSE ;
417  }
418 
419  inline Bool_t isValueDirty() const {
420  // Returns true of value has been invalidated by server value change
421  if (inhibitDirty()) return kTRUE ;
422  switch(_operMode) {
423  case AClean:
424  return kFALSE ;
425  case ADirty:
426  return kTRUE ;
427  case Auto:
428  if (_valueDirty) return isDerived() ;
429  return kFALSE ;
430  }
431  return kTRUE ; // we should never get here
432  }
433 
434  inline Bool_t isValueDirtyAndClear() const {
435  // Returns true of value has been invalidated by server value change
436  if (inhibitDirty()) return kTRUE ;
437  switch(_operMode) {
438  case AClean:
439  return kFALSE ;
440  case ADirty:
441  return kTRUE ;
442  case Auto:
443  if (_valueDirty) {
444  _valueDirty = kFALSE ;
445  return isDerived();
446  }
447  return kFALSE ;
448  }
449  return kTRUE ; // But we should never get here
450  }
451 
452 
454  // Returns true of value has been invalidated by server value change
455 
456  if (inhibitDirty()) return kTRUE ;
457  switch(_operMode) {
458  case AClean:
459  return kFALSE ;
460  case ADirty:
461  return kTRUE ;
462  case Auto:
463  if (_valueDirty || _shapeDirty) {
464  _shapeDirty = kFALSE ;
465  _valueDirty = kFALSE ;
466  return isDerived();
467  }
468  _shapeDirty = kFALSE ;
469  _valueDirty = kFALSE ;
470  return kFALSE ;
471  }
472  return kTRUE ; // But we should never get here
473  }
474 
475  // Cache management
476  void registerCache(RooAbsCache& cache) ;
477  void unRegisterCache(RooAbsCache& cache) ;
478  Int_t numCaches() const ;
479  RooAbsCache* getCache(Int_t index) const ;
480 
481  /// Query the operation mode of this node.
482  inline OperMode operMode() const { return _operMode ; }
483  /// Set the operation mode of this node.
484  void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE) ;
485 
486  // Dirty state modifiers
487  /// Mark the element dirty. This forces a re-evaluation when a value is requested.
488  void setValueDirty() {
489  if (_operMode == Auto && !inhibitDirty())
490  setValueDirty(nullptr);
491  }
492  /// Notify that a shape-like property (*e.g.* binning) has changed.
493  void setShapeDirty() { setShapeDirty(nullptr); }
494 
495  const char* aggregateCacheUniqueSuffix() const ;
496  virtual const char* cacheUniqueSuffix() const { return 0 ; }
497 
498  void wireAllCaches() ;
499 
501  virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache) { _eocache = &cache; }
502 
503  /// @}
504  ////////////////////////////////////////////////////////////////////////////
505 
506  //Debug hooks
507  static void verboseDirty(Bool_t flag) ;
508  void printDirty(Bool_t depth=kTRUE) const ;
509  static void setDirtyInhibit(Bool_t flag) ;
510 
511  void graphVizTree(const char* fileName, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ;
512  void graphVizTree(std::ostream& os, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ;
513 
514  void printComponentTree(const char* indent="",const char* namePat=0, Int_t nLevel=999) ;
515  void printCompactTree(const char* indent="",const char* fileName=0, const char* namePat=0, RooAbsArg* client=0) ;
516  void printCompactTree(std::ostream& os, const char* indent="", const char* namePat=0, RooAbsArg* client=0) ;
517  virtual void printCompactTreeHook(std::ostream& os, const char *ind="") ;
518 
519  Bool_t addOwnedComponents(const RooArgSet& comps) ;
520  const RooArgSet* ownedComponents() const { return _ownedComponents ; }
521 
523 
525 
526  RooAbsProxy* getProxy(Int_t index) const ;
527  Int_t numProxies() const ;
528 
529 
530  inline const TNamed* namePtr() const {
531  return _namePtr ;
532  }
533 
534  void SetName(const char* name) ;
535  void SetNameTitle(const char *name, const char *title) ;
536 
538  {
539  _myws = &ws;
540  return kFALSE;
541  };
542 
543 
544 protected:
545  void graphVizAddConnections(std::set<std::pair<RooAbsArg*,RooAbsArg*> >&) ;
546 
547  virtual void operModeHook() {} ;
548 
549  virtual void optimizeDirtyHook(const RooArgSet* /*obs*/) {} ;
550 
551  virtual Bool_t isValid() const ;
552 
553  virtual void getParametersHook(const RooArgSet* /*nset*/, RooArgSet* /*list*/, Bool_t /*stripDisconnected*/) const {} ;
554  virtual void getObservablesHook(const RooArgSet* /*nset*/, RooArgSet* /*list*/) const {} ;
555 
556  void clearValueAndShapeDirty() const {
559  }
560 
561  void clearValueDirty() const {
563  }
564  void clearShapeDirty() const {
566  }
567 
568  /// Force element to re-evaluate itself when a value is requested.
569  void setValueDirty(const RooAbsArg* source);
570  /// Notify that a shape-like property (*e.g.* binning) has changed.
571  void setShapeDirty(const RooAbsArg* source);
572 
573  virtual void ioStreamerPass2() ;
574  static void ioStreamerPass2Finalize() ;
575 
576 
577 private:
578  void addParameters(RooArgSet& params, const RooArgSet* nset=0, Bool_t stripDisconnected=kTRUE) const;
579 
581 
582 
583  protected:
584 
585  // Client-Server relation and Proxy management
586  friend class RooArgSet ;
587  friend class RooAbsCollection ;
588  friend class RooCustomizer ;
589  friend class RooWorkspace ;
590  friend class RooExtendPdf ;
591  friend class RooRealIntegral ;
592  friend class RooAbsReal ;
593  friend class RooProjectedPdf ;
594  RefCountList_t _serverList ; // list of server objects
595  RefCountList_t _clientList; // list of client objects
596  RefCountList_t _clientListShape; // subset of clients that requested shape dirty flag propagation
597  RefCountList_t _clientListValue; // subset of clients that requested value dirty flag propagation
598 
599  RooRefArray _proxyList ; // list of proxies
600  std::deque<RooAbsCache*> _cacheList ; // list of caches
601 
602 
603  // Proxy management
604  friend class RooAddModel ;
605  friend class RooArgProxy ;
606  friend class RooSetProxy ;
607  friend class RooListProxy ;
608  friend class RooObjectFactory ;
609  friend class RooHistPdf ;
610  friend class RooHistFunc ;
611  friend class RooHistFunc2 ;
612  void registerProxy(RooArgProxy& proxy) ;
613  void registerProxy(RooSetProxy& proxy) ;
614  void registerProxy(RooListProxy& proxy) ;
615  void unRegisterProxy(RooArgProxy& proxy) ;
616  void unRegisterProxy(RooSetProxy& proxy) ;
617  void unRegisterProxy(RooListProxy& proxy) ;
618  void setProxyNormSet(const RooArgSet* nset) ;
619 
620  // Attribute list
621  std::set<std::string> _boolAttrib ; // Boolean attributes
622  std::map<std::string,std::string> _stringAttrib ; // String attributes
623  std::set<std::string> _boolAttribTransient ; //! Transient boolean attributes (not copied in ctor)
624 
625  void printAttribList(std::ostream& os) const;
626 
627  // Hooks for RooTreeData interface
628  friend class RooCompositeDataStore ;
629  friend class RooTreeDataStore ;
630  friend class RooVectorDataStore ;
631  friend class RooDataSet ;
632  friend class RooRealMPFE ;
633  virtual void syncCache(const RooArgSet* nset=0) = 0 ;
634  virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE) = 0 ;
635 
636  virtual void attachToTree(TTree& t, Int_t bufSize=32000) = 0 ;
637  virtual void attachToVStore(RooVectorDataStore& vstore) = 0 ;
638  /// Attach this argument to the data store such that it reads data from there.
639  void attachToStore(RooAbsDataStore& store) ;
640 
641  virtual void setTreeBranchStatus(TTree& t, Bool_t active) = 0 ;
642  virtual void fillTreeBranch(TTree& t) = 0 ;
643  TString cleanBranchName() const ;
644 
645  // Global
646  friend std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg);
647  friend std::istream& operator>>(std::istream& is, RooAbsArg &arg) ;
649 
650  // Debug stuff
651  static Bool_t _verboseDirty ; // Static flag controlling verbose messaging for dirty state changes
652  static Bool_t _inhibitDirty ; // Static flag controlling global inhibit of dirty state propagation
653  Bool_t _deleteWatch ; //! Delete watch flag
654 
655  Bool_t inhibitDirty() const ;
656 
657  public:
658  void setLocalNoDirtyInhibit(Bool_t flag) const { _localNoInhibitDirty = flag ; }
660  protected:
661 
662 
663  mutable Bool_t _valueDirty ; // Flag set if value needs recalculating because input values modified
664  mutable Bool_t _shapeDirty ; // Flag set if value needs recalculating because input shapes modified
665  mutable bool _allBatchesDirty{true}; //! Mark batches as dirty (only meaningful for RooAbsReal).
666 
667  mutable OperMode _operMode ; // Dirty state propagation mode
668  mutable Bool_t _fast ; // Allow fast access mode in getVal() and proxies
669 
670  // Owned components
671  RooArgSet* _ownedComponents ; //! Set of owned component
672 
673  mutable Bool_t _prohibitServerRedirect ; //! Prohibit server redirects -- Debugging tool
674 
675  mutable RooExpensiveObjectCache* _eocache{nullptr}; // Pointer to global cache manager for any expensive components created by this object
676 
677  mutable TNamed* _namePtr ; //! Do not persist. Pointer to global instance of string that matches object named
678  Bool_t _isConstant ; //! Cached isConstant status
679 
680  mutable Bool_t _localNoInhibitDirty ; //! Prevent 'AlwaysDirty' mode for this node
681 
682 /* RooArgSet _leafNodeCache ; //! Cached leaf nodes */
683 /* RooArgSet _branchNodeCache //! Cached branch nodes */
684 
685  mutable RooWorkspace *_myws; //! In which workspace do I live, if any
686 
687  /// \cond Internal
688  // Legacy streamers need the following statics:
689  friend class RooFitResult;
690 
691  public:
692  static std::map<RooAbsArg*,std::unique_ptr<TRefArray>> _ioEvoList; // temporary holding list for proxies needed in schema evolution
693  protected:
694  static std::stack<RooAbsArg*> _ioReadStack ; // reading stack
695  /// \endcond
696 
697  ClassDef(RooAbsArg,7) // Abstract variable
698 };
699 
700 std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg);
701 std::istream& operator>>(std::istream& is, RooAbsArg &arg);
702 
703 
704 #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:1934
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:299
RooAbsArg::numProxies
Int_t numProxies() const
Return the number of registered proxies.
Definition: RooAbsArg.cxx:1275
RooAbsArg::fillTreeBranch
virtual void fillTreeBranch(TTree &t)=0
RooAbsArg::ADirty
@ ADirty
Definition: RooAbsArg.h:388
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:652
RooAbsArg::operMode
OperMode operMode() const
Query the operation mode of this node.
Definition: RooAbsArg.h:482
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooAbsArg::clientIterator
TIterator * clientIterator() const
Retrieve a client iterator.
Definition: RooAbsArg.h:125
RooLinkedListIter.h
RooAbsArg::ValueChange
@ ValueChange
Definition: RooAbsArg.h:386
RooAbsArg::DeActivate
@ DeActivate
Definition: RooAbsArg.h:386
RooAbsArg::getObservablesHook
virtual void getObservablesHook(const RooArgSet *, RooArgSet *) const
Definition: RooAbsArg.h:554
RooAbsArg::printTitle
virtual void printTitle(std::ostream &os) const
Print object title.
Definition: RooAbsArg.cxx:1333
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:32
RooAbsArg::_boolAttribTransient
std::set< std::string > _boolAttribTransient
Definition: RooAbsArg.h:623
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:680
RooAbsArg::ConfigChange
@ ConfigChange
Definition: RooAbsArg.h:386
Option_t
const char Option_t
Definition: RtypesCore.h:66
operator>>
std::istream & operator>>(std::istream &is, RooAbsArg &arg)
Istream operator.
Definition: RooAbsArg.cxx:1476
RooAbsData
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:47
RooAbsArg::_boolAttrib
std::set< std::string > _boolAttrib
Definition: RooAbsArg.h:621
RooAbsArg::printArgs
virtual void printArgs(std::ostream &os) const
Print object arguments, ie its proxies.
Definition: RooAbsArg.cxx:1360
RooAbsArg::stringAttributes
const std::map< std::string, std::string > & stringAttributes() const
Definition: RooAbsArg.h:346
RooAbsArg::recursiveCheckObservables
Bool_t recursiveCheckObservables(const RooArgSet *nset) const
Recursively call checkObservables on all nodes in the expression tree.
Definition: RooAbsArg.cxx:738
RooAbsArg::getComponents
RooArgSet * getComponents() const
Create a RooArgSet with all components (branch nodes) of the expression tree headed by this object.
Definition: RooAbsArg.cxx:711
RooAbsArg::Always
@ Always
Definition: RooAbsArg.h:387
RooAbsArg::isValueDirtyAndClear
Bool_t isValueDirtyAndClear() const
Definition: RooAbsArg.h:434
RooAbsArg::Auto
@ Auto
Definition: RooAbsArg.h:388
RooAbsArg::_isConstant
Bool_t _isConstant
Do not persist. Pointer to global instance of string that matches object named.
Definition: RooAbsArg.h:678
RooAbsArg::unRegisterCache
void unRegisterCache(RooAbsCache &cache)
Unregister a RooAbsCache. Called from the RooAbsCache destructor.
Definition: RooAbsArg.cxx:1915
RooAbsArg::RooObjectFactory
friend class RooObjectFactory
Definition: RooAbsArg.h:608
RooAbsArg::ioStreamerPass2Finalize
static void ioStreamerPass2Finalize()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
Definition: RooAbsArg.cxx:2333
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:1864
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:320
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:1980
RooAbsArg::printAttribList
void printAttribList(std::ostream &os) const
Transient boolean attributes (not copied in ctor)
Definition: RooAbsArg.cxx:1485
RooAbsArg::_serverList
RefCountList_t _serverList
Definition: RooAbsArg.h:594
TNamed.h
RooAbsArg::namePtr
const TNamed * namePtr() const
Definition: RooAbsArg.h:530
TTree
A TTree represents a columnar dataset.
Definition: TTree.h:79
RooAbsArg::ownedComponents
const RooArgSet * ownedComponents() const
Definition: RooAbsArg.h:520
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:2250
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:2305
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:729
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:530
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:1393
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:1383
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:1752
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::RooHistFunc2
friend class RooHistFunc2
Definition: RooAbsArg.h:611
RooAbsArg::_clientListShape
RefCountList_t _clientListShape
Definition: RooAbsArg.h:596
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:1539
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:1779
RooAbsReal
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:62
RooAbsArg::getProxy
RooAbsProxy * getProxy(Int_t index) const
Return the nth proxy from the proxy list.
Definition: RooAbsArg.cxx:1262
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:387
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)
Definition: RooAbsArg.cxx:1098
RooAbsArg::setExpensiveObjectCache
virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache)
Definition: RooAbsArg.h:501
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:354
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:387
RooAbsArg::expensiveObjectCache
RooExpensiveObjectCache & expensiveObjectCache() const
Definition: RooAbsArg.cxx:2202
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:668
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:2351
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:1153
RooAbsArg::getDependents
RooArgSet * getDependents(const RooArgSet &set) const
Definition: RooAbsArg.h:161
RooCompositeDataStore
RooCompositeDataStore combines several disjunct datasets into one.
Definition: RooCompositeDataStore.h:33
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:2051
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:1061
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:549
RooAbsArg::serverNameChangeHook
virtual void serverNameChangeHook(const RooAbsArg *, const RooAbsArg *)
Definition: RooAbsArg.h:264
RooAbsArg::_namePtr
TNamed * _namePtr
Definition: RooAbsArg.h:677
RooAbsArg::setLocalNoDirtyInhibit
void setLocalNoDirtyInhibit(Bool_t flag) const
Definition: RooAbsArg.h:658
RooAbsArg::getParameters
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:578
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:1953
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:675
RooAbsArg::_prohibitServerRedirect
Bool_t _prohibitServerRedirect
Set of owned component.
Definition: RooAbsArg.h:673
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)
RooAbsArg::localNoDirtyInhibit
Bool_t localNoDirtyInhibit() const
Definition: RooAbsArg.h:659
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:2266
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:1312
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:1839
RooAbsArg::getParameters
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:289
RooAbsArg::_valueDirty
Bool_t _valueDirty
Definition: RooAbsArg.h:663
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:1349
RooAbsArg::isValueDirty
Bool_t isValueDirty() const
Definition: RooAbsArg.h:419
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:522
RooAbsArg::registerCache
void registerCache(RooAbsCache &cache)
Register RooAbsCache with this object.
Definition: RooAbsArg.cxx:1906
RooAbsArg::_operMode
OperMode _operMode
Mark batches as dirty (only meaningful for RooAbsReal).
Definition: RooAbsArg.h:667
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:380
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooAbsArg::setTreeBranchStatus
virtual void setTreeBranchStatus(TTree &t, Bool_t active)=0
RooAbsArg::clearValueAndShapeDirty
void clearValueAndShapeDirty() const
Definition: RooAbsArg.h:556
RooLinkedList
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:35
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:1520
RooAbsArg::_clientList
RefCountList_t _clientList
Definition: RooAbsArg.h:595
RooAbsCollection
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
Definition: RooAbsCollection.h:31
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:388
RooAbsArg::setProxyNormSet
void setProxyNormSet(const RooArgSet *nset)
Forward a change in the cached normalization argset to all the registered proxies.
Definition: RooAbsArg.cxx:1286
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:1583
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:597
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:1551
RooAbsArg::constOptimizeTestStatistic
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Interface function signaling a request to perform constant term optimization.
Definition: RooAbsArg.cxx:1739
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:1501
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:819
RooTreeDataStore
RooTreeDataStore is a TTree-backed data storage.
Definition: RooTreeDataStore.h:31
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:524
THashList.h
RooAbsArg::operator<<
friend std::ostream & operator<<(std::ostream &os, const RooAbsArg &arg)
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:1458
RooAbsArg::_shapeDirty
Bool_t _shapeDirty
Definition: RooAbsArg.h:664
RooAbsArg::Activate
@ Activate
Definition: RooAbsArg.h:386
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::clearShapeDirty
void clearShapeDirty() const
Definition: RooAbsArg.h:564
RooAbsArg::getParameters
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:285
RooAbsArg::isShapeDirty
Bool_t isShapeDirty() const
Definition: RooAbsArg.h:414
RooAbsArg::cacheUniqueSuffix
virtual const char * cacheUniqueSuffix() const
Definition: RooAbsArg.h:496
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:388
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:2214
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:493
RooAbsArg::getObservables
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Return the observables of this pdf given a set of observables.
Definition: RooAbsArg.h:294
RooAbsArg::getParametersHook
virtual void getParametersHook(const RooArgSet *, RooArgSet *, Bool_t) const
Definition: RooAbsArg.h:553
RooAbsArg::addOwnedComponents
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
Definition: RooAbsArg.cxx:2141
RooAbsArg::_proxyList
RooRefArray _proxyList
Definition: RooAbsArg.h:599
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:339
RooAbsArg::operator>>
friend std::istream & operator>>(std::istream &is, RooAbsArg &arg)
Istream operator.
Definition: RooAbsArg.cxx:1476
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:28
RooVectorDataStore
RooVectorDataStore uses std::vectors to store data columns.
Definition: RooVectorDataStore.h:36
RooAbsArg::_stringAttrib
std::map< std::string, std::string > _stringAttrib
Definition: RooAbsArg.h:622
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:2155
RooAbsArg::NotAdvised
@ NotAdvised
Definition: RooAbsArg.h:387
RooAbsArg::importWorkspaceHook
virtual Bool_t importWorkspaceHook(RooWorkspace &ws)
Definition: RooAbsArg.h:537
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)
Substitute our servers with those listed in newSet.
Definition: RooAbsArg.cxx:943
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:764
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:2232
RooAbsArg::setCacheAndTrackHints
virtual void setCacheAndTrackHints(RooArgSet &)
Definition: RooAbsArg.h:411
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:453
RooAbsArg::canNodeBeCached
virtual CacheMode canNodeBeCached() const
Definition: RooAbsArg.h:410
RooAbsArg::setValueDirty
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
Definition: RooAbsArg.h:488
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:1343
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:653
RooAbsArg::getVariables
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
Definition: RooAbsArg.cxx:1943
RooAbsArg::_cacheList
std::deque< RooAbsCache * > _cacheList
Definition: RooAbsArg.h:600
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:386
Text_t
char Text_t
Definition: RtypesCore.h:62
RooAbsArg::_myws
RooWorkspace * _myws
Prevent 'AlwaysDirty' mode for this node.
Definition: RooAbsArg.h:685
RooAbsArg::operModeHook
virtual void operModeHook()
Definition: RooAbsArg.h:547
RooAbsArg::_ownedComponents
RooArgSet * _ownedComponents
Definition: RooAbsArg.h:671
RooPrintable::defaultPrintStyle
virtual StyleOption defaultPrintStyle(Option_t *opt) const
Definition: RooPrintable.cxx:241
RooAbsArg::_allBatchesDirty
bool _allBatchesDirty
Definition: RooAbsArg.h:665
RooAbsArg::numCaches
Int_t numCaches() const
Return number of registered caches.
Definition: RooAbsArg.cxx:1925
RooAbsArg::_verboseDirty
static Bool_t _verboseDirty
Definition: RooAbsArg.h:651
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:1181
RooAbsArg::IsSortable
virtual Bool_t IsSortable() const
Definition: RooAbsArg.h:367
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:833
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:2189
RooAbsArg::clearValueDirty
void clearValueDirty() const
Definition: RooAbsArg.h:561
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:1893
RooAbsArg::printName
virtual void printName(std::ostream &os) const
Print object name.
Definition: RooAbsArg.cxx:1323
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:1646
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:360
RooAbsArg::inRange
virtual Bool_t inRange(const char *) const
Definition: RooAbsArg.h:376
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:29
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:1301
RooAbsArg::printMetaArgs
virtual void printMetaArgs(std::ostream &) const
Definition: RooAbsArg.h:330