Warning, file /include/root/RooAbsArg.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_ABS_ARG
0017 #define ROO_ABS_ARG
0018
0019 #include <RooAbsCache.h>
0020 #include <RooFit/Config.h>
0021 #include <RooFit/Detail/NormalizationHelpers.h>
0022 #include <RooLinkedListIter.h>
0023 #include <RooNameReg.h>
0024 #include <RooPrintable.h>
0025 #include <RooSTLRefCountList.h>
0026 #include <RooStringView.h>
0027
0028 #include <TNamed.h>
0029 #include <TObjArray.h>
0030 #include <TRefArray.h>
0031
0032 #include <deque>
0033 #include <iostream>
0034 #include <map>
0035 #include <memory>
0036 #include <set>
0037 #include <stack>
0038 #include <string>
0039 #include <unordered_map>
0040
0041
0042 class TTree ;
0043 class RooArgSet ;
0044 class RooAbsCollection ;
0045 class RooVectorDataStore ;
0046 class RooAbsData ;
0047 class RooAbsDataStore ;
0048 class RooAbsProxy ;
0049 class RooArgProxy ;
0050 template<class RooCollection_t>
0051 class RooCollectionProxy;
0052 using RooSetProxy = RooCollectionProxy<RooArgSet>;
0053 using RooListProxy = RooCollectionProxy<RooArgList>;
0054 class RooExpensiveObjectCache ;
0055 class RooWorkspace ;
0056 namespace RooFit {
0057 namespace Detail {
0058 class CodeSquashContext;
0059 }
0060 }
0061
0062 class RooRefArray : public TObjArray {
0063 public:
0064 RooRefArray() = default;
0065 RooRefArray(const RooRefArray &other) : TObjArray(other) {}
0066 RooRefArray &operator=(const RooRefArray &other) = default;
0067 protected:
0068 ClassDefOverride(RooRefArray,1)
0069 } ;
0070
0071 class RooAbsArg;
0072
0073 namespace cling {
0074 std::string printValue(RooAbsArg*);
0075 }
0076
0077 class RooAbsArg : public TNamed, public RooPrintable {
0078 public:
0079 using RefCountList_t = RooSTLRefCountList<RooAbsArg>;
0080 using RefCountListLegacyIterator_t = TIteratorToSTLInterface<RefCountList_t::Container_t>;
0081
0082
0083 RooAbsArg() ;
0084 ~RooAbsArg() override;
0085 RooAbsArg(const char *name, const char *title);
0086 RooAbsArg(const RooAbsArg& other, const char* name=nullptr) ;
0087 RooAbsArg& operator=(const RooAbsArg& other) = delete;
0088 virtual TObject* clone(const char* newname=nullptr) const = 0 ;
0089 TObject* Clone(const char* newname = nullptr) const override {
0090 return clone(newname && newname[0] != '\0' ? newname : nullptr);
0091 }
0092 virtual RooAbsArg* cloneTree(const char* newname=nullptr) const ;
0093
0094
0095
0096
0097 virtual bool isDerived() const {
0098 return true ;
0099 }
0100
0101
0102
0103
0104
0105
0106 bool dependsOnValue(const RooAbsCollection& serverList, const RooAbsArg* ignoreArg=nullptr) const {
0107 return dependsOn(serverList,ignoreArg,true) ;
0108 }
0109
0110
0111
0112
0113
0114 bool dependsOnValue(const RooAbsArg& server, const RooAbsArg* ignoreArg=nullptr) const {
0115 return dependsOn(server,ignoreArg,true) ;
0116 }
0117 bool dependsOn(const RooAbsCollection& serverList, const RooAbsArg* ignoreArg=nullptr, bool valueOnly=false) const ;
0118
0119
0120
0121 inline bool dependsOn(const RooAbsArg& server, const RooAbsArg* ignoreArg=nullptr, bool valueOnly=false) const {
0122 return dependsOn(server.namePtr(), ignoreArg, valueOnly);
0123 }
0124 bool dependsOn(TNamed const* namePtr, const RooAbsArg* ignoreArg=nullptr, bool valueOnly=false) const ;
0125 bool overlaps(const RooAbsArg& testArg, bool valueOnly=false) const ;
0126 bool hasClients() const { return !_clientList.empty(); }
0127
0128
0129
0130
0131
0132
0133
0134
0135 inline TIterator* clientIterator() const
0136 R__DEPRECATED(6,34, "Use clients() and begin(), end() or range-based loops.") {
0137
0138 return makeLegacyIterator(_clientList);
0139 }
0140 inline TIterator* valueClientIterator() const
0141 R__DEPRECATED(6,34, "Use valueClients() and begin(), end() or range-based loops.") {
0142
0143 return makeLegacyIterator(_clientListValue);
0144 }
0145 inline TIterator* shapeClientIterator() const
0146 R__DEPRECATED(6,34, "Use shapeClients() and begin(), end() or range-based loops.") {
0147
0148 return makeLegacyIterator(_clientListShape);
0149 }
0150 inline TIterator* serverIterator() const
0151 R__DEPRECATED(6,34, "Use servers() and begin(), end() or range-based loops.") {
0152
0153 return makeLegacyIterator(_serverList);
0154 }
0155
0156 inline RooFIter valueClientMIterator() const
0157 R__DEPRECATED(6,34, "Use valueClients() and begin(), end() or range-based loops.") {
0158 return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_clientListValue)));
0159 }
0160 inline RooFIter shapeClientMIterator() const
0161 R__DEPRECATED(6,34, "Use shapeClients() and begin(), end() or range-based loops.") {
0162 return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_clientListShape)));
0163 }
0164 inline RooFIter serverMIterator() const
0165 R__DEPRECATED(6,34, "Use servers() and begin(), end() or range-based loops.") {
0166 return RooFIter(std::unique_ptr<RefCountListLegacyIterator_t>(makeLegacyIterator(_serverList)));
0167 }
0168
0169
0170 RooFit::OwningPtr<RooArgSet> getDependents(const RooArgSet& set) const;
0171 RooFit::OwningPtr<RooArgSet> getDependents(const RooAbsData* set) const;
0172 RooFit::OwningPtr<RooArgSet> getDependents(const RooArgSet* depList) const;
0173
0174 inline bool dependentOverlaps(const RooAbsData* dset, const RooAbsArg& testArg) const { return observableOverlaps(dset,testArg) ; }
0175
0176 inline bool dependentOverlaps(const RooArgSet* depList, const RooAbsArg& testArg) const { return observableOverlaps(depList, testArg) ; }
0177
0178 inline bool checkDependents(const RooArgSet* nset) const { return checkObservables(nset) ; }
0179
0180 inline bool recursiveCheckDependents(const RooArgSet* nset) const { return recursiveCheckObservables(nset) ; }
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192 const RefCountList_t& clients() const {
0193 return _clientList;
0194 }
0195
0196 const RefCountList_t& valueClients() const {
0197 return _clientListValue;
0198 }
0199
0200
0201 const RefCountList_t& shapeClients() const {
0202 return _clientListShape;
0203 }
0204
0205
0206 const RefCountList_t& servers() const {
0207 return _serverList;
0208 }
0209
0210 inline RooAbsArg* findServer(const char *name) const {
0211 const auto serverIt = _serverList.findByName(name);
0212 return serverIt != _serverList.end() ? *serverIt : nullptr;
0213 }
0214
0215 inline RooAbsArg* findServer(const RooAbsArg& arg) const {
0216 return _serverList.findByNamePointer(&arg);
0217 }
0218
0219 inline RooAbsArg* findServer(Int_t index) const {
0220 return _serverList.containedObjects()[index];
0221 }
0222
0223 inline bool isValueServer(const RooAbsArg& arg) const {
0224 return _clientListValue.containsByNamePtr(&arg);
0225 }
0226
0227 inline bool isValueServer(const char* name) const {
0228 return _clientListValue.containsSameName(name);
0229 }
0230
0231 inline bool isShapeServer(const RooAbsArg& arg) const {
0232 return _clientListShape.containsByNamePtr(&arg);
0233 }
0234
0235 inline bool isShapeServer(const char* name) const {
0236 return _clientListShape.containsSameName(name);
0237 }
0238 void leafNodeServerList(RooAbsCollection* list, const RooAbsArg* arg=nullptr, bool recurseNonDerived=false) const ;
0239 void branchNodeServerList(RooAbsCollection* list, const RooAbsArg* arg=nullptr, bool recurseNonDerived=false) const ;
0240 void treeNodeServerList(RooAbsCollection* list, const RooAbsArg* arg=nullptr,
0241 bool doBranch=true, bool doLeaf=true,
0242 bool valueOnly=false, bool recurseNonDerived=false) const ;
0243
0244
0245
0246
0247
0248
0249 inline virtual bool isFundamental() const {
0250 return false;
0251 }
0252
0253
0254
0255
0256 virtual RooFit::OwningPtr<RooAbsArg> createFundamental(const char* newname=nullptr) const = 0;
0257
0258
0259
0260
0261 inline virtual bool isLValue() const {
0262 return false;
0263 }
0264
0265
0266
0267 bool redirectServers(const RooAbsCollection& newServerList, bool mustReplaceAll=false, bool nameChange=false, bool isRecursionStep=false) ;
0268 bool redirectServers(std::unordered_map<RooAbsArg*, RooAbsArg*> const& replacements);
0269 bool recursiveRedirectServers(const RooAbsCollection& newServerList, bool mustReplaceAll=false, bool nameChange=false, bool recurseInNewSet=true) ;
0270
0271 virtual bool redirectServersHook(const RooAbsCollection & newServerList, bool mustReplaceAll,
0272 bool nameChange, bool isRecursiveStep);
0273
0274 virtual void serverNameChangeHook(const RooAbsArg* , const RooAbsArg* ) { } ;
0275
0276 void addServer(RooAbsArg& server, bool valueProp=true, bool shapeProp=false, std::size_t refCount = 1);
0277 void addServerList(RooAbsCollection& serverList, bool valueProp=true, bool shapeProp=false) ;
0278 void
0279 R__SUGGEST_ALTERNATIVE("This interface is unsafe! Use RooAbsArg::redirectServers()")
0280 replaceServer(RooAbsArg& oldServer, RooAbsArg& newServer, bool valueProp, bool shapeProp) ;
0281 void changeServer(RooAbsArg& server, bool valueProp, bool shapeProp) ;
0282 void removeServer(RooAbsArg& server, bool force=false) ;
0283 RooAbsArg *findNewServer(const RooAbsCollection &newSet, bool nameChange) const;
0284
0285
0286
0287
0288
0289
0290
0291 RooFit::OwningPtr<RooArgSet> getVariables(bool stripDisconnected=true) const ;
0292 RooFit::OwningPtr<RooArgSet> getParameters(const RooAbsData* data, bool stripDisconnected=true) const;
0293 RooFit::OwningPtr<RooArgSet> getParameters(const RooAbsData& data, bool stripDisconnected=true) const;
0294 RooFit::OwningPtr<RooArgSet> getParameters(const RooArgSet& observables, bool stripDisconnected=true) const;
0295 RooFit::OwningPtr<RooArgSet> getParameters(const RooArgSet* observables, bool stripDisconnected=true) const;
0296 virtual bool getParameters(const RooArgSet* observables, RooArgSet& outputSet, bool stripDisconnected=true) const;
0297 RooFit::OwningPtr<RooArgSet> getObservables(const RooArgSet& set, bool valueOnly=true) const;
0298 RooFit::OwningPtr<RooArgSet> getObservables(const RooAbsData* data) const;
0299 RooFit::OwningPtr<RooArgSet> getObservables(const RooAbsData& data) const;
0300 RooFit::OwningPtr<RooArgSet> getObservables(const RooArgSet* depList, bool valueOnly=true) const;
0301 bool getObservables(const RooAbsCollection* depList, RooArgSet& outputSet, bool valueOnly=true) const;
0302 bool observableOverlaps(const RooAbsData* dset, const RooAbsArg& testArg) const ;
0303 bool observableOverlaps(const RooArgSet* depList, const RooAbsArg& testArg) const ;
0304 virtual bool checkObservables(const RooArgSet* nset) const ;
0305 bool recursiveCheckObservables(const RooArgSet* nset) const ;
0306 RooFit::OwningPtr<RooArgSet> getComponents() const ;
0307
0308
0309
0310 void attachArgs(const RooAbsCollection &set);
0311 void attachDataSet(const RooAbsData &set);
0312 void attachDataStore(const RooAbsDataStore &set);
0313
0314
0315 virtual bool readFromStream(std::istream& is, bool compact, bool verbose=false) = 0 ;
0316 virtual void writeToStream(std::ostream& os, bool compact) const = 0 ;
0317
0318
0319
0320 void Print(Option_t *options= nullptr) const override {
0321
0322 printStream(defaultPrintStream(),defaultPrintContents(options),defaultPrintStyle(options));
0323 }
0324
0325 void printName(std::ostream& os) const override ;
0326 void printTitle(std::ostream& os) const override ;
0327 void printClassName(std::ostream& os) const override ;
0328 void printAddress(std::ostream& os) const override ;
0329 void printArgs(std::ostream& os) const override ;
0330 virtual void printMetaArgs(std::ostream& ) const {} ;
0331 void printMultiline(std::ostream& os, Int_t contents, bool verbose=false, TString indent="") const override;
0332 void printTree(std::ostream& os, TString indent="") const override ;
0333
0334 Int_t defaultPrintContents(Option_t* opt) const override ;
0335
0336
0337 void setAttribute(const Text_t* name, bool value=true) ;
0338 bool getAttribute(const Text_t* name) const ;
0339 inline const std::set<std::string>& attributes() const {
0340
0341 return _boolAttrib ;
0342 }
0343
0344 void setStringAttribute(const Text_t* key, const Text_t* value) ;
0345 void removeStringAttribute(const Text_t* key) ;
0346 const Text_t* getStringAttribute(const Text_t* key) const ;
0347 inline const std::map<std::string,std::string>& stringAttributes() const {
0348
0349 return _stringAttrib ;
0350 }
0351
0352
0353 void setTransientAttribute(const Text_t* name, bool value=true) ;
0354 bool getTransientAttribute(const Text_t* name) const ;
0355 inline const std::set<std::string>& transientAttributes() const {
0356
0357 return _boolAttribTransient ;
0358 }
0359
0360
0361 inline bool isConstant() const {
0362 return _isConstant ;
0363 }
0364
0365
0366 Int_t Compare(const TObject* other) const override ;
0367 bool IsSortable() const override {
0368
0369 return true ;
0370 }
0371
0372 virtual bool operator==(const RooAbsArg& other) const = 0 ;
0373 virtual bool isIdentical(const RooAbsArg& other, bool assumeSameType=false) const = 0 ;
0374
0375
0376 virtual bool inRange(const char*) const {
0377
0378 return true ;
0379 }
0380 virtual bool hasRange(const char*) const {
0381
0382 return false ;
0383 }
0384
0385
0386 enum ConstOpCode { Activate=0, DeActivate=1, ConfigChange=2, ValueChange=3 } ;
0387 enum CacheMode { Always=0, NotAdvised=1, Never=2 } ;
0388 enum OperMode { Auto=0, AClean=1, ADirty=2 } ;
0389
0390
0391
0392
0393
0394
0395
0396
0397
0398 virtual void optimizeCacheMode(const RooArgSet& observables) ;
0399 virtual void optimizeCacheMode(const RooArgSet& observables, RooArgSet& optNodes, RooLinkedList& processedNodes) ;
0400
0401
0402
0403 bool findConstantNodes(const RooArgSet& observables, RooArgSet& cacheList) ;
0404 bool findConstantNodes(const RooArgSet& observables, RooArgSet& cacheList, RooLinkedList& processedNodes) ;
0405
0406
0407
0408 virtual void constOptimizeTestStatistic(ConstOpCode opcode, bool doAlsoTrackingOpt=true) ;
0409
0410 virtual CacheMode canNodeBeCached() const { return Always ; }
0411 virtual void setCacheAndTrackHints(RooArgSet& ) {} ;
0412
0413
0414 inline bool isShapeDirty() const {
0415
0416 return isDerived()?_shapeDirty:false ;
0417 }
0418
0419 inline bool isValueDirty() const {
0420
0421 if (inhibitDirty()) return true ;
0422 switch(_operMode) {
0423 case AClean:
0424 return false ;
0425 case ADirty:
0426 return true ;
0427 case Auto:
0428 if (_valueDirty) return isDerived() ;
0429 return false ;
0430 }
0431 return true ;
0432 }
0433
0434 inline bool isValueDirtyAndClear() const {
0435
0436 if (inhibitDirty()) return true ;
0437 switch(_operMode) {
0438 case AClean:
0439 return false ;
0440 case ADirty:
0441 return true ;
0442 case Auto:
0443 if (_valueDirty) {
0444 _valueDirty = false ;
0445 return isDerived();
0446 }
0447 return false ;
0448 }
0449 return true ;
0450 }
0451
0452
0453 inline bool isValueOrShapeDirtyAndClear() const {
0454
0455
0456 if (inhibitDirty()) return true ;
0457 switch(_operMode) {
0458 case AClean:
0459 return false ;
0460 case ADirty:
0461 return true ;
0462 case Auto:
0463 if (_valueDirty || _shapeDirty) {
0464 _shapeDirty = false ;
0465 _valueDirty = false ;
0466 return isDerived();
0467 }
0468 _shapeDirty = false ;
0469 _valueDirty = false ;
0470 return false ;
0471 }
0472 return true ;
0473 }
0474
0475
0476 void registerCache(RooAbsCache& cache) ;
0477 void unRegisterCache(RooAbsCache& cache) ;
0478 Int_t numCaches() const ;
0479 RooAbsCache* getCache(Int_t index) const ;
0480
0481
0482 inline OperMode operMode() const { return _operMode ; }
0483
0484 void setOperMode(OperMode mode, bool recurseADirty=true) ;
0485
0486
0487
0488 void setValueDirty() {
0489 if (_operMode == Auto && !inhibitDirty())
0490 setValueDirty(nullptr);
0491 }
0492
0493 void setShapeDirty() { setShapeDirty(nullptr); }
0494
0495 const char* aggregateCacheUniqueSuffix() const ;
0496 virtual const char* cacheUniqueSuffix() const { return nullptr ; }
0497
0498 void wireAllCaches() ;
0499
0500 RooExpensiveObjectCache& expensiveObjectCache() const ;
0501 virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache) { _eocache = &cache; }
0502
0503
0504
0505
0506
0507 virtual void setCachedValue(double , bool = true) {};
0508
0509
0510
0511
0512
0513 static void verboseDirty(bool flag) ;
0514 void printDirty(bool depth=true) const ;
0515 static void setDirtyInhibit(bool flag) ;
0516
0517 void graphVizTree(const char* fileName, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ;
0518 void graphVizTree(std::ostream& os, const char* delimiter="\n", bool useTitle=false, bool useLatex=false) ;
0519
0520 void printComponentTree(const char* indent="",const char* namePat=nullptr, Int_t nLevel=999) ;
0521 void printCompactTree(const char* indent="",const char* fileName=nullptr, const char* namePat=nullptr, RooAbsArg* client=nullptr) ;
0522 void printCompactTree(std::ostream& os, const char* indent="", const char* namePat=nullptr, RooAbsArg* client=nullptr) ;
0523 virtual void printCompactTreeHook(std::ostream& os, const char *ind="") ;
0524
0525
0526
0527
0528
0529
0530
0531
0532
0533
0534
0535 bool addOwnedComponents(const RooAbsCollection& comps) ;
0536 bool addOwnedComponents(RooAbsCollection&& comps) ;
0537 bool addOwnedComponents(RooArgList&& comps) ;
0538
0539
0540
0541 template<typename... Args_t>
0542 bool addOwnedComponents(std::unique_ptr<Args_t>... comps) {
0543 return addOwnedComponents({*comps.release() ...});
0544 }
0545 const RooArgSet* ownedComponents() const { return _ownedComponents ; }
0546
0547 void setProhibitServerRedirect(bool flag) { _prohibitServerRedirect = flag ; }
0548
0549 void setWorkspace(RooWorkspace &ws) { _myws = &ws; }
0550 inline RooWorkspace* workspace() const { return _myws; }
0551
0552 RooAbsProxy* getProxy(Int_t index) const ;
0553 Int_t numProxies() const ;
0554
0555
0556
0557
0558
0559
0560
0561 inline const TNamed* namePtr() const {
0562 return _namePtr ;
0563 }
0564
0565 void SetName(const char* name) override ;
0566 void SetNameTitle(const char *name, const char *title) override ;
0567
0568 virtual bool importWorkspaceHook(RooWorkspace &ws)
0569 {
0570 _myws = &ws;
0571 return false;
0572 };
0573
0574 virtual bool canComputeBatchWithCuda() const { return false; }
0575 virtual bool isReducerNode() const { return false; }
0576
0577 virtual void applyWeightSquared(bool flag);
0578
0579 virtual std::unique_ptr<RooAbsArg> compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext & ctx) const;
0580
0581 virtual bool isCategory() const { return false; }
0582
0583 virtual void translate(RooFit::Detail::CodeSquashContext &ctx) const;
0584
0585 protected:
0586 void graphVizAddConnections(std::set<std::pair<RooAbsArg*,RooAbsArg*> >&) ;
0587
0588 virtual void operModeHook() {} ;
0589
0590 virtual void optimizeDirtyHook(const RooArgSet* ) {} ;
0591
0592 virtual bool isValid() const ;
0593
0594 virtual void getParametersHook(const RooArgSet* , RooArgSet* , bool ) const {} ;
0595 virtual void getObservablesHook(const RooArgSet* , RooArgSet* ) const {} ;
0596
0597 void clearValueAndShapeDirty() const {
0598 _valueDirty=false ;
0599 _shapeDirty=false ;
0600 }
0601
0602 void clearValueDirty() const {
0603 _valueDirty=false ;
0604 }
0605 void clearShapeDirty() const {
0606 _shapeDirty=false ;
0607 }
0608
0609
0610 void setValueDirty(const RooAbsArg* source);
0611
0612 void setShapeDirty(const RooAbsArg* source);
0613
0614 virtual void ioStreamerPass2() ;
0615 static void ioStreamerPass2Finalize() ;
0616
0617
0618 private:
0619 void addParameters(RooAbsCollection& params, const RooArgSet* nset = nullptr, bool stripDisconnected = true) const;
0620 std::size_t getParametersSizeEstimate(const RooArgSet* nset = nullptr) const;
0621
0622 RefCountListLegacyIterator_t * makeLegacyIterator(const RefCountList_t& list) const;
0623
0624
0625 protected:
0626 friend class RooAbsReal;
0627
0628
0629 friend class RooAbsCollection ;
0630 friend class RooWorkspace ;
0631 friend class RooRealIntegral ;
0632 RefCountList_t _serverList ;
0633 RefCountList_t _clientList;
0634 RefCountList_t _clientListShape;
0635 RefCountList_t _clientListValue;
0636
0637 RooRefArray _proxyList ;
0638
0639 std::vector<RooAbsCache*> _cacheList ;
0640
0641
0642
0643 friend class RooArgProxy ;
0644 template<class RooCollection_t>
0645 friend class RooCollectionProxy;
0646 friend class RooHistPdf ;
0647 friend class RooHistFunc ;
0648 void registerProxy(RooArgProxy& proxy) ;
0649 void registerProxy(RooSetProxy& proxy) ;
0650 void registerProxy(RooListProxy& proxy) ;
0651 void unRegisterProxy(RooArgProxy& proxy) ;
0652 void unRegisterProxy(RooSetProxy& proxy) ;
0653 void unRegisterProxy(RooListProxy& proxy) ;
0654 void setProxyNormSet(const RooArgSet* nset) ;
0655
0656
0657 std::set<std::string> _boolAttrib ;
0658 std::map<std::string,std::string> _stringAttrib ;
0659 std::set<std::string> _boolAttribTransient ;
0660
0661 void printAttribList(std::ostream& os) const;
0662
0663
0664 friend class RooCompositeDataStore ;
0665 friend class RooTreeDataStore ;
0666 friend class RooVectorDataStore ;
0667 friend class RooDataSet ;
0668 friend class RooRealMPFE ;
0669 virtual void syncCache(const RooArgSet* nset=nullptr) = 0 ;
0670 virtual void copyCache(const RooAbsArg* source, bool valueOnly=false, bool setValDirty=true) = 0 ;
0671
0672 virtual void attachToTree(TTree& t, Int_t bufSize=32000) = 0 ;
0673 virtual void attachToVStore(RooVectorDataStore& vstore) = 0 ;
0674
0675 void attachToStore(RooAbsDataStore& store) ;
0676
0677 virtual void setTreeBranchStatus(TTree& t, bool active) = 0 ;
0678 virtual void fillTreeBranch(TTree& t) = 0 ;
0679 TString cleanBranchName() const ;
0680
0681
0682 friend std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg);
0683 friend std::istream& operator>>(std::istream& is, RooAbsArg &arg) ;
0684 friend void RooRefArray::Streamer(TBuffer&);
0685
0686 struct ProxyListCache {
0687 std::vector<RooAbsProxy*> cache;
0688 bool isDirty = true;
0689 };
0690 ProxyListCache _proxyListCache;
0691
0692
0693 static bool _verboseDirty ;
0694 static bool _inhibitDirty ;
0695 bool _deleteWatch = false;
0696
0697 bool inhibitDirty() const ;
0698
0699 public:
0700 void setLocalNoDirtyInhibit(bool flag) const { _localNoInhibitDirty = flag ; }
0701 bool localNoDirtyInhibit() const { return _localNoInhibitDirty ; }
0702
0703
0704 std::size_t dataToken() const { return _dataToken; }
0705 bool hasDataToken() const { return _dataToken != std::numeric_limits<std::size_t>::max(); }
0706 void setDataToken(std::size_t index);
0707 void resetDataToken() { _dataToken = std::numeric_limits<std::size_t>::max(); }
0708 protected:
0709
0710
0711 mutable bool _valueDirty = true;
0712 mutable bool _shapeDirty = true;
0713
0714 mutable OperMode _operMode = Auto;
0715 mutable bool _fast = false;
0716
0717
0718 RooArgSet* _ownedComponents = nullptr;
0719
0720 mutable bool _prohibitServerRedirect = false;
0721
0722 mutable RooExpensiveObjectCache* _eocache{nullptr};
0723
0724 mutable const TNamed * _namePtr = nullptr;
0725 bool _isConstant = false;
0726
0727 mutable bool _localNoInhibitDirty = false;
0728
0729
0730
0731
0732 mutable RooWorkspace *_myws = nullptr;
0733
0734 std::size_t _dataToken = std::numeric_limits<std::size_t>::max();
0735
0736
0737
0738 friend class RooFitResult;
0739
0740 public:
0741 static std::map<RooAbsArg*,std::unique_ptr<TRefArray>> _ioEvoList;
0742 protected:
0743 static std::stack<RooAbsArg*> _ioReadStack ;
0744
0745
0746 private:
0747 void substituteServer(RooAbsArg *oldServer, RooAbsArg *newServer);
0748 bool callRedirectServersHook(RooAbsCollection const& newSet, bool mustReplaceAll, bool nameChange, bool isRecursionStep);
0749
0750 ClassDefOverride(RooAbsArg,9)
0751 };
0752
0753 std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg);
0754 std::istream& operator>>(std::istream& is, RooAbsArg &arg);
0755
0756
0757 #endif