Logo ROOT   6.18/05
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 ;
52class RooRealProxy ;
53/* class TGraphStruct ; */
54
55class 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
68
69
70class RooAbsArg : public TNamed, public RooPrintable {
71public:
74
75 // Constructors, cloning and assignment
76 RooAbsArg() ;
77 virtual ~RooAbsArg();
78 RooAbsArg(const char *name, const char *title);
79 RooAbsArg(const RooAbsArg& other, const char* name=0) ;
80 RooAbsArg& operator=(const RooAbsArg& other);
81 virtual TObject* clone(const char* newname=0) const = 0 ;
82 virtual TObject* Clone(const char* newname = 0) const {
83 return clone(newname && newname[0] != '\0' ? newname : nullptr);
84 }
85 virtual RooAbsArg* cloneTree(const char* newname=0) const ;
86
87 // Accessors to client-server relation information
88
89 /// Does value or shape of this arg depend on any other arg?
90 virtual Bool_t isDerived() const {
91 return kTRUE ;
92 //std::cout << IsA()->GetName() << "::isDerived(" << GetName() << ") = " << (_serverList.GetSize()>0 || _proxyList.GetSize()>0) << std::endl ;
93 //return (_serverList.GetSize()>0 || _proxyList.GetSize()>0)?kTRUE:kFALSE;
94 }
95 Bool_t isCloneOf(const RooAbsArg& other) const ;
96 Bool_t dependsOnValue(const RooAbsCollection& serverList, const RooAbsArg* ignoreArg=0) const {
97 // Does this arg depend on the value of any of of the values in serverList?
98 return dependsOn(serverList,ignoreArg,kTRUE) ;
99 }
100 Bool_t dependsOnValue(const RooAbsArg& server, const RooAbsArg* ignoreArg=0) const {
101 // Does this arg depend on the value of server?
102 return dependsOn(server,ignoreArg,kTRUE) ;
103 }
104 Bool_t dependsOn(const RooAbsCollection& serverList, const RooAbsArg* ignoreArg=0, Bool_t valueOnly=kFALSE) const ;
105 Bool_t dependsOn(const RooAbsArg& server, const RooAbsArg* ignoreArg=0, Bool_t valueOnly=kFALSE) const ;
106 Bool_t overlaps(const RooAbsArg& testArg, Bool_t valueOnly=kFALSE) const ;
107 Bool_t hasClients() const { return !_clientList.empty(); }
108
109 ////////////////////////////////////////////////////////////////////////////
110 // Legacy iterators
111 inline TIterator* clientIterator() const
112 R__SUGGEST_ALTERNATIVE("Use clients() and begin(), end() or range-based loops.") {
113 // Return iterator over all client RooAbsArgs
115 }
117 R__SUGGEST_ALTERNATIVE("Use valueClients() and begin(), end() or range-based loops.") {
118 // Return iterator over all shape client RooAbsArgs
120 }
122 R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin(), end() or range-based loops.") {
123 // Return iterator over all shape client RooAbsArgs
125 }
126 inline TIterator* serverIterator() const
127 R__SUGGEST_ALTERNATIVE("Use servers() and begin(), end() or range-based loops.") {
128 // Return iterator over all server RooAbsArgs
130 }
131
133 R__SUGGEST_ALTERNATIVE("Use valueClients() and begin(), end() or range-based loops.") {
134 return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_clientListValue)));
135 }
137 R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin(), end() or range-based loops.") {
138 return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_clientListShape)));
139 }
141 R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin(), end() or range-based loops.") {
142 return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_serverList)));
143 }
144
145 ////////////////////////////////////////////////////////////////////////////
146
147 /// List of all clients of this object.
148 const RefCountList_t& clients() const {
149 return _clientList;
150 }
151 /// List of all value clients of this object. Value clients receive value updates.
153 return _clientListValue;
154 }
155 /// List of all shape clients of this object. Shape clients receive property information such as
156 /// changes of a value range.
158 return _clientListShape;
159 }
160
161 const RefCountList_t& servers() const {
162 return _serverList;
163 }
164
165 inline RooAbsArg* findServer(const char *name) const {
166 // Return server of this arg with given name. Returns null if not found
167 const auto serverIt = _serverList.findByName(name);
168 return serverIt != _serverList.end() ? *serverIt : nullptr;
169 }
170 inline RooAbsArg* findServer(const RooAbsArg& arg) const {
171 // Return server of this arg with name of given input arg. Returns null if not found
172 const auto serverIt = _serverList.findByNamePointer(&arg);
173 return serverIt != _serverList.end() ? *serverIt : nullptr;
174 }
175 inline RooAbsArg* findServer(Int_t index) const {
176 // Return i-th server from server list
177 return _serverList.containedObjects()[index];
178 }
179 inline Bool_t isValueServer(const RooAbsArg& arg) const {
180 // If true, arg is a value server of self
182 }
183 inline Bool_t isValueServer(const char* name) const {
184 // If true, we have a server with given name
186 }
187 inline Bool_t isShapeServer(const RooAbsArg& arg) const {
188 // If true arg is a shape server of self
190 }
191 inline Bool_t isShapeServer(const char* name) const {
192 // If true, we have a shape server with given name
194 }
195 void leafNodeServerList(RooAbsCollection* list, const RooAbsArg* arg=0, Bool_t recurseNonDerived=kFALSE) const ;
196 void branchNodeServerList(RooAbsCollection* list, const RooAbsArg* arg=0, Bool_t recurseNonDerived=kFALSE) const ;
197 void treeNodeServerList(RooAbsCollection* list, const RooAbsArg* arg=0,
198 Bool_t doBranch=kTRUE, Bool_t doLeaf=kTRUE,
199 Bool_t valueOnly=kFALSE, Bool_t recurseNonDerived=kFALSE) const ;
200
201
202 /// Is this object a fundamental type that can be added to a dataset?
203 /// Fundamental-type subclasses override this method to return kTRUE.
204 /// Note that this test is subtlely different from the dynamic isDerived()
205 /// test, e.g. a constant is not derived but is also not fundamental.
206 inline virtual Bool_t isFundamental() const {
207 return kFALSE;
208 }
209
210 /// Create a fundamental-type object that stores our type of value. The
211 /// created object will have a valid value, but not necessarily the same
212 /// as our value. The caller is responsible for deleting the returned object.
213 virtual RooAbsArg *createFundamental(const char* newname=0) const = 0;
214
215 /// Is this argument an l-value, i.e., can it appear on the left-hand side
216 /// of an assignment expression? LValues are also special since they can
217 /// potentially be analytically integrated and generated.
218 inline virtual Bool_t isLValue() const {
219 return kFALSE;
220 }
221
222 void addParameters(RooArgSet& params, const RooArgSet* nset=0, Bool_t stripDisconnected=kTRUE) const ;
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 inline RooArgSet* getDependents(const RooArgSet& set) const { return getObservables(set) ; }
257 inline RooArgSet* getDependents(const RooAbsData* set) const { return getObservables(set) ; }
258 inline RooArgSet* getDependents(const RooArgSet* depList) const { return getObservables(depList) ; }
259 inline Bool_t dependentOverlaps(const RooAbsData* dset, const RooAbsArg& testArg) const { return observableOverlaps(dset,testArg) ; }
260 inline Bool_t dependentOverlaps(const RooArgSet* depList, const RooAbsArg& testArg) const { return observableOverlaps(depList, testArg) ; }
261 inline Bool_t checkDependents(const RooArgSet* nset) const { return checkObservables(nset) ; }
262 inline Bool_t recursiveCheckDependents(const RooArgSet* nset) const { return recursiveCheckObservables(nset) ; }
263 // --- End obsolete functions for backward compatibility
264
265 void attachDataSet(const RooAbsData &set);
266 void attachDataStore(const RooAbsDataStore &set);
267
268 // I/O streaming interface (machine readable)
269 virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t verbose=kFALSE) = 0 ;
270 virtual void writeToStream(std::ostream& os, Bool_t compact) const = 0 ;
271
272 inline virtual void Print(Option_t *options= 0) const {
273 // Printing interface (human readable)
275 }
276
277 virtual void printName(std::ostream& os) const ;
278 virtual void printTitle(std::ostream& os) const ;
279 virtual void printClassName(std::ostream& os) const ;
280 virtual void printAddress(std::ostream& os) const ;
281 virtual void printArgs(std::ostream& os) const ;
282 virtual void printMetaArgs(std::ostream& /*os*/) const {} ;
283 virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const;
284 virtual void printTree(std::ostream& os, TString indent="") const ;
285
286 virtual Int_t defaultPrintContents(Option_t* opt) const ;
287
288 // Accessors to attributes
289 void setAttribute(const Text_t* name, Bool_t value=kTRUE) ;
290 Bool_t getAttribute(const Text_t* name) const ;
291 inline const std::set<std::string>& attributes() const {
292 // Returns set of names of boolean attributes defined
293 return _boolAttrib ;
294 }
295
296 void setStringAttribute(const Text_t* key, const Text_t* value) ;
297 const Text_t* getStringAttribute(const Text_t* key) const ;
298 inline const std::map<std::string,std::string>& stringAttributes() const {
299 // Returns std::map<string,string> with all string attributes defined
300 return _stringAttrib ;
301 }
302
303 // Accessors to transient attributes
304 void setTransientAttribute(const Text_t* name, Bool_t value=kTRUE) ;
306 inline const std::set<std::string>& transientAttributes() const {
307 // Return set of transient boolean attributes
308 return _boolAttribTransient ;
309 }
310
311 inline Bool_t isConstant() const {
312 // Returns true if 'Constant' attribute is set
313 return _isConstant ; //getAttribute("Constant") ;
314 }
316
317 // Sorting
318 Int_t Compare(const TObject* other) const ;
319 virtual Bool_t IsSortable() const {
320 // Object is sortable in ROOT container class
321 return kTRUE ;
322 }
323
324 //Debug hooks
325 static void verboseDirty(Bool_t flag) ;
326 void printDirty(Bool_t depth=kTRUE) const ;
327
328 static void setDirtyInhibit(Bool_t flag) ;
329
330 virtual Bool_t operator==(const RooAbsArg& other) = 0 ;
331 virtual Bool_t isIdentical(const RooAbsArg& other, Bool_t assumeSameType=kFALSE) = 0 ;
332
333 // Range management
334 virtual Bool_t inRange(const char*) const {
335 // Is value in range (dummy interface always returns true)
336 return kTRUE ;
337 }
338 virtual Bool_t hasRange(const char*) const {
339 // Has this argument a defined range (dummy interface always returns flase)
340 return kFALSE ;
341 }
342
343
345
346
347 friend class RooMinuit ;
348
349 // Cache mode optimization (tracks changes & do lazy evaluation vs evaluate always)
350 virtual void optimizeCacheMode(const RooArgSet& observables) ;
351 virtual void optimizeCacheMode(const RooArgSet& observables, RooArgSet& optNodes, RooLinkedList& processedNodes) ;
352
353
354 // Find constant terms in expression
355 Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheList) ;
356 Bool_t findConstantNodes(const RooArgSet& observables, RooArgSet& cacheList, RooLinkedList& processedNodes) ;
357
358
359 // constant term optimization
360 virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE) ;
361 enum CacheMode { Always=0, NotAdvised=1, Never=2 } ;
362 virtual CacheMode canNodeBeCached() const { return Always ; }
363 virtual void setCacheAndTrackHints(RooArgSet& /*trackNodes*/ ) {} ;
364
365 void graphVizTree(const char* fileName, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ;
366 void graphVizTree(std::ostream& os, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ;
367
368/* TGraphStruct* graph(Bool_t useFactoryTag=kFALSE, Double_t textSize=0.03) ; */
369
370 void printComponentTree(const char* indent="",const char* namePat=0, Int_t nLevel=999) ;
371 void printCompactTree(const char* indent="",const char* fileName=0, const char* namePat=0, RooAbsArg* client=0) ;
372 void printCompactTree(std::ostream& os, const char* indent="", const char* namePat=0, RooAbsArg* client=0) ;
373 virtual void printCompactTreeHook(std::ostream& os, const char *ind="") ;
374
375 // Dirty state accessor
376 inline Bool_t isShapeDirty() const {
377 // Return true is shape has been invalidated by server value change
378 return isDerived()?_shapeDirty:kFALSE ;
379 }
380
381 inline Bool_t isValueDirty() const {
382 // Returns true of value has been invalidated by server value change
383 if (inhibitDirty()) return kTRUE ;
384 switch(_operMode) {
385 case AClean:
386 return kFALSE ;
387 case ADirty:
388 return kTRUE ;
389 case Auto:
390 if (_valueDirty) return isDerived() ;
391 return kFALSE ;
392 }
393 return kTRUE ; // we should never get here
394 }
395
397 // Returns true of value has been invalidated by server value change
398 if (inhibitDirty()) return kTRUE ;
399 switch(_operMode) {
400 case AClean:
401 return kFALSE ;
402 case ADirty:
403 return kTRUE ;
404 case Auto:
405 if (_valueDirty) {
407 return isDerived();
408 }
409 return kFALSE ;
410 }
411 return kTRUE ; // But we should never get here
412 }
413
414
416 // Returns true of value has been invalidated by server value change
417
418 if (inhibitDirty()) return kTRUE ;
419 switch(_operMode) {
420 case AClean:
421 return kFALSE ;
422 case ADirty:
423 return kTRUE ;
424 case Auto:
425 if (_valueDirty || _shapeDirty) {
428 return isDerived();
429 }
432 return kFALSE ;
433 }
434 return kTRUE ; // But we should never get here
435 }
436
437 // Cache management
438 void registerCache(RooAbsCache& cache) ;
439 void unRegisterCache(RooAbsCache& cache) ;
440 Int_t numCaches() const ;
441 RooAbsCache* getCache(Int_t index) const ;
442
443 enum OperMode { Auto=0, AClean=1, ADirty=2 } ;
444 inline OperMode operMode() const { return _operMode ; }
445 void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE) ;
446
447 static UInt_t crc32(const char* data);
448 static UInt_t crc32(const char* data, ULong_t sz, UInt_t crc = 0);
449
450 static const UInt_t fnv1a32start = 2166136261u;
451 static UInt_t fnv1a32(const char* data);
452 static UInt_t fnv1a32(const char* data, ULong_t sz, UInt_t hash = fnv1a32start);
453
454 static const ULong64_t fnv1a64start = (ULong64_t(3421674724u) << 32) | ULong64_t(2216829733u);
455 static ULong64_t fnv1a64(const char* data);
456 static ULong64_t fnv1a64(const char* data, ULong_t sz, ULong64_t hash = fnv1a64start);
457
458 Bool_t addOwnedComponents(const RooArgSet& comps) ;
459 const RooArgSet* ownedComponents() const { return _ownedComponents ; }
460
462
464
465 protected:
466
467 void graphVizAddConnections(std::set<std::pair<RooAbsArg*,RooAbsArg*> >&) ;
468
469 friend class RooExtendPdf ;
470 friend class RooRealIntegral ;
471 friend class RooAbsReal ;
472 friend class RooProjectedPdf ;
473 //friend class RooSimCloneTool ;
474
475 virtual void operModeHook() {} ;
476
477 virtual void optimizeDirtyHook(const RooArgSet* /*obs*/) {} ;
478
479 virtual Bool_t isValid() const ;
480
481 virtual void getParametersHook(const RooArgSet* /*nset*/, RooArgSet* /*list*/, Bool_t /*stripDisconnected*/) const {} ;
482 virtual void getObservablesHook(const RooArgSet* /*nset*/, RooArgSet* /*list*/) const {} ;
483
484 // Dirty state modifiers
485 public:
486 inline void setValueDirty() const { if (_operMode==Auto && !inhibitDirty()) setValueDirty(0) ; }
487 inline void setShapeDirty() const { setShapeDirty(0) ; }
488
489 inline void clearValueAndShapeDirty() const {
492 }
493
494 inline void clearValueDirty() const {
496 }
497 inline void clearShapeDirty() const {
499 }
500
501 const char* aggregateCacheUniqueSuffix() const ;
502 virtual const char* cacheUniqueSuffix() const { return 0 ; }
503
504 void wireAllCaches() ;
505
506 inline const TNamed* namePtr() const {
507 return _namePtr ;
508 }
509
510 void SetName(const char* name) ;
511 void SetNameTitle(const char *name, const char *title) ;
512
513 protected:
514
515 // Client-Server relatation and Proxy management
516 friend class RooArgSet ;
517 friend class RooAbsCollection ;
518 friend class RooCustomizer ;
519 friend class RooWorkspace ;
520 RefCountList_t _serverList ; // list of server objects
521 RefCountList_t _clientList; // list of client objects
522 RefCountList_t _clientListShape; // subset of clients that requested shape dirty flag propagation
523 RefCountList_t _clientListValue; // subset of clients that requested value dirty flag propagation
524
525 RooRefArray _proxyList ; // list of proxies
526 std::deque<RooAbsCache*> _cacheList ; // list of caches
527
528 // Server redirection interface
529 public:
530 Bool_t redirectServers(const RooAbsCollection& newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t isRecursionStep=kFALSE) ;
531 Bool_t recursiveRedirectServers(const RooAbsCollection& newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE) ;
532 virtual Bool_t redirectServersHook(const RooAbsCollection& /*newServerList*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive*/) { return kFALSE ; } ;
533 virtual void serverNameChangeHook(const RooAbsArg* /*oldServer*/, const RooAbsArg* /*newServer*/) { } ;
534
535 void addServer(RooAbsArg& server, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE, std::size_t refCount = 1);
536 void addServerList(RooAbsCollection& serverList, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE) ;
537 void replaceServer(RooAbsArg& oldServer, RooAbsArg& newServer, Bool_t valueProp, Bool_t shapeProp) ;
538 void changeServer(RooAbsArg& server, Bool_t valueProp, Bool_t shapeProp) ;
539 void removeServer(RooAbsArg& server, Bool_t force=kFALSE) ;
540 RooAbsArg *findNewServer(const RooAbsCollection &newSet, Bool_t nameChange) const;
541
544
546 {
547 _myws = &ws;
548 return kFALSE;
549 };
550
551 protected:
552 // Proxy management
553 friend class RooAddModel ;
554 friend class RooArgProxy ;
555 friend class RooSetProxy ;
556 friend class RooListProxy ;
557 friend class RooObjectFactory ;
558 friend class RooHistPdf ;
559 friend class RooHistFunc ;
560 friend class RooHistFunc2 ;
561 void registerProxy(RooArgProxy& proxy) ;
562 void registerProxy(RooSetProxy& proxy) ;
563 void registerProxy(RooListProxy& proxy) ;
564 void unRegisterProxy(RooArgProxy& proxy) ;
565 void unRegisterProxy(RooSetProxy& proxy) ;
566 void unRegisterProxy(RooListProxy& proxy) ;
567 RooAbsProxy* getProxy(Int_t index) const ;
568 void setProxyNormSet(const RooArgSet* nset) ;
569 Int_t numProxies() const ;
570
571 // Attribute list
572 std::set<std::string> _boolAttrib ; // Boolean attributes
573 std::map<std::string,std::string> _stringAttrib ; // String attributes
574 std::set<std::string> _boolAttribTransient ; //! Transient boolean attributes (not copied in ctor)
575
576 void printAttribList(std::ostream& os) const;
577
578 // Hooks for RooTreeData interface
580 friend class RooTreeDataStore ;
581 friend class RooVectorDataStore ;
582 friend class RooTreeData ;
583 friend class RooDataSet ;
584 friend class RooRealMPFE ;
585 virtual void syncCache(const RooArgSet* nset=0) = 0 ;
586 virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE) = 0 ;
587
588 virtual void attachToTree(TTree& t, Int_t bufSize=32000) = 0 ;
589 virtual void attachToVStore(RooVectorDataStore& vstore) = 0 ;
590 void attachToStore(RooAbsDataStore& store) ;
591
592 virtual void setTreeBranchStatus(TTree& t, Bool_t active) = 0 ;
593 virtual void fillTreeBranch(TTree& t) = 0 ;
594 TString cleanBranchName() const ;
595
596 // Global
597 friend std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg);
598 friend std::istream& operator>>(std::istream& is, RooAbsArg &arg) ;
599
600 // Debug stuff
601 static Bool_t _verboseDirty ; // Static flag controlling verbose messaging for dirty state changes
602 static Bool_t _inhibitDirty ; // Static flag controlling global inhibit of dirty state propagation
603 Bool_t _deleteWatch ; //! Delete watch flag
604
605 Bool_t inhibitDirty() const ;
606
607 public:
610 protected:
611
612 // Value and Shape dirty state bits
613 void setValueDirty(const RooAbsArg* source) const ;
614 void setShapeDirty(const RooAbsArg* source) const ;
615 mutable Bool_t _valueDirty ; // Flag set if value needs recalculating because input values modified
616 mutable Bool_t _shapeDirty ; // Flag set if value needs recalculating because input shapes modified
617
618 friend class RooRealProxy ;
619 mutable OperMode _operMode ; // Dirty state propagation mode
620 mutable Bool_t _fast ; // Allow fast access mode in getVal() and proxies
621
622 // Owned components
623 RooArgSet* _ownedComponents ; //! Set of owned component
624
625 mutable Bool_t _prohibitServerRedirect ; //! Prohibit server redirects -- Debugging tool
626
627 mutable RooExpensiveObjectCache* _eocache ; // Pointer to global cache manager for any expensive components created by this object
628
629 mutable TNamed* _namePtr ; //! Do not persist. Pointer to global instance of string that matches object named
630 Bool_t _isConstant ; //! Cached isConstant status
631
632 mutable Bool_t _localNoInhibitDirty ; //! Prevent 'AlwaysDirty' mode for this node
633
634/* RooArgSet _leafNodeCache ; //! Cached leaf nodes */
635/* RooArgSet _branchNodeCache //! Cached branch nodes */
636
637 mutable RooWorkspace *_myws; //! In which workspace do I live, if any
638
639 public:
640 virtual void ioStreamerPass2() ;
641 static void ioStreamerPass2Finalize() ;
642 static std::map<RooAbsArg*,TRefArray*> _ioEvoList ; // temporary holding list for proxies needed in schema evolution
643 static std::stack<RooAbsArg*> _ioReadStack ; // reading stack
644
645 private:
647
648 ClassDef(RooAbsArg,7) // Abstract variable
649};
650
651std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg);
652std::istream& operator>>(std::istream& is, RooAbsArg &arg) ;
653
654/// Print a RDataFrame at the prompt
655namespace cling {
656std::string printValue(RooAbsArg *raa);
657} // namespace cling
658
659
660#endif
#define R__SUGGEST_ALTERNATIVE(ALTERNATIVE)
Definition: RConfig.hxx:530
std::ostream & operator<<(std::ostream &os, const RooAbsArg &arg)
std::istream & operator>>(std::istream &is, RooAbsArg &arg)
Istream operator.
Definition: RooAbsArg.cxx:1443
int Int_t
Definition: RtypesCore.h:41
char Text_t
Definition: RtypesCore.h:58
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
unsigned long ULong_t
Definition: RtypesCore.h:51
bool Bool_t
Definition: RtypesCore.h:59
unsigned long long ULong64_t
Definition: RtypesCore.h:70
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:70
RooExpensiveObjectCache & expensiveObjectCache() const
Definition: RooAbsArg.cxx:2293
virtual Bool_t IsSortable() const
Definition: RooAbsArg.h:319
static std::stack< RooAbsArg * > _ioReadStack
Definition: RooAbsArg.h:643
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:694
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
Definition: RooAbsArg.cxx:2246
RooRefArray _proxyList
Definition: RooAbsArg.h:525
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:620
void clearValueAndShapeDirty() const
Definition: RooAbsArg.h:489
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:1279
TNamed * _namePtr
Definition: RooAbsArg.h:629
virtual Bool_t importWorkspaceHook(RooWorkspace &ws)
Definition: RooAbsArg.h:545
static UInt_t crc32(const char *data)
Definition: RooAbsArg.cxx:1858
static void verboseDirty(Bool_t flag)
Activate verbose messaging related to dirty flag propagation.
Definition: RooAbsArg.cxx:238
void attachToStore(RooAbsDataStore &store)
Definition: RooAbsArg.cxx:2280
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default contents to print.
Definition: RooAbsArg.cxx:1350
const TNamed * namePtr() const
Definition: RooAbsArg.h:506
const char * aggregateCacheUniqueSuffix() const
Definition: RooAbsArg.cxx:2305
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:906
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:218
void changeServer(RooAbsArg &server, Bool_t valueProp, Bool_t shapeProp)
Change dirty flag propagation mask for specified server.
Definition: RooAbsArg.cxx:440
Bool_t isValueServer(const RooAbsArg &arg) const
Definition: RooAbsArg.h:179
virtual Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Definition: RooAbsArg.h:532
virtual void getObservablesHook(const RooArgSet *, RooArgSet *) const
Definition: RooAbsArg.h:482
RooWorkspace * _myws
Prevent 'AlwaysDirty' mode for this node.
Definition: RooAbsArg.h:637
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:1746
void attachDataStore(const RooAbsDataStore &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
Definition: RooAbsArg.cxx:1487
virtual void printClassName(std::ostream &os) const
Print object class name.
Definition: RooAbsArg.cxx:1310
RooArgSet * _ownedComponents
Definition: RooAbsArg.h:623
std::deque< RooAbsCache * > _cacheList
Definition: RooAbsArg.h:526
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:729
void registerProxy(RooArgProxy &proxy)
Register an RooArgProxy in the proxy list.
Definition: RooAbsArg.cxx:1120
friend class RooHistFunc2
Definition: RooAbsArg.h:560
TIterator * valueClientIterator() const R__SUGGEST_ALTERNATIVE("Use valueClients() and begin()
Bool_t checkDependents(const RooArgSet *nset) const
Definition: RooAbsArg.h:261
friend std::ostream & operator<<(std::ostream &os, const RooAbsArg &arg)
Bool_t isShapeServer(const RooAbsArg &arg) const
Definition: RooAbsArg.h:187
RooFIter serverMIterator() const R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin()
RooArgSet * getDependents(const RooArgSet &set) const
Definition: RooAbsArg.h:256
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
Definition: RooAbsArg.cxx:288
friend class RooObjectFactory
Definition: RooAbsArg.h:557
static void ioStreamerPass2Finalize()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
Definition: RooAbsArg.cxx:2426
RooArgSet * getDependents(const RooAbsData *set) const
Definition: RooAbsArg.h:257
virtual CacheMode canNodeBeCached() const
Definition: RooAbsArg.h:362
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:474
virtual void setTreeBranchStatus(TTree &t, Bool_t active)=0
void setProhibitServerRedirect(Bool_t flag)
Definition: RooAbsArg.h:461
void setWorkspace(RooWorkspace &ws)
Definition: RooAbsArg.h:463
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Implement multi-line detailed printing.
Definition: RooAbsArg.cxx:1360
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:82
const RooArgSet * ownedComponents() const
Definition: RooAbsArg.h:459
Bool_t isCloneOf(const RooAbsArg &other) const
Check if this object was created as a clone of 'other'.
Definition: RooAbsArg.cxx:246
Bool_t isShapeDirty() const
Definition: RooAbsArg.h:376
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:229
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:1613
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:2142
void unRegisterProxy(RooArgProxy &proxy)
Remove proxy from proxy list.
Definition: RooAbsArg.cxx:1148
static const ULong64_t fnv1a64start
Definition: RooAbsArg.h:454
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:1806
const RefCountList_t & shapeClients() const
List of all shape clients of this object.
Definition: RooAbsArg.h:157
Bool_t inhibitDirty() const
Delete watch flag.
Definition: RooAbsArg.cxx:84
const RefCountList_t & valueClients() const
List of all value clients of this object. Value clients receive value updates.
Definition: RooAbsArg.h:152
friend std::istream & operator>>(std::istream &is, RooAbsArg &arg)
Istream operator.
Definition: RooAbsArg.cxx:1443
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:543
std::set< std::string > _boolAttrib
Definition: RooAbsArg.h:572
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:353
virtual void printTree(std::ostream &os, TString indent="") const
Print object tree structure.
Definition: RooAbsArg.cxx:1425
TIterator end() or range-based loops.")
Definition: RooAbsArg.h:112
void unRegisterCache(RooAbsCache &cache)
Unregister a RooAbsCache. Called from the RooAbsCache destructor.
Definition: RooAbsArg.cxx:2006
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:206
virtual void printTitle(std::ostream &os) const
Print object title.
Definition: RooAbsArg.cxx:1300
Bool_t isValueOrShapeDirtyAndClear() const
Definition: RooAbsArg.h:415
RefCountList_t _clientListValue
Definition: RooAbsArg.h:523
void printAttribList(std::ostream &os) const
Transient boolean attributes (not copied in ctor)
Definition: RooAbsArg.cxx:1452
Bool_t dependentOverlaps(const RooAbsData *dset, const RooAbsArg &testArg) const
Definition: RooAbsArg.h:259
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
Definition: RooAbsArg.h:272
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
Definition: RooAbsArg.cxx:301
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:501
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:543
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
Definition: RooAbsArg.cxx:256
virtual void writeToStream(std::ostream &os, Bool_t compact) const =0
Bool_t hasClients() const
Definition: RooAbsArg.h:107
virtual void printAddress(std::ostream &os) const
Print class name of object.
Definition: RooAbsArg.cxx:1316
void setTransientAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
Definition: RooAbsArg.cxx:315
static std::map< RooAbsArg *, TRefArray * > _ioEvoList
Definition: RooAbsArg.h:642
virtual void serverNameChangeHook(const RooAbsArg *, const RooAbsArg *)
Definition: RooAbsArg.h:533
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:1984
virtual void setCacheAndTrackHints(RooArgSet &)
Definition: RooAbsArg.h:363
const std::set< std::string > & attributes() const
Definition: RooAbsArg.h:291
Bool_t _isConstant
Do not persist. Pointer to global instance of string that matches object named.
Definition: RooAbsArg.h:630
Bool_t isValueDirty() const
Definition: RooAbsArg.h:381
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:784
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:1506
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
Definition: RooAbsArg.cxx:2034
void clearValueDirty() const
Definition: RooAbsArg.h:494
virtual void ioStreamerPass2()
In which workspace do I live, if any.
Definition: RooAbsArg.cxx:2396
void wireAllCaches()
Definition: RooAbsArg.cxx:2323
Bool_t _valueDirty
Definition: RooAbsArg.h:615
virtual ~RooAbsArg()
Destructor.
Definition: RooAbsArg.cxx:187
virtual Bool_t isDerived() const
Does value or shape of this arg depend on any other arg?
Definition: RooAbsArg.h:90
TIterator * shapeClientIterator() const R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin()
static Bool_t _inhibitDirty
Definition: RooAbsArg.h:602
virtual const char * cacheUniqueSuffix() const
Definition: RooAbsArg.h:502
RefCountListLegacyIterator_t * makeLegacyIterator(const RefCountList_t &list) const
Definition: RooAbsArg.cxx:2454
@ NotAdvised
Definition: RooAbsArg.h:361
const RefCountList_t & servers() const
Definition: RooAbsArg.h:161
static UInt_t fnv1a32(const char *data)
Definition: RooAbsArg.cxx:1945
Bool_t _localNoInhibitDirty
Cached isConstant status.
Definition: RooAbsArg.h:632
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Interface function signaling a request to perform constant term optimization.
Definition: RooAbsArg.cxx:1706
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
Definition: RooAbsArg.cxx:1719
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:1268
OperMode _operMode
Definition: RooAbsArg.h:619
RooLinkedList getCloningAncestors() const
Return ancestors in cloning chain of this RooAbsArg.
Definition: RooAbsArg.cxx:2044
RooAbsArg * findServer(const RooAbsArg &arg) const
Definition: RooAbsArg.h:170
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
Definition: RooAbsArg.cxx:2232
static const UInt_t fnv1a32start
Definition: RooAbsArg.h:450
Bool_t recursiveCheckObservables(const RooArgSet *nset) const
Recursively call checkObservables on all nodes in the expression tree.
Definition: RooAbsArg.cxx:703
const std::map< std::string, std::string > & stringAttributes() const
Definition: RooAbsArg.h:298
RooAbsCache * getCache(Int_t index) const
Return registered cache object by index.
Definition: RooAbsArg.cxx:2025
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:1518
static Bool_t _verboseDirty
Definition: RooAbsArg.h:601
void registerCache(RooAbsCache &cache)
Register RooAbsCache with this object.
Definition: RooAbsArg.cxx:1997
virtual void optimizeCacheMode(const RooArgSet &observables)
Activate cache mode optimization with given definition of observables.
Definition: RooAbsArg.cxx:1550
RefCountList_t _clientListShape
Definition: RooAbsArg.h:522
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:1831
void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Definition: RooAbsArg.cxx:2357
static ULong64_t fnv1a64(const char *data)
Definition: RooAbsArg.cxx:1962
Bool_t recursiveCheckDependents(const RooArgSet *nset) const
Definition: RooAbsArg.h:262
Bool_t _prohibitServerRedirect
Set of owned component.
Definition: RooAbsArg.h:625
RooAbsArg * findServer(Int_t index) const
Definition: RooAbsArg.h:175
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:404
Int_t numProxies() const
Return the number of registered proxies.
Definition: RooAbsArg.cxx:1242
@ DeActivate
Definition: RooAbsArg.h:344
@ ValueChange
Definition: RooAbsArg.h:344
@ ConfigChange
Definition: RooAbsArg.h:344
void setShapeDirty() const
Definition: RooAbsArg.h:487
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
Definition: RooAbsArg.cxx:279
virtual void printName(std::ostream &os) const
Print object name.
Definition: RooAbsArg.cxx:1290
void replaceServer(RooAbsArg &oldServer, RooAbsArg &newServer, Bool_t valueProp, Bool_t shapeProp)
Replace 'oldServer' with 'newServer'.
Definition: RooAbsArg.cxx:429
const std::set< std::string > & transientAttributes() const
Definition: RooAbsArg.h:306
const RefCountList_t & clients() const
List of all clients of this object.
Definition: RooAbsArg.h:148
RooArgSet * getDependents(const RooArgSet *depList) const
Definition: RooAbsArg.h:258
virtual void getParametersHook(const RooArgSet *, RooArgSet *, Bool_t) const
Definition: RooAbsArg.h:481
virtual void printMetaArgs(std::ostream &) const
Definition: RooAbsArg.h:282
Bool_t isShapeServer(const char *name) const
Definition: RooAbsArg.h:191
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:389
Bool_t dependsOnValue(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0) const
Definition: RooAbsArg.h:96
void setProxyNormSet(const RooArgSet *nset)
Forward a change in the cached normalization argset to all the registered proxies.
Definition: RooAbsArg.cxx:1253
RefCountList_t _clientList
Definition: RooAbsArg.h:521
Bool_t dependsOnValue(const RooAbsArg &server, const RooAbsArg *ignoreArg=0) const
Definition: RooAbsArg.h:100
RooAbsProxy * getProxy(Int_t index) const
Return the nth proxy from the proxy list.
Definition: RooAbsArg.cxx:1229
RooAbsArg & operator=(const RooAbsArg &other)
Assign all boolean and string properties of the original object.
Definition: RooAbsArg.cxx:154
Bool_t isValueDirtyAndClear() const
Definition: RooAbsArg.h:396
Bool_t dependentOverlaps(const RooArgSet *depList, const RooAbsArg &testArg) const
Definition: RooAbsArg.h:260
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:520
void clearShapeDirty() const
Definition: RooAbsArg.h:497
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:627
RooArgSet * getComponents() const
Definition: RooAbsArg.cxx:673
std::set< std::string > _boolAttribTransient
Definition: RooAbsArg.h:574
Bool_t _shapeDirty
Definition: RooAbsArg.h:616
void setLocalNoDirtyInhibit(Bool_t flag) const
Definition: RooAbsArg.h:608
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:1028
Bool_t isConstant() const
Definition: RooAbsArg.h:311
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:485
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:2071
virtual void operModeHook()
Definition: RooAbsArg.h:475
RooFIter valueClientMIterator() const R__SUGGEST_ALTERNATIVE("Use valueClients() and begin()
virtual void optimizeDirtyHook(const RooArgSet *)
Definition: RooAbsArg.h:477
Bool_t getTransientAttribute(const Text_t *name) const
Check if a named attribute is set.
Definition: RooAbsArg.cxx:337
std::map< std::string, std::string > _stringAttrib
Definition: RooAbsArg.h:573
virtual Bool_t inRange(const char *) const
Definition: RooAbsArg.h:334
TIterator * serverIterator() const R__SUGGEST_ALTERNATIVE("Use servers() and begin()
Int_t numCaches() const
Return number of registered caches.
Definition: RooAbsArg.cxx:2016
RooFIter shapeClientMIterator() const R__SUGGEST_ALTERNATIVE("Use shapeClients() and begin()
RooAbsArg()
Default constructor.
Definition: RooAbsArg.cxx:93
void setValueDirty() const
Definition: RooAbsArg.h:486
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
Definition: RooAbsArg.cxx:1065
Bool_t isValueServer(const char *name) const
Definition: RooAbsArg.h:183
void attachDataSet(const RooAbsData &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
Definition: RooAbsArg.cxx:1468
virtual Bool_t hasRange(const char *) const
Definition: RooAbsArg.h:338
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:1327
RooAbsArg * findServer(const char *name) const
Definition: RooAbsArg.h:165
void SetName(const char *name)
Set the name of the TNamed.
Definition: RooAbsArg.cxx:2341
void addParameters(RooArgSet &params, const RooArgSet *nset=0, Bool_t stripDisconnected=kTRUE) const
INTERNAL helper function for getParameters()
Definition: RooAbsArg.cxx:552
Bool_t localNoDirtyInhibit() const
Definition: RooAbsArg.h:609
Bool_t _deleteWatch
Definition: RooAbsArg.h:603
OperMode operMode() const
Definition: RooAbsArg.h:444
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:798
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:37
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:53
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.
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
RooRealProxy is the concrete proxy for RooAbsReal objects A RooRealProxy is the general mechanism to ...
Definition: RooRealProxy.h:23
const RooAbsReal & arg() const
Definition: RooRealProxy.h:43
RooRefArray & operator=(const RooRefArray &other)=default
RooRefArray(const RooRefArray &other)
Definition: RooAbsArg.h:59
virtual ~RooRefArray()
Definition: RooAbsArg.h:62
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
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:71
void ws()
Definition: ws.C:66