|
ROOT
Reference Guide |
|
Go to the documentation of this file.
107 #if (__GNUC__==3&&__GNUC_MINOR__==2&&__GNUC_PATCHLEVEL__==3)
118 std::map<RooAbsArg*,std::unique_ptr<TRefArray>> RooAbsArg::_ioEvoList;
119 std::stack<RooAbsArg*> RooAbsArg::_ioReadStack ;
127 _prohibitServerRedirect(
kFALSE), _namePtr(0), _isConstant(
kFALSE), _localNoInhibitDirty(
kFALSE),
141 _ownedComponents(0), _prohibitServerRedirect(
kFALSE), _namePtr(0), _isConstant(
kFALSE),
142 _localNoInhibitDirty(
kFALSE), _myws(0)
144 if (
name ==
nullptr || strlen(
name) == 0) {
145 throw std::logic_error(
"Each RooFit object needs a name. "
146 "Objects representing the same entity (e.g. an observable 'x') are identified using their name.");
156 :
TNamed(other.GetName(), other.GetTitle()),
RooPrintable(other), _boolAttrib(other._boolAttrib),
157 _stringAttrib(other._stringAttrib), _deleteWatch(other._deleteWatch), _operMode(Auto), _fast(
kFALSE),
158 _ownedComponents(0), _prohibitServerRedirect(
kFALSE), _namePtr(other._namePtr),
159 _isConstant(other._isConstant), _localNoInhibitDirty(other._localNoInhibitDirty), _myws(0)
172 Bool_t valueProp, shapeProp ;
174 valueProp = server->_clientListValue.containsByNamePtr(&other);
175 shapeProp = server->_clientListShape.containsByNamePtr(&other);
205 bool valueProp, shapeProp;
207 valueProp = server->_clientListValue.containsByNamePtr(&other);
208 shapeProp = server->_clientListShape.containsByNamePtr(&other);
232 for (
auto client : clientListTmp) {
233 client->setAttribute(
"ServerDied") ;
237 client->setAttribute(attr.
Data());
238 client->removeServer(*
this,
kTRUE);
243 cxcoutD(
Tracing) <<
"RooAbsArg::dtor(" <<
GetName() <<
"," <<
this <<
") DeleteWatch: object is being destroyed" << endl ;
248 << client->GetName() <<
"\" should have been deleted first" << endl ;
284 other.getAttribute(
Form(
"CloneOf(%lx)",(
ULong_t)
this))) ;
294 if(
string(
"Constant")==
name) {
338 map<string,string>::const_iterator iter =
_stringAttrib.find(key) ;
340 return iter->second.c_str() ;
392 <<
"): PROHIBITED SERVER ADDITION REQUESTED: adding server " << server.
GetName()
393 <<
"(" << &server <<
") for " << (valueProp?
"value ":
"") << (shapeProp?
"shape":
"") << endl ;
394 throw std::logic_error(
"PROHIBITED SERVER ADDITION REQUESTED in RooAbsArg::addServer");
398 <<
"(" << &server <<
") for " << (valueProp?
"value ":
"") << (shapeProp?
"shape":
"") << endl ;
428 for (
const auto arg : serverList) {
442 cxcoutF(
LinkStateMgmt) <<
"RooAbsArg::addServer(" <<
this <<
"," <<
GetName() <<
"): PROHIBITED SERVER REMOVAL REQUESTED: removing server "
443 << server.
GetName() <<
"(" << &server <<
")" << endl ;
449 << server.
GetName() <<
"(" << &server <<
")" << endl ;
468 addServer(newServer, propValue, propShape, count);
479 << server.
GetName() <<
" not registered" << endl ;
486 << server.
GetName() <<
" doesn't have us registered as client" << endl ;
548 if ((doBranch&&doLeaf) ||
561 Bool_t isValueSrv = server->_clientListValue.containsByNamePtr(arg);
562 if (valueOnly && !isValueSrv) {
594 if (server->isValueServer(*
this)) {
595 if (server->isFundamental()) {
596 if (!nset || !server->dependsOn(*nset)) {
597 nodeParamServers.
add(*server) ;
600 nodeBranchServers.
add(*server) ;
609 params.
add(nodeParamServers,
kTRUE) ;
612 for (
const auto server : nodeBranchServers) {
613 server->addParameters(params,nset) ;
684 if (!dataList)
return depList ;
687 RooArgSet leafList(
"leafNodeServerList") ;
691 for (
const auto arg : leafList) {
692 if (arg->dependsOnValue(*dataList) && arg->isLValue()) {
697 for (
const auto arg : leafList) {
698 if (arg->dependsOn(*dataList) && arg->isLValue()) {
714 name.Append(
"_components") ;
746 while((arg=iter.
next())) {
749 << arg->
GetName() <<
" no longer exists!" << endl ;
769 for (
auto server : serverList) {
770 if (
dependsOn(*server,ignoreArg,valueOnly)) {
785 if (
this==ignoreArg)
return kFALSE ;
804 if ( !valueOnly || server->isValueServer(*
this)) {
805 if (server->dependsOn(testArg,ignoreArg,valueOnly)) {
873 }
else if (source==
this) {
876 <<
"): cyclical dependency detected, source = " << source->
GetName() << endl ;
884 <<
"): dirty flag " << (
_valueDirty?
"already ":
"") <<
"raised" << endl ;
891 client->setValueDirty(source) ;
906 <<
"): dirty flag " << (
_shapeDirty?
"already ":
"") <<
"raised" << endl ;
917 }
else if (source==
this) {
920 <<
"): cyclical dependency detected" << endl ;
928 client->setShapeDirty(source) ;
929 client->setValueDirty(source) ;
970 for (
auto arg : newSetOrig) {
972 if (
string(
"REMOVAL_DUMMY")==arg->GetName()) {
974 if (arg->getAttribute(
"REMOVE_ALL")) {
991 std::vector<RooAbsArg*> origServerList, origServerValue, origServerShape;
993 origServerList.reserve(origSize);
994 origServerValue.reserve(origSize);
997 origServerList.push_back(oldServer) ;
1000 if (oldServer->_clientListValue.containsByNamePtr(
this)) {
1001 origServerValue.push_back(oldServer) ;
1003 if (oldServer->_clientListShape.containsByNamePtr(
this)) {
1004 origServerShape.push_back(oldServer) ;
1009 for (
auto oldServer : origServerList) {
1014 cxcoutD(
LinkStateMgmt) <<
"RooAbsArg::redirectServers(" << (
void*)
this <<
"," <<
GetName() <<
"): server " << oldServer->GetName()
1015 <<
" redirected from " << oldServer <<
" to " << newServer << endl ;
1019 if (mustReplaceAll) {
1020 coutE(
LinkStateMgmt) <<
"RooAbsArg::redirectServers(" << (
void*)
this <<
"," <<
GetName() <<
"): server " << oldServer->GetName()
1021 <<
" (" << (
void*)oldServer <<
") not redirected" << (nameChange?
"[nameChange]":
"") << endl ;
1027 auto findByNamePtr = [&oldServer](
const RooAbsArg * item) {
1028 return oldServer->namePtr() == item->namePtr();
1030 bool propValue = std::any_of(origServerValue.begin(), origServerValue.end(), findByNamePtr);
1031 bool propShape = std::any_of(origServerShape.begin(), origServerShape.end(), findByNamePtr);
1033 if (newServer !=
this) {
1048 if (mustReplaceAll && !ret2) {
1051 <<
"): ERROR, proxy '" << p->
name()
1052 <<
"' with arg '" << (ap ? ap->absArg()->GetName() :
"<could not cast>") <<
"' could not be adjusted" << endl;
1081 newServer = newSet.
find(*
this) ;
1086 TString nameAttrib(
"ORIGNAME:") ;
1101 << nameAttrib <<
" attribute" << endl ;
1107 newServer= tmp->
first();
1125 static std::set<const RooAbsArg*> callStack;
1127 std::set<const RooAbsArg*>::iterator it = callStack.lower_bound(
this);
1128 if (it != callStack.end() &&
this == *it) {
1131 callStack.insert(it,
this);
1144 cxcoutD(
LinkStateMgmt) <<
"RooAbsArg::recursiveRedirectServers(" <<
this <<
"," <<
GetName() <<
") newSet = " << newSet <<
" mustReplaceAll = "
1145 << (mustReplaceAll?
"T":
"F") <<
" nameChange = " << (nameChange?
"T":
"F") <<
" recurseInNewSet = " << (recurseInNewSet?
"T":
"F") << endl ;
1152 ret |= server->recursiveRedirectServers(newSet,mustReplaceAll,nameChange,recurseInNewSet) ;
1155 callStack.erase(
this);
1174 <<
" already registered" << endl ;
1215 << proxy.
GetName() <<
" already registered" << endl ;
1248 << proxy.
GetName() <<
" already registered" << endl ;
1256 cout <<
"RooAbsArg::registerProxy(" <<
GetName() <<
") proxy registration failure! nold=" << nProxyOld <<
" nnew=" <<
_proxyList.
GetEntries() << endl ;
1319 <<
"): Cannot be attached to a TTree" << endl ;
1360 os << IsA()->GetName() ;
1383 if (p==0) continue ;
1410 os <<
indent <<
"--- RooAbsArg ---" << endl;
1412 os <<
indent <<
" Value State: " ;
1414 case ADirty: os <<
"FORCED DIRTY" ; break ;
1415 case AClean: os <<
"FORCED clean" ; break ;
1421 os <<
indent <<
" Attributes: " ;
1425 os <<
indent <<
" Address: " << (
void*)
this << endl;
1427 os <<
indent <<
" Clients: " << endl;
1429 os <<
indent <<
" (" << (
void*)client <<
","
1437 os <<
indent <<
" Servers: " << endl;
1439 os <<
indent <<
" (" << (
void*)server <<
","
1440 << (server->_clientListValue.containsByNamePtr(
this)?
"V":
"-")
1441 << (server->_clientListShape.containsByNamePtr(
this)?
"S":
"-")
1447 os <<
indent <<
" Proxies: " << endl ;
1450 if (!proxy) continue ;
1452 os <<
indent <<
" " << proxy->
name() <<
" -> " ;
1457 os <<
" (empty)" << endl ; ;
1460 os <<
indent <<
" " << proxy->
name() <<
" -> " ;
1502 set<string>::const_iterator iter =
_boolAttrib.begin() ;
1505 os << (
first?
" [":
",") << *iter ;
1509 if (!
first) os <<
"] " ;
1524 while((branch=iter.
next())) {
1543 while((branch=iter.
next())) {
1574 while((branch=bIter.
next())) {
1581 case AClean: cout <<
"FORCED clean" ; break ;
1582 case ADirty: cout <<
"FORCED DIRTY" ; break ;
1604 coutI(
Optimization) <<
"RooAbsArg::optimizeCacheMode(" <<
GetName() <<
") nodes " << opt <<
" depend on observables, "
1605 <<
"changing cache operation mode from change tracking to unconditional evaluation" << endl ;
1626 if (processedNodes.
findArg(
this)) {
1629 processedNodes.
Add(
this) ;
1636 cxcoutI(
Integration) <<
"RooAbsArg::optimizeCacheMode(" <<
GetName() <<
") integral depends on value of one or more observables and will be evaluated for every event" << endl ;
1652 server->optimizeCacheMode(observables,optimizedNodes,processedNodes) ;
1668 << cacheList <<
" depend exclusively on constant parameters and will be precalculated and cached" << endl ;
1687 if (processedNodes.
findArg(
this)) {
1690 processedNodes.
Add(
this) ;
1698 while((param = iter.
next())) {
1732 if (server->isDerived()) {
1733 server->findConstantNodes(observables,cacheList,processedNodes) ;
1757 server->constOptimizeTestStatistic(opcode,doAlsoTrackingOpt) ;
1780 if (mode==
ADirty && recurseADirty) {
1782 clientV->setOperMode(mode) ;
1797 ofstream ofs(filename) ;
1822 os << IsA()->GetName() <<
"::" <<
GetName() <<
" = " ;
1827 case Auto: os <<
" [Auto," << (
isValueDirty()?
"Dirty":
"Clean") <<
"] " ; break ;
1828 case AClean: os <<
" [ACLEAN] " ; break ;
1829 case ADirty: os <<
" [ADIRTY] " ; break ;
1843 arg->printCompactTree(os,indent2,namePat,
this) ;
1856 if (nLevel==0) return ;
1870 arg->printComponentTree(indent2.
Data(),namePat,nLevel-1) ;
1887 TString cleanName(rawBranchName) ;
1972 set<string>::const_iterator iter=
_boolAttrib.begin() ;
1976 strlcpy(buf,iter->c_str(),128) ;
1978 char* ptrToken = strtok(0,
")") ;
1997 ofstream ofs(fileName) ;
1999 coutE(
InputArguments) <<
"RooAbsArg::graphVizTree() ERROR: Cannot open graphViz output file with name " << fileName << endl ;
2014 coutE(
InputArguments) <<
"RooAbsArg::graphVizTree() ERROR: output stream provided as input argument is in invalid state" << endl ;
2018 os <<
"digraph " <<
GetName() <<
"{" << endl ;
2027 while((node=iter.
next())) {
2028 string nodeName = node->
GetName();
2029 string nodeTitle = node->
GetTitle();
2030 string nodeLabel = (useTitle && !nodeTitle.empty()) ? nodeTitle : nodeName;
2033 string::size_type position = nodeLabel.find(
"#") ;
2034 while(useLatex && position!=nodeLabel.npos){
2035 nodeLabel.replace(position, 1,
"\\");
2038 string typeFormat =
"\\texttt{";
2039 string nodeType = (useLatex) ? typeFormat+node->IsA()->
GetName()+
"}" : node->IsA()->
GetName();
2041 os <<
"\"" << nodeName <<
"\" [ color=" << (node->
isFundamental()?
"blue":
"red")
2042 <<
", label=\"" << nodeType << delimiter << nodeLabel <<
"\"];" << endl ;
2047 set<pair<RooAbsArg*,RooAbsArg*> > links ;
2051 set<pair<RooAbsArg*,RooAbsArg*> >::iterator
liter = links.begin() ;
2053 os <<
"\"" <<
liter->first->GetName() <<
"\" -> \"" <<
liter->second->GetName() <<
"\";" << endl ;
2069 linkSet.insert(make_pair(
this,server)) ;
2070 server->graphVizAddConnections(linkSet) ;
2181 clonedNodes->
remove(*head) ;
2188 delete clonedNodes ;
2192 head->TNamed::SetName(newname) ;
2237 while((arg=iter.
next())) {
2239 if (tmp) suffix += tmp ;
2241 return Form(
"%s",suffix.c_str()) ;
2253 while((arg=iter.
next())) {
2255 for (deque<RooAbsCache*>::iterator iter2 = arg->
_cacheList.begin() ; iter2 != arg->
_cacheList.end() ; ++iter2) {
2256 (*iter2)->wireCache() ;
2296 void RooAbsArg::Streamer(
TBuffer &R__b)
2299 _ioReadStack.push(
this) ;
2301 _ioReadStack.pop() ;
2323 auto iter = _ioEvoList.find(
this);
2324 if (iter != _ioEvoList.end()) {
2329 for (
int i = 0; i < iter->second->GetEntriesFast(); i++) {
2333 _ioEvoList.erase(iter);
2351 for (
const auto& iter : _ioEvoList) {
2354 if (!iter.first->_proxyList.GetEntriesFast())
2355 iter.first->_proxyList.Expand(iter.second->GetEntriesFast());
2356 for (
int i = 0; i < iter.second->GetEntriesFast(); i++) {
2357 iter.first->_proxyList.Add(iter.second->At(i));
2373 void RooRefArray::Streamer(
TBuffer &R__b)
2381 auto refArray = std::make_unique<TRefArray>();
2382 refArray->Streamer(R__b) ;
2386 RooAbsArg::_ioEvoList[RooAbsArg::_ioReadStack.top()] = std::move(refArray);
2395 TObject* tmpObj ;
while ((tmpObj = iter->
Next())) {
2396 refArray.Add(tmpObj) ;
2400 refArray.Streamer(R__b) ;
2410 std::stringstream
s;
2412 s <<
"An instance of " << raa->
ClassName() <<
".";
bool containsByNamePtr(const T *obj) const
Check if list contains an item using findByNamePointer().
virtual void print(std::ostream &os, Bool_t addContents=kFALSE) const
Print proxy name.
RooAbsCache * getCache(Int_t index) const
Return registered cache object by index.
Int_t numProxies() const
Return the number of registered proxies.
Bool_t isValueServer(const RooAbsArg &arg) const
Check if this is serving values to arg.
Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE) override
Add element to an owning set.
static RooNameReg & instance()
Return reference to singleton instance.
static Bool_t _inhibitDirty
OperMode operMode() const
Query the operation mode of this node.
virtual void printTitle(std::ostream &os) const
Print object title.
std::set< std::string > _boolAttribTransient
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
RooAbsArg * first() const
std::size_t size() const
Number of contained objects (neglecting the ref count).
Bool_t _localNoInhibitDirty
Cached isConstant status.
virtual void SetName(const char *name)
Set the name of the TNamed.
RooAbsData is the common abstract base class for binned and unbinned datasets.
std::set< std::string > _boolAttrib
virtual void printArgs(std::ostream &os) const
Print object arguments, ie its proxies.
Bool_t recursiveCheckObservables(const RooArgSet *nset) const
Recursively call checkObservables on all nodes in the expression tree.
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
RooArgSet * getComponents() const
Create a RooArgSet with all components (branch nodes) of the expression tree headed by this object.
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
const char * Data() const
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Bool_t _isConstant
Do not persist. Pointer to global instance of string that matches object named.
void unRegisterCache(RooAbsCache &cache)
Unregister a RooAbsCache. Called from the RooAbsCache destructor.
virtual void operModeHook()
Interface for operation mode changes.
ostream & operator<<(ostream &os, RooAbsArg &arg)
Ostream operator.
char * Form(const char *fmt,...)
virtual TObject * Remove(TObject *obj)
Remove object from array.
virtual const char * GetTitle() const
Returns title of object.
static void ioStreamerPass2Finalize()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
virtual Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Bool_t dependsOnValue(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0) const
Check whether this object depends on values from an element in the serverList.
TString cleanBranchName() const
Construct a mangled name from the actual name that is free of any math symbols that might be interpre...
virtual ~RooAbsArg()
Destructor.
RooSetProxy is the concrete proxy for RooArgSet objects.
virtual void Print(Option_t *options=0) const
Print the object to the defaultPrintStream().
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.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
void printAttribList(std::ostream &os) const
Transient boolean attributes (not copied in ctor)
RooFIter fwdIterator() const
One-time forward iterator.
RefCountList_t _serverList
const TNamed * namePtr() const
A TTree represents a columnar dataset.
virtual void writeToStream(std::ostream &os, Bool_t compact) const =0
Binding & operator=(OUT(*fun)(void))
void SetName(const char *name)
Set the name of the TNamed.
static constexpr double s
virtual const char * name() const
TIteratorToSTLInterface< RefCountList_t::Container_t > RefCountListLegacyIterator_t
virtual void ioStreamerPass2()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
virtual Bool_t checkObservables(const RooArgSet *nset) const
Overloadable function in which derived classes can implement consistency checks of the variables.
std::size_t refCount(typename Container_t::const_iterator item) const
Return ref count of item that iterator points to.
Bool_t getTransientAttribute(const Text_t *name) const
Check if a named attribute is set.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Implement multi-line detailed printing.
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default contents to print.
Bool_t isShapeServer(const RooAbsArg &arg) const
Check if this is serving shape to arg.
RooAbsArg * find(const char *name) const
Find object with given name in list.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Set the operation mode of this node.
Int_t GetEntries() const
Return the number of objects in array (i.e.
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...
RefCountList_t _clientListShape
void changeServer(RooAbsArg &server, Bool_t valueProp, Bool_t shapeProp)
Change dirty flag propagation mask for specified server.
static void indent(ostringstream &buf, int indent_level)
Int_t Compare(const TObject *other) const
Utility function used by TCollection::Sort to compare contained TObjects We implement comparison by n...
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.
Bool_t isShapeServer() const
An array of references to TObjects.
RooAbsProxy * getProxy(Int_t index) const
Return the nth proxy from the proxy list.
Bool_t inhibitDirty() const
Delete watch flag.
Buffer base class used for serializing objects.
RooConstVar represent a constant real-valued object.
Bool_t isCloneOf(const RooAbsArg &other) const
Check if this object was created as a clone of 'other'.
TObject * At(Int_t idx) const
virtual Bool_t changePointer(const RooAbsCollection &newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE)=0
virtual void attachToVStore(RooVectorDataStore &vstore)=0
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
Recursively replace all servers with the new servers in newSet.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
const char * GetName() const
Returns name of object.
RooExpensiveObjectCache & expensiveObjectCache() const
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
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...
RefCountListLegacyIterator_t * makeLegacyIterator(const RefCountList_t &list) const
bool empty() const
Check if empty.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
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.
virtual Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Interface for server redirect calls.
RooExpensiveObjectCache is a singleton class that serves as repository for objects that are expensive...
Iterator abstract base class.
TString operator+(const TString &s1, const TString &s2)
Use the special concatenation constructor.
TString & ReplaceAll(const TString &s1, const TString &s2)
void registerProxy(RooArgProxy &proxy)
Register an RooArgProxy in the proxy list.
static constexpr double liter
void graphVizAddConnections(std::set< std::pair< RooAbsArg *, RooAbsArg * > > &)
Utility function that inserts all point-to-point client-server connections between any two RooAbsArgs...
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
Container_t::const_iterator end() const
End of contained objects.
RooAbsArg * findNewServer(const RooAbsCollection &newSet, Bool_t nameChange) const
Find the new server in the specified set that matches the old server.
RooAbsArg * findArg(const RooAbsArg *) const
Return pointer to object with given name in collection.
Container_t::const_iterator begin() const
Iterator over contained objects.
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...
virtual Bool_t isDerived() const
Does value or shape of this arg depend on any other arg?
virtual const char * GetName() const
Returns name of object.
RooLinkedList getCloningAncestors() const
Return ancestors in cloning chain of this RooAbsArg.
void addParameters(RooArgSet ¶ms, const RooArgSet *nset=0, Bool_t stripDisconnected=kTRUE) const
INTERNAL helper function for getParameters()
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
RooExpensiveObjectCache * _eocache
Prohibit server redirects – Debugging tool.
Bool_t _prohibitServerRedirect
Set of owned component.
RooResolutionModel is the base class for PDFs that represent a resolution model that can be convolute...
void Add(T *obj, std::size_t initialCount=1)
Add an object or increase refCount if it is already present.
void replaceServer(RooAbsArg &oldServer, RooAbsArg &newServer, Bool_t valueProp, Bool_t shapeProp)
Replace 'oldServer' with 'newServer'.
void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
RooAbsArg & operator=(const RooAbsArg &other)
Assign all boolean and string properties of the original object.
const TNamed * constPtr(const char *stringPtr)
Return a unique TNamed pointer for given C++ string.
RooArgProxy is the abstract interface for RooAbsArg proxy classes.
void reserve(std::size_t amount)
virtual Bool_t isValid() const
WVE (08/21/01) Probably obsolete now.
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 SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
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...
virtual void printAddress(std::ostream &os) const
Print class name of object.
Bool_t isValueDirty() const
Int_t GetEntriesFast() const
void registerCache(RooAbsCache &cache)
Register RooAbsCache with this object.
OperMode _operMode
Mark batches as dirty (only meaningful for RooAbsReal).
The TNamed class is the base class for all named ROOT classes.
virtual void printCompactTreeHook(std::ostream &, const char *)
Interface for printing of cache guts in tree mode printing.
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
RooAbsArg * absArg() const
TString & Append(const char *cs)
virtual const RooArgSet * get() const
Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Add element to non-owning set.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
void RemoveAll(const T *obj)
Remove from list irrespective of ref count.
Bool_t defineSetInternal(const char *name, const RooArgSet &aset)
RooAbsArg * next()
Return next element or nullptr if at end.
void attachDataStore(const RooAbsDataStore &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
RefCountList_t _clientList
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
static void verboseDirty(Bool_t flag)
Activate verbose messaging related to dirty flag propagation.
void setProxyNormSet(const RooArgSet *nset)
Forward a change in the cached normalization argset to all the registered proxies.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
virtual void optimizeCacheMode(const RooArgSet &observables)
Activate cache mode optimization with given definition of observables.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Storage_t::size_type size() const
static RooExpensiveObjectCache & instance()
Return reference to singleton instance.
const Container_t & containedObjects() const
Direct reference to container of objects held by this list.
virtual void Add(TObject *arg)
RefCountList_t _clientListValue
void printDirty(Bool_t depth=kTRUE) const
Print information about current value dirty state information.
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Interface function signaling a request to perform constant term optimization.
void attachDataSet(const RooAbsData &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
RooListProxy is the concrete proxy for RooArgList objects.
virtual const RooArgSet * get(Int_t index) const =0
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=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.
virtual void changeNormSet(const RooArgSet *newNormSet)
Destructor.
Bool_t isValueServer() const
RooTreeDataStore is a TTree-backed data storage.
virtual TObject * Next()=0
virtual Bool_t isFundamental() const
Is this object a fundamental type that can be added to a dataset? Fundamental-type subclasses overrid...
virtual void printTree(std::ostream &os, TString indent="") const
Print object tree structure.
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.
Bool_t isShapeDirty() const
RooNameSet is a utility class that stores the names the objects in a RooArget.
virtual const char * cacheUniqueSuffix() const
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)=0
const char * aggregateCacheUniqueSuffix() const
void setShapeDirty()
Notify that a shape-like property (e.g. binning) has changed.
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Return the observables of this pdf given a set of observables.
virtual void getParametersHook(const RooArgSet *, RooArgSet *, Bool_t) const
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
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.
void setTransientAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
TIterator * MakeIterator(Bool_t dir=kIterForward) const
Returns an array iterator.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
RooAbsCache is the abstract base class for data members of RooAbsArgs that cache other (composite) Ro...
virtual void Expand(Int_t newSize)
Expand or shrink the array to newSize elements.
RooVectorDataStore uses std::vectors to store data columns.
std::map< std::string, std::string > _stringAttrib
Mother of all ROOT objects.
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
const char * content() const
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
Bool_t redirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t isRecursionStep=kFALSE)
Replace all direct servers of this object with the new servers in newServerList.
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.
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 Compress()
Remove empty slots from array.
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
RooAbsProxy is the abstact interface for proxy classes.
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
virtual void printClassName(std::ostream &os) const
Print object class name.
static void setDirtyInhibit(Bool_t flag)
Control global dirty inhibit mode.
virtual const char * GetName() const
Returns name of object.
virtual void findConstantNodes(const RooArgSet &, RooArgSet &, RooLinkedList &)
Interface for constant term node finding calls.
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
std::deque< RooAbsCache * > _cacheList
virtual void optimizeCacheMode(const RooArgSet &, RooArgSet &, RooLinkedList &)
Interface for processing of cache mode optimization calls.
RooAbsArg * findServer(const char *name) const
Return server of this with name name. Returns nullptr if not found.
RooAbsDataStore is the abstract base class for data collection that use a TTree as internal storage m...
RooWorkspace * _myws
Prevent 'AlwaysDirty' mode for this node.
virtual void operModeHook()
RooArgSet * _ownedComponents
virtual StyleOption defaultPrintStyle(Option_t *opt) const
RooRealVar represents a variable that can be changed from the outside.
Int_t numCaches() const
Return number of registered caches.
static Bool_t _verboseDirty
void unRegisterProxy(RooArgProxy &proxy)
Remove proxy from proxy list.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
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...
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.
void attachToStore(RooAbsDataStore &store)
Attach this argument to the data store such that it reads data from there.
RooAbsCollection * selectByAttrib(const char *name, Bool_t value) const
Create a subset of the current collection, consisting only of those elements with the specified attri...
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 printName(std::ostream &os) const
Print object name.
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 ...
TIterator and GenericRooFIter front end with STL back end.
Bool_t isConstant() const
Check if the "Constant" attribute is set.
void reserve(Storage_t::size_type count)
void sort(Bool_t reverse=false)
Sort collection using std::sort and name comparison.
istream & operator>>(istream &is, RooAbsArg &arg)
Istream operator.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
void Remove(const T *obj, bool force=false)
Decrease ref count of given object.
RooAbsArg()
Default constructor.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
virtual void attachToTree(TTree &t, Int_t bufSize=32000)=0
Overloadable function for derived classes to implement attachment as branch to a TTree.
virtual void printMetaArgs(std::ostream &) const
virtual void printValue(std::ostream &os) const
Interface to print value of object.