112std::map<RooAbsArg*,std::unique_ptr<TRefArray>> RooAbsArg::_ioEvoList;
113std::stack<RooAbsArg*> RooAbsArg::_ioReadStack ;
120 :
TNamed(), _deleteWatch(false), _valueDirty(true), _shapeDirty(true), _operMode(Auto), _fast(false), _ownedComponents(nullptr),
121 _prohibitServerRedirect(false), _namePtr(0), _isConstant(false), _localNoInhibitDirty(false),
134 :
TNamed(
name, title), _deleteWatch(false), _valueDirty(true), _shapeDirty(true), _operMode(Auto), _fast(false),
135 _ownedComponents(0), _prohibitServerRedirect(false), _namePtr(0), _isConstant(false),
136 _localNoInhibitDirty(false), _myws(0)
138 if (
name ==
nullptr || strlen(
name) == 0) {
139 throw std::logic_error(
"Each RooFit object needs a name. "
140 "Objects representing the same entity (e.g. an observable 'x') are identified using their name.");
151 _boolAttrib(other._boolAttrib),
152 _stringAttrib(other._stringAttrib), _deleteWatch(other._deleteWatch), _operMode(Auto), _fast(false),
153 _ownedComponents(0), _prohibitServerRedirect(false),
155 _isConstant(other._isConstant), _localNoInhibitDirty(other._localNoInhibitDirty), _myws(0)
159 bool valueProp, shapeProp ;
161 valueProp = server->_clientListValue.containsByNamePtr(&other);
162 shapeProp = server->_clientListShape.containsByNamePtr(&other);
192 bool valueProp, shapeProp;
194 valueProp = server->_clientListValue.containsByNamePtr(&other);
195 shapeProp = server->_clientListShape.containsByNamePtr(&other);
219 for (
auto client : clientListTmp) {
220 client->setAttribute(
"ServerDied") ;
223 attr.Append(
Form(
"(%zx)",(
size_t)
this)) ;
224 client->setAttribute(
attr.Data());
225 client->removeServer(*
this,
true);
230 cxcoutD(
Tracing) <<
"RooAbsArg::dtor(" <<
GetName() <<
"," <<
this <<
") DeleteWatch: object is being destroyed" << endl ;
235 << client->GetName() <<
"\" should have been deleted first" << endl ;
281 if(
string(
"Constant")==
name) {
325 map<string,string>::const_iterator iter =
_stringAttrib.find(key) ;
327 return iter->second.c_str() ;
379 <<
"): PROHIBITED SERVER ADDITION REQUESTED: adding server " << server.
GetName()
380 <<
"(" << &server <<
") for " << (valueProp?
"value ":
"") << (shapeProp?
"shape":
"") << endl ;
381 throw std::logic_error(
"PROHIBITED SERVER ADDITION REQUESTED in RooAbsArg::addServer");
385 <<
"(" << &server <<
") for " << (valueProp?
"value ":
"") << (shapeProp?
"shape":
"") << endl ;
415 for (
const auto arg : serverList) {
429 cxcoutF(
LinkStateMgmt) <<
"RooAbsArg::addServer(" <<
this <<
"," <<
GetName() <<
"): PROHIBITED SERVER REMOVAL REQUESTED: removing server "
430 << server.
GetName() <<
"(" << &server <<
")" << endl ;
436 << server.
GetName() <<
"(" << &server <<
")" << endl ;
455 addServer(newServer, propValue, propShape, count);
466 << server.
GetName() <<
" not registered" << endl ;
473 << server.
GetName() <<
" doesn't have us registered as client" << endl ;
535 if ((doBranch&&doLeaf) ||
540 list->
add(*arg,
true) ;
548 bool isValueSrv = server->_clientListValue.containsByNamePtr(arg);
549 if (valueOnly && !isValueSrv) {
581 std::vector<RooAbsArg*> branchList;
583 if (server->isValueServer(*
this)) {
584 if (server->isFundamental()) {
585 if (!nset || !server->dependsOn(*nset)) {
586 nodeParamServers.
add(*server);
589 branchList.push_back(server);
598 params.
add(nodeParamServers,
true) ;
601 std::sort(branchList.begin(), branchList.end());
602 const auto last = std::unique(branchList.begin(), branchList.end());
603 for (
auto serverIt = branchList.begin(); serverIt < last; ++serverIt) {
604 (*serverIt)->addParameters(params, nset);
620 std::vector<RooAbsArg*> branchList;
622 if (server->isValueServer(*
this)) {
623 if (server->isFundamental()) {
624 if (!nset || !server->dependsOn(*nset)) {
628 branchList.push_back(server);
634 std::sort(branchList.begin(), branchList.end());
635 const auto last = std::unique(branchList.begin(), branchList.end());
636 for (
auto serverIt = branchList.begin(); serverIt < last; ++serverIt) {
637 res += (*serverIt)->getParametersSizeEstimate(nset);
675 outputSet.
add(*paramSet);
681 outputSet.
setName(
"parameters");
692 outputSet.
add(tempList,
true);
749 outputSet.
setName(
"dependents");
751 if (!dataList)
return false;
754 RooArgSet leafList(
"leafNodeServerList") ;
758 for (
const auto arg : leafList) {
759 if (arg->dependsOnValue(*dataList) && arg->isLValue()) {
760 outputSet.
add(*arg) ;
764 for (
const auto arg : leafList) {
765 if (arg->dependsOn(*dataList) && arg->isLValue()) {
766 outputSet.
add(*arg) ;
781 name.Append(
"_components") ;
812 if (arg->getAttribute(
"ServerDied")) {
814 << arg->GetName() <<
" no longer exists!" << endl ;
818 ret |= arg->checkObservables(nset) ;
834 for (
auto server : serverList) {
835 if (
dependsOn(*server,ignoreArg,valueOnly)) {
850 if (
this==ignoreArg)
return false ;
869 if ( !valueOnly || server->isValueServer(*
this)) {
870 if (server->dependsOn(testArg,ignoreArg,valueOnly)) {
938 }
else if (source==
this) {
941 <<
"): cyclical dependency detected, source = " << source->
GetName() << endl ;
949 <<
"): dirty flag " << (
_valueDirty?
"already ":
"") <<
"raised" << endl ;
956 client->setValueDirty(source) ;
971 <<
"): dirty flag " << (
_shapeDirty?
"already ":
"") <<
"raised" << endl ;
982 }
else if (source==
this) {
985 <<
"): cyclical dependency detected" << endl ;
993 client->setShapeDirty(source) ;
994 client->setValueDirty(source) ;
1029 if (newSetOrig.
empty())
return false ;
1036 for (
auto arg : newSetOrig) {
1038 if (
string(
"REMOVAL_DUMMY")==arg->GetName()) {
1040 if (arg->getAttribute(
"REMOVE_ALL")) {
1057 std::vector<RooAbsArg*> origServerList, origServerValue, origServerShape;
1059 origServerList.reserve(origSize);
1060 origServerValue.reserve(origSize);
1063 origServerList.push_back(oldServer) ;
1066 if (oldServer->_clientListValue.containsByNamePtr(
this)) {
1067 origServerValue.push_back(oldServer) ;
1069 if (oldServer->_clientListShape.containsByNamePtr(
this)) {
1070 origServerShape.push_back(oldServer) ;
1075 for (
auto oldServer : origServerList) {
1080 cxcoutD(
LinkStateMgmt) <<
"RooAbsArg::redirectServers(" << (
void*)
this <<
"," <<
GetName() <<
"): server " << oldServer->GetName()
1081 <<
" redirected from " << oldServer <<
" to " << newServer << endl ;
1085 if (mustReplaceAll) {
1086 coutE(
LinkStateMgmt) <<
"RooAbsArg::redirectServers(" << (
void*)
this <<
"," <<
GetName() <<
"): server " << oldServer->GetName()
1087 <<
" (" << (
void*)oldServer <<
") not redirected" << (nameChange?
"[nameChange]":
"") << endl ;
1093 auto findByNamePtr = [&oldServer](
const RooAbsArg * item) {
1094 return oldServer->namePtr() == item->namePtr();
1096 bool propValue = std::any_of(origServerValue.begin(), origServerValue.end(), findByNamePtr);
1097 bool propShape = std::any_of(origServerShape.begin(), origServerShape.end(), findByNamePtr);
1099 if (newServer !=
this) {
1112 bool ret2 =
p->changePointer(*newSet,nameChange,
false) ;
1114 if (mustReplaceAll && !ret2) {
1117 <<
"): ERROR, proxy '" <<
p->name()
1118 <<
"' with arg '" << (ap ? ap->absArg()->GetName() :
"<could not cast>") <<
"' could not be adjusted" << endl;
1148 newServer = newSet.
find(*
this) ;
1153 TString nameAttrib(
"ORIGNAME:") ;
1168 << nameAttrib <<
" attribute" << endl ;
1174 newServer= tmp->
first();
1194 static std::set<const RooAbsArg*> callStack;
1196 std::set<const RooAbsArg*>::iterator it = callStack.lower_bound(
this);
1197 if (it != callStack.end() &&
this == *it) {
1200 callStack.insert(it,
this);
1213 cxcoutD(
LinkStateMgmt) <<
"RooAbsArg::recursiveRedirectServers(" <<
this <<
"," <<
GetName() <<
") newSet = " << newSet <<
" mustReplaceAll = "
1214 << (mustReplaceAll?
"T":
"F") <<
" nameChange = " << (nameChange?
"T":
"F") <<
" recurseInNewSet = " << (recurseInNewSet?
"T":
"F") << endl ;
1221 ret |= server->recursiveRedirectServers(newSet,mustReplaceAll,nameChange,recurseInNewSet) ;
1224 callStack.erase(
this);
1243 <<
" already registered" << endl ;
1286 << proxy.
GetName() <<
" already registered" << endl ;
1321 << proxy.
GetName() <<
" already registered" << endl ;
1330 cout <<
"RooAbsArg::registerProxy(" <<
GetName() <<
") proxy registration failure! nold=" << nProxyOld <<
" nnew=" <<
_proxyList.
GetEntries() << endl ;
1391 p->changeNormSet(nset);
1408 <<
"): Cannot be attached to a TTree" << endl ;
1472 if (
p==0) continue ;
1499 os <<
indent <<
"--- RooAbsArg ---" << endl;
1501 os <<
indent <<
" Value State: " ;
1503 case ADirty: os <<
"FORCED DIRTY" ; break ;
1504 case AClean: os <<
"FORCED clean" ; break ;
1510 os <<
indent <<
" Attributes: " ;
1514 os <<
indent <<
" Address: " << (
void*)
this << endl;
1516 os <<
indent <<
" Clients: " << endl;
1518 os <<
indent <<
" (" << (
void*)client <<
","
1526 os <<
indent <<
" Servers: " << endl;
1528 os <<
indent <<
" (" << (
void*)server <<
","
1529 << (server->_clientListValue.containsByNamePtr(
this)?
"V":
"-")
1530 << (server->_clientListShape.containsByNamePtr(
this)?
"S":
"-")
1536 os <<
indent <<
" Proxies: " << std::endl;
1539 if (!proxy) continue ;
1540 os <<
indent <<
" " << proxy->
name() <<
" -> " ;
1541 if(
auto * argProxy =
dynamic_cast<RooArgProxy*
>(proxy)) {
1542 if (
RooAbsArg* parg = argProxy->absArg()) {
1545 os <<
" (empty)" << std::endl;
1556 throw std::runtime_error(
"Unsupported proxy type.");
1594 set<string>::const_iterator iter =
_boolAttrib.begin() ;
1597 os << (
first?
" [":
",") << *iter ;
1601 if (!
first) os <<
"] " ;
1618 for(
auto const& branch : branches) {
1619 branch->redirectServers(set,
false,
false);
1667 branch->printDirty(
false) ;
1673 case AClean: cout <<
"FORCED clean" ; break ;
1674 case ADirty: cout <<
"FORCED DIRTY" ; break ;
1696 coutI(
Optimization) <<
"RooAbsArg::optimizeCacheMode(" <<
GetName() <<
") nodes " << opt <<
" depend on observables, "
1697 <<
"changing cache operation mode from change tracking to unconditional evaluation" << endl ;
1728 auto obj = processedNodes.
findArg(
this);
1729 assert(obj !=
this);
1733 <<
" node " <<
this <<
" exists already as " << obj <<
" but with the SAME name !" << endl;
1735 processedNodes.
Add(
this);
1741 cxcoutI(
Integration) <<
"RooAbsArg::optimizeCacheMode(" <<
GetName() <<
") integral depends on value of one or more observables and will be evaluated for every event" << endl ;
1743 optimizedNodes.
add(*
this,
true) ;
1757 server->optimizeCacheMode(observables,optimizedNodes,processedNodes) ;
1773 << cacheList <<
" depend exclusively on constant parameters and will be precalculated and cached" << endl ;
1792 if (processedNodes.
findArg(
this)) {
1795 processedNodes.
Add(
this) ;
1802 if (!param->isConstant()) {
1827 cacheList.
add(*
this,
false) ;
1835 if (server->isDerived()) {
1836 server->findConstantNodes(observables,cacheList,processedNodes) ;
1860 server->constOptimizeTestStatistic(opcode,doAlsoTrackingOpt) ;
1885 clientV->setOperMode(
mode) ;
1930 case Auto: os <<
" [Auto," << (
isValueDirty()?
"Dirty":
"Clean") <<
"] " ; break ;
1931 case AClean: os <<
" [ACLEAN] " ; break ;
1932 case ADirty: os <<
" [ADIRTY] " ; break ;
1946 arg->printCompactTree(os,indent2,namePat,
this) ;
1959 if (nLevel==0) return ;
1973 arg->printComponentTree(indent2.
Data(),namePat,nLevel-1) ;
1990 TString cleanName(rawBranchName) ;
2075 set<string>::const_iterator iter=
_boolAttrib.begin() ;
2079 strlcpy(buf,iter->c_str(),128) ;
2081 char* ptrToken = strtok(0,
")") ;
2102 ofstream ofs(fileName) ;
2104 coutE(
InputArguments) <<
"RooAbsArg::graphVizTree() ERROR: Cannot open graphViz output file with name " << fileName << endl ;
2121 coutE(
InputArguments) <<
"RooAbsArg::graphVizTree() ERROR: output stream provided as input argument is in invalid state" << endl ;
2128 os <<
"digraph \"" <<
GetName() <<
"\"{" << endl ;
2136 string nodeName = node->GetName();
2137 string nodeTitle = node->GetTitle();
2138 string nodeLabel = (useTitle && !nodeTitle.empty()) ? nodeTitle : nodeName;
2141 string::size_type position = nodeLabel.find(
"#") ;
2142 while(useLatex && position!=nodeLabel.npos){
2143 nodeLabel.replace(position, 1,
"\\");
2146 string typeFormat =
"\\texttt{";
2147 string nodeType = (useLatex) ? typeFormat+node->ClassName()+
"}" : node->ClassName();
2149 if (
auto realNode =
dynamic_cast<RooAbsReal*
>(node)) {
2150 nodeLabel += delimiter + std::to_string(realNode->getVal());
2153 os <<
"\"" << nodeName <<
"\" [ color=" << (node->isFundamental()?
"blue":
"red")
2154 <<
", label=\"" << nodeType << delimiter << nodeLabel <<
"\"];" << endl ;
2159 set<pair<RooAbsArg*,RooAbsArg*> > links ;
2163 for(
auto const& link : links) {
2164 os <<
"\"" << link.first->GetName() <<
"\" -> \"" << link.second->GetName() <<
"\";" << endl ;
2180 linkSet.insert(make_pair(
this,server)) ;
2181 server->graphVizAddConnections(linkSet) ;
2228 RooArgSet(*this).snapshot(clonedNodes,
true);
2236 clonedNodes.
remove(*head) ;
2243 head->TNamed::SetName(newname) ;
2287 const char* tmp = arg->cacheUniqueSuffix() ;
2288 if (tmp) suffix += tmp ;
2290 return Form(
"%s",suffix.c_str()) ;
2300 for(
auto const& arg : branches) {
2301 for (
auto const& arg2 : arg->_cacheList) {
2341 _ioReadStack.push(
this) ;
2343 _ioReadStack.pop() ;
2365 auto iter = _ioEvoList.find(
this);
2366 if (iter != _ioEvoList.end()) {
2371 for (
int i = 0; i < iter->second->GetEntriesFast(); i++) {
2375 _ioEvoList.erase(iter);
2393 for (
const auto& iter : _ioEvoList) {
2396 if (!iter.first->_proxyList.GetEntriesFast())
2397 iter.first->_proxyList.Expand(iter.second->GetEntriesFast());
2398 for (
int i = 0; i < iter.second->GetEntriesFast(); i++) {
2399 iter.first->_proxyList.Add(iter.second->At(i));
2423 auto refArray = std::make_unique<TRefArray>();
2424 refArray->Streamer(R__b) ;
2428 RooAbsArg::_ioEvoList[RooAbsArg::_ioReadStack.top()] = std::move(refArray);
2437 TObject* tmpObj ;
while ((tmpObj = iter->
Next())) {
2438 refArray.
Add(tmpObj) ;
2452 std::stringstream
s;
2454 s <<
"An instance of " << raa->
ClassName() <<
".";
2466 for(
auto * server :
servers()) {
2467 server->applyWeightSquared(flag);
istream & operator>>(istream &is, RooAbsArg &arg)
Istream operator.
ostream & operator<<(ostream &os, RooAbsArg const &arg)
Ostream operator.
static void indent(ostringstream &buf, int indent_level)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
Option_t Option_t TPoint TPoint const char mode
Binding & operator=(OUT(*fun)(void))
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
RooExpensiveObjectCache & expensiveObjectCache() const
bool overlaps(const RooAbsArg &testArg, bool valueOnly=false) const
Test if any of the nodes of tree are shared with that of the given tree.
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
void replaceServer(RooAbsArg &oldServer, RooAbsArg &newServer, bool valueProp, bool shapeProp)
Replace 'oldServer' with 'newServer'.
bool _isConstant
De-duplicated name pointer. This will be equal for all objects with the same name.
void leafNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, bool recurseNonDerived=false) const
Fill supplied list with all leaf nodes of the arg tree, starting with ourself as top node.
void attachToStore(RooAbsDataStore &store)
Attach this argument to the data store such that it reads data from there.
bool recursiveRedirectServers(const RooAbsCollection &newServerList, bool mustReplaceAll=false, bool nameChange=false, bool recurseInNewSet=true)
Recursively replace all servers with the new servers in newSet.
const TNamed * namePtr() const
De-duplicated pointer to this object's name.
const char * aggregateCacheUniqueSuffix() const
void printArgs(std::ostream &os) const override
Print object arguments, ie its proxies.
void printClassName(std::ostream &os) const override
Print object class name.
ProxyListCache _proxyListCache
RooWorkspace * _myws
Prevent 'AlwaysDirty' mode for this node.
~RooAbsArg() override
Destructor.
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.
void attachDataStore(const RooAbsDataStore &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
RooArgSet * _ownedComponents
void printAddress(std::ostream &os) const override
Print class name of object.
void setShapeDirty()
Notify that a shape-like property (e.g. binning) has changed.
void registerProxy(RooArgProxy &proxy)
Register an RooArgProxy in the proxy list.
void setOperMode(OperMode mode, bool recurseADirty=true)
Set the operation mode of this node.
void attachArgs(const RooAbsCollection &set)
Bind this node to objects in set.
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
bool isShapeServer(const RooAbsArg &arg) const
Check if this is serving shape to arg.
bool isShapeDirty() const
static void ioStreamerPass2Finalize()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
void addParameters(RooAbsCollection ¶ms, const RooArgSet *nset=nullptr, bool stripDisconnected=true) const
Add all parameters of the function and its daughters to params.
void removeServer(RooAbsArg &server, bool force=false)
Unregister another RooAbsArg as a server to us, ie, declare that we no longer depend on its value and...
bool dependsOnValue(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0) const
Check whether this object depends on values from an element in the serverList.
void treeNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, bool doBranch=true, bool doLeaf=true, bool valueOnly=false, bool recurseNonDerived=false) const
Fill supplied list with nodes of the arg tree, following all server links, starting with ourself as t...
void setTransientAttribute(const Text_t *name, bool value=true)
Set (default) or clear a named boolean attribute of this object.
void graphVizAddConnections(std::set< std::pair< RooAbsArg *, RooAbsArg * > > &)
Utility function that inserts all point-to-point client-server connections between any two RooAbsArgs...
void unRegisterProxy(RooArgProxy &proxy)
Remove proxy from proxy list.
RooArgSet * getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
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.
void Print(Option_t *options=0) const override
Print the object to the defaultPrintStream().
void SetName(const char *name) override
Set the name of the TNamed.
std::set< std::string > _boolAttrib
void unRegisterCache(RooAbsCache &cache)
Unregister a RooAbsCache. Called from the RooAbsCache destructor.
RefCountList_t _clientListValue
bool addOwnedComponents(const RooAbsCollection &comps)
Take ownership of the contents of 'comps'.
void printAttribList(std::ostream &os) const
Transient boolean attributes (not copied in ctor)
void printTree(std::ostream &os, TString indent="") const override
Print object tree structure.
void SetNameTitle(const char *name, const char *title) override
Set all the TNamed parameters (name and title).
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
bool 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 ...
static bool _verboseDirty
cache of the list of proxies. Avoids type casting.
void addServerList(RooAbsCollection &serverList, bool valueProp=true, bool shapeProp=false)
Register a list of RooAbsArg as servers to us by calling addServer() for each arg in the list.
virtual bool readFromStream(std::istream &is, bool compact, bool verbose=false)=0
bool redirectServers(const RooAbsCollection &newServerList, bool mustReplaceAll=false, bool nameChange=false, bool isRecursionStep=false)
Replace all direct servers of this object with the new servers in newServerList.
static void setDirtyInhibit(bool flag)
Control global dirty inhibit mode.
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 ...
virtual void getParametersHook(const RooArgSet *, RooArgSet *, bool) const
virtual void ioStreamerPass2()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
bool dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, bool valueOnly=false) const
Test whether we depend on (ie, are served by) any object in the specified collection.
bool _prohibitServerRedirect
Set of owned component.
RefCountListLegacyIterator_t * makeLegacyIterator(const RefCountList_t &list) const
const RefCountList_t & servers() const
List of all servers of this object.
void addServer(RooAbsArg &server, bool valueProp=true, bool shapeProp=false, std::size_t refCount=1)
Register another RooAbsArg as a server to us, ie, declare that we depend on it.
RooArgSet * getVariables(bool stripDisconnected=true) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
Int_t Compare(const TObject *other) const override
Utility function used by TCollection::Sort to compare contained TObjects We implement comparison by n...
Int_t defaultPrintContents(Option_t *opt) const override
Define default contents to print.
virtual bool isDerived() const
Does value or shape of this arg depend on any other arg?
virtual void attachToTree(TTree &t, Int_t bufSize=32000)=0
Overloadable function for derived classes to implement attachment as branch to a TTree.
OperMode _operMode
Mark batches as dirty (only meaningful for RooAbsReal).
virtual void constOptimizeTestStatistic(ConstOpCode opcode, bool doAlsoTrackingOpt=true)
Interface function signaling a request to perform constant term optimization.
RooLinkedList getCloningAncestors() const
Return ancestors in cloning chain of this RooAbsArg.
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
bool getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
static void verboseDirty(bool flag)
Activate verbose messaging related to dirty flag propagation.
RooAbsCache * getCache(Int_t index) const
Return registered cache object by index.
virtual void writeToStream(std::ostream &os, bool compact) const =0
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Implement multi-line detailed printing.
void registerCache(RooAbsCache &cache)
Register RooAbsCache with this object.
virtual void optimizeCacheMode(const RooArgSet &observables)
Activate cache mode optimization with given definition of observables.
RefCountList_t _clientListShape
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...
bool inhibitDirty() const
Delete watch flag.
bool 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...
void changeServer(RooAbsArg &server, bool valueProp, bool shapeProp)
Change dirty flag propagation mask for specified server.
Int_t numProxies() const
Return the number of registered proxies.
void printName(std::ostream &os) const override
Print object name.
bool isValueDirty() const
bool _localNoInhibitDirty
Cached isConstant status.
virtual void printMetaArgs(std::ostream &) const
virtual void applyWeightSquared(bool flag)
Disables or enables the usage of squared weights.
static bool _inhibitDirty
void setAttribute(const Text_t *name, bool value=true)
Set (default) or clear a named boolean attribute of this object.
void setProxyNormSet(const RooArgSet *nset)
Forward a change in the cached normalization argset to all the registered proxies.
RefCountList_t _clientList
void printDirty(bool depth=true) const
Print information about current value dirty state information.
RooAbsProxy * getProxy(Int_t index) const
Return the nth proxy from the proxy list.
RooAbsArg & operator=(const RooAbsArg &other)
Assign all boolean and string properties of the original object.
virtual bool redirectServersHook(const RooAbsCollection &, bool, bool, bool)
Function that is called at the end of redirectServers().
RefCountList_t _serverList
RooExpensiveObjectCache * _eocache
Prohibit server redirects – Debugging tool.
virtual bool isFundamental() const
Is this object a fundamental type that can be added to a dataset? Fundamental-type subclasses overrid...
RooArgSet * getComponents() const
Create a RooArgSet with all components (branch nodes) of the expression tree headed by this object.
virtual bool isValid() const
WVE (08/21/01) Probably obsolete now.
std::set< std::string > _boolAttribTransient
bool isCloneOf(const RooAbsArg &other) const
Check if this object was created as a clone of 'other'.
RooArgSet * getParameters(const RooAbsData *data, bool stripDisconnected=true) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
void printTitle(std::ostream &os) const override
Print object title.
std::size_t getParametersSizeEstimate(const RooArgSet *nset=nullptr) const
Obtain an estimate of the number of parameters of the function and its daughters.
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.
bool getTransientAttribute(const Text_t *name) const
Check if a named attribute is set.
virtual void operModeHook()
void branchNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, bool recurseNonDerived=false) const
Fill supplied list with all branch nodes of the arg tree starting with ourself as top node.
bool recursiveCheckObservables(const RooArgSet *nset) const
Recursively call checkObservables on all nodes in the expression tree.
bool isValueServer(const RooAbsArg &arg) const
Check if this is serving values to arg.
std::map< std::string, std::string > _stringAttrib
Int_t numCaches() const
Return number of registered caches.
virtual bool checkObservables(const RooArgSet *nset) const
Overloadable function in which derived classes can implement consistency checks of the variables.
RooAbsArg()
Default constructor.
virtual std::unique_ptr< RooArgSet > fillNormSetForServer(RooArgSet const &normSet, RooAbsArg const &server) const
Fills a RooArgSet to be used as the normalization set for a server, given a normalization set for thi...
void attachDataSet(const RooAbsData &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
TIteratorToSTLInterface< RefCountList_t::Container_t > RefCountListLegacyIterator_t
RooAbsArg * findServer(const char *name) const
Return server of this with name name. Returns nullptr if not found.
std::vector< RooAbsCache * > _cacheList
RooAbsArg * findNewServer(const RooAbsCollection &newSet, bool nameChange) const
Find the new server in the specified set that matches the old server.
OperMode operMode() const
Query the operation mode of this node.
RooAbsCache is the abstract base class for data members of RooAbsArgs that cache other (composite) Ro...
virtual void operModeHook()
Interface for operation mode changes.
virtual void findConstantNodes(const RooArgSet &, RooArgSet &, RooLinkedList &)
Interface for constant term node finding calls.
virtual void printCompactTreeHook(std::ostream &, const char *)
Interface for printing of cache guts in tree mode printing.
virtual bool redirectServersHook(const RooAbsCollection &, bool, bool, bool)
Interface for server redirect calls.
virtual void optimizeCacheMode(const RooArgSet &, RooArgSet &, RooLinkedList &)
Interface for processing of cache mode optimization calls.
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsCollection * selectByAttrib(const char *name, bool value) const
Create a subset of the current collection, consisting only of those elements with the specified attri...
virtual bool addOwned(RooAbsArg &var, bool silent=false)
Add an argument and transfer the ownership to the collection.
virtual bool remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false)
Remove the specified argument from our list.
void Print(Option_t *options=0) const override
This method must be overridden when a class wants to print itself.
Int_t getSize() const
Return the number of elements in the collection.
const char * GetName() const override
Returns name of object.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
Storage_t::size_type size() const
RooAbsArg * first() const
void reserve(Storage_t::size_type count)
void clear()
Clear contents. If the collection is owning, it will also delete the contents.
void sort(bool reverse=false)
Sort collection using std::sort and name comparison.
void setName(const char *name)
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsDataStore is the abstract base class for data collection that use a TTree as internal storage m...
virtual const RooArgSet * get(Int_t index) const =0
RooAbsData is the common abstract base class for binned and unbinned datasets.
virtual const RooArgSet * get() const
RooAbsProxy is the abstact interface for proxy classes.
virtual const char * name() const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgProxy is the abstract interface for RooAbsArg proxy classes.
bool isShapeServer() const
Returns true if contents is shape server of owner.
RooAbsArg * absArg() const
Return pointer to contained argument.
bool isValueServer() const
Returns true of contents is value server of owner.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooConstVar represent a constant real-valued object.
RooExpensiveObjectCache is a singleton class that serves as repository for objects that are expensive...
static RooExpensiveObjectCache & instance()
Return reference to singleton instance.
Switches the message service to a different level while the instance is alive.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
RooAbsArg * findArg(const RooAbsArg *) const
Return pointer to object with given name in collection.
virtual void Add(TObject *arg)
TObject * FindObject(const char *name) const override
Return pointer to obejct with given name.
RooNameReg is a registry for const char* names.
const TNamed * constPtr(const char *stringPtr)
Return a unique TNamed pointer for given C++ string.
static RooNameReg & instance()
Return reference to singleton instance.
@ kRenamedArg
TNamed flag to indicate that some RooAbsArg has been renamed (flag set in new name)
static void incrementRenameCounter()
The renaming counter has to be incremented every time a RooAbsArg is renamed.
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
virtual StyleOption defaultPrintStyle(Option_t *opt) const
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,...
virtual void printValue(std::ostream &os) const
Interface to print value of object.
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
RooRealVar represents a variable that can be changed from the outside.
TClass * IsA() const override
void Streamer(TBuffer &) override
Stream an object of class RooRefArray.
RooResolutionModel is the base class for PDFs that represent a resolution model that can be convolute...
std::size_t refCount(typename Container_t::const_iterator item) const
Return ref count of item that iterator points to.
const Container_t & containedObjects() const
Direct reference to container of objects held by this list.
void Remove(const T *obj, bool force=false)
Decrease ref count of given object.
Container_t::const_iterator begin() const
Iterator over contained objects.
void Add(T *obj, std::size_t initialCount=1)
Add an object or increase refCount if it is already present.
Container_t::const_iterator end() const
End of contained objects.
bool empty() const
Check if empty.
std::size_t size() const
Number of contained objects (neglecting the ref count).
void RemoveAll(const T *obj)
Remove from list irrespective of ref count.
void reserve(std::size_t amount)
bool containsByNamePtr(const T *obj) const
Check if list contains an item using findByNamePointer().
RooTreeDataStore is a TTree-backed data storage.
RooVectorDataStore uses std::vectors to store data columns.
bool defineSetInternal(const char *name, const RooArgSet &aset)
const RooArgSet * set(const char *name)
Return pointer to previously defined named set with given nmame If no such set is found a null pointe...
Buffer base class used for serializing objects.
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
TIterator and GenericRooFIter front end with STL back end.
Iterator abstract base class.
virtual TObject * Next()=0
The TNamed class is the base class for all named ROOT classes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
void Streamer(TBuffer &) override
Stream an object of class TObject.
const char * GetTitle() const override
Returns title of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Int_t GetEntriesFast() const
virtual void Expand(Int_t newSize)
Expand or shrink the array to newSize elements.
TIterator * MakeIterator(Bool_t dir=kIterForward) const override
Returns an array iterator.
virtual void Compress()
Remove empty slots from array.
Int_t GetEntries() const override
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const override
TObject * Remove(TObject *obj) override
Remove object from array.
TObject * FindObject(const char *name) const override
Find an object in this collection using its name.
void Add(TObject *obj) override
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
An array of references to TObjects.
void Add(TObject *obj) override
void Streamer(TBuffer &) override
Stream all objects in the array to or from the I/O buffer.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Append(const char *cs)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
A TTree represents a columnar dataset.
static Roo_reg_AGKInteg1D instance
std::string getColonSeparatedNameString(RooArgSet const &argSet)
Create a string with all sorted names of RooArgSet elements separated by colons.
static constexpr double s
std::vector< RooAbsProxy * > cache