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 <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
38class TTree ;
39class RooArgSet ;
40class RooAbsCollection ;
41class RooTreeData ;
42class RooTreeDataStore ;
44class RooAbsData ;
45class RooAbsDataStore ;
46class RooAbsProxy ;
47class RooArgProxy ;
48class RooSetProxy ;
49class RooListProxy ;
51class RooWorkspace ;
52
53class 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
65class RooAbsArg;
66/// Print at the prompt
67namespace cling {
68std::string printValue(RooAbsArg*);
69}
70
71class RooAbsArg : public TNamed, public RooPrintable {
72public:
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 }
118 R__SUGGEST_ALTERNATIVE("Use valueClients() and begin(), end() or range-based loops.") {
119 // Return iterator over all shape client RooAbsArgs
121 }
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
134 R__SUGGEST_ALTERNATIVE("Use valueClients() and begin(), end() or range-based loops.") {
135 return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_clientListValue)));
136 }
138 R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin(), end() or range-based loops.") {
139 return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_clientListShape)));
140 }
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.
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.
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 {
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 {
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) ;
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_t operator==(const RooAbsArg& other) = 0 ;
340 virtual Bool_t isIdentical(const RooAbsArg& other, Bool_t assumeSameType=kFALSE) = 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
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) {
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) {
437 return isDerived();
438 }
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.
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
501
503 {
504 _myws = &ws;
505 return kFALSE;
506 };
507
508
509protected:
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
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
542private:
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
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) ;
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:
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 /// \cond Internal
656 // Legacy streamers need the following statics:
657 friend class RooFitResult;
658
659 public:
660 static std::map<RooAbsArg*,std::unique_ptr<TRefArray>> _ioEvoList; // temporary holding list for proxies needed in schema evolution
661 protected:
662 static std::stack<RooAbsArg*> _ioReadStack ; // reading stack
663 /// \endcond
664
665 ClassDef(RooAbsArg,7) // Abstract variable
666};
667
668std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg);
669std::istream& operator>>(std::istream& is, RooAbsArg &arg);
670
671
672#endif
#define R__SUGGEST_ALTERNATIVE(ALTERNATIVE)
Definition: RConfig.hxx:537
std::ostream & operator<<(std::ostream &os, const RooAbsArg &arg)
std::istream & operator>>(std::istream &is, RooAbsArg &arg)
Istream operator.
Definition: RooAbsArg.cxx:1450
int Int_t
Definition: RtypesCore.h:41
char Text_t
Definition: RtypesCore.h:58
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
static void indent(ostringstream &buf, int indent_level)
char name[80]
Definition: TGX11.cxx:109
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:71
RooExpensiveObjectCache & expensiveObjectCache() const
Definition: RooAbsArg.cxx:2176
virtual Bool_t IsSortable() const
Definition: RooAbsArg.h:328
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
virtual Bool_t checkObservables(const RooArgSet *nset) const
Overloadable function in which derived classes can implement consistency checks of the variables.
Definition: RooAbsArg.cxx:699
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
Definition: RooAbsArg.cxx:2129
RooRefArray _proxyList
Definition: RooAbsArg.h:564
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
Bool_t _fast
Definition: RooAbsArg.h:636
void clearValueAndShapeDirty() const
Definition: RooAbsArg.h:521
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)=0
virtual Bool_t isValid() const
WVE (08/21/01) Probably obsolete now.
Definition: RooAbsArg.cxx:1286
TNamed * _namePtr
Definition: RooAbsArg.h:645
virtual Bool_t importWorkspaceHook(RooWorkspace &ws)
Definition: RooAbsArg.h:502
static void verboseDirty(Bool_t flag)
Activate verbose messaging related to dirty flag propagation.
Definition: RooAbsArg.cxx:243
void attachToStore(RooAbsDataStore &store)
Attach this argument to the data store such that it reads data from there.
Definition: RooAbsArg.cxx:2163
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default contents to print.
Definition: RooAbsArg.cxx:1357
const TNamed * namePtr() const
Definition: RooAbsArg.h:478
const char * aggregateCacheUniqueSuffix() const
Definition: RooAbsArg.cxx:2188
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:913
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
void changeServer(RooAbsArg &server, Bool_t valueProp, Bool_t shapeProp)
Change dirty flag propagation mask for specified server.
Definition: RooAbsArg.cxx:445
Bool_t isValueServer(const RooAbsArg &arg) const
Check if this is serving values to arg.
Definition: RooAbsArg.h:181
virtual Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Definition: RooAbsArg.h:489
virtual void getObservablesHook(const RooArgSet *, RooArgSet *) const
Definition: RooAbsArg.h:519
RooWorkspace * _myws
Prevent 'AlwaysDirty' mode for this node.
Definition: RooAbsArg.h:653
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:1753
void attachDataStore(const RooAbsDataStore &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
Definition: RooAbsArg.cxx:1494
virtual void printClassName(std::ostream &os) const
Print object class name.
Definition: RooAbsArg.cxx:1317
RooArgSet * _ownedComponents
Definition: RooAbsArg.h:639
std::deque< RooAbsCache * > _cacheList
Definition: RooAbsArg.h:565
void setShapeDirty()
Notify that a shape-like property (e.g. binning) has changed.
Definition: RooAbsArg.h:471
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:734
void registerProxy(RooArgProxy &proxy)
Register an RooArgProxy in the proxy list.
Definition: RooAbsArg.cxx:1127
friend class RooHistFunc2
Definition: RooAbsArg.h:576
TIterator * valueClientIterator() const R__SUGGEST_ALTERNATIVE("Use valueClients() and begin()
Bool_t checkDependents(const RooArgSet *nset) const
Definition: RooAbsArg.h:267
friend std::ostream & operator<<(std::ostream &os, const RooAbsArg &arg)
Bool_t isShapeServer(const RooAbsArg &arg) const
Check if this is serving shape to arg.
Definition: RooAbsArg.h:189
RooFIter serverMIterator() const R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin()
RooArgSet * getDependents(const RooArgSet &set) const
Definition: RooAbsArg.h:257
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
Definition: RooAbsArg.cxx:293
friend class RooObjectFactory
Definition: RooAbsArg.h:573
static void ioStreamerPass2Finalize()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
Definition: RooAbsArg.cxx:2307
RooArgSet * getDependents(const RooAbsData *set) const
Definition: RooAbsArg.h:259
virtual CacheMode canNodeBeCached() const
Definition: RooAbsArg.h:371
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:479
virtual void setTreeBranchStatus(TTree &t, Bool_t active)=0
void setProhibitServerRedirect(Bool_t flag)
Definition: RooAbsArg.h:459
void setWorkspace(RooWorkspace &ws)
Definition: RooAbsArg.h:461
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Implement multi-line detailed printing.
Definition: RooAbsArg.cxx:1367
friend class RooAddPdfOrig
Definition: RooAbsArg.h:227
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
Definition: RooAbsArg.h:83
const RooArgSet * ownedComponents() const
Definition: RooAbsArg.h:457
Bool_t isCloneOf(const RooAbsArg &other) const
Check if this object was created as a clone of 'other'.
Definition: RooAbsArg.cxx:251
Bool_t isShapeDirty() const
Definition: RooAbsArg.h:385
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)=0
static void setDirtyInhibit(Bool_t flag)
Control global dirty inhibit mode.
Definition: RooAbsArg.cxx:234
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:1620
virtual Bool_t operator==(const RooAbsArg &other)=0
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:2025
void unRegisterProxy(RooArgProxy &proxy)
Remove proxy from proxy list.
Definition: RooAbsArg.cxx:1155
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:1813
const RefCountList_t & shapeClients() const
List of all shape clients of this object.
Definition: RooAbsArg.h:158
Bool_t inhibitDirty() const
Delete watch flag.
Definition: RooAbsArg.cxx:85
RooSTLRefCountList< RooAbsArg > RefCountList_t
Definition: RooAbsArg.h:73
const RefCountList_t & valueClients() const
List of all value clients of this object. Value clients receive value updates.
Definition: RooAbsArg.h:153
friend std::istream & operator>>(std::istream &is, RooAbsArg &arg)
Istream operator.
Definition: RooAbsArg.cxx:1450
RooArgSet * getObservables(const RooAbsData &data) const
Return the observables of this pdf given the observables defined by data.
Definition: RooAbsArg.h:245
virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache)
Definition: RooAbsArg.h:500
std::set< std::string > _boolAttrib
Definition: RooAbsArg.h:588
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:358
virtual void printTree(std::ostream &os, TString indent="") const
Print object tree structure.
Definition: RooAbsArg.cxx:1432
TIterator end() or range-based loops.")
Definition: RooAbsArg.h:113
void unRegisterCache(RooAbsCache &cache)
Unregister a RooAbsCache. Called from the RooAbsCache destructor.
Definition: RooAbsArg.cxx:1889
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
virtual void printTitle(std::ostream &os) const
Print object title.
Definition: RooAbsArg.cxx:1307
Bool_t isValueOrShapeDirtyAndClear() const
Definition: RooAbsArg.h:424
RefCountList_t _clientListValue
Definition: RooAbsArg.h:562
void printAttribList(std::ostream &os) const
Transient boolean attributes (not copied in ctor)
Definition: RooAbsArg.cxx:1459
Bool_t dependentOverlaps(const RooAbsData *dset, const RooAbsArg &testArg) const
Definition: RooAbsArg.h:263
virtual void Print(Option_t *options=0) const
Print the object to the defaultPrintStream().
Definition: RooAbsArg.h:281
friend void RooRefArray::Streamer(TBuffer &)
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
Definition: RooAbsArg.cxx:306
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:506
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:548
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
Definition: RooAbsArg.cxx:261
virtual void writeToStream(std::ostream &os, Bool_t compact) const =0
Bool_t hasClients() const
Definition: RooAbsArg.h:108
virtual void printAddress(std::ostream &os) const
Print class name of object.
Definition: RooAbsArg.cxx:1323
void setTransientAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
Definition: RooAbsArg.cxx:320
virtual void serverNameChangeHook(const RooAbsArg *, const RooAbsArg *)
Definition: RooAbsArg.h:490
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:1867
virtual void setCacheAndTrackHints(RooArgSet &)
Definition: RooAbsArg.h:372
const std::set< std::string > & attributes() const
Definition: RooAbsArg.h:300
Bool_t _isConstant
Do not persist. Pointer to global instance of string that matches object named.
Definition: RooAbsArg.h:646
Bool_t isValueDirty() const
Definition: RooAbsArg.h:390
virtual Bool_t isIdentical(const RooAbsArg &other, Bool_t assumeSameType=kFALSE)=0
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:789
TIterator * clientIterator() const R__SUGGEST_ALTERNATIVE("Use clients() and begin()
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:1513
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
Definition: RooAbsArg.cxx:1917
void clearValueDirty() const
Definition: RooAbsArg.h:526
virtual void ioStreamerPass2()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
Definition: RooAbsArg.cxx:2279
void wireAllCaches()
Definition: RooAbsArg.cxx:2206
Bool_t _valueDirty
Definition: RooAbsArg.h:631
virtual ~RooAbsArg()
Destructor.
Definition: RooAbsArg.cxx:192
virtual Bool_t isDerived() const
Does value or shape of this arg depend on any other arg?
Definition: RooAbsArg.h:91
TIterator * shapeClientIterator() const R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin()
static Bool_t _inhibitDirty
Definition: RooAbsArg.h:620
virtual const char * cacheUniqueSuffix() const
Definition: RooAbsArg.h:474
RefCountListLegacyIterator_t * makeLegacyIterator(const RefCountList_t &list) const
Definition: RooAbsArg.cxx:2325
@ NotAdvised
Definition: RooAbsArg.h:370
const RefCountList_t & servers() const
List of all servers of this object.
Definition: RooAbsArg.h:163
Bool_t _localNoInhibitDirty
Cached isConstant status.
Definition: RooAbsArg.h:648
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Interface function signaling a request to perform constant term optimization.
Definition: RooAbsArg.cxx:1713
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
Definition: RooAbsArg.cxx:1726
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:1275
OperMode _operMode
Mark batches as dirty (only meaningful for RooAbsReal).
Definition: RooAbsArg.h:635
RooLinkedList getCloningAncestors() const
Return ancestors in cloning chain of this RooAbsArg.
Definition: RooAbsArg.cxx:1927
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
Definition: RooAbsArg.h:466
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
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
Definition: RooAbsArg.cxx:2115
Bool_t recursiveCheckObservables(const RooArgSet *nset) const
Recursively call checkObservables on all nodes in the expression tree.
Definition: RooAbsArg.cxx:708
const std::map< std::string, std::string > & stringAttributes() const
Definition: RooAbsArg.h:307
RooAbsCache * getCache(Int_t index) const
Return registered cache object by index.
Definition: RooAbsArg.cxx:1908
virtual void syncCache(const RooArgSet *nset=0)=0
void printDirty(Bool_t depth=kTRUE) const
Print information about current value dirty state information.
Definition: RooAbsArg.cxx:1525
bool _allBatchesDirty
Definition: RooAbsArg.h:633
static Bool_t _verboseDirty
Definition: RooAbsArg.h:619
void registerCache(RooAbsCache &cache)
Register RooAbsCache with this object.
Definition: RooAbsArg.cxx:1880
virtual void optimizeCacheMode(const RooArgSet &observables)
Activate cache mode optimization with given definition of observables.
Definition: RooAbsArg.cxx:1557
RefCountList_t _clientListShape
Definition: RooAbsArg.h:561
virtual void attachToVStore(RooVectorDataStore &vstore)=0
TString cleanBranchName() const
Construct a mangled name from the actual name that is free of any math symbols that might be interpre...
Definition: RooAbsArg.cxx:1838
void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Definition: RooAbsArg.cxx:2240
Bool_t recursiveCheckDependents(const RooArgSet *nset) const
Definition: RooAbsArg.h:269
Bool_t _prohibitServerRedirect
Set of owned component.
Definition: RooAbsArg.h:641
RooAbsArg * findServer(Int_t index) const
Return i-th server from server list.
Definition: RooAbsArg.h:177
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:409
Int_t numProxies() const
Return the number of registered proxies.
Definition: RooAbsArg.cxx:1249
@ DeActivate
Definition: RooAbsArg.h:353
@ ValueChange
Definition: RooAbsArg.h:353
@ ConfigChange
Definition: RooAbsArg.h:353
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
Definition: RooAbsArg.cxx:284
virtual void printName(std::ostream &os) const
Print object name.
Definition: RooAbsArg.cxx:1297
void replaceServer(RooAbsArg &oldServer, RooAbsArg &newServer, Bool_t valueProp, Bool_t shapeProp)
Replace 'oldServer' with 'newServer'.
Definition: RooAbsArg.cxx:434
const std::set< std::string > & transientAttributes() const
Definition: RooAbsArg.h:315
const RefCountList_t & clients() const
List of all clients of this object.
Definition: RooAbsArg.h:149
RooArgSet * getDependents(const RooArgSet *depList) const
Definition: RooAbsArg.h:261
virtual void getParametersHook(const RooArgSet *, RooArgSet *, Bool_t) const
Definition: RooAbsArg.h:518
virtual void printMetaArgs(std::ostream &) const
Definition: RooAbsArg.h:291
Bool_t isShapeServer(const char *name) const
Check if this is serving shape to an object with name name.
Definition: RooAbsArg.h:193
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:394
Bool_t dependsOnValue(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0) const
Definition: RooAbsArg.h:97
void setProxyNormSet(const RooArgSet *nset)
Forward a change in the cached normalization argset to all the registered proxies.
Definition: RooAbsArg.cxx:1260
RefCountList_t _clientList
Definition: RooAbsArg.h:560
Bool_t dependsOnValue(const RooAbsArg &server, const RooAbsArg *ignoreArg=0) const
Definition: RooAbsArg.h:101
RooAbsProxy * getProxy(Int_t index) const
Return the nth proxy from the proxy list.
Definition: RooAbsArg.cxx:1236
RooAbsArg & operator=(const RooAbsArg &other)
Assign all boolean and string properties of the original object.
Definition: RooAbsArg.cxx:159
Bool_t isValueDirtyAndClear() const
Definition: RooAbsArg.h:405
Bool_t dependentOverlaps(const RooArgSet *depList, const RooAbsArg &testArg) const
Definition: RooAbsArg.h:265
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:231
RefCountList_t _serverList
Definition: RooAbsArg.h:559
void clearShapeDirty() const
Definition: RooAbsArg.h:529
virtual RooAbsArg * createFundamental(const char *newname=0) const =0
Create a fundamental-type object that stores our type of value.
RooExpensiveObjectCache * _eocache
Prohibit server redirects – Debugging tool.
Definition: RooAbsArg.h:643
RooArgSet * getComponents() const
Definition: RooAbsArg.cxx:678
std::set< std::string > _boolAttribTransient
Definition: RooAbsArg.h:590
Bool_t _shapeDirty
Definition: RooAbsArg.h:632
void setLocalNoDirtyInhibit(Bool_t flag) const
Definition: RooAbsArg.h:626
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:1035
Bool_t isConstant() const
Definition: RooAbsArg.h:320
virtual void fillTreeBranch(TTree &t)=0
void branchNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, Bool_t recurseNonDerived=kFALSE) const
Fill supplied list with all branch nodes of the arg tree starting with ourself as top node.
Definition: RooAbsArg.cxx:490
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:1954
virtual void operModeHook()
Definition: RooAbsArg.h:512
RooFIter valueClientMIterator() const R__SUGGEST_ALTERNATIVE("Use valueClients() and begin()
virtual void optimizeDirtyHook(const RooArgSet *)
Definition: RooAbsArg.h:514
Bool_t getTransientAttribute(const Text_t *name) const
Check if a named attribute is set.
Definition: RooAbsArg.cxx:342
std::map< std::string, std::string > _stringAttrib
Definition: RooAbsArg.h:589
virtual Bool_t inRange(const char *) const
Definition: RooAbsArg.h:343
TIterator * serverIterator() const R__SUGGEST_ALTERNATIVE("Use servers() and begin()
Int_t numCaches() const
Return number of registered caches.
Definition: RooAbsArg.cxx:1899
RooFIter shapeClientMIterator() const R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin()
RooAbsArg()
Default constructor.
Definition: RooAbsArg.cxx:94
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
Definition: RooAbsArg.cxx:1072
Bool_t isValueServer(const char *name) const
Check if this is serving values to an object with name name.
Definition: RooAbsArg.h:185
void attachDataSet(const RooAbsData &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
Definition: RooAbsArg.cxx:1475
virtual Bool_t hasRange(const char *) const
Definition: RooAbsArg.h:347
virtual TObject * clone(const char *newname=0) const =0
virtual void printArgs(std::ostream &os) const
Print object arguments, ie its proxies.
Definition: RooAbsArg.cxx:1334
TIteratorToSTLInterface< RefCountList_t::Container_t > RefCountListLegacyIterator_t
Definition: RooAbsArg.h:74
RooAbsArg * findServer(const char *name) const
Return server of this with name name. Returns nullptr if not found.
Definition: RooAbsArg.h:167
void SetName(const char *name)
Set the name of the TNamed.
Definition: RooAbsArg.cxx:2224
void addParameters(RooArgSet &params, const RooArgSet *nset=0, Bool_t stripDisconnected=kTRUE) const
INTERNAL helper function for getParameters()
Definition: RooAbsArg.cxx:557
Bool_t localNoDirtyInhibit() const
Definition: RooAbsArg.h:627
Bool_t _deleteWatch
Definition: RooAbsArg.h:621
OperMode operMode() const
Definition: RooAbsArg.h:453
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:803
RooAbsCache is the abstract base class for data members of RooAbsArgs that cache other (composite) Ro...
Definition: RooAbsCache.h:27
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsDataStore is the abstract base class for data collection that use a TTree as internal storage m...
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:39
RooAbsProxy is the abstact interface for proxy classes.
Definition: RooAbsProxy.h:31
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:59
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
Definition: RooAddPdf.h:29
RooArgProxy is the abstact interface for RooAbsArg proxy classes.
Definition: RooArgProxy.h:24
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
RooCompositeDataStore combines several disjunct datasets into one.
RooCustomizer is a factory class to produce clones of a prototype composite PDF object with the same ...
Definition: RooCustomizer.h:32
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:31
RooExpensiveObjectCache is a singleton class that serves as repository for objects that are expensive...
RooExtendPdf is a wrapper around an existing PDF that adds a parameteric extended likelihood term to ...
Definition: RooExtendPdf.h:22
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
Definition: RooFitResult.h:40
RooHistFunc implements a real-valued function sampled from a multidimensional histogram.
Definition: RooHistFunc.h:29
RooHistPdf implements a probablity density function sampled from a multidimensional histogram.
Definition: RooHistPdf.h:28
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:36
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:25
RooMinuit is a wrapper class around TFitter/TMinuit that provides a seamless interface between the MI...
Definition: RooMinuit.h:39
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
Definition: RooPrintable.h:25
virtual StyleOption defaultPrintStyle(Option_t *opt) const
static std::ostream & defaultPrintStream(std::ostream *os=0)
Return a reference to the current default stream to use in Print().
virtual void printStream(std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
Print description of object on ostream, printing contents set by contents integer,...
RooProdPdf is an efficient implementation of a product of PDFs of the form.
Definition: RooProdPdf.h:31
Class RooProjectedPdf is a RooAbsPdf implementation that represent a projection of a given input p....
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
RooRealMPFE is the multi-processor front-end for parallel calculation of RooAbsReal objects.
Definition: RooRealMPFE.h:30
RooRefArray & operator=(const RooRefArray &other)=default
RooRefArray(const RooRefArray &other)
Definition: RooAbsArg.h:57
virtual ~RooRefArray()
Definition: RooAbsArg.h:60
Container_t::const_iterator findByNamePointer(const T *item) const
Find an item by comparing RooAbsArg::namePtr() adresses.
bool containsSameName(const char *name) const
Check if list contains an item using findByName().
const Container_t & containedObjects() const
Direct reference to container of objects held by this list.
Container_t::const_iterator end() const
End of contained objects.
bool empty() const
Check if empty.
Container_t::const_iterator findByName(const char *name) const
Find an item by comparing strings returned by RooAbsArg::GetName()
bool containsByNamePtr(const T *obj) const
Check if list contains an item using findByNamePointer().
RooSetProxy is the concrete proxy for RooArgSet objects.
Definition: RooSetProxy.h:24
RooTreeDataStore is a TTree-backed data storage.
RooTreeData is the abstract base class for data collection that use a TTree as internal storage mecha...
Definition: RooTreeData.h:25
RooVectorDataStore is the abstract base class for data collection that use a TTree as internal storag...
The RooWorkspace is a persistable container for RooFit projects.
Definition: RooWorkspace.h:43
Buffer base class used for serializing objects.
Definition: TBuffer.h:42
TIterator and GenericRooFIter front end with STL back end.
Iterator abstract base class.
Definition: TIterator.h:30
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
An array of TObjects.
Definition: TObjArray.h:37
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:131
A TTree represents a columnar dataset.
Definition: TTree.h:72
void ws()
Definition: ws.C:66