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 RooTreeData ;
44 class RooTreeDataStore ;
45 class RooVectorDataStore ;
46 class RooAbsData ;
47 class RooAbsDataStore ;
48 class RooAbsProxy ;
49 class RooArgProxy ;
50 class RooSetProxy ;
51 class RooListProxy ;
53 class RooWorkspace ;
54 
55 class RooRefArray : public TObjArray {
56  public:
58  } ;
59  RooRefArray(const RooRefArray& other) : TObjArray(other) {
60  }
61  RooRefArray& operator=(const RooRefArray& other) = default;
62  virtual ~RooRefArray() {} ;
63  protected:
64  ClassDef(RooRefArray,1) // Helper class for proxy lists
65 } ;
66 
67 class RooAbsArg;
68 /// Print at the prompt
69 namespace cling {
70 std::string printValue(RooAbsArg*);
71 }
72 
73 class RooAbsArg : public TNamed, public RooPrintable {
74 public:
77 
78  // Constructors, cloning and assignment
79  RooAbsArg() ;
80  virtual ~RooAbsArg();
81  RooAbsArg(const char *name, const char *title);
82  RooAbsArg(const RooAbsArg& other, const char* name=0) ;
83  RooAbsArg& operator=(const RooAbsArg& other);
84  virtual TObject* clone(const char* newname=0) const = 0 ;
85  virtual TObject* Clone(const char* newname = 0) const {
86  return clone(newname && newname[0] != '\0' ? newname : nullptr);
87  }
88  virtual RooAbsArg* cloneTree(const char* newname=0) const ;
89 
90  // Accessors to client-server relation information
91 
92  /// Does value or shape of this arg depend on any other arg?
93  virtual Bool_t isDerived() const {
94  return kTRUE ;
95  }
96  Bool_t isCloneOf(const RooAbsArg& other) const ;
97 
98  /// Check whether this object depends on values from an element in the `serverList`.
99  ///
100  /// @param serverList Test if one of the elements in this list serves values to `this`.
101  /// @param ignoreArg Ignore values served by this object.
102  /// @return True if values are served.
103  Bool_t dependsOnValue(const RooAbsCollection& serverList, const RooAbsArg* ignoreArg=0) const {
104  return dependsOn(serverList,ignoreArg,kTRUE) ;
105  }
106  /// Check whether this object depends on values served from the object passed as `server`.
107  ///
108  /// @param server Test if `server` serves values to `this`.
109  /// @param ignoreArg Ignore values served by this object.
110  /// @return True if values are served.
111  Bool_t dependsOnValue(const RooAbsArg& server, const RooAbsArg* ignoreArg=0) const {
112  return dependsOn(server,ignoreArg,kTRUE) ;
113  }
114  Bool_t dependsOn(const RooAbsCollection& serverList, const RooAbsArg* ignoreArg=0, Bool_t valueOnly=kFALSE) const ;
115  Bool_t dependsOn(const RooAbsArg& server, const RooAbsArg* ignoreArg=0, Bool_t valueOnly=kFALSE) const ;
116  Bool_t overlaps(const RooAbsArg& testArg, Bool_t valueOnly=kFALSE) const ;
117  Bool_t hasClients() const { return !_clientList.empty(); }
118 
119  ////////////////////////////////////////////////////////////////////////////
120  /// \name Legacy RooFit interface.
121  /// This is a collection of functions that remain supported, but more elegant
122  /// interfaces are usually available.
123  /// @{
124 
125  /// Retrieve a client iterator.
126  inline TIterator* clientIterator() const
127  R__SUGGEST_ALTERNATIVE("Use clients() and begin(), end() or range-based loops.") {
128  // Return iterator over all client RooAbsArgs
130  }
132  R__SUGGEST_ALTERNATIVE("Use valueClients() and begin(), end() or range-based loops.") {
133  // Return iterator over all shape client RooAbsArgs
135  }
137  R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin(), end() or range-based loops.") {
138  // Return iterator over all shape client RooAbsArgs
140  }
141  inline TIterator* serverIterator() const
142  R__SUGGEST_ALTERNATIVE("Use servers() and begin(), end() or range-based loops.") {
143  // Return iterator over all server RooAbsArgs
145  }
146 
148  R__SUGGEST_ALTERNATIVE("Use valueClients() and begin(), end() or range-based loops.") {
149  return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_clientListValue)));
150  }
152  R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin(), end() or range-based loops.") {
153  return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_clientListShape)));
154  }
155  inline RooFIter serverMIterator() const
156  R__SUGGEST_ALTERNATIVE("Use servers() and begin(), end() or range-based loops.") {
157  return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_serverList)));
158  }
159 
160  // --- Obsolete functions for backward compatibility
161  /// \deprecated Use getObservables()
162  inline RooArgSet* getDependents(const RooArgSet& set) const { return getObservables(set) ; }
163  /// \deprecated Use getObservables()
164  inline RooArgSet* getDependents(const RooAbsData* set) const { return getObservables(set) ; }
165  /// \deprecated Use getObservables()
166  inline RooArgSet* getDependents(const RooArgSet* depList) const { return getObservables(depList) ; }
167  /// \deprecated Use observableOverlaps()
168  inline Bool_t dependentOverlaps(const RooAbsData* dset, const RooAbsArg& testArg) const { return observableOverlaps(dset,testArg) ; }
169  /// \deprecated Use observableOverlaps()
170  inline Bool_t dependentOverlaps(const RooArgSet* depList, const RooAbsArg& testArg) const { return observableOverlaps(depList, testArg) ; }
171  /// \deprecated Use checkObservables()
172  inline Bool_t checkDependents(const RooArgSet* nset) const { return checkObservables(nset) ; }
173  /// \deprecated Use recursiveCheckObservables()
174  inline Bool_t recursiveCheckDependents(const RooArgSet* nset) const { return recursiveCheckObservables(nset) ; }
175  // --- End obsolete functions for backward compatibility
176  /// @}
177  ////////////////////////////////////////////////////////////////////////////
178 
179  ////////////////////////////////////////////////////////////////////////////
180  /// \name Client-Server Interface.
181  /// These functions allow RooFit to figure out who is serving values to whom.
182  /// @{
183 
184  /// List of all clients of this object.
185  const RefCountList_t& clients() const {
186  return _clientList;
187  }
188  /// List of all value clients of this object. Value clients receive value updates.
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  //Debug hooks
373  static void verboseDirty(Bool_t flag) ;
374  void printDirty(Bool_t depth=kTRUE) const ;
375 
376  static void setDirtyInhibit(Bool_t flag) ;
377 
378  virtual bool operator==(const RooAbsArg& other) const = 0 ;
379  virtual bool isIdentical(const RooAbsArg& other, Bool_t assumeSameType=kFALSE) const = 0 ;
380 
381  // Range management
382  virtual Bool_t inRange(const char*) const {
383  // Is value in range (dummy interface always returns true)
384  return kTRUE ;
385  }
386  virtual Bool_t hasRange(const char*) const {
387  // Has this argument a defined range (dummy interface always returns flase)
388  return kFALSE ;
389  }
390 
391 
393 
394 
395  friend class RooMinuit ;
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  enum CacheMode { Always=0, NotAdvised=1, Never=2 } ;
410  virtual CacheMode canNodeBeCached() const { return Always ; }
411  virtual void setCacheAndTrackHints(RooArgSet& /*trackNodes*/ ) {} ;
412 
413  void graphVizTree(const char* fileName, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ;
414  void graphVizTree(std::ostream& os, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ;
415 
416 /* TGraphStruct* graph(Bool_t useFactoryTag=kFALSE, Double_t textSize=0.03) ; */
417 
418  void printComponentTree(const char* indent="",const char* namePat=0, Int_t nLevel=999) ;
419  void printCompactTree(const char* indent="",const char* fileName=0, const char* namePat=0, RooAbsArg* client=0) ;
420  void printCompactTree(std::ostream& os, const char* indent="", const char* namePat=0, RooAbsArg* client=0) ;
421  virtual void printCompactTreeHook(std::ostream& os, const char *ind="") ;
422 
423  // Dirty state accessor
424  inline Bool_t isShapeDirty() const {
425  // Return true is shape has been invalidated by server value change
426  return isDerived()?_shapeDirty:kFALSE ;
427  }
428 
429  inline Bool_t isValueDirty() const {
430  // Returns true of value has been invalidated by server value change
431  if (inhibitDirty()) return kTRUE ;
432  switch(_operMode) {
433  case AClean:
434  return kFALSE ;
435  case ADirty:
436  return kTRUE ;
437  case Auto:
438  if (_valueDirty) return isDerived() ;
439  return kFALSE ;
440  }
441  return kTRUE ; // we should never get here
442  }
443 
444  inline Bool_t isValueDirtyAndClear() const {
445  // Returns true of value has been invalidated by server value change
446  if (inhibitDirty()) return kTRUE ;
447  switch(_operMode) {
448  case AClean:
449  return kFALSE ;
450  case ADirty:
451  return kTRUE ;
452  case Auto:
453  if (_valueDirty) {
454  _valueDirty = kFALSE ;
455  return isDerived();
456  }
457  return kFALSE ;
458  }
459  return kTRUE ; // But we should never get here
460  }
461 
462 
464  // Returns true of value has been invalidated by server value change
465 
466  if (inhibitDirty()) return kTRUE ;
467  switch(_operMode) {
468  case AClean:
469  return kFALSE ;
470  case ADirty:
471  return kTRUE ;
472  case Auto:
473  if (_valueDirty || _shapeDirty) {
474  _shapeDirty = kFALSE ;
475  _valueDirty = kFALSE ;
476  return isDerived();
477  }
478  _shapeDirty = kFALSE ;
479  _valueDirty = kFALSE ;
480  return kFALSE ;
481  }
482  return kTRUE ; // But we should never get here
483  }
484 
485  // Cache management
486  void registerCache(RooAbsCache& cache) ;
487  void unRegisterCache(RooAbsCache& cache) ;
488  Int_t numCaches() const ;
489  RooAbsCache* getCache(Int_t index) const ;
490 
491  enum OperMode { Auto=0, AClean=1, ADirty=2 } ;
492  inline OperMode operMode() const { return _operMode ; }
493  void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE) ;
494 
495  Bool_t addOwnedComponents(const RooArgSet& comps) ;
496  const RooArgSet* ownedComponents() const { return _ownedComponents ; }
497 
499 
501 
502 
503  // Dirty state modifiers
504  /// Mark the element dirty. This forces a re-evaluation when a value is requested.
505  void setValueDirty() {
506  if (_operMode == Auto && !inhibitDirty())
507  setValueDirty(nullptr);
508  }
509  /// Notify that a shape-like property (*e.g.* binning) has changed.
510  void setShapeDirty() { setShapeDirty(nullptr); }
511 
512  const char* aggregateCacheUniqueSuffix() const ;
513  virtual const char* cacheUniqueSuffix() const { return 0 ; }
514 
515  void wireAllCaches() ;
516 
517  inline const TNamed* namePtr() const {
518  return _namePtr ;
519  }
520 
521  void SetName(const char* name) ;
522  void SetNameTitle(const char *name, const char *title) ;
523 
524 
525 
526 
528  virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache) { _eocache = &cache; }
529 
531  {
532  _myws = &ws;
533  return kFALSE;
534  };
535 
536 
537 protected:
538  void graphVizAddConnections(std::set<std::pair<RooAbsArg*,RooAbsArg*> >&) ;
539 
540  virtual void operModeHook() {} ;
541 
542  virtual void optimizeDirtyHook(const RooArgSet* /*obs*/) {} ;
543 
544  virtual Bool_t isValid() const ;
545 
546  virtual void getParametersHook(const RooArgSet* /*nset*/, RooArgSet* /*list*/, Bool_t /*stripDisconnected*/) const {} ;
547  virtual void getObservablesHook(const RooArgSet* /*nset*/, RooArgSet* /*list*/) const {} ;
548 
549  void clearValueAndShapeDirty() const {
552  }
553 
554  void clearValueDirty() const {
556  }
557  void clearShapeDirty() const {
559  }
560 
561  /// Force element to re-evaluate itself when a value is requested.
562  void setValueDirty(const RooAbsArg* source);
563  /// Notify that a shape-like property (*e.g.* binning) has changed.
564  void setShapeDirty(const RooAbsArg* source);
565 
566  virtual void ioStreamerPass2() ;
567  static void ioStreamerPass2Finalize() ;
568 
569 
570 private:
571  void addParameters(RooArgSet& params, const RooArgSet* nset=0, Bool_t stripDisconnected=kTRUE) const;
572 
574 
575 
576  protected:
577 
578  // Client-Server relation and Proxy management
579  friend class RooArgSet ;
580  friend class RooAbsCollection ;
581  friend class RooCustomizer ;
582  friend class RooWorkspace ;
583  friend class RooExtendPdf ;
584  friend class RooRealIntegral ;
585  friend class RooAbsReal ;
586  friend class RooProjectedPdf ;
587  RefCountList_t _serverList ; // list of server objects
588  RefCountList_t _clientList; // list of client objects
589  RefCountList_t _clientListShape; // subset of clients that requested shape dirty flag propagation
590  RefCountList_t _clientListValue; // subset of clients that requested value dirty flag propagation
591 
592  RooRefArray _proxyList ; // list of proxies
593  std::deque<RooAbsCache*> _cacheList ; // list of caches
594 
595 
596  // Proxy management
597  friend class RooAddModel ;
598  friend class RooArgProxy ;
599  friend class RooSetProxy ;
600  friend class RooListProxy ;
601  friend class RooObjectFactory ;
602  friend class RooHistPdf ;
603  friend class RooHistFunc ;
604  friend class RooHistFunc2 ;
605  void registerProxy(RooArgProxy& proxy) ;
606  void registerProxy(RooSetProxy& proxy) ;
607  void registerProxy(RooListProxy& proxy) ;
608  void unRegisterProxy(RooArgProxy& proxy) ;
609  void unRegisterProxy(RooSetProxy& proxy) ;
610  void unRegisterProxy(RooListProxy& proxy) ;
611  RooAbsProxy* getProxy(Int_t index) const ;
612  void setProxyNormSet(const RooArgSet* nset) ;
613  Int_t numProxies() const ;
614 
615  // Attribute list
616  std::set<std::string> _boolAttrib ; // Boolean attributes
617  std::map<std::string,std::string> _stringAttrib ; // String attributes
618  std::set<std::string> _boolAttribTransient ; //! Transient boolean attributes (not copied in ctor)
619 
620  void printAttribList(std::ostream& os) const;
621 
622  // Hooks for RooTreeData interface
623  friend class RooCompositeDataStore ;
624  friend class RooTreeDataStore ;
625  friend class RooVectorDataStore ;
626  friend class RooTreeData ;
627  friend class RooDataSet ;
628  friend class RooRealMPFE ;
629  virtual void syncCache(const RooArgSet* nset=0) = 0 ;
630  virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE) = 0 ;
631 
632  virtual void attachToTree(TTree& t, Int_t bufSize=32000) = 0 ;
633  virtual void attachToVStore(RooVectorDataStore& vstore) = 0 ;
634  /// Attach this argument to the data store such that it reads data from there.
635  void attachToStore(RooAbsDataStore& store) ;
636 
637  virtual void setTreeBranchStatus(TTree& t, Bool_t active) = 0 ;
638  virtual void fillTreeBranch(TTree& t) = 0 ;
639  TString cleanBranchName() const ;
640 
641  // Global
642  friend std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg);
643  friend std::istream& operator>>(std::istream& is, RooAbsArg &arg) ;
644  friend void RooRefArray::Streamer(TBuffer&);
645 
646  // Debug stuff
647  static Bool_t _verboseDirty ; // Static flag controlling verbose messaging for dirty state changes
648  static Bool_t _inhibitDirty ; // Static flag controlling global inhibit of dirty state propagation
649  Bool_t _deleteWatch ; //! Delete watch flag
650 
651  Bool_t inhibitDirty() const ;
652 
653  public:
654  void setLocalNoDirtyInhibit(Bool_t flag) const { _localNoInhibitDirty = flag ; }
656  protected:
657 
658 
659  mutable Bool_t _valueDirty ; // Flag set if value needs recalculating because input values modified
660  mutable Bool_t _shapeDirty ; // Flag set if value needs recalculating because input shapes modified
661  mutable bool _allBatchesDirty{true}; //! Mark batches as dirty (only meaningful for RooAbsReal).
662 
663  mutable OperMode _operMode ; // Dirty state propagation mode
664  mutable Bool_t _fast ; // Allow fast access mode in getVal() and proxies
665 
666  // Owned components
667  RooArgSet* _ownedComponents ; //! Set of owned component
668 
669  mutable Bool_t _prohibitServerRedirect ; //! Prohibit server redirects -- Debugging tool
670 
671  mutable RooExpensiveObjectCache* _eocache ; // Pointer to global cache manager for any expensive components created by this object
672 
673  mutable TNamed* _namePtr ; //! Do not persist. Pointer to global instance of string that matches object named
674  Bool_t _isConstant ; //! Cached isConstant status
675 
676  mutable Bool_t _localNoInhibitDirty ; //! Prevent 'AlwaysDirty' mode for this node
677 
678 /* RooArgSet _leafNodeCache ; //! Cached leaf nodes */
679 /* RooArgSet _branchNodeCache //! Cached branch nodes */
680 
681  mutable RooWorkspace *_myws; //! In which workspace do I live, if any
682 
683  /// \cond Internal
684  // Legacy streamers need the following statics:
685  friend class RooFitResult;
686 
687  public:
688  static std::map<RooAbsArg*,std::unique_ptr<TRefArray>> _ioEvoList; // temporary holding list for proxies needed in schema evolution
689  protected:
690  static std::stack<RooAbsArg*> _ioReadStack ; // reading stack
691  /// \endcond
692 
693  ClassDef(RooAbsArg,7) // Abstract variable
694 };
695 
696 std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg);
697 std::istream& operator>>(std::istream& is, RooAbsArg &arg);
698 
699 
700 #endif
RooAbsArg::Clone
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
Definition: RooAbsArg.h:85
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:1902
RooAbsArg::serverIterator
TIterator * serverIterator() const
Definition: RooAbsArg.h:141
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:1243
RooAbsArg::fillTreeBranch
virtual void fillTreeBranch(TTree &t)=0
RooAbsArg::ADirty
@ ADirty
Definition: RooAbsArg.h:491
RooRealMPFE
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:648
RooAbsArg::operMode
OperMode operMode() const
Definition: RooAbsArg.h:492
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooAbsArg::clientIterator
TIterator * clientIterator() const
Retrieve a client iterator.
Definition: RooAbsArg.h:126
RooLinkedListIter.h
RooAbsArg::ValueChange
@ ValueChange
Definition: RooAbsArg.h:392
RooAbsArg::DeActivate
@ DeActivate
Definition: RooAbsArg.h:392
RooAbsArg::getObservablesHook
virtual void getObservablesHook(const RooArgSet *, RooArgSet *) const
Definition: RooAbsArg.h:547
RooAbsArg::printTitle
virtual void printTitle(std::ostream &os) const
Print object title.
Definition: RooAbsArg.cxx:1301
RooAbsArg::shapeClientIterator
TIterator * shapeClientIterator() const
Definition: RooAbsArg.h:136
TObjArray
Definition: TObjArray.h:37
RooAddPdf
Definition: RooAddPdf.h:32
RooAbsArg::_boolAttribTransient
std::set< std::string > _boolAttribTransient
Definition: RooAbsArg.h:618
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:676
RooAbsArg::ConfigChange
@ ConfigChange
Definition: RooAbsArg.h:392
operator>>
std::istream & operator>>(std::istream &is, RooAbsArg &arg)
Istream operator.
Definition: RooAbsArg.cxx:1444
RooAbsData
Definition: RooAbsData.h:46
RooAbsArg::_boolAttrib
std::set< std::string > _boolAttrib
Definition: RooAbsArg.h:616
RooAbsArg::printArgs
virtual void printArgs(std::ostream &os) const
Print object arguments, ie its proxies.
Definition: RooAbsArg.cxx:1328
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:706
RooAbsArg::getComponents
RooArgSet * getComponents() const
Create a RooArgSet with all components (branch nodes) of the expression tree headed by this object.
Definition: RooAbsArg.cxx:679
RooAbsArg::Always
@ Always
Definition: RooAbsArg.h:409
RooAbsArg::isValueDirtyAndClear
Bool_t isValueDirtyAndClear() const
Definition: RooAbsArg.h:444
RooAbsArg::Auto
@ Auto
Definition: RooAbsArg.h:491
RooAbsArg::_isConstant
Bool_t _isConstant
Do not persist. Pointer to global instance of string that matches object named.
Definition: RooAbsArg.h:674
RooAbsArg::unRegisterCache
void unRegisterCache(RooAbsCache &cache)
Unregister a RooAbsCache. Called from the RooAbsCache destructor.
Definition: RooAbsArg.cxx:1883
RooAbsArg::RooObjectFactory
friend class RooObjectFactory
Definition: RooAbsArg.h:601
RooAbsArg::ioStreamerPass2Finalize
static void ioStreamerPass2Finalize()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
Definition: RooAbsArg.cxx:2301
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:103
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:1832
RooCustomizer
Definition: RooCustomizer.h:35
RooAbsArg::~RooAbsArg
virtual ~RooAbsArg()
Destructor.
Definition: RooAbsArg.cxx:190
RooAbsArg::findServer
RooAbsArg * findServer(Int_t index) const
Return i-th server from server list.
Definition: RooAbsArg.h:213
RooSetProxy
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:1948
RooAbsArg::printAttribList
void printAttribList(std::ostream &os) const
Transient boolean attributes (not copied in ctor)
Definition: RooAbsArg.cxx:1453
RooAbsArg::_serverList
RefCountList_t _serverList
Definition: RooAbsArg.h:587
TNamed.h
RooAbsArg::namePtr
const TNamed * namePtr() const
Definition: RooAbsArg.h:517
TTree
Definition: TTree.h:79
RooAbsArg::ownedComponents
const RooArgSet * ownedComponents() const
Definition: RooAbsArg.h:496
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:2218
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:76
RooAbsArg::ioStreamerPass2
virtual void ioStreamerPass2()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
Definition: RooAbsArg.cxx:2273
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:697
RooPrintable.h
RooAbsArg::getTransientAttribute
Bool_t getTransientAttribute(const Text_t *name) const
Check if a named attribute is set.
Definition: RooAbsArg.cxx:340
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:1361
RooExtendPdf
Definition: RooExtendPdf.h:22
RooAbsArg::defaultPrintContents
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default contents to print.
Definition: RooAbsArg.cxx:1351
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)
Change cache operation mode to given mode.
Definition: RooAbsArg.cxx:1720
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:504
RooAbsArg::RooHistFunc2
friend class RooHistFunc2
Definition: RooAbsArg.h:604
RooAbsArg::_clientListShape
RefCountList_t _clientListShape
Definition: RooAbsArg.h:589
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:443
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:1507
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:1747
RooAbsReal
Definition: RooAbsReal.h:61
RooAbsArg::getProxy
RooAbsProxy * getProxy(Int_t index) const
Return the nth proxy from the proxy list.
Definition: RooAbsArg.cxx:1230
RooAbsArg::inhibitDirty
Bool_t inhibitDirty() const
Delete watch flag.
Definition: RooAbsArg.cxx:83
TBuffer
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:249
RooAbsArg::CacheMode
CacheMode
Definition: RooAbsArg.h:409
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:1066
RooTreeData
Definition: RooTreeData.h:25
RooAbsArg::setExpensiveObjectCache
virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache)
Definition: RooAbsArg.h:528
RooRefArray::RooRefArray
RooRefArray()
Definition: RooAbsArg.h:57
TString
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:409
RooAbsArg::expensiveObjectCache
RooExpensiveObjectCache & expensiveObjectCache() const
Definition: RooAbsArg.cxx:2170
RooPrintable
Definition: RooPrintable.h:25
RooAbsArg::_fast
Bool_t _fast
Definition: RooAbsArg.h:664
RooAbsArg::recursiveCheckDependents
Bool_t recursiveCheckDependents(const RooArgSet *nset) const
Definition: RooAbsArg.h:174
RooAbsArg::makeLegacyIterator
RefCountListLegacyIterator_t * makeLegacyIterator(const RefCountList_t &list) const
Definition: RooAbsArg.cxx:2319
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:488
RooExpensiveObjectCache
Definition: RooExpensiveObjectCache.h:24
bool
TIterator
Definition: TIterator.h:30
RooFitResult
Definition: RooFitResult.h:40
RooAbsArg::registerProxy
void registerProxy(RooArgProxy &proxy)
Register an RooArgProxy in the proxy list.
Definition: RooAbsArg.cxx:1121
RooAbsArg::getDependents
RooArgSet * getDependents(const RooArgSet &set) const
Definition: RooAbsArg.h:162
RooCompositeDataStore
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:2019
RooRealIntegral
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:1029
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:542
RooAbsArg::serverNameChangeHook
virtual void serverNameChangeHook(const RooAbsArg *, const RooAbsArg *)
Definition: RooAbsArg.h:264
RooAbsArg::_namePtr
TNamed * _namePtr
Definition: RooAbsArg.h:673
RooAbsArg::setLocalNoDirtyInhibit
void setLocalNoDirtyInhibit(Bool_t flag) const
Definition: RooAbsArg.h:654
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:546
RooAbsArg::isDerived
virtual Bool_t isDerived() const
Does value or shape of this arg depend on any other arg?
Definition: RooAbsArg.h:93
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:1921
RooAbsArg::addParameters
void addParameters(RooArgSet &params, const RooArgSet *nset=0, Bool_t stripDisconnected=kTRUE) const
INTERNAL helper function for getParameters()
Definition: RooAbsArg.cxx:555
RooAbsArg::setStringAttribute
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
Definition: RooAbsArg.cxx:291
RooAbsArg::_eocache
RooExpensiveObjectCache * _eocache
Prohibit server redirects – Debugging tool.
Definition: RooAbsArg.h:671
RooAbsArg::_prohibitServerRedirect
Bool_t _prohibitServerRedirect
Set of owned component.
Definition: RooAbsArg.h:669
RooRefArray::~RooRefArray
virtual ~RooRefArray()
Definition: RooAbsArg.h:62
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
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:432
operator<<
std::ostream & operator<<(std::ostream &os, const RooAbsArg &arg)
RooAbsArg::localNoDirtyInhibit
Bool_t localNoDirtyInhibit() const
Definition: RooAbsArg.h:655
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:2234
RooAbsArg::dependentOverlaps
Bool_t dependentOverlaps(const RooAbsData *dset, const RooAbsArg &testArg) const
Definition: RooAbsArg.h:168
RooAbsArg::operator=
RooAbsArg & operator=(const RooAbsArg &other)
Assign all boolean and string properties of the original object.
Definition: RooAbsArg.cxx:157
RooAbsArg::getDependents
RooArgSet * getDependents(const RooAbsData *set) const
Definition: RooAbsArg.h:164
RooArgProxy
Definition: RooArgProxy.h:24
RooAbsArg::isValid
virtual Bool_t isValid() const
WVE (08/21/01) Probably obsolete now.
Definition: RooAbsArg.cxx:1280
RooRefArray
Definition: RooAbsArg.h:55
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:1807
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:659
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:407
RooAbsArg::printAddress
virtual void printAddress(std::ostream &os) const
Print class name of object.
Definition: RooAbsArg.cxx:1317
RooAbsArg::isValueDirty
Bool_t isValueDirty() const
Definition: RooAbsArg.h:429
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:498
RooAbsArg::registerCache
void registerCache(RooAbsCache &cache)
Register RooAbsCache with this object.
Definition: RooAbsArg.cxx:1874
RooAbsArg::_operMode
OperMode _operMode
Mark batches as dirty (only meaningful for RooAbsReal).
Definition: RooAbsArg.h:663
TNamed
Definition: TNamed.h:29
RooFIter
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
Definition: RooLinkedListIter.h:39
RooAbsArg::hasRange
virtual Bool_t hasRange(const char *) const
Definition: RooAbsArg.h:386
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:549
RooLinkedList
Definition: RooLinkedList.h:35
RooAbsArg::RefCountList_t
RooSTLRefCountList< RooAbsArg > RefCountList_t
Definition: RooAbsArg.h:75
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:1488
RooAbsArg::_clientList
RefCountList_t _clientList
Definition: RooAbsArg.h:588
RooAbsCollection
Definition: RooAbsCollection.h:30
RooAbsArg::verboseDirty
static void verboseDirty(Bool_t flag)
Activate verbose messaging related to dirty flag propagation.
Definition: RooAbsArg.cxx:241
RooAbsArg::AClean
@ AClean
Definition: RooAbsArg.h:491
RooAbsArg::setProxyNormSet
void setProxyNormSet(const RooArgSet *nset)
Forward a change in the cached normalization argset to all the registered proxies.
Definition: RooAbsArg.cxx:1254
RooAbsArg::getStringAttribute
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
Definition: RooAbsArg.cxx:304
RooAbsArg::optimizeCacheMode
virtual void optimizeCacheMode(const RooArgSet &observables)
Activate cache mode optimization with given definition of observables.
Definition: RooAbsArg.cxx:1551
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:590
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:1519
RooAbsArg::constOptimizeTestStatistic
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Interface function signaling a request to perform constant term optimization.
Definition: RooAbsArg.cxx:1707
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:1469
RooListProxy
Definition: RooListProxy.h:24
RooHistPdf
Definition: RooHistPdf.h:29
RooRefArray::RooRefArray
RooRefArray(const RooRefArray &other)
Definition: RooAbsArg.h:59
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:787
RooTreeDataStore
Definition: RooTreeDataStore.h:31
RooAbsArg::servers
const RefCountList_t & servers() const
List of all servers of this object.
Definition: RooAbsArg.h:199
RooHistFunc
Definition: RooHistFunc.h:30
RooAbsArg::setWorkspace
void setWorkspace(RooWorkspace &ws)
Definition: RooAbsArg.h:500
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:1426
RooAbsArg::_shapeDirty
Bool_t _shapeDirty
Definition: RooAbsArg.h:660
RooAbsArg::Activate
@ Activate
Definition: RooAbsArg.h:392
RooAbsArg::hasClients
Bool_t hasClients() const
Definition: RooAbsArg.h:117
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:356
RooAbsArg::RooAddPdfOrig
friend class RooAddPdfOrig
Definition: RooAbsArg.h:281
RooAbsArg::clearShapeDirty
void clearShapeDirty() const
Definition: RooAbsArg.h:557
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:424
RooAbsArg::cacheUniqueSuffix
virtual const char * cacheUniqueSuffix() const
Definition: RooAbsArg.h:513
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:491
RooWorkspace
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:2182
RooAbsArg::operator==
virtual bool operator==(const RooAbsArg &other) const =0
RooAbsArg::valueClientIterator
TIterator * valueClientIterator() const
Definition: RooAbsArg.h:131
RooAbsArg::setShapeDirty
void setShapeDirty()
Notify that a shape-like property (e.g. binning) has changed.
Definition: RooAbsArg.h:510
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:546
RooAbsArg::addOwnedComponents
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
Definition: RooAbsArg.cxx:2109
RooAbsArg::_proxyList
RooRefArray _proxyList
Definition: RooAbsArg.h:592
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:477
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:318
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:1444
RooAbsCache
Definition: RooAbsCache.h:27
RooAbsArg::getDependents
RooArgSet * getDependents(const RooArgSet *depList) const
Definition: RooAbsArg.h:166
RooAddModel
Definition: RooAddModel.h:28
RooVectorDataStore
Definition: RooVectorDataStore.h:35
RooAbsArg::_stringAttrib
std::map< std::string, std::string > _stringAttrib
Definition: RooAbsArg.h:617
TObject
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:259
RooAbsArg::valueClientMIterator
RooFIter valueClientMIterator() const
Definition: RooAbsArg.h:147
RooAbsArg::cloneTree
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
Definition: RooAbsArg.cxx:2123
RooAbsArg::NotAdvised
@ NotAdvised
Definition: RooAbsArg.h:409
RooAbsArg::importWorkspaceHook
virtual Bool_t importWorkspaceHook(RooWorkspace &ws)
Definition: RooAbsArg.h:530
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:911
RooMinuit
Definition: RooMinuit.h:39
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:732
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:2200
RooAbsArg::setCacheAndTrackHints
virtual void setCacheAndTrackHints(RooArgSet &)
Definition: RooAbsArg.h:411
RooDataSet
Definition: RooDataSet.h:33
RooAbsArg
Definition: RooAbsArg.h:73
RooAbsArg::isValueOrShapeDirtyAndClear
Bool_t isValueOrShapeDirtyAndClear() const
Definition: RooAbsArg.h:463
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:505
RooAbsProxy
Definition: RooAbsProxy.h:30
RooAbsArg::printClassName
virtual void printClassName(std::ostream &os) const
Print object class name.
Definition: RooAbsArg.cxx:1311
RooAbsArg::setDirtyInhibit
static void setDirtyInhibit(Bool_t flag)
Control global dirty inhibit mode.
Definition: RooAbsArg.cxx:232
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:151
RooAbsArg::_deleteWatch
Bool_t _deleteWatch
Definition: RooAbsArg.h:649
RooAbsArg::getVariables
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
Definition: RooAbsArg.cxx:1911
RooAbsArg::_cacheList
std::deque< RooAbsCache * > _cacheList
Definition: RooAbsArg.h:593
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
Definition: RooAbsDataStore.h:31
RooAbsCache.h
RooAbsArg::ConstOpCode
ConstOpCode
Definition: RooAbsArg.h:392
Text_t
char Text_t
Definition: RtypesCore.h:62
RooAbsArg::_myws
RooWorkspace * _myws
Prevent 'AlwaysDirty' mode for this node.
Definition: RooAbsArg.h:681
RooAbsArg::operModeHook
virtual void operModeHook()
Definition: RooAbsArg.h:540
RooAbsArg::_ownedComponents
RooArgSet * _ownedComponents
Definition: RooAbsArg.h:667
RooPrintable::defaultPrintStyle
virtual StyleOption defaultPrintStyle(Option_t *opt) const
Definition: RooPrintable.cxx:241
RooAbsArg::_allBatchesDirty
bool _allBatchesDirty
Definition: RooAbsArg.h:661
RooAbsArg::numCaches
Int_t numCaches() const
Return number of registered caches.
Definition: RooAbsArg.cxx:1893
RooAbsArg::_verboseDirty
static Bool_t _verboseDirty
Definition: RooAbsArg.h:647
RooAbsArg::checkDependents
Bool_t checkDependents(const RooArgSet *nset) const
Definition: RooAbsArg.h:172
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:1149
RooAbsArg::IsSortable
virtual Bool_t IsSortable() const
Definition: RooAbsArg.h:367
RooProdPdf
Definition: RooProdPdf.h:33
RooProjectedPdf
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:801
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:392
RooAbsArg::attachToStore
void attachToStore(RooAbsDataStore &store)
Attach this argument to the data store such that it reads data from there.
Definition: RooAbsArg.cxx:2157
RooAbsArg::clearValueDirty
void clearValueDirty() const
Definition: RooAbsArg.h:554
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:111
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:1861
RooAbsArg::printName
virtual void printName(std::ostream &os) const
Print object name.
Definition: RooAbsArg.cxx:1291
RooAbsArg::dependentOverlaps
Bool_t dependentOverlaps(const RooArgSet *depList, const RooAbsArg &testArg) const
Definition: RooAbsArg.h:170
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:1614
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:382
RooArgSet
Definition: RooArgSet.h:28
RooAbsArg::serverMIterator
RooFIter serverMIterator() const
Definition: RooAbsArg.h:155
RooAbsArg::RooAbsArg
RooAbsArg()
Default constructor.
Definition: RooAbsArg.cxx:92
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:282
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:1269
RooAbsArg::printMetaArgs
virtual void printMetaArgs(std::ostream &) const
Definition: RooAbsArg.h:330