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