Logo ROOT   6.12/07
Reference Guide
RooAbsArg.cxx
Go to the documentation of this file.
1 /******************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * @(#)root/roofitcore:$Id$
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 
17 //////////////////////////////////////////////////////////////////////////////
18 /** \class RooAbsArg
19  \ingroup Roofitcore
20 
21 RooAbsArg is the common abstract base class for objects that
22 represent a value (of arbitrary type) and "shape" that in general
23 depends on (is a client of) other RooAbsArg subclasses. The only
24 state information about a value that is maintained in this base
25 class consists of named attributes and flags that track when either
26 the value or the shape of this object changes. The meaning of shape
27 depends on the client implementation but could be, for example, the
28 allowed range of a value. The base class is also responsible for
29 managing client/server links and propagating value/shape changes
30 through an expression tree. RooAbsArg implements public interfaces
31 for inspecting client/server relationships and
32 setting/clearing/testing named attributes.
33 
34 */
35 
36 #include "RooFit.h"
37 #include "Riostream.h"
38 
39 #include "TBuffer.h"
40 #include "TClass.h"
41 #include "TObjString.h"
42 #include "TVirtualStreamerInfo.h"
43 // #include "TGraphStruct.h"
44 
45 #include "RooSecondMoment.h"
46 #include "RooNameSet.h"
47 #include "RooWorkspace.h"
48 
49 #include "RooMsgService.h"
50 #include "RooAbsArg.h"
51 #include "RooArgSet.h"
52 #include "RooArgProxy.h"
53 #include "RooSetProxy.h"
54 #include "RooListProxy.h"
55 #include "RooAbsData.h"
56 #include "RooAbsCategoryLValue.h"
57 #include "RooAbsRealLValue.h"
58 #include "RooTrace.h"
59 #include "RooStringVar.h"
60 #include "RooRealIntegral.h"
61 #include "RooConstVar.h"
62 #include "RooMsgService.h"
64 #include "RooAbsDataStore.h"
65 #include "RooResolutionModel.h"
66 #include "RooVectorDataStore.h"
67 #include "RooTreeDataStore.h"
68 
69 #include <string.h>
70 #include <iomanip>
71 #include <fstream>
72 #include <algorithm>
73 #include <sstream>
74 
75 using namespace std ;
76 
77 #if (__GNUC__==3&&__GNUC_MINOR__==2&&__GNUC_PATCHLEVEL__==3)
78 char* operator+( streampos&, char* );
79 #endif
80 
82 ;
83 
86 Bool_t RooAbsArg::inhibitDirty() const { return _inhibitDirty && !_localNoInhibitDirty; }
87 
88 std::map<RooAbsArg*,TRefArray*> RooAbsArg::_ioEvoList ;
89 std::stack<RooAbsArg*> RooAbsArg::_ioReadStack ;
90 
91 
92 ////////////////////////////////////////////////////////////////////////////////
93 /// Default constructor
94 
96  : TNamed(), _deleteWatch(kFALSE), _operMode(Auto), _fast(kFALSE), _ownedComponents(0),
97  _prohibitServerRedirect(kFALSE), _eocache(0), _namePtr(0), _isConstant(kFALSE), _localNoInhibitDirty(kFALSE),
98  _myws(0)
99 {
102 
104 
105 }
106 
107 ////////////////////////////////////////////////////////////////////////////////
108 /// Create an object with the specified name and descriptive title.
109 /// The newly created object has no clients or servers and has its
110 /// dirty flags set.
111 
112 RooAbsArg::RooAbsArg(const char *name, const char *title)
116 {
118 
121 
122 }
123 
124 ////////////////////////////////////////////////////////////////////////////////
125 /// Copy constructor transfers all boolean and string properties of the original
126 /// object. Transient properties and client-server links are not copied
127 
128 RooAbsArg::RooAbsArg(const RooAbsArg &other, const char *name)
129  : TNamed(other.GetName(), other.GetTitle()), RooPrintable(other), _boolAttrib(other._boolAttrib),
133 {
134  // Use name in argument, if supplied
135  if (name) {
136  TNamed::SetName(name) ;
138  } else {
139  // Same name, Ddon't recalculate name pointer (expensive)
140  TNamed::SetName(other.GetName()) ;
141  _namePtr = other._namePtr ;
142  }
143 
144  // Copy server list by hand
145  RooFIter sIter = other._serverList.fwdIterator() ;
146  RooAbsArg* server ;
147  Bool_t valueProp, shapeProp ;
148  while ((server = sIter.next())) {
149  valueProp = server->_clientListValue.findArg(&other)?kTRUE:kFALSE ;
150  shapeProp = server->_clientListShape.findArg(&other)?kTRUE:kFALSE ;
151  addServer(*server,valueProp,shapeProp) ;
152  }
153 
156 
157  setValueDirty() ;
158  setShapeDirty() ;
159 
160  //setAttribute(Form("CloneOf(%08x)",&other)) ;
161  //cout << "RooAbsArg::cctor(" << this << ") #bools = " << _boolAttrib.size() << " #strings = " << _stringAttrib.size() << endl ;
162 
163 }
164 
165 
166 ////////////////////////////////////////////////////////////////////////////////
167 /// Destructor.
168 
170 {
171  // Notify all servers that they no longer need to serve us
172  while (_serverList.GetSize() > 0) {
173  removeServer(*static_cast<RooAbsArg*>(_serverList.First()), kTRUE) ;
174  }
175 
176  // Notify all client that they are in limbo
177  RooRefCountList tmpclientList(_clientList); // have to copy, as we invalidate iterators
178  RooFIter clientIter = tmpclientList.fwdIterator() ;
179  RooAbsArg* client = 0;
180  Bool_t first(kTRUE) ;
181  while ((client=clientIter.next())) {
182  client->setAttribute("ServerDied") ;
183  TString attr("ServerDied:");
184  attr.Append(GetName());
185  attr.Append(Form("(%lx)",(ULong_t)this)) ;
186  client->setAttribute(attr.Data());
187  client->removeServer(*this,kTRUE);
188 
189  if (_verboseDirty) {
190 
191  if (first) {
192  cxcoutD(Tracing) << "RooAbsArg::dtor(" << GetName() << "," << this << ") DeleteWatch: object is being destroyed" << endl ;
193  first = kFALSE ;
194  }
195 
196  cxcoutD(Tracing) << fName << "::" << ClassName() << ":~RooAbsArg: dependent \""
197  << client->GetName() << "\" should have been deleted first" << endl ;
198  }
199  }
200 
201  delete _clientShapeIter ;
202  delete _clientValueIter ;
203 
204  if (_ownedComponents) {
205  delete _ownedComponents ;
206  _ownedComponents = 0 ;
207  }
208 
209 }
210 
211 
212 ////////////////////////////////////////////////////////////////////////////////
213 /// Control global dirty inhibit mode. When set to true no value or shape dirty
214 /// flags are propagated and cache is always considered to be dirty.
215 
217 {
218  _inhibitDirty = flag ;
219 }
220 
221 
222 ////////////////////////////////////////////////////////////////////////////////
223 /// Activate verbose messaging related to dirty flag propagation
224 
226 {
227  _verboseDirty = flag ;
228 }
229 
230 ////////////////////////////////////////////////////////////////////////////////
231 /// Check if this object was created as a clone of 'other'
232 
234 {
235  return (getAttribute(Form("CloneOf(%lx)",(ULong_t)&other)) ||
236  other.getAttribute(Form("CloneOf(%lx)",(ULong_t)this))) ;
237 }
238 
239 
240 ////////////////////////////////////////////////////////////////////////////////
241 /// Set (default) or clear a named boolean attribute of this object.
242 
244 {
245  // Preserve backward compatibility - any strong
246  if(string("Constant")==name) {
247  _isConstant = value ;
248  }
249 
250  if (value) {
251  _boolAttrib.insert(name) ;
252  } else {
253  set<string>::iterator iter = _boolAttrib.find(name) ;
254  if (iter != _boolAttrib.end()) {
255  _boolAttrib.erase(iter) ;
256  }
257 
258  }
259 
260 }
261 
262 
263 ////////////////////////////////////////////////////////////////////////////////
264 /// Check if a named attribute is set. By default, all attributes are unset.
265 
267 {
268  return (_boolAttrib.find(name) != _boolAttrib.end()) ;
269 }
270 
271 
272 ////////////////////////////////////////////////////////////////////////////////
273 /// Associate string 'value' to this object under key 'key'
274 
275 void RooAbsArg::setStringAttribute(const Text_t* key, const Text_t* value)
276 {
277  if (value) {
278  _stringAttrib[key] = value ;
279  } else {
280  if (_stringAttrib.find(key)!=_stringAttrib.end()) {
281  _stringAttrib.erase(key) ;
282  }
283  }
284 }
285 
286 ////////////////////////////////////////////////////////////////////////////////
287 /// Get string attribute mapped under key 'key'. Returns null pointer
288 /// if no attribute exists under that key
289 
291 {
292  map<string,string>::const_iterator iter = _stringAttrib.find(key) ;
293  if (iter!=_stringAttrib.end()) {
294  return iter->second.c_str() ;
295  } else {
296  return 0 ;
297  }
298 }
299 
300 
301 ////////////////////////////////////////////////////////////////////////////////
302 /// Set (default) or clear a named boolean attribute of this object.
303 
305 {
306  if (value) {
307 
308  _boolAttribTransient.insert(name) ;
309 
310  } else {
311 
312  set<string>::iterator iter = _boolAttribTransient.find(name) ;
313  if (iter != _boolAttribTransient.end()) {
314  _boolAttribTransient.erase(iter) ;
315  }
316 
317  }
318 
319 }
320 
321 
322 ////////////////////////////////////////////////////////////////////////////////
323 /// Check if a named attribute is set. By default, all attributes
324 /// are unset.
325 
327 {
328  return (_boolAttribTransient.find(name) != _boolAttribTransient.end()) ;
329 }
330 
331 
332 
333 
334 ////////////////////////////////////////////////////////////////////////////////
335 /// Register another RooAbsArg as a server to us, ie, declare that
336 /// we depend on it. In addition to the basic client-server relationship,
337 /// we can declare dependence on the server's value and/or shape.
338 
339 void RooAbsArg::addServer(RooAbsArg& server, Bool_t valueProp, Bool_t shapeProp)
340 {
342  cxcoutF(LinkStateMgmt) << "RooAbsArg::addServer(" << this << "," << GetName()
343  << "): PROHIBITED SERVER ADDITION REQUESTED: adding server " << server.GetName()
344  << "(" << &server << ") for " << (valueProp?"value ":"") << (shapeProp?"shape":"") << endl ;
345  assert(0) ;
346  }
347 
348  cxcoutD(LinkStateMgmt) << "RooAbsArg::addServer(" << this << "," << GetName() << "): adding server " << server.GetName()
349  << "(" << &server << ") for " << (valueProp?"value ":"") << (shapeProp?"shape":"") << endl ;
350 
351  if (server.operMode()==ADirty && operMode()!=ADirty && valueProp) {
353  }
354 
355 
356  // LM: use hash tables for larger lists
358  if (server._clientList.GetSize() > 999 && server._clientList.getHashTableSize() == 0) server._clientList.setHashTableSize(1000);
359  if (server._clientListValue.GetSize() > 999 && server._clientListValue.getHashTableSize() == 0) server._clientListValue.setHashTableSize(1000);
360 
361  // Add server link to given server
362  _serverList.Add(&server) ;
363 
364  server._clientList.Add(this) ;
365  if (valueProp) server._clientListValue.Add(this) ;
366  if (shapeProp) server._clientListShape.Add(this) ;
367 }
368 
369 
370 
371 ////////////////////////////////////////////////////////////////////////////////
372 /// Register a list of RooAbsArg as servers to us by calls
373 /// addServer() for each arg in the list
374 
375 void RooAbsArg::addServerList(RooAbsCollection& serverList, Bool_t valueProp, Bool_t shapeProp)
376 {
377  RooAbsArg* arg ;
378  RooFIter iter = serverList.fwdIterator() ;
379  while ((arg=iter.next())) {
380  addServer(*arg,valueProp,shapeProp) ;
381  }
382 }
383 
384 
385 
386 ////////////////////////////////////////////////////////////////////////////////
387 /// Unregister another RooAbsArg as a server to us, ie, declare that
388 /// we no longer depend on its value and shape.
389 
391 {
393  cxcoutF(LinkStateMgmt) << "RooAbsArg::addServer(" << this << "," << GetName() << "): PROHIBITED SERVER REMOVAL REQUESTED: removing server "
394  << server.GetName() << "(" << &server << ")" << endl ;
395  assert(0) ;
396  }
397 
398  if (_verboseDirty) {
399  cxcoutD(LinkStateMgmt) << "RooAbsArg::removeServer(" << GetName() << "): removing server "
400  << server.GetName() << "(" << &server << ")" << endl ;
401  }
402 
403  // Remove server link to given server
404  if (!force) {
405  _serverList.Remove(&server) ;
406 
407  server._clientList.Remove(this) ;
408  server._clientListValue.Remove(this) ;
409  server._clientListShape.Remove(this) ;
410  } else {
411  _serverList.RemoveAll(&server) ;
412 
413  server._clientList.RemoveAll(this) ;
414  server._clientListValue.RemoveAll(this) ;
415  server._clientListShape.RemoveAll(this) ;
416  }
417 }
418 
419 
420 ////////////////////////////////////////////////////////////////////////////////
421 /// Replace 'oldServer' with 'newServer'
422 
423 void RooAbsArg::replaceServer(RooAbsArg& oldServer, RooAbsArg& newServer, Bool_t propValue, Bool_t propShape)
424 {
425  Int_t count = _serverList.refCount(&oldServer);
426  removeServer(oldServer, kTRUE);
427  while (count--) {
428  addServer(newServer, propValue, propShape);
429  }
430 }
431 
432 
433 ////////////////////////////////////////////////////////////////////////////////
434 /// Change dirty flag propagation mask for specified server
435 
436 void RooAbsArg::changeServer(RooAbsArg& server, Bool_t valueProp, Bool_t shapeProp)
437 {
438  if (!_serverList.findArg(&server)) {
439  coutE(LinkStateMgmt) << "RooAbsArg::changeServer(" << GetName() << "): Server "
440  << server.GetName() << " not registered" << endl ;
441  return ;
442  }
443 
444  // This condition should not happen, but check anyway
445  if (!server._clientList.findArg(this)) {
446  coutE(LinkStateMgmt) << "RooAbsArg::changeServer(" << GetName() << "): Server "
447  << server.GetName() << " doesn't have us registered as client" << endl ;
448  return ;
449  }
450 
451  // Remove all propagation links, then reinstall requested ones ;
452  Int_t vcount = server._clientListValue.refCount(this) ;
453  Int_t scount = server._clientListShape.refCount(this) ;
454  server._clientListValue.RemoveAll(this) ;
455  server._clientListShape.RemoveAll(this) ;
456  if (valueProp) {
457  server._clientListValue.Add(this, vcount) ;
458  }
459  if (shapeProp) {
460  server._clientListShape.Add(this, scount) ;
461  }
462 }
463 
464 
465 
466 ////////////////////////////////////////////////////////////////////////////////
467 /// Fill supplied list with all leaf nodes of the arg tree, starting with
468 /// ourself as top node. A leaf node is node that has no servers declared.
469 
470 void RooAbsArg::leafNodeServerList(RooAbsCollection* list, const RooAbsArg* arg, Bool_t recurseNonDerived) const
471 {
472  treeNodeServerList(list,arg,kFALSE,kTRUE,kFALSE,recurseNonDerived) ;
473 }
474 
475 
476 
477 ////////////////////////////////////////////////////////////////////////////////
478 /// Fill supplied list with all branch nodes of the arg tree starting with
479 /// ourself as top node. A branch node is node that has one or more servers declared.
480 
481 void RooAbsArg::branchNodeServerList(RooAbsCollection* list, const RooAbsArg* arg, Bool_t recurseNonDerived) const
482 {
483  treeNodeServerList(list,arg,kTRUE,kFALSE,kFALSE,recurseNonDerived) ;
484 }
485 
486 
487 ////////////////////////////////////////////////////////////////////////////////
488 /// Fill supplied list with nodes of the arg tree, following all server links,
489 /// starting with ourself as top node.
490 
491 void RooAbsArg::treeNodeServerList(RooAbsCollection* list, const RooAbsArg* arg, Bool_t doBranch, Bool_t doLeaf, Bool_t valueOnly, Bool_t recurseFundamental) const
492 {
493 // if (arg==0) {
494 // cout << "treeNodeServerList(" << GetName() << ") doBranch=" << (doBranch?"T":"F") << " doLeaf = " << (doLeaf?"T":"F") << " valueOnly=" << (valueOnly?"T":"F") << endl ;
495 // }
496 
497  if (!arg) {
498 // if (list->getHashTableSize()==0) {
499 // list->setHashTableSize(1000) ;
500 // }
501  arg=this ;
502  }
503 
504  // Decide if to add current node
505  if ((doBranch&&doLeaf) ||
506  (doBranch&&arg->isDerived()) ||
507  (doLeaf&&arg->isFundamental()&&(!(recurseFundamental&&arg->isDerived()))) ||
508  (doLeaf && !arg->isFundamental() && !arg->isDerived())) {
509 
510  list->add(*arg,kTRUE) ;
511  }
512 
513  // Recurse if current node is derived
514  if (arg->isDerived() && (!arg->isFundamental() || recurseFundamental)) {
515  RooAbsArg* server ;
516  RooFIter sIter = arg->serverMIterator() ;
517  while ((server=sIter.next())) {
518 
519  // Skip non-value server nodes if requested
520  Bool_t isValueSrv = server->_clientListValue.findArg(arg)?kTRUE:kFALSE ;
521  if (valueOnly && !isValueSrv) {
522  continue ;
523  }
524  treeNodeServerList(list,server,doBranch,doLeaf,valueOnly,recurseFundamental) ;
525  }
526  }
527 }
528 
529 
530 ////////////////////////////////////////////////////////////////////////////////
531 /// Create a list of leaf nodes in the arg tree starting with
532 /// ourself as top node that don't match any of the names of the variable list
533 /// of the supplied data set (the dependents). The caller of this
534 /// function is responsible for deleting the returned argset.
535 /// The complement of this function is getObservables()
536 
537 RooArgSet* RooAbsArg::getParameters(const RooAbsData* set, Bool_t stripDisconnected) const
538 {
539  return getParameters(set?set->get():0,stripDisconnected) ;
540 }
541 
542 
543 ////////////////////////////////////////////////////////////////////////////////
544 /// INTERNAL helper function for getParameters()
545 
546 void RooAbsArg::addParameters(RooArgSet& params, const RooArgSet* nset,Bool_t stripDisconnected) const
547 {
548  // INTERNAL helper function for getParameters()
549  RooFIter siter = serverMIterator() ;
550  RooAbsArg* server ;
551 
552  RooArgSet nodeParamServers ;
553  RooArgSet nodeBranchServers ;
554  while((server=siter.next())) {
555  if (server->isValueServer(*this)) {
556  if (server->isFundamental()) {
557  if (!nset || !server->dependsOn(*nset)) {
558  nodeParamServers.add(*server) ;
559  }
560  } else {
561  nodeBranchServers.add(*server) ;
562  }
563  }
564  }
565 
566  // Allow pdf to strip parameters from list before adding it
567  getParametersHook(nset,&nodeParamServers,stripDisconnected) ;
568 
569  // Add parameters of this node to the combined list
570  params.add(nodeParamServers,kTRUE) ;
571 
572  // Now recurse into branch servers
573  RooFIter biter = nodeBranchServers.fwdIterator() ;
574  while((server=biter.next())) {
575  server->addParameters(params,nset) ;
576  }
577 }
578 
579 
580 ////////////////////////////////////////////////////////////////////////////////
581 /// Create a list of leaf nodes in the arg tree starting with
582 /// ourself as top node that don't match any of the names the args in the
583 /// supplied argset. The caller of this function is responsible
584 /// for deleting the returned argset. The complement of this function
585 /// is getObservables()
586 
587 RooArgSet* RooAbsArg::getParameters(const RooArgSet* nset, Bool_t stripDisconnected) const
588 {
589 
590  // Check for cached parameter set
591  if (_myws) {
592  RooNameSet nsetObs(nset ? *nset : RooArgSet());
593  const RooArgSet *paramSet = _myws->set(Form("CACHE_PARAMS_OF_PDF_%s_FOR_OBS_%s", GetName(), nsetObs.content()));
594  if (paramSet) {
595  // cout << " restoring parameter cache from workspace for pdf " << IsA()->GetName() << "::" << GetName() <<
596  // endl ;
597  return new RooArgSet(*paramSet);
598  }
599  }
600 
601  RooArgSet *parList = new RooArgSet("parameters");
602 
603  addParameters(*parList, nset, stripDisconnected);
604 
605  parList->sort();
606 
607  // Cache parameter set
608  if (_myws && parList->getSize() > 10) {
609  RooNameSet nsetObs(nset ? *nset : RooArgSet());
610  _myws->defineSetInternal(Form("CACHE_PARAMS_OF_PDF_%s_FOR_OBS_%s", GetName(), nsetObs.content()), *parList);
611  // cout << " caching parameters in workspace for pdf " << IsA()->GetName() << "::" << GetName() << endl ;
612  }
613 
614  return parList;
615 }
616 
617 
618 
619 ////////////////////////////////////////////////////////////////////////////////
620 /// Create a list of leaf nodes in the arg tree starting with
621 /// ourself as top node that match any of the names of the variable list
622 /// of the supplied data set (the dependents). The caller of this
623 /// function is responsible for deleting the returned argset.
624 /// The complement of this function is getObservables()
625 
627 {
628  if (!set) return new RooArgSet ;
629 
630  return getObservables(set->get()) ;
631 }
632 
633 
634 ////////////////////////////////////////////////////////////////////////////////
635 /// Create a list of leaf nodes in the arg tree starting with
636 /// ourself as top node that match any of the names the args in the
637 /// supplied argset. The caller of this function is responsible
638 /// for deleting the returned argset. The complement of this function
639 /// is getObservables()
640 
641 RooArgSet* RooAbsArg::getObservables(const RooArgSet* dataList, Bool_t valueOnly) const
642 {
643  //cout << "RooAbsArg::getObservables(" << GetName() << ")" << endl ;
644 
645  RooArgSet* depList = new RooArgSet("dependents") ;
646  if (!dataList) return depList ;
647 
648  // Make iterator over tree leaf node list
649  RooArgSet leafList("leafNodeServerList") ;
650  treeNodeServerList(&leafList,0,kFALSE,kTRUE,valueOnly) ;
651  //leafNodeServerList(&leafList) ;
652  RooFIter sIter = leafList.fwdIterator() ;
653 
654  RooAbsArg* arg ;
655  if (valueOnly) {
656  while ((arg=sIter.next())) {
657  if (arg->dependsOnValue(*dataList) && arg->isLValue()) {
658  depList->add(*arg) ;
659  }
660  }
661  } else {
662  while ((arg=sIter.next())) {
663  if (arg->dependsOn(*dataList) && arg->isLValue()) {
664  depList->add(*arg) ;
665  }
666  }
667  }
668  //delete sIter ;
669 
670 // // Call hook function for all branch nodes
671 // RooArgSet branchList ;
672 // branchNodeServerList(&branchList) ;
673 // RooAbsArg* branch ;
674 // RooLinkedListIter bIter = branchList.iterator() ;
675 // while((branch=(RooAbsArg*)bIter.Next())) {
676 // branch->getObservablesHook(dataList, depList) ;
677 // }
678 // //delete bIter ;
679 
680  return depList ;
681 }
682 
683 
685 {
686  // Return a RooArgSet with all component (branch nodes) of the
687  // expression tree headed by this object
688 
689  TString name(GetName()) ;
690  name.Append("_components") ;
691 
692  RooArgSet* set = new RooArgSet(name) ;
693  branchNodeServerList(set) ;
694 
695  return set ;
696 }
697 
698 
699 
700 ////////////////////////////////////////////////////////////////////////////////
701 /// Overloadable function in which derived classes can implement
702 /// consistency checks of the variables. If this function returns
703 /// true, indicating an error, the fitter or generator will abort.
704 
706 {
707  return kFALSE ;
708 }
709 
710 
711 ////////////////////////////////////////////////////////////////////////////////
712 /// Recursively call checkObservables on all nodes in the expression tree
713 
715 {
716  RooArgSet nodeList ;
717  treeNodeServerList(&nodeList) ;
718  RooFIter iter = nodeList.fwdIterator() ;
719 
720  RooAbsArg* arg ;
721  Bool_t ret(kFALSE) ;
722  while((arg=iter.next())) {
723  if (arg->getAttribute("ServerDied")) {
724  coutE(LinkStateMgmt) << "RooAbsArg::recursiveCheckObservables(" << GetName() << "): ERROR: one or more servers of node "
725  << arg->GetName() << " no longer exists!" << endl ;
726  arg->Print("v") ;
727  ret = kTRUE ;
728  }
729  ret |= arg->checkObservables(nset) ;
730  }
731 
732  return ret ;
733 }
734 
735 
736 ////////////////////////////////////////////////////////////////////////////////
737 /// Test whether we depend on (ie, are served by) any object in the
738 /// specified collection. Uses the dependsOn(RooAbsArg&) member function.
739 
740 Bool_t RooAbsArg::dependsOn(const RooAbsCollection& serverList, const RooAbsArg* ignoreArg, Bool_t valueOnly) const
741 {
742  // Test whether we depend on (ie, are served by) any object in the
743  // specified collection. Uses the dependsOn(RooAbsArg&) member function.
744 
745  RooFIter sIter = serverList.fwdIterator();
746  RooAbsArg* server ;
747  while ((server=sIter.next())) {
748  if (dependsOn(*server,ignoreArg,valueOnly)) {
749  return kTRUE;
750  }
751  }
752  return kFALSE;
753 }
754 
755 
756 ////////////////////////////////////////////////////////////////////////////////
757 /// Test whether we depend on (ie, are served by) the specified object.
758 /// Note that RooAbsArg objects are considered equivalent if they have
759 /// the same name.
760 
761 Bool_t RooAbsArg::dependsOn(const RooAbsArg& testArg, const RooAbsArg* ignoreArg, Bool_t valueOnly) const
762 {
763  if (this==ignoreArg) return kFALSE ;
764 
765  // First check if testArg is self
766  //if (!TString(testArg.GetName()).CompareTo(GetName())) return kTRUE ;
767  if (testArg.namePtr()==namePtr()) return kTRUE ;
768 
769 
770  // Next test direct dependence
771  RooAbsArg* server = findServer(testArg) ;
772  if (server!=0) {
773 
774  // Return true if valueOnly is FALSE or if server is value server, otherwise keep looking
775  if ( !valueOnly || server->isValueServer(*this)) {
776  return kTRUE ;
777  }
778  }
779 
780  // If not, recurse
781  RooFIter sIter = serverMIterator() ;
782  while ((server=sIter.next())) {
783 
784  if ( !valueOnly || server->isValueServer(*this)) {
785  if (server->dependsOn(testArg,ignoreArg,valueOnly)) {
786  return kTRUE ;
787  }
788  }
789  }
790 
791  return kFALSE ;
792 }
793 
794 
795 
796 ////////////////////////////////////////////////////////////////////////////////
797 /// Test if any of the nodes of tree are shared with that of the given tree
798 
799 Bool_t RooAbsArg::overlaps(const RooAbsArg& testArg, Bool_t valueOnly) const
800 {
801  RooArgSet list("treeNodeList") ;
802  treeNodeServerList(&list) ;
803 
804  return valueOnly ? testArg.dependsOnValue(list) : testArg.dependsOn(list) ;
805 }
806 
807 
808 
809 ////////////////////////////////////////////////////////////////////////////////
810 /// Test if any of the dependents of the arg tree (as determined by getObservables)
811 /// overlaps with those of the testArg.
812 
813 Bool_t RooAbsArg::observableOverlaps(const RooAbsData* dset, const RooAbsArg& testArg) const
814 {
815  return observableOverlaps(dset->get(),testArg) ;
816 }
817 
818 
819 ////////////////////////////////////////////////////////////////////////////////
820 /// Test if any of the dependents of the arg tree (as determined by getObservables)
821 /// overlaps with those of the testArg.
822 
823 Bool_t RooAbsArg::observableOverlaps(const RooArgSet* nset, const RooAbsArg& testArg) const
824 {
825  RooArgSet* depList = getObservables(nset) ;
826  Bool_t ret = testArg.dependsOn(*depList) ;
827  delete depList ;
828  return ret ;
829 }
830 
831 
832 
833 ////////////////////////////////////////////////////////////////////////////////
834 /// Mark this object as having changed its value, and propagate this status
835 /// change to all of our clients. If the object is not in automatic dirty
836 /// state propagation mode, this call has no effect
837 
838 void RooAbsArg::setValueDirty(const RooAbsArg* source) const
839 {
840  if (_operMode!=Auto || _inhibitDirty) return ;
841 
842  // Handle no-propagation scenarios first
843  if (_clientListValue.GetSize()==0) {
844  _valueDirty = kTRUE ;
845  return ;
846  }
847 
848  // Cyclical dependency interception
849  if (source==0) {
850  source=this ;
851  } else if (source==this) {
852  // Cyclical dependency, abort
853  coutE(LinkStateMgmt) << "RooAbsArg::setValueDirty(" << GetName()
854  << "): cyclical dependency detected, source = " << source->GetName() << endl ;
855  //assert(0) ;
856  return ;
857  }
858 
859  // Propagate dirty flag to all clients if this is a down->up transition
860  if (_verboseDirty) {
861  cxcoutD(LinkStateMgmt) << "RooAbsArg::setValueDirty(" << (source?source->GetName():"self") << "->" << GetName() << "," << this
862  << "): dirty flag " << (_valueDirty?"already ":"") << "raised" << endl ;
863  }
864 
865  _valueDirty = kTRUE ;
866 
867 
868  RooFIter clientValueIter = _clientListValue.fwdIterator() ;
869  RooAbsArg* client ;
870  while ((client=clientValueIter.next())) {
871  client->setValueDirty(source) ;
872  }
873 
874 
875 }
876 
877 
878 ////////////////////////////////////////////////////////////////////////////////
879 /// Mark this object as having changed its shape, and propagate this status
880 /// change to all of our clients.
881 
882 void RooAbsArg::setShapeDirty(const RooAbsArg* source) const
883 {
884  if (_verboseDirty) {
885  cxcoutD(LinkStateMgmt) << "RooAbsArg::setShapeDirty(" << GetName()
886  << "): dirty flag " << (_shapeDirty?"already ":"") << "raised" << endl ;
887  }
888 
889  if (_clientListShape.GetSize()==0) {
890  _shapeDirty = kTRUE ;
891  return ;
892  }
893 
894  // Set 'dirty' shape state for this object and propagate flag to all its clients
895  if (source==0) {
896  source=this ;
897  } else if (source==this) {
898  // Cyclical dependency, abort
899  coutE(LinkStateMgmt) << "RooAbsArg::setShapeDirty(" << GetName()
900  << "): cyclical dependency detected" << endl ;
901  return ;
902  }
903 
904  // Propagate dirty flag to all clients if this is a down->up transition
906 
907  RooFIter clientShapeIter = _clientListShape.fwdIterator() ;
908  RooAbsArg* client ;
909  while ((client=clientShapeIter.next())) {
910  client->setShapeDirty(source) ;
911  client->setValueDirty(source) ;
912  }
913 
914 }
915 
916 
917 
918 ////////////////////////////////////////////////////////////////////////////////
919 /// Substitute our servers with those listed in newSet. If nameChange is false, servers and
920 /// and substitutes are matched by name. If nameChange is true, servers are matched to args
921 /// in newSet that have the 'ORIGNAME:<servername>' attribute set. If mustReplaceAll is set,
922 /// a warning is printed and error status is returned if not all servers could be sucessfully
923 /// substituted.
924 
925 Bool_t RooAbsArg::redirectServers(const RooAbsCollection& newSetOrig, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursionStep)
926 {
927  // Trivial case, no servers
928  if (!_serverList.First()) return kFALSE ;
929  if (newSetOrig.getSize()==0) return kFALSE ;
930 
931  // Strip any non-matchin removal nodes from newSetOrig
932  RooAbsCollection* newSet ;
933 
934  if (nameChange) {
935 
936  newSet = new RooArgSet ;
937  RooFIter iter = newSetOrig.fwdIterator() ;
938  RooAbsArg* arg ;
939  while((arg=iter.next())) {
940 
941  if (string("REMOVAL_DUMMY")==arg->GetName()) {
942 
943  if (arg->getAttribute("REMOVE_ALL")) {
944 // cout << "RooAbsArg::redir including remove_all node " << arg->GetName() << endl ;
945  newSet->add(*arg) ;
946  } else if (arg->getAttribute(Form("REMOVE_FROM_%s",getStringAttribute("ORIGNAME")))) {
947 // cout << "RooAbsArg::redir including remove_from_" << GetName() << " node " << arg->GetName() << endl ;
948  newSet->add(*arg) ;
949  }
950  } else {
951  newSet->add(*arg) ;
952  }
953  }
954 
955 // cout << "RooAbsArg::redirect with name change(" << GetName() << ") newSet = " << newSet << " origSet = " << newSetOrig << endl ;
956 
957  } else {
958  newSet = (RooAbsCollection*) &newSetOrig ;
959  }
960 
961  // Replace current servers with new servers with the same name from the given list
962  Bool_t ret(kFALSE) ;
963 
964  //Copy original server list to not confuse the iterator while deleting
965  RooLinkedList origServerList, origServerValue, origServerShape ;
966  RooAbsArg *oldServer, *newServer ;
967  RooFIter sIter = _serverList.fwdIterator() ;
968  while ((oldServer=sIter.next())) {
969  origServerList.Add(oldServer) ;
970 
971  // Retrieve server side link state information
972  if (oldServer->_clientListValue.findArg(this)) {
973  origServerValue.Add(oldServer) ;
974  }
975  if (oldServer->_clientListShape.findArg(this)) {
976  origServerShape.Add(oldServer) ;
977  }
978  }
979 
980  // Delete all previously registered servers
981  sIter = origServerList.fwdIterator() ;
982  Bool_t propValue, propShape ;
983  while ((oldServer=sIter.next())) {
984 
985  newServer= oldServer->findNewServer(*newSet, nameChange);
986 
987  if (newServer && _verboseDirty) {
988  cxcoutD(LinkStateMgmt) << "RooAbsArg::redirectServers(" << (void*)this << "," << GetName() << "): server " << oldServer->GetName()
989  << " redirected from " << oldServer << " to " << newServer << endl ;
990  }
991 
992  if (!newServer) {
993  if (mustReplaceAll) {
994  cxcoutD(LinkStateMgmt) << "RooAbsArg::redirectServers(" << (void*)this << "," << GetName() << "): server " << oldServer->GetName()
995  << " (" << (void*)oldServer << ") not redirected" << (nameChange?"[nameChange]":"") << endl ;
996  ret = kTRUE ;
997  }
998  continue ;
999  }
1000 
1001  propValue=origServerValue.findArg(oldServer)?kTRUE:kFALSE ;
1002  propShape=origServerShape.findArg(oldServer)?kTRUE:kFALSE ;
1003  // cout << "replaceServer with name " << oldServer->GetName() << " old=" << oldServer << " new=" << newServer << endl ;
1004  if (newServer != this) {
1005  replaceServer(*oldServer,*newServer,propValue,propShape) ;
1006  }
1007  }
1008 
1009 
1010  setValueDirty() ;
1011  setShapeDirty() ;
1012 
1013  // Process the proxies
1014  Bool_t allReplaced=kTRUE ;
1015  for (int i=0 ; i<numProxies() ; i++) {
1016  RooAbsProxy* p = getProxy(i) ;
1017  if (!p) continue ;
1018  Bool_t ret2 = p->changePointer(*newSet,nameChange,kFALSE) ;
1019  allReplaced &= ret2 ;
1020  }
1021 
1022  if (mustReplaceAll && !allReplaced) {
1023  coutE(LinkStateMgmt) << "RooAbsArg::redirectServers(" << GetName()
1024  << "): ERROR, some proxies could not be adjusted" << endl ;
1025  ret = kTRUE ;
1026  }
1027 
1028  // Optional subclass post-processing
1029  for (Int_t i=0 ;i<numCaches() ; i++) {
1030  ret |= getCache(i)->redirectServersHook(*newSet,mustReplaceAll,nameChange,isRecursionStep) ;
1031  }
1032  ret |= redirectServersHook(*newSet,mustReplaceAll,nameChange,isRecursionStep) ;
1033 
1034  if (nameChange) {
1035  delete newSet ;
1036  }
1037 
1038  return ret ;
1039 }
1040 
1041 ////////////////////////////////////////////////////////////////////////////////
1042 /// Find the new server in the specified set that matches the old server.
1043 /// Allow a name change if nameChange is kTRUE, in which case the new
1044 /// server is selected by searching for a new server with an attribute
1045 /// of "ORIGNAME:<oldName>". Return zero if there is not a unique match.
1046 
1048 {
1049  RooAbsArg *newServer = 0;
1050  if (!nameChange) {
1051  newServer = newSet.find(*this) ;
1052  }
1053  else {
1054  // Name changing server redirect:
1055  // use 'ORIGNAME:<oldName>' attribute instead of name of new server
1056  TString nameAttrib("ORIGNAME:") ;
1057  nameAttrib.Append(GetName()) ;
1058 
1059  RooArgSet* tmp = (RooArgSet*) newSet.selectByAttrib(nameAttrib,kTRUE) ;
1060  if(0 != tmp) {
1061 
1062  // Check if any match was found
1063  if (tmp->getSize()==0) {
1064  delete tmp ;
1065  return 0 ;
1066  }
1067 
1068  // Check if match is unique
1069  if(tmp->getSize()>1) {
1070  coutF(LinkStateMgmt) << "RooAbsArg::redirectServers(" << GetName() << "): FATAL Error, " << tmp->getSize() << " servers with "
1071  << nameAttrib << " attribute" << endl ;
1072  tmp->Print("v") ;
1073  assert(0) ;
1074  }
1075 
1076  // use the unique element in the set
1077  newServer= tmp->first();
1078  delete tmp ;
1079  }
1080  }
1081  return newServer;
1082 }
1083 
1084 Bool_t RooAbsArg::recursiveRedirectServers(const RooAbsCollection& newSet, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t recurseInNewSet)
1085 {
1086  // Recursively redirect all servers with new server in collection 'newSet'.
1087  // Substitute our servers with those listed in newSet. If nameChange is false, servers and
1088  // and substitutes are matched by name. If nameChange is true, servers are matched to args
1089  // in newSet that have the 'ORIGNAME:<servername>' attribute set. If mustReplaceAll is set,
1090  // a warning is printed and error status is returned if not all servers could be sucessfully
1091  // substituted. If recurseInNewSet is true, the recursion algorithm also recursion into
1092  // expression trees under the arguments in the new servers (i.e. those in newset)
1093 
1094 
1095  // Cyclic recursion protection
1096  static std::set<const RooAbsArg*> callStack;
1097  {
1098  std::set<const RooAbsArg*>::iterator it = callStack.lower_bound(this);
1099  if (it != callStack.end() && this == *it) {
1100  return kFALSE;
1101  } else {
1102  callStack.insert(it, this);
1103  }
1104  }
1105 
1106  // Do not recurse into newset if not so specified
1107 // if (!recurseInNewSet && newSet.contains(*this)) {
1108 // return kFALSE ;
1109 // }
1110 
1111 
1112  // Apply the redirectServers function recursively on all branch nodes in this argument tree.
1113  Bool_t ret(kFALSE) ;
1114 
1115  cxcoutD(LinkStateMgmt) << "RooAbsArg::recursiveRedirectServers(" << this << "," << GetName() << ") newSet = " << newSet << " mustReplaceAll = "
1116  << (mustReplaceAll?"T":"F") << " nameChange = " << (nameChange?"T":"F") << " recurseInNewSet = " << (recurseInNewSet?"T":"F") << endl ;
1117 
1118  // Do redirect on self (identify operation as recursion step)
1119  ret |= redirectServers(newSet,mustReplaceAll,nameChange,kTRUE) ;
1120 
1121  // Do redirect on servers
1122  RooFIter sIter = serverMIterator() ;
1123  RooAbsArg* server ;
1124  while((server=sIter.next())) {
1125  ret |= server->recursiveRedirectServers(newSet,mustReplaceAll,nameChange,recurseInNewSet) ;
1126  }
1127 
1128  callStack.erase(this);
1129  return ret ;
1130 }
1131 
1132 
1133 
1134 ////////////////////////////////////////////////////////////////////////////////
1135 /// Register an RooArgProxy in the proxy list. This function is called by owned
1136 /// proxies upon creation. After registration, this arg wil forward pointer
1137 /// changes from serverRedirects and updates in cached normalization sets
1138 /// to the proxies immediately after they occur. The proxied argument is
1139 /// also added as value and/or shape server
1140 
1142 {
1143  // Every proxy can be registered only once
1144  if (_proxyList.FindObject(&proxy)) {
1145  coutE(LinkStateMgmt) << "RooAbsArg::registerProxy(" << GetName() << "): proxy named "
1146  << proxy.GetName() << " for arg " << proxy.absArg()->GetName()
1147  << " already registered" << endl ;
1148  return ;
1149  }
1150 
1151 // cout << (void*)this << " " << GetName() << ": registering proxy "
1152 // << (void*)&proxy << " with name " << proxy.name() << " in mode "
1153 // << (proxy.isValueServer()?"V":"-") << (proxy.isShapeServer()?"S":"-") << endl ;
1154 
1155  // Register proxied object as server
1156  if (proxy.absArg()) {
1157  addServer(*proxy.absArg(),proxy.isValueServer(),proxy.isShapeServer()) ;
1158  }
1159 
1160  // Register proxy itself
1161  _proxyList.Add(&proxy) ;
1162 }
1163 
1164 
1165 ////////////////////////////////////////////////////////////////////////////////
1166 /// Remove proxy from proxy list. This functions is called by owned proxies
1167 /// upon their destruction.
1168 
1170 {
1171  _proxyList.Remove(&proxy) ;
1172  _proxyList.Compress() ;
1173 }
1174 
1175 
1176 
1177 ////////////////////////////////////////////////////////////////////////////////
1178 /// Register an RooSetProxy in the proxy list. This function is called by owned
1179 /// proxies upon creation. After registration, this arg wil forward pointer
1180 /// changes from serverRedirects and updates in cached normalization sets
1181 /// to the proxies immediately after they occur.
1182 
1184 {
1185  // Every proxy can be registered only once
1186  if (_proxyList.FindObject(&proxy)) {
1187  coutE(LinkStateMgmt) << "RooAbsArg::registerProxy(" << GetName() << "): proxy named "
1188  << proxy.GetName() << " already registered" << endl ;
1189  return ;
1190  }
1191 
1192  // Register proxy itself
1193  _proxyList.Add(&proxy) ;
1194 }
1195 
1196 
1197 
1198 ////////////////////////////////////////////////////////////////////////////////
1199 /// Remove proxy from proxy list. This functions is called by owned proxies
1200 /// upon their destruction.
1201 
1203 {
1204  _proxyList.Remove(&proxy) ;
1205  _proxyList.Compress() ;
1206 }
1207 
1208 
1209 
1210 ////////////////////////////////////////////////////////////////////////////////
1211 /// Register an RooListProxy in the proxy list. This function is called by owned
1212 /// proxies upon creation. After registration, this arg wil forward pointer
1213 /// changes from serverRedirects and updates in cached normalization sets
1214 /// to the proxies immediately after they occur.
1215 
1217 {
1218  // Every proxy can be registered only once
1219  if (_proxyList.FindObject(&proxy)) {
1220  coutE(LinkStateMgmt) << "RooAbsArg::registerProxy(" << GetName() << "): proxy named "
1221  << proxy.GetName() << " already registered" << endl ;
1222  return ;
1223  }
1224 
1225  // Register proxy itself
1226  Int_t nProxyOld = _proxyList.GetEntries() ;
1227  _proxyList.Add(&proxy) ;
1228  if (_proxyList.GetEntries()!=nProxyOld+1) {
1229  cout << "RooAbsArg::registerProxy(" << GetName() << ") proxy registration failure! nold=" << nProxyOld << " nnew=" << _proxyList.GetEntries() << endl ;
1230  }
1231 }
1232 
1233 
1234 
1235 ////////////////////////////////////////////////////////////////////////////////
1236 /// Remove proxy from proxy list. This functions is called by owned proxies
1237 /// upon their destruction.
1238 
1240 {
1241  _proxyList.Remove(&proxy) ;
1242  _proxyList.Compress() ;
1243 }
1244 
1245 
1246 
1247 ////////////////////////////////////////////////////////////////////////////////
1248 /// Return the nth proxy from the proxy list.
1249 
1251 {
1252  // Cross cast: proxy list returns TObject base pointer, we need
1253  // a RooAbsProxy base pointer. C++ standard requires
1254  // a dynamic_cast for this.
1255  return dynamic_cast<RooAbsProxy*> (_proxyList.At(index)) ;
1256 }
1257 
1258 
1259 
1260 ////////////////////////////////////////////////////////////////////////////////
1261 /// Return the number of registered proxies.
1262 
1264 {
1265  return _proxyList.GetEntriesFast();
1266 }
1267 
1268 
1269 
1270 ////////////////////////////////////////////////////////////////////////////////
1271 /// Forward a change in the cached normalization argset
1272 /// to all the registered proxies.
1273 
1275 {
1276  for (int i=0 ; i<numProxies() ; i++) {
1277  RooAbsProxy* p = getProxy(i) ;
1278  if (!p) continue ;
1279  getProxy(i)->changeNormSet(nset) ;
1280  }
1281 }
1282 
1283 
1284 
1285 ////////////////////////////////////////////////////////////////////////////////
1286 /// Overloadable function for derived classes to implement
1287 /// attachment as branch to a TTree
1288 
1290 {
1291  coutE(Contents) << "RooAbsArg::attachToTree(" << GetName()
1292  << "): Cannot be attached to a TTree" << endl ;
1293 }
1294 
1295 
1296 
1297 ////////////////////////////////////////////////////////////////////////////////
1298 /// WVE (08/21/01) Probably obsolete now
1299 
1301 {
1302  return kTRUE ;
1303 }
1304 
1305 
1306 
1307 
1308 ////////////////////////////////////////////////////////////////////////////////
1309 /// Print object name
1310 
1311 void RooAbsArg::printName(ostream& os) const
1312 {
1313  os << GetName() ;
1314 }
1315 
1316 
1317 
1318 ////////////////////////////////////////////////////////////////////////////////
1319 /// Print object title
1320 
1321 void RooAbsArg::printTitle(ostream& os) const
1322 {
1323  os << GetTitle() ;
1324 }
1325 
1326 
1327 
1328 ////////////////////////////////////////////////////////////////////////////////
1329 /// Print object class name
1330 
1331 void RooAbsArg::printClassName(ostream& os) const
1332 {
1333  os << IsA()->GetName() ;
1334 }
1335 
1336 
1337 void RooAbsArg::printAddress(ostream& os) const
1338 {
1339  // Print addrss of this RooAbsArg
1340  os << this ;
1341 }
1342 
1343 
1344 
1345 ////////////////////////////////////////////////////////////////////////////////
1346 /// Print object arguments, ie its proxies
1347 
1348 void RooAbsArg::printArgs(ostream& os) const
1349 {
1350  // Print nothing if there are no dependencies
1351  if (numProxies()==0) return ;
1352 
1353  os << "[ " ;
1354  for (Int_t i=0 ; i<numProxies() ; i++) {
1355  RooAbsProxy* p = getProxy(i) ;
1356  if (p==0) continue ;
1357  if (!TString(p->name()).BeginsWith("!")) {
1358  p->print(os) ;
1359  os << " " ;
1360  }
1361  }
1362  printMetaArgs(os) ;
1363  os << "]" ;
1364 }
1365 
1366 
1367 
1368 ////////////////////////////////////////////////////////////////////////////////
1369 /// Define default contents to print
1370 
1372 {
1373  return kName|kClassName|kValue|kArgs ;
1374 }
1375 
1376 
1377 
1378 ////////////////////////////////////////////////////////////////////////////////
1379 /// Implement multi-line detailed printing
1380 
1381 void RooAbsArg::printMultiline(ostream& os, Int_t /*contents*/, Bool_t /*verbose*/, TString indent) const
1382 {
1383  os << indent << "--- RooAbsArg ---" << endl;
1384  // dirty state flags
1385  os << indent << " Value State: " ;
1386  switch(_operMode) {
1387  case ADirty: os << "FORCED DIRTY" ; break ;
1388  case AClean: os << "FORCED clean" ; break ;
1389  case Auto: os << (isValueDirty() ? "DIRTY":"clean") ; break ;
1390  }
1391  os << endl
1392  << indent << " Shape State: " << (isShapeDirty() ? "DIRTY":"clean") << endl;
1393  // attribute list
1394  os << indent << " Attributes: " ;
1395  printAttribList(os) ;
1396  os << endl ;
1397  // our memory address (for x-referencing with client addresses of other args)
1398  os << indent << " Address: " << (void*)this << endl;
1399  // client list
1400  os << indent << " Clients: " << endl;
1401  RooFIter clientIter= _clientList.fwdIterator();
1402  RooAbsArg* client ;
1403  while ((client=clientIter.next())) {
1404  os << indent << " (" << (void*)client << ","
1405  << (_clientListValue.findArg(client)?"V":"-")
1406  << (_clientListShape.findArg(client)?"S":"-")
1407  << ") " ;
1409  }
1410 
1411  // server list
1412  os << indent << " Servers: " << endl;
1413  RooFIter serverIter= _serverList.fwdIterator();
1414  RooAbsArg* server ;
1415  while ((server=serverIter.next())) {
1416  os << indent << " (" << (void*)server << ","
1417  << (server->_clientListValue.findArg(this)?"V":"-")
1418  << (server->_clientListShape.findArg(this)?"S":"-")
1419  << ") " ;
1421  }
1422 
1423  // proxy list
1424  os << indent << " Proxies: " << endl ;
1425  for (int i=0 ; i<numProxies() ; i++) {
1426  RooAbsProxy* proxy=getProxy(i) ;
1427  if (!proxy) continue ;
1428  if (proxy->IsA()->InheritsFrom(RooArgProxy::Class())) {
1429  os << indent << " " << proxy->name() << " -> " ;
1430  RooAbsArg* parg = ((RooArgProxy*)proxy)->absArg() ;
1431  if (parg) {
1432  parg->printStream(os,kName,kSingleLine) ;
1433  } else {
1434  os << " (empty)" << endl ; ;
1435  }
1436  } else {
1437  os << indent << " " << proxy->name() << " -> " ;
1438  os << endl ;
1439  TString moreIndent(indent) ;
1440  moreIndent.Append(" ") ;
1441  ((RooSetProxy*)proxy)->printStream(os,kName,kStandard,moreIndent.Data()) ;
1442  }
1443  }
1444 }
1445 
1446 
1447 ////////////////////////////////////////////////////////////////////////////////
1448 /// Print object tree structure
1449 
1450 void RooAbsArg::printTree(ostream& os, TString /*indent*/) const
1451 {
1452  const_cast<RooAbsArg*>(this)->printCompactTree(os) ;
1453 }
1454 
1455 
1456 ////////////////////////////////////////////////////////////////////////////////
1457 /// Ostream operator
1458 
1459 ostream& operator<<(ostream& os, RooAbsArg &arg)
1460 {
1461  arg.writeToStream(os,kTRUE) ;
1462  return os ;
1463 }
1464 
1465 ////////////////////////////////////////////////////////////////////////////////
1466 /// Istream operator
1467 
1468 istream& operator>>(istream& is, RooAbsArg &arg)
1469 {
1470  arg.readFromStream(is,kTRUE,kFALSE) ;
1471  return is ;
1472 }
1473 
1474 ////////////////////////////////////////////////////////////////////////////////
1475 /// Print the attribute list
1476 
1477 void RooAbsArg::printAttribList(ostream& os) const
1478 {
1479  set<string>::const_iterator iter = _boolAttrib.begin() ;
1480  Bool_t first(kTRUE) ;
1481  while (iter != _boolAttrib.end()) {
1482  os << (first?" [":",") << *iter ;
1483  first=kFALSE ;
1484  ++iter ;
1485  }
1486  if (!first) os << "] " ;
1487 }
1488 
1489 ////////////////////////////////////////////////////////////////////////////////
1490 /// Replace server nodes with names matching the dataset variable names
1491 /// with those data set variables, making this PDF directly dependent on the dataset
1492 
1494 {
1495  const RooArgSet* set = data.get() ;
1497  branchNodeServerList(&branches,0,kTRUE) ;
1498 
1499  RooFIter iter = branches.fwdIterator() ;
1500  RooAbsArg* branch ;
1501  while((branch=iter.next())) {
1502  branch->redirectServers(*set,kFALSE,kFALSE) ;
1503  }
1504 }
1505 
1506 
1507 
1508 ////////////////////////////////////////////////////////////////////////////////
1509 /// Replace server nodes with names matching the dataset variable names
1510 /// with those data set variables, making this PDF directly dependent on the dataset
1511 
1513 {
1514  const RooArgSet* set = dstore.get() ;
1516  branchNodeServerList(&branches,0,kTRUE) ;
1517 
1518  RooFIter iter = branches.fwdIterator() ;
1519  RooAbsArg* branch ;
1520  while((branch=iter.next())) {
1521  branch->redirectServers(*set,kFALSE,kFALSE) ;
1522  }
1523 }
1524 
1525 
1526 
1527 ////////////////////////////////////////////////////////////////////////////////
1528 /// Utility function used by TCollection::Sort to compare contained TObjects
1529 /// We implement comparison by name, resulting in alphabetical sorting by object name.
1530 
1531 Int_t RooAbsArg::Compare(const TObject* other) const
1532 {
1533  return strcmp(GetName(),other->GetName()) ;
1534 }
1535 
1536 
1537 
1538 ////////////////////////////////////////////////////////////////////////////////
1539 /// Print information about current value dirty state information.
1540 /// If depth flag is true, information is recursively printed for
1541 /// all nodes in this arg tree.
1542 
1544 {
1545  if (depth) {
1546 
1547  RooArgSet branchList ;
1548  branchNodeServerList(&branchList) ;
1549  RooFIter bIter = branchList.fwdIterator() ;
1550  RooAbsArg* branch ;
1551  while((branch=bIter.next())) {
1552  branch->printDirty(kFALSE) ;
1553  }
1554 
1555  } else {
1556  cout << GetName() << " : " ;
1557  switch (_operMode) {
1558  case AClean: cout << "FORCED clean" ; break ;
1559  case ADirty: cout << "FORCED DIRTY" ; break ;
1560  case Auto: cout << "Auto " << (isValueDirty()?"DIRTY":"clean") ;
1561  }
1562  cout << endl ;
1563  }
1564 }
1565 
1566 
1567 ////////////////////////////////////////////////////////////////////////////////
1568 /// Activate cache mode optimization with given definition of observables.
1569 /// The cache operation mode of all objects in the expression tree will
1570 /// modified such that all nodes that depend directly or indirectly on
1571 /// any of the listed observables will be set to ADirty, as they are
1572 /// expected to change every time. This save change tracking overhead for
1573 /// nodes that are a priori known to change every time
1574 
1575 void RooAbsArg::optimizeCacheMode(const RooArgSet& observables)
1576 {
1577  RooLinkedList proc;
1578  RooArgSet opt ;
1579  optimizeCacheMode(observables,opt,proc) ;
1580 
1581  coutI(Optimization) << "RooAbsArg::optimizeCacheMode(" << GetName() << ") nodes " << opt << " depend on observables, "
1582  << "changing cache operation mode from change tracking to unconditional evaluation" << endl ;
1583 }
1584 
1585 
1586 ////////////////////////////////////////////////////////////////////////////////
1587 /// Activate cache mode optimization with given definition of observables.
1588 /// The cache operation mode of all objects in the expression tree will
1589 /// modified such that all nodes that depend directly or indirectly on
1590 /// any of the listed observables will be set to ADirty, as they are
1591 /// expected to change every time. This save change tracking overhead for
1592 /// nodes that are a priori known to change every time
1593 
1594 void RooAbsArg::optimizeCacheMode(const RooArgSet& observables, RooArgSet& optimizedNodes, RooLinkedList& processedNodes)
1595 {
1596  // Optimization applies only to branch nodes, not to leaf nodes
1597  if (!isDerived()) {
1598  return ;
1599  }
1600 
1601 
1602  // Terminate call if this node was already processed (tree structure may be cyclical)
1603  if (processedNodes.findArg(this)) {
1604  return ;
1605  } else {
1606  processedNodes.Add(this) ;
1607  }
1608 
1609  // Set cache mode operator to 'AlwaysDirty' if we depend on any of the given observables
1610  if (dependsOnValue(observables)) {
1611 
1612  if (dynamic_cast<RooRealIntegral*>(this)) {
1613  cxcoutI(Integration) << "RooAbsArg::optimizeCacheMode(" << GetName() << ") integral depends on value of one or more observables and will be evaluated for every event" << endl ;
1614  }
1615  optimizedNodes.add(*this,kTRUE) ;
1616  if (operMode()==AClean) {
1617  } else {
1618  setOperMode(ADirty,kTRUE) ; // WVE propagate flag recursively to top of tree
1619  }
1620  } else {
1621  }
1622  // Process any RooAbsArgs contained in any of the caches of this object
1623  for (Int_t i=0 ;i<numCaches() ; i++) {
1624  getCache(i)->optimizeCacheMode(observables,optimizedNodes,processedNodes) ;
1625  }
1626 
1627  // Forward calls to all servers
1628  RooFIter sIter = serverMIterator() ;
1629  RooAbsArg* server ;
1630  while((server=sIter.next())) {
1631  server->optimizeCacheMode(observables,optimizedNodes,processedNodes) ;
1632  }
1633 
1634 }
1635 
1636 ////////////////////////////////////////////////////////////////////////////////
1637 /// Find branch nodes with all-constant parameters, and add them to the list of
1638 /// nodes that can be cached with a dataset in a test statistic calculation
1639 
1641 {
1642  RooLinkedList proc ;
1643  Bool_t ret = findConstantNodes(observables,cacheList,proc) ;
1644 
1645  // If node can be optimized and hasn't been identified yet, add it to the list
1646  coutI(Optimization) << "RooAbsArg::findConstantNodes(" << GetName() << "): components "
1647  << cacheList << " depend exclusively on constant parameters and will be precalculated and cached" << endl ;
1648 
1649  return ret ;
1650 }
1651 
1652 
1653 
1654 ////////////////////////////////////////////////////////////////////////////////
1655 /// Find branch nodes with all-constant parameters, and add them to the list of
1656 /// nodes that can be cached with a dataset in a test statistic calculation
1657 
1658 Bool_t RooAbsArg::findConstantNodes(const RooArgSet& observables, RooArgSet& cacheList, RooLinkedList& processedNodes)
1659 {
1660  // Caching only applies to branch nodes
1661  if (!isDerived()) {
1662  return kFALSE;
1663  }
1664 
1665  // Terminate call if this node was already processed (tree structure may be cyclical)
1666  if (processedNodes.findArg(this)) {
1667  return kFALSE ;
1668  } else {
1669  processedNodes.Add(this) ;
1670  }
1671 
1672  // Check if node depends on any non-constant parameter
1673  Bool_t canOpt(kTRUE) ;
1674  RooArgSet* paramSet = getParameters(observables) ;
1675  RooFIter iter = paramSet->fwdIterator() ;
1676  RooAbsArg* param ;
1677  while((param = iter.next())) {
1678  if (!param->isConstant()) {
1679  canOpt=kFALSE ;
1680  break ;
1681  }
1682  }
1683  delete paramSet ;
1684 
1685 
1686  if (getAttribute("NeverConstant")) {
1687  canOpt = kFALSE ;
1688  }
1689 
1690  if (canOpt) {
1691  setAttribute("ConstantExpression") ;
1692  }
1693 
1694  // If yes, list node eligible for caching, if not test nodes one level down
1695  if (canOpt||getAttribute("CacheAndTrack")) {
1696 
1697  if (!cacheList.find(*this) && dependsOnValue(observables) && !observables.find(*this) ) {
1698 
1699  // Add to cache list
1700  cxcoutD(Optimization) << "RooAbsArg::findConstantNodes(" << GetName() << ") adding self to list of constant nodes" << endl ;
1701 
1702  if (canOpt) setAttribute("ConstantExpressionCached") ;
1703  cacheList.add(*this,kFALSE) ;
1704  }
1705  }
1706 
1707  if (!canOpt) {
1708 
1709  // If not, see if next level down can be cached
1710  RooFIter sIter = serverMIterator() ;
1711  RooAbsArg* server ;
1712  while((server=sIter.next())) {
1713  if (server->isDerived()) {
1714  server->findConstantNodes(observables,cacheList,processedNodes) ;
1715  }
1716  }
1717  }
1718 
1719  // Forward call to all cached contained in current object
1720  for (Int_t i=0 ;i<numCaches() ; i++) {
1721  getCache(i)->findConstantNodes(observables,cacheList,processedNodes) ;
1722  }
1723 
1724  return kFALSE ;
1725 }
1726 
1727 
1728 
1729 
1730 ////////////////////////////////////////////////////////////////////////////////
1731 /// Interface function signaling a request to perform constant term
1732 /// optimization. This default implementation takes no action other than to
1733 /// forward the calls to all servers
1734 
1736 {
1737  RooFIter sIter = serverMIterator() ;
1738  RooAbsArg* server ;
1739  while((server=sIter.next())) {
1740  server->constOptimizeTestStatistic(opcode,doAlsoTrackingOpt) ;
1741  }
1742 }
1743 
1744 
1745 ////////////////////////////////////////////////////////////////////////////////
1746 /// Change cache operation mode to given mode. If recurseAdirty
1747 /// is true, then a mode change to AlwaysDirty will automatically
1748 /// be propagated recursively to all client nodes
1749 
1750 void RooAbsArg::setOperMode(OperMode mode, Bool_t recurseADirty)
1751 {
1752  // Prevent recursion loops
1753  if (mode==_operMode) return ;
1754 
1755  _operMode = mode ;
1756  _fast = ((mode==AClean) || dynamic_cast<RooRealVar*>(this)!=0 || dynamic_cast<RooConstVar*>(this)!=0 ) ;
1757  for (Int_t i=0 ;i<numCaches() ; i++) {
1758  getCache(i)->operModeHook() ;
1759  }
1760  operModeHook() ;
1761 
1762  // Propagate to all clients
1763  if (mode==ADirty && recurseADirty) {
1764  RooFIter iter = valueClientMIterator() ;
1765  RooAbsArg* client ;
1766  while((client=iter.next())) {
1767  client->setOperMode(mode) ;
1768  }
1769  }
1770 }
1771 
1772 
1773 ////////////////////////////////////////////////////////////////////////////////
1774 /// Print tree structure of expression tree on stdout, or to file if filename is specified.
1775 /// If namePat is not "*", only nodes with names matching the pattern will be printed.
1776 /// The client argument is used in recursive calls to properly display the value or shape nature
1777 /// of the client-server links. It should be zero in calls initiated by users.
1778 
1779 void RooAbsArg::printCompactTree(const char* indent, const char* filename, const char* namePat, RooAbsArg* client)
1780 {
1781  if (filename) {
1782  ofstream ofs(filename) ;
1783  printCompactTree(ofs,indent,namePat,client) ;
1784  } else {
1785  printCompactTree(cout,indent,namePat,client) ;
1786  }
1787 }
1788 
1789 
1790 ////////////////////////////////////////////////////////////////////////////////
1791 /// Print tree structure of expression tree on given ostream.
1792 /// If namePat is not "*", only nodes with names matching the pattern will be printed.
1793 /// The client argument is used in recursive calls to properly display the value or shape nature
1794 /// of the client-server links. It should be zero in calls initiated by users.
1795 
1796 void RooAbsArg::printCompactTree(ostream& os, const char* indent, const char* namePat, RooAbsArg* client)
1797 {
1798  if ( !namePat || TString(GetName()).Contains(namePat)) {
1799  os << indent << this ;
1800  if (client) {
1801  os << "/" ;
1802  if (isValueServer(*client)) os << "V" ; else os << "-" ;
1803  if (isShapeServer(*client)) os << "S" ; else os << "-" ;
1804  }
1805  os << " " ;
1806 
1807  os << IsA()->GetName() << "::" << GetName() << " = " ;
1808  printValue(os) ;
1809 
1810  if (_serverList.GetSize()>0) {
1811  switch(operMode()) {
1812  case Auto: os << " [Auto," << (isValueDirty()?"Dirty":"Clean") << "] " ; break ;
1813  case AClean: os << " [ACLEAN] " ; break ;
1814  case ADirty: os << " [ADIRTY] " ; break ;
1815  }
1816  }
1817  os << endl ;
1818 
1819  for (Int_t i=0 ;i<numCaches() ; i++) {
1820  getCache(i)->printCompactTreeHook(os,indent) ;
1821  }
1822  printCompactTreeHook(os,indent) ;
1823  }
1824 
1825  TString indent2(indent) ;
1826  indent2 += " " ;
1827  RooFIter iter = serverMIterator() ;
1828  RooAbsArg* arg ;
1829  while((arg=iter.next())) {
1830  arg->printCompactTree(os,indent2,namePat,this) ;
1831  }
1832 }
1833 
1834 
1835 ////////////////////////////////////////////////////////////////////////////////
1836 /// Print tree structure of expression tree on given ostream, only branch nodes are printed.
1837 /// Lead nodes (variables) will not be shown
1838 ///
1839 /// If namePat is not "*", only nodes with names matching the pattern will be printed.
1840 
1841 void RooAbsArg::printComponentTree(const char* indent, const char* namePat, Int_t nLevel)
1842 {
1843  if (nLevel==0) return ;
1844  if (isFundamental()) return ;
1845  RooResolutionModel* rmodel = dynamic_cast<RooResolutionModel*>(this) ;
1846  if (rmodel && rmodel->isConvolved()) return ;
1847  if (InheritsFrom("RooConstVar")) return ;
1848 
1849  if ( !namePat || TString(GetName()).Contains(namePat)) {
1850  cout << indent ;
1851  Print() ;
1852  }
1853 
1854  TString indent2(indent) ;
1855  indent2 += " " ;
1856  RooFIter iter = serverMIterator() ;
1857  RooAbsArg* arg ;
1858  while((arg=iter.next())) {
1859  arg->printComponentTree(indent2.Data(),namePat,nLevel-1) ;
1860  }
1861 }
1862 
1863 
1864 ////////////////////////////////////////////////////////////////////////////////
1865 /// Construct a mangled name from the actual name that
1866 /// is free of any math symbols that might be interpreted by TTree
1867 
1869 {
1870  // Check for optional alternate name of branch for this argument
1871  TString rawBranchName = GetName() ;
1872  if (getStringAttribute("BranchName")) {
1873  rawBranchName = getStringAttribute("BranchName") ;
1874  }
1875 
1876  TString cleanName(rawBranchName) ;
1877  cleanName.ReplaceAll("/","D") ;
1878  cleanName.ReplaceAll("-","M") ;
1879  cleanName.ReplaceAll("+","P") ;
1880  cleanName.ReplaceAll("*","X") ;
1881  cleanName.ReplaceAll("[","L") ;
1882  cleanName.ReplaceAll("]","R") ;
1883  cleanName.ReplaceAll("(","L") ;
1884  cleanName.ReplaceAll(")","R") ;
1885  cleanName.ReplaceAll("{","L") ;
1886  cleanName.ReplaceAll("}","R") ;
1887 
1888  if (cleanName.Length()<=60) return cleanName ;
1889 
1890  // Name is too long, truncate and include CRC32 checksum of full name in clean name
1891  static char buf[1024] ;
1892  strlcpy(buf,cleanName.Data(),1024) ;
1893  snprintf(buf+46,1024-46,"_CRC%08x",crc32(cleanName.Data())) ;
1894 
1895  return TString(buf) ;
1896 }
1897 
1898 
1899 
1900 
1901 
1903 {
1904  // Calculate crc32 checksum on given string
1905  unsigned long sz = strlen(data);
1906  switch (strlen(data)) {
1907  case 0:
1908  return 0;
1909  case 1:
1910  return data[0];
1911  case 2:
1912  return (data[0] << 8) | data[1];
1913  case 3:
1914  return (data[0] << 16) | (data[1] << 8) | data[2];
1915  case 4:
1916  return (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
1917  default:
1918  return crc32(data + 4, sz - 4, (data[0] << 24) | (data[1] << 16) |
1919  (data[2] << 8) | data[3]);
1920  }
1921 }
1922 
1923 
1925 {
1926  // update CRC32 with new data
1927 
1928  // use precomputed table, rather than computing it on the fly
1929  static const UInt_t crctab[256] = { 0x00000000,
1930  0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
1931  0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6,
1932  0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
1933  0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac,
1934  0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f,
1935  0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, 0x709f7b7a,
1936  0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
1937  0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58,
1938  0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033,
1939  0xa4ad16ea, 0xa06c0b5d, 0xd4326d90, 0xd0f37027, 0xddb056fe,
1940  0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
1941  0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4,
1942  0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0,
1943  0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5,
1944  0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
1945  0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, 0x7897ab07,
1946  0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c,
1947  0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1,
1948  0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
1949  0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b,
1950  0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698,
1951  0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d,
1952  0x94ea7b2a, 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
1953  0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, 0xc6bcf05f,
1954  0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34,
1955  0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80,
1956  0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
1957  0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x5c007b8a,
1958  0x58c1663d, 0x558240e4, 0x51435d53, 0x251d3b9e, 0x21dc2629,
1959  0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c,
1960  0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
1961  0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e,
1962  0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65,
1963  0xeba91bbc, 0xef68060b, 0xd727bbb6, 0xd3e6a601, 0xdea580d8,
1964  0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
1965  0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2,
1966  0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71,
1967  0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74,
1968  0x857130c3, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
1969  0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x7b827d21,
1970  0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a,
1971  0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, 0x18197087,
1972  0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
1973  0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d,
1974  0x2056cd3a, 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce,
1975  0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb,
1976  0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
1977  0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, 0x89b8fd09,
1978  0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662,
1979  0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf,
1980  0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
1981  };
1982 
1983  crc = ~crc;
1984  while (sz--) crc = (crc << 8) ^ UInt_t(*data++) ^ crctab[crc >> 24];
1985 
1986  return ~crc;
1987 }
1988 
1990 {
1991  // calculate 32 bit FNV1A hash of string
1992  return fnv1a32(data, strlen(data));
1993 }
1994 
1996 {
1997  // update 32 bit FNV1A hash
1998  const UInt_t fnv1a32mult = 16777619u;
1999  while (sz--) {
2000  hash ^= *data++;
2001  hash *= fnv1a32mult;
2002  }
2003  return hash;
2004 }
2005 
2007 {
2008  // calculate 64 bit FNV1A hash of string
2009  return fnv1a64(data, strlen(data));
2010 }
2011 
2013 {
2014  // update 64 bit FNV1A hash
2015  const ULong64_t fnv1a64mult = (ULong64_t(1) << 40) | ULong64_t(435);
2016  while (sz--) {
2017  hash ^= *data++;
2018  hash *= fnv1a64mult;
2019  }
2020  return hash;
2021 }
2022 
2023 ////////////////////////////////////////////////////////////////////////////////
2024 /// Hook function interface for object to insert additional information
2025 /// when printed in the context of a tree structure. This default
2026 /// implementation prints nothing
2027 
2028 void RooAbsArg::printCompactTreeHook(ostream&, const char *)
2029 {
2030 }
2031 
2032 
2033 ////////////////////////////////////////////////////////////////////////////////
2034 /// Register RooAbsCache with this object. This function is called
2035 /// by RooAbsCache constructors for objects that are a datamember
2036 /// of this RooAbsArg. By registering itself the RooAbsArg is aware
2037 /// of all its cache data members and will forward server change
2038 /// and cache mode change calls to the cache objects, which in turn
2039 /// can forward them their contents
2040 
2042 {
2043  _cacheList.push_back(&cache) ;
2044 }
2045 
2046 
2047 ////////////////////////////////////////////////////////////////////////////////
2048 /// Unregister a RooAbsCache. Called from the RooAbsCache destructor
2049 
2051 {
2052  _cacheList.erase(std::remove(_cacheList.begin(), _cacheList.end(), &cache),
2053  _cacheList.end());
2054 }
2055 
2056 
2057 ////////////////////////////////////////////////////////////////////////////////
2058 /// Return number of registered caches
2059 
2061 {
2062  return _cacheList.size() ;
2063 }
2064 
2065 
2066 ////////////////////////////////////////////////////////////////////////////////
2067 /// Return registered cache object by index
2068 
2070 {
2071  return _cacheList[index] ;
2072 }
2073 
2074 
2075 ////////////////////////////////////////////////////////////////////////////////
2076 /// Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
2077 
2078 RooArgSet* RooAbsArg::getVariables(Bool_t stripDisconnected) const
2079 {
2080  return getParameters(RooArgSet(),stripDisconnected) ;
2081 }
2082 
2083 
2084 ////////////////////////////////////////////////////////////////////////////////
2085 /// Return ancestors in cloning chain of this RooAbsArg. NOTE: Returned pointers
2086 /// are not guaranteed to be 'live', so do not dereference without proper caution
2087 
2089 {
2090  RooLinkedList retVal ;
2091 
2092  set<string>::const_iterator iter= _boolAttrib.begin() ;
2093  while(iter != _boolAttrib.end()) {
2094  if (TString(*iter).BeginsWith("CloneOf(")) {
2095  char buf[128] ;
2096  strlcpy(buf,iter->c_str(),128) ;
2097  strtok(buf,"(") ;
2098  char* ptrToken = strtok(0,")") ;
2099  RooAbsArg* ptr = (RooAbsArg*) strtol(ptrToken,0,16) ;
2100  retVal.Add(ptr) ;
2101  }
2102  }
2103 
2104  return retVal ;
2105 }
2106 
2107 
2108 ////////////////////////////////////////////////////////////////////////////////
2109 /// Create a GraphViz .dot file visualizing the expression tree headed by
2110 /// this RooAbsArg object. Use the GraphViz tool suite to make e.g. a gif
2111 /// or ps file from the .dot file
2112 ///
2113 /// Based on concept developed by Kyle Cranmer
2114 
2115 void RooAbsArg::graphVizTree(const char* fileName, const char* delimiter, bool useTitle, bool useLatex)
2116 {
2117  ofstream ofs(fileName) ;
2118  if (!ofs) {
2119  coutE(InputArguments) << "RooAbsArg::graphVizTree() ERROR: Cannot open graphViz output file with name " << fileName << endl ;
2120  return ;
2121  }
2122  graphVizTree(ofs, delimiter, useTitle, useLatex) ;
2123 }
2124 
2125 ////////////////////////////////////////////////////////////////////////////////
2126 /// Write the GraphViz representation of the expression tree headed by
2127 /// this RooAbsArg object to the given ostream.
2128 ///
2129 /// Based on concept developed by Kyle Cranmer
2130 
2131 void RooAbsArg::graphVizTree(ostream& os, const char* delimiter, bool useTitle, bool useLatex)
2132 {
2133  if (!os) {
2134  coutE(InputArguments) << "RooAbsArg::graphVizTree() ERROR: output stream provided as input argument is in invalid state" << endl ;
2135  }
2136 
2137  // Write header
2138  os << "digraph " << GetName() << "{" << endl ;
2139 
2140  // First list all the tree nodes
2141  RooArgSet nodeSet ;
2142  treeNodeServerList(&nodeSet) ;
2143  RooFIter iter = nodeSet.fwdIterator() ;
2144  RooAbsArg* node ;
2145 
2146  // iterate over nodes
2147  while((node=iter.next())) {
2148  string nodeName = node->GetName();
2149  string nodeTitle = node->GetTitle();
2150  string nodeLabel = (useTitle && !nodeTitle.empty()) ? nodeTitle : nodeName;
2151 
2152  // if using latex, replace ROOT's # with normal latex backslash
2153  string::size_type position = nodeLabel.find("#") ;
2154  while(useLatex && position!=nodeLabel.npos){
2155  nodeLabel.replace(position, 1, "\\");
2156  }
2157 
2158  string typeFormat = "\\texttt{";
2159  string nodeType = (useLatex) ? typeFormat+node->IsA()->GetName()+"}" : node->IsA()->GetName();
2160 
2161  os << "\"" << nodeName << "\" [ color=" << (node->isFundamental()?"blue":"red")
2162  << ", label=\"" << nodeType << delimiter << nodeLabel << "\"];" << endl ;
2163 
2164  }
2165 
2166  // Get set of all server links
2167  set<pair<RooAbsArg*,RooAbsArg*> > links ;
2168  graphVizAddConnections(links) ;
2169 
2170  // And write them out
2171  set<pair<RooAbsArg*,RooAbsArg*> >::iterator liter = links.begin() ;
2172  for( ; liter != links.end() ; ++liter ) {
2173  os << "\"" << liter->first->GetName() << "\" -> \"" << liter->second->GetName() << "\";" << endl ;
2174  }
2175 
2176  // Write trailer
2177  os << "}" << endl ;
2178 
2179 }
2180 
2181 ////////////////////////////////////////////////////////////////////////////////
2182 /// Utility function that inserts all point-to-point client-server connections
2183 /// between any two RooAbsArgs in the expression tree headed by this object
2184 /// in the linkSet argument.
2185 
2186 void RooAbsArg::graphVizAddConnections(set<pair<RooAbsArg*,RooAbsArg*> >& linkSet)
2187 {
2188  RooFIter sIter = serverMIterator() ;
2189  RooAbsArg* server ;
2190  while((server=sIter.next())) {
2191  linkSet.insert(make_pair(this,server)) ;
2192  server->graphVizAddConnections(linkSet) ;
2193  }
2194 }
2195 
2196 
2197 
2198 // //_____________________________________________________________________________
2199 // TGraphStruct* RooAbsArg::graph(Bool_t useFactoryTag, Double_t textSize)
2200 // {
2201 // // Return a TGraphStruct object filled with the tree structure of the pdf object
2202 
2203 // TGraphStruct* theGraph = new TGraphStruct() ;
2204 
2205 // // First list all the tree nodes
2206 // RooArgSet nodeSet ;
2207 // treeNodeServerList(&nodeSet) ;
2208 // TIterator* iter = nodeSet.createIterator() ;
2209 // RooAbsArg* node ;
2210 
2211 
2212 // // iterate over nodes
2213 // while((node=(RooAbsArg*)iter->Next())) {
2214 
2215 // // Skip node that represent numeric constants
2216 // if (node->IsA()->InheritsFrom(RooConstVar::Class())) continue ;
2217 
2218 // string nodeName ;
2219 // if (useFactoryTag && node->getStringAttribute("factory_tag")) {
2220 // nodeName = node->getStringAttribute("factory_tag") ;
2221 // } else {
2222 // if (node->isFundamental()) {
2223 // nodeName = node->GetName();
2224 // } else {
2225 // ostringstream oss ;
2226 // node->printStream(oss,(node->defaultPrintContents(0)&(~kValue)),node->defaultPrintStyle(0)) ;
2227 // nodeName= oss.str() ;
2228 // // nodeName = Form("%s::%s",node->IsA()->GetName(),node->GetName());
2229 
2230 // }
2231 // }
2232 // if (strncmp(nodeName.c_str(),"Roo",3)==0) {
2233 // nodeName = string(nodeName.c_str()+3) ;
2234 // }
2235 // node->setStringAttribute("graph_name",nodeName.c_str()) ;
2236 
2237 // TGraphNode* gnode = theGraph->AddNode(nodeName.c_str(),nodeName.c_str()) ;
2238 // gnode->SetLineWidth(2) ;
2239 // gnode->SetTextColor(node->isFundamental()?kBlue:kRed) ;
2240 // gnode->SetTextSize(textSize) ;
2241 // }
2242 // delete iter ;
2243 
2244 // // Get set of all server links
2245 // set<pair<RooAbsArg*,RooAbsArg*> > links ;
2246 // graphVizAddConnections(links) ;
2247 
2248 // // And insert them into the graph
2249 // set<pair<RooAbsArg*,RooAbsArg*> >::iterator liter = links.begin() ;
2250 // for( ; liter != links.end() ; ++liter ) {
2251 
2252 // TGraphNode* n1 = (TGraphNode*)theGraph->GetListOfNodes()->FindObject(liter->first->getStringAttribute("graph_name")) ;
2253 // TGraphNode* n2 = (TGraphNode*)theGraph->GetListOfNodes()->FindObject(liter->second->getStringAttribute("graph_name")) ;
2254 // if (n1 && n2) {
2255 // TGraphEdge* edge = theGraph->AddEdge(n1,n2) ;
2256 // edge->SetLineWidth(2) ;
2257 // }
2258 // }
2259 
2260 // return theGraph ;
2261 // }
2262 
2263 
2264 
2265 // //_____________________________________________________________________________
2266 // Bool_t RooAbsArg::inhibitDirty()
2267 // {
2268 // // Return current status of the inhibitDirty global flag. If true
2269 // // no dirty state change tracking occurs and all caches are considered
2270 // // to be always dirty.
2271 // return _inhibitDirty ;
2272 // }
2273 
2274 
2275 ////////////////////////////////////////////////////////////////////////////////
2276 /// Take ownership of the contents of 'comps'
2277 
2279 {
2280  if (!_ownedComponents) {
2281  _ownedComponents = new RooArgSet("owned components") ;
2282  }
2283  return _ownedComponents->addOwned(comps) ;
2284 }
2285 
2286 
2287 
2288 ////////////////////////////////////////////////////////////////////////////////
2289 /// Clone tree expression of objects. All tree nodes will be owned by
2290 /// the head node return by cloneTree()
2291 
2292 RooAbsArg* RooAbsArg::cloneTree(const char* newname) const
2293 {
2294  // Clone tree using snapshot
2295  RooArgSet* clonedNodes = (RooArgSet*) RooArgSet(*this).snapshot(kTRUE) ;
2296 
2297  // Find the head node in the cloneSet
2298  RooAbsArg* head = clonedNodes->find(*this) ;
2299 
2300  // Remove the head node from the cloneSet
2301  // To release it from the set ownership
2302  clonedNodes->remove(*head) ;
2303 
2304  // Add the set as owned component of the head
2305  head->addOwnedComponents(*clonedNodes) ;
2306 
2307  // Delete intermediate container
2308  clonedNodes->releaseOwnership() ;
2309  delete clonedNodes ;
2310 
2311  // Adjust name of head node if requested
2312  if (newname) {
2313  head->TNamed::SetName(newname) ;
2314  head->_namePtr = (TNamed*) RooNameReg::instance().constPtr(newname) ;
2315  }
2316 
2317  // Return the head
2318  return head ;
2319 }
2320 
2321 
2322 
2323 ////////////////////////////////////////////////////////////////////////////////
2324 
2326 {
2327  if (dynamic_cast<RooTreeDataStore*>(&store)) {
2328  attachToTree(((RooTreeDataStore&)store).tree()) ;
2329  } else if (dynamic_cast<RooVectorDataStore*>(&store)) {
2331  }
2332 }
2333 
2334 
2335 
2336 ////////////////////////////////////////////////////////////////////////////////
2337 
2339 {
2340  if (_eocache) {
2341  return *_eocache ;
2342  } else {
2344  }
2345 }
2346 
2347 
2348 ////////////////////////////////////////////////////////////////////////////////
2349 
2351 {
2352  string suffix ;
2353 
2355  branchNodeServerList(&branches) ;
2356  RooFIter iter = branches.fwdIterator();
2357  RooAbsArg* arg ;
2358  while((arg=iter.next())) {
2359  const char* tmp = arg->cacheUniqueSuffix() ;
2360  if (tmp) suffix += tmp ;
2361  }
2362  return Form("%s",suffix.c_str()) ;
2363 }
2364 
2365 
2366 ////////////////////////////////////////////////////////////////////////////////
2367 
2369 {
2371  branchNodeServerList(&branches) ;
2372  RooFIter iter = branches.fwdIterator() ;
2373  RooAbsArg* arg ;
2374  while((arg=iter.next())) {
2375 // cout << "wiring caches on node " << arg->GetName() << endl ;
2376  for (deque<RooAbsCache*>::iterator iter2 = arg->_cacheList.begin() ; iter2 != arg->_cacheList.end() ; ++iter2) {
2377  (*iter2)->wireCache() ;
2378  }
2379  }
2380 }
2381 
2382 
2383 
2384 ////////////////////////////////////////////////////////////////////////////////
2385 
2386 void RooAbsArg::SetName(const char* name)
2387 {
2388  TNamed::SetName(name) ;
2389  TNamed* newPtr = (TNamed*) RooNameReg::instance().constPtr(GetName()) ;
2390  if (newPtr != _namePtr) {
2391  //cout << "Rename '" << _namePtr->GetName() << "' to '" << name << "' (set flag in new name)" << endl;
2392  _namePtr = newPtr;
2394  }
2395 }
2396 
2397 
2398 
2399 
2400 ////////////////////////////////////////////////////////////////////////////////
2401 
2402 void RooAbsArg::SetNameTitle(const char *name, const char *title)
2403 {
2404  TNamed::SetNameTitle(name,title) ;
2405  TNamed* newPtr = (TNamed*) RooNameReg::instance().constPtr(GetName()) ;
2406  if (newPtr != _namePtr) {
2407  //cout << "Rename '" << _namePtr->GetName() << "' to '" << name << "' (set flag in new name)" << endl;
2408  _namePtr = newPtr;
2410  }
2411 }
2412 
2413 
2414 ////////////////////////////////////////////////////////////////////////////////
2415 /// Stream an object of class RooAbsArg.
2416 
2417 void RooAbsArg::Streamer(TBuffer &R__b)
2418 {
2419  if (R__b.IsReading()) {
2420  _ioReadStack.push(this) ;
2421  R__b.ReadClassBuffer(RooAbsArg::Class(),this);
2422  _ioReadStack.pop() ;
2424  _isConstant = getAttribute("Constant") ;
2425  } else {
2426  R__b.WriteClassBuffer(RooAbsArg::Class(),this);
2427  }
2428 }
2429 
2430 ////////////////////////////////////////////////////////////////////////////////
2431 /// Method called by workspace container to finalize schema evolution issues
2432 /// that cannot be handled in a single ioStreamer pass.
2433 ///
2434 /// A second pass is typically needed when evolving data member of RooAbsArg-derived
2435 /// classes that are container classes with references to other members, which may
2436 /// not yet be 'live' in the first ioStreamer() evolution pass.
2437 ///
2438 /// Classes may overload this function, but must call the base method in the
2439 /// overloaded call to ensure base evolution is handled properly
2440 
2442 {
2443 
2444  // Handling of v5-v6 migration (TRefArray _proxyList --> RooRefArray _proxyList)
2445  map<RooAbsArg*,TRefArray*>::iterator iter = _ioEvoList.find(this) ;
2446  if (iter != _ioEvoList.end()) {
2447 
2448  // Transfer contents of saved TRefArray to RooRefArray now
2449  if (!_proxyList.GetEntriesFast())
2450  _proxyList.Expand(iter->second->GetEntriesFast());
2451  for (int i = 0; i < iter->second->GetEntriesFast(); i++) {
2452  _proxyList.Add(iter->second->At(i));
2453  }
2454  // Delete TRefArray and remove from list
2455  delete iter->second ;
2456  _ioEvoList.erase(iter) ;
2457  }
2458 }
2459 
2460 
2461 
2462 
2463 ////////////////////////////////////////////////////////////////////////////////
2464 /// Method called by workspace container to finalize schema evolution issues
2465 /// that cannot be handled in a single ioStreamer pass. This static finalize method
2466 /// is called after ioStreamerPass2() is called on each directly listed object
2467 /// in the workspace. It's purpose is to complete schema evolution of any
2468 /// objects in the workspace that are not directly listed as content elements
2469 /// (e.g. analytical convolution tokens )
2470 
2472 {
2473 
2474  // Handling of v5-v6 migration (TRefArray _proxyList --> RooRefArray _proxyList)
2475  map<RooAbsArg*,TRefArray*>::iterator iter = _ioEvoList.begin() ;
2476  while (iter != _ioEvoList.end()) {
2477 
2478  // Transfer contents of saved TRefArray to RooRefArray now
2479  if (!iter->first->_proxyList.GetEntriesFast())
2480  iter->first->_proxyList.Expand(iter->second->GetEntriesFast());
2481  for (int i = 0; i < iter->second->GetEntriesFast(); i++) {
2482  iter->first->_proxyList.Add(iter->second->At(i));
2483  }
2484 
2485  // Save iterator position for deletion after increment
2486  map<RooAbsArg*,TRefArray*>::iterator iter_tmp = iter ;
2487 
2488  iter++ ;
2489 
2490  // Delete TRefArray and remove from list
2491  delete iter_tmp->second ;
2492  _ioEvoList.erase(iter_tmp) ;
2493 
2494  }
2495 
2496 }
2497 
2498 
2499 ////////////////////////////////////////////////////////////////////////////////
2500 /// Stream an object of class RooRefArray.
2501 
2502 void RooRefArray::Streamer(TBuffer &R__b)
2503 {
2504  UInt_t R__s, R__c;
2505  if (R__b.IsReading()) {
2506 
2507  Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { }
2508 
2509  // Make temporary refArray and read that from the streamer
2510  TRefArray* refArray = new TRefArray ;
2511  refArray->Streamer(R__b) ;
2512  R__b.CheckByteCount(R__s, R__c, refArray->IsA());
2513 
2514  // Schedule deferred processing of TRefArray into proxy list
2515  RooAbsArg::_ioEvoList[RooAbsArg::_ioReadStack.top()] = refArray ;
2516 
2517  } else {
2518 
2519  R__c = R__b.WriteVersion(RooRefArray::IsA(), kTRUE);
2520 
2521  // Make a temporary refArray and write that to the streamer
2522  TRefArray refArray(GetEntriesFast());
2523  TIterator* iter = MakeIterator() ;
2524  TObject* tmpObj ; while ((tmpObj = iter->Next())) {
2525  refArray.Add(tmpObj) ;
2526  }
2527  delete iter ;
2528 
2529  refArray.Streamer(R__b) ;
2530  R__b.SetByteCount(R__c, kTRUE) ;
2531 
2532  }
2533 }
2534 
2535 
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
Definition: RooAbsArg.cxx:243
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
Definition: RooAbsArg.cxx:2078
virtual void Add(TObject *arg)
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
Definition: RooAbsArg.cxx:2292
Bool_t IsReading() const
Definition: TBuffer.h:83
Int_t numCaches() const
Return number of registered caches.
Definition: RooAbsArg.cxx:2060
virtual void findConstantNodes(const RooArgSet &, RooArgSet &, RooLinkedList &)
Interface for constant term node finding calls.
#define coutE(a)
Definition: RooMsgService.h:34
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, which is interpreted as an OR of &#39;enum ContentsOptions&#39; values and in the style given by &#39;enum StyleOption&#39;.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
void unRegisterProxy(RooArgProxy &proxy)
Remove proxy from proxy list.
Definition: RooAbsArg.cxx:1169
void treeNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, Bool_t doBranch=kTRUE, Bool_t doLeaf=kTRUE, Bool_t valueOnly=kFALSE, Bool_t recurseNonDerived=kFALSE) const
Fill supplied list with nodes of the arg tree, following all server links, starting with ourself as t...
Definition: RooAbsArg.cxx:491
RooAbsDataStore is the abstract base class for data collection that use a TTree as internal storage m...
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
TIterator * _clientShapeIter
Definition: RooAbsArg.h:481
virtual Bool_t RemoveAll(TObject *obj)
Remove object from list and delete object itself regardless of reference count.
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
Definition: RooArgSet.h:86
static std::stack< RooAbsArg * > _ioReadStack
Definition: RooAbsArg.h:599
virtual const char * name() const
Definition: RooAbsProxy.h:41
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
Definition: RooAbsArg.cxx:740
void sort(Bool_t ascend=kTRUE)
#define cxcoutI(a)
Definition: RooMsgService.h:83
RooAbsCache * getCache(Int_t index) const
Return registered cache object by index.
Definition: RooAbsArg.cxx:2069
void graphVizTree(const char *fileName, const char *delimiter="\, bool useTitle=false, bool useLatex=false)
Create a GraphViz .dot file visualizing the expression tree headed by this RooAbsArg object...
Definition: RooAbsArg.cxx:2115
short Version_t
Definition: RtypesCore.h:61
static void ioStreamerPass2Finalize()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
Definition: RooAbsArg.cxx:2471
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Definition: RooAbsArg.h:194
virtual void operModeHook()
Interface for operation mode changes.
Definition: RooAbsCache.cxx:99
virtual void optimizeCacheMode(const RooArgSet &observables)
Activate cache mode optimization with given definition of observables.
Definition: RooAbsArg.cxx:1575
void Add(TObject *obj)
Definition: TRefArray.h:80
virtual const RooArgSet * get() const
Definition: RooAbsData.h:79
void printAttribList(std::ostream &os) const
Transient boolean attributes (not copied in ctor)
Definition: RooAbsArg.cxx:1477
RooFIter valueClientMIterator() const
Definition: RooAbsArg.h:117
void leafNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, Bool_t recurseNonDerived=kFALSE) const
Fill supplied list with all leaf nodes of the arg tree, starting with ourself as top node...
Definition: RooAbsArg.cxx:470
void setHashTableSize(Int_t size)
Change the threshold for hash-table use to given size.
const char Option_t
Definition: RtypesCore.h:62
#define coutI(a)
Definition: RooMsgService.h:31
RooExpensiveObjectCache is a singleton class that serves as repository for objects that are expensive...
friend std::ostream & operator<<(std::ostream &os, const RooAbsArg &arg)
#define cxcoutD(a)
Definition: RooMsgService.h:79
A RooRefCountList is a RooLinkedList that keeps a reference counter with each added node...
void registerProxy(RooArgProxy &proxy)
Register an RooArgProxy in the proxy list.
Definition: RooAbsArg.cxx:1141
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
TNamed * _namePtr
Definition: RooAbsArg.h:585
Buffer base class used for serializing objects.
Definition: TBuffer.h:40
virtual void printClassName(std::ostream &os) const
Print object class name.
Definition: RooAbsArg.cxx:1331
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default contents to print.
Definition: RooAbsArg.cxx:1371
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual TObject * Remove(TObject *obj)
Remove object from array.
Definition: TObjArray.cxx:703
Int_t refCount(TObject *obj)
Return reference count associated with &#39;obj&#39;.
virtual const RooArgSet * get(Int_t index) const =0
RooAbsArg()
Default constructor.
Definition: RooAbsArg.cxx:95
virtual void printValue(std::ostream &os) const
Interface to print value of object.
virtual Bool_t isLValue() const
Definition: RooAbsArg.h:170
RooFIter fwdIterator() const
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
std::set< std::string > _boolAttrib
Definition: RooAbsArg.h:528
Int_t getHashTableSize() const
Definition: RooLinkedList.h:50
Bool_t inhibitDirty() const
Delete watch flag.
Definition: RooAbsArg.cxx:86
An array of references to TObjects.
Definition: TRefArray.h:39
void setProxyNormSet(const RooArgSet *nset)
Forward a change in the cached normalization argset to all the registered proxies.
Definition: RooAbsArg.cxx:1274
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of &#39;comps&#39;.
Definition: RooAbsArg.cxx:2278
STL namespace.
const char * content() const
Definition: RooNameSet.h:50
RooTreeDataStore is the abstract base class for data collection that use a TTree as internal storage ...
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
TObject * At(Int_t idx) const
Definition: TObjArray.h:165
void replaceServer(RooAbsArg &oldServer, RooAbsArg &newServer, Bool_t valueProp, Bool_t shapeProp)
Replace &#39;oldServer&#39; with &#39;newServer&#39;.
Definition: RooAbsArg.cxx:423
RooAbsCache is the abstract base class for data members of RooAbsArgs that cache other (composite) Ro...
Definition: RooAbsCache.h:27
void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Definition: RooAbsArg.cxx:2402
Bool_t _fast
Definition: RooAbsArg.h:576
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Definition: TNamed.cxx:154
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)=0
void attachDataSet(const RooAbsData &set)
Replace server nodes with names matching the dataset variable names with those data set variables...
Definition: RooAbsArg.cxx:1493
TObject * First() const
Definition: RooLinkedList.h:78
Bool_t _deleteWatch
Definition: RooAbsArg.h:559
Int_t GetSize() const
Definition: RooLinkedList.h:60
Iterator abstract base class.
Definition: TIterator.h:30
Bool_t isCloneOf(const RooAbsArg &other) const
Check if this object was created as a clone of &#39;other&#39;.
Definition: RooAbsArg.cxx:233
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:694
virtual void getParametersHook(const RooArgSet *, RooArgSet *, Bool_t) const
Definition: RooAbsArg.h:436
void attachToStore(RooAbsDataStore &store)
Definition: RooAbsArg.cxx:2325
RooArgSet * _ownedComponents
Definition: RooAbsArg.h:579
RooAbsArg * findServer(const char *name) const
Definition: RooAbsArg.h:122
virtual void attachToTree(TTree &t, Int_t bufSize=32000)=0
Overloadable function for derived classes to implement attachment as branch to a TTree.
Definition: RooAbsArg.cxx:1289
RooRefCountList _clientListValue
Definition: RooAbsArg.h:478
Bool_t _valueDirty
Definition: RooAbsArg.h:571
void registerCache(RooAbsCache &cache)
Register RooAbsCache with this object.
Definition: RooAbsArg.cxx:2041
void setValueDirty() const
Definition: RooAbsArg.h:441
RooAbsArg * findNewServer(const RooAbsCollection &newSet, Bool_t nameChange) const
Find the new server in the specified set that matches the old server.
Definition: RooAbsArg.cxx:1047
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string &#39;value&#39; to this object under key &#39;key&#39;.
Definition: RooAbsArg.cxx:275
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition: TObject.cxx:128
std::deque< RooAbsCache * > _cacheList
Definition: RooAbsArg.h:480
RooFIter serverMIterator() const
Definition: RooAbsArg.h:119
Bool_t observableOverlaps(const RooAbsData *dset, const RooAbsArg &testArg) const
Test if any of the dependents of the arg tree (as determined by getObservables) overlaps with those o...
Definition: RooAbsArg.cxx:813
void printCompactTree(const char *indent="", const char *fileName=0, const char *namePat=0, RooAbsArg *client=0)
Print tree structure of expression tree on stdout, or to file if filename is specified.
Definition: RooAbsArg.cxx:1779
RooPlotable is a &#39;mix-in&#39; base class that define the standard RooFit plotting and printing methods...
Definition: RooPrintable.h:25
void Class()
Definition: Class.C:29
RooLinkedList getCloningAncestors() const
Return ancestors in cloning chain of this RooAbsArg.
Definition: RooAbsArg.cxx:2088
virtual void printName(std::ostream &os) const
Print object name.
Definition: RooAbsArg.cxx:1311
virtual Bool_t changePointer(const RooAbsCollection &newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE)=0
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Definition: TObjArray.cxx:414
RooVectorDataStore is the abstract base class for data collection that use a TTree as internal storag...
static constexpr double liter
virtual void attachToVStore(RooVectorDataStore &vstore)=0
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
Definition: RooAbsArg.h:227
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...
friend std::istream & operator>>(std::istream &is, RooAbsArg &arg)
Istream operator.
Definition: RooAbsArg.cxx:1468
Int_t Compare(const TObject *other) const
Utility function used by TCollection::Sort to compare contained TObjects We implement comparison by n...
Definition: RooAbsArg.cxx:1531
static Bool_t _verboseDirty
Definition: RooAbsArg.h:557
virtual Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Interface for server redirect calls.
Definition: RooAbsCache.cxx:89
virtual Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Definition: RooAbsArg.h:488
RooConstVar represent a constant real-valued object.
Definition: RooConstVar.h:25
friend class RooArgSet
Definition: RooAbsArg.h:471
static Bool_t _inhibitDirty
Definition: RooAbsArg.h:558
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
Bool_t isShapeServer() const
Definition: RooArgProxy.h:65
TString operator+(const TString &s1, const TString &s2)
Use the special concatenation constructor.
Definition: TString.cxx:1448
void wireAllCaches()
Definition: RooAbsArg.cxx:2368
virtual void operModeHook()
Definition: RooAbsArg.h:430
Bool_t overlaps(const RooAbsArg &testArg, Bool_t valueOnly=kFALSE) const
Test if any of the nodes of tree are shared with that of the given tree.
Definition: RooAbsArg.cxx:799
static ULong64_t fnv1a64(const char *data)
Definition: RooAbsArg.cxx:2006
static void verboseDirty(Bool_t flag)
Activate verbose messaging related to dirty flag propagation.
Definition: RooAbsArg.cxx:225
virtual Bool_t isFundamental() const
Definition: RooAbsArg.h:157
void addServerList(RooAbsCollection &serverList, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE)
Register a list of RooAbsArg as servers to us by calls addServer() for each arg in the list...
Definition: RooAbsArg.cxx:375
virtual void printCompactTreeHook(std::ostream &, const char *)
Interface for printing of cache guts in tree mode printing.
static RooNameReg & instance()
Return reference to singleton instance.
Definition: RooNameReg.cxx:64
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
Definition: RooAbsArg.cxx:266
virtual void Add(TObject *arg)
Definition: RooLinkedList.h:62
void graphVizAddConnections(std::set< std::pair< RooAbsArg *, RooAbsArg *> > &)
Utility function that inserts all point-to-point client-server connections between any two RooAbsArgs...
Definition: RooAbsArg.cxx:2186
RooNameSet is a utility class that stores the names the objects in a RooArget.
Definition: RooNameSet.h:24
void unRegisterCache(RooAbsCache &cache)
Unregister a RooAbsCache. Called from the RooAbsCache destructor.
Definition: RooAbsArg.cxx:2050
Int_t getSize() const
virtual const char * cacheUniqueSuffix() const
Definition: RooAbsArg.h:457
TString cleanBranchName() const
Construct a mangled name from the actual name that is free of any math symbols that might be interpre...
Definition: RooAbsArg.cxx:1868
void setTransientAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
Definition: RooAbsArg.cxx:304
RooExpensiveObjectCache & expensiveObjectCache() const
Definition: RooAbsArg.cxx:2338
RooAbsArg * first() const
Bool_t _isConstant
Do not persist. Pointer to global instance of string that matches object named.
Definition: RooAbsArg.h:586
RooAbsProxy is the abstact interface for proxy classes.
Definition: RooAbsProxy.h:31
virtual ~RooAbsArg()
Destructor.
Definition: RooAbsArg.cxx:169
Bool_t recursiveCheckObservables(const RooArgSet *nset) const
Recursively call checkObservables on all nodes in the expression tree.
Definition: RooAbsArg.cxx:714
RooArgSet * getComponents() const
Definition: RooAbsArg.cxx:684
void branchNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, Bool_t recurseNonDerived=kFALSE) const
Fill supplied list with all branch nodes of the arg tree starting with ourself as top node...
Definition: RooAbsArg.cxx:481
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:443
void printComponentTree(const char *indent="", const char *namePat=0, Int_t nLevel=999)
Print tree structure of expression tree on given ostream, only branch nodes are printed.
Definition: RooAbsArg.cxx:1841
RooWorkspace * _myws
Prevent &#39;AlwaysDirty&#39; mode for this node.
Definition: RooAbsArg.h:593
unsigned int UInt_t
Definition: RtypesCore.h:42
void SetName(const char *name)
Set the name of the TNamed.
Definition: RooAbsArg.cxx:2386
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key &#39;key&#39;.
Definition: RooAbsArg.cxx:290
Int_t GetEntriesFast() const
Definition: TObjArray.h:64
char * Form(const char *fmt,...)
virtual void printAddress(std::ostream &os) const
Print class name of object.
Definition: RooAbsArg.cxx:1337
RooRefCountList _clientList
Definition: RooAbsArg.h:476
static UInt_t crc32(const char *data)
Definition: RooAbsArg.cxx:1902
RooAbsArg * absArg() const
Definition: RooArgProxy.h:37
void attachDataStore(const RooAbsDataStore &set)
Replace server nodes with names matching the dataset variable names with those data set variables...
Definition: RooAbsArg.cxx:1512
virtual Bool_t addOwned(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
Definition: RooArgSet.h:90
virtual void printMetaArgs(std::ostream &) const
Definition: RooAbsArg.h:237
virtual void changeNormSet(const RooArgSet *newNormSet)
Destructor.
Definition: RooAbsProxy.cxx:65
OperMode operMode() const
Definition: RooAbsArg.h:399
OperMode _operMode
Definition: RooAbsArg.h:575
Bool_t isValueServer() const
Definition: RooArgProxy.h:61
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Implement multi-line detailed printing.
Definition: RooAbsArg.cxx:1381
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:37
RooRefCountList _clientListShape
Definition: RooAbsArg.h:477
void changeServer(RooAbsArg &server, Bool_t valueProp, Bool_t shapeProp)
Change dirty flag propagation mask for specified server.
Definition: RooAbsArg.cxx:436
void addParameters(RooArgSet &params, const RooArgSet *nset=0, Bool_t stripDisconnected=kTRUE) const
INTERNAL helper function for getParameters()
Definition: RooAbsArg.cxx:546
TString fName
Definition: TNamed.h:32
#define coutF(a)
Definition: RooMsgService.h:35
static RooExpensiveObjectCache & instance()
Return reference to singleton instance.
virtual void writeToStream(std::ostream &os, Bool_t compact) const =0
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:25
static void setDirtyInhibit(Bool_t flag)
Control global dirty inhibit mode.
Definition: RooAbsArg.cxx:216
RooAbsArg * next()
const Bool_t kFALSE
Definition: RtypesCore.h:88
virtual void printArgs(std::ostream &os) const
Print object arguments, ie its proxies.
Definition: RooAbsArg.cxx:1348
virtual Bool_t Remove(TObject *obj)
Remove object from list and if reference count reaches zero delete object itself as well...
Bool_t _localNoInhibitDirty
Cached isConstant status.
Definition: RooAbsArg.h:588
RooRefArray _proxyList
Definition: RooAbsArg.h:479
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:35
void printDirty(Bool_t depth=kTRUE) const
Print information about current value dirty state information.
Definition: RooAbsArg.cxx:1543
Bool_t defineSetInternal(const char *name, const RooArgSet &aset)
#define ClassImp(name)
Definition: Rtypes.h:359
virtual Bool_t isValid() const
WVE (08/21/01) Probably obsolete now.
Definition: RooAbsArg.cxx:1300
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooFIter fwdIterator() const
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&#39;t match any of...
Definition: RooAbsArg.cxx:537
std::map< std::string, std::string > _stringAttrib
Definition: RooAbsArg.h:529
unsigned long long ULong64_t
Definition: RtypesCore.h:70
unsigned long ULong_t
Definition: RtypesCore.h:51
virtual Bool_t checkObservables(const RooArgSet *nset) const
Overloadable function in which derived classes can implement consistency checks of the variables...
Definition: RooAbsArg.cxx:705
virtual void Expand(Int_t newSize)
Expand or shrink the array to newSize elements.
Definition: TObjArray.cxx:386
RooRefCountList _serverList
Definition: RooAbsArg.h:475
TIterator * _clientValueIter
Iterator over _clientListShape.
Definition: RooAbsArg.h:482
Bool_t findConstantNodes(const RooArgSet &observables, RooArgSet &cacheList)
Find branch nodes with all-constant parameters, and add them to the list of nodes that can be cached ...
Definition: RooAbsArg.cxx:1640
Bool_t _prohibitServerRedirect
Set of owned component.
Definition: RooAbsArg.h:581
const char * GetName() const
Returns name of object.
Bool_t isValueDirty() const
Definition: RooAbsArg.h:336
RooAbsProxy * getProxy(Int_t index) const
Return the nth proxy from the proxy list.
Definition: RooAbsArg.cxx:1250
Bool_t dependsOnValue(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0) const
Definition: RooAbsArg.h:88
Mother of all ROOT objects.
Definition: TObject.h:37
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects...
Int_t numProxies() const
Return the number of registered proxies.
Definition: RooAbsArg.cxx:1263
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
RooArgProxy is the abstact interface for RooAbsArg proxy classes.
Definition: RooArgProxy.h:24
Bool_t isShapeServer(const RooAbsArg &arg) const
Definition: RooAbsArg.h:142
Bool_t _shapeDirty
Definition: RooAbsArg.h:572
virtual void printTitle(std::ostream &os) const
Print object title.
Definition: RooAbsArg.cxx:1321
Bool_t isValueServer(const RooAbsArg &arg) const
Definition: RooAbsArg.h:134
virtual Bool_t isDerived() const
Definition: RooAbsArg.h:81
Bool_t getTransientAttribute(const Text_t *name) const
Check if a named attribute is set.
Definition: RooAbsArg.cxx:326
void setShapeDirty() const
Definition: RooAbsArg.h:442
TIterator * MakeIterator(Bool_t dir=kTRUE) const
Return an iterator over this list.
virtual void optimizeCacheMode(const RooArgSet &, RooArgSet &, RooLinkedList &)
Interface for processing of cache mode optimization calls.
Definition: RooAbsCache.cxx:80
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Interface function signaling a request to perform constant term optimization.
Definition: RooAbsArg.cxx:1735
virtual TObject * Next()=0
const TNamed * constPtr(const char *stringPtr)
Return a unique TNamed pointer for given C++ string.
Definition: RooNameReg.cxx:91
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...
RooSetProxy is the concrete proxy for RooArgSet objects.
Definition: RooSetProxy.h:24
#define snprintf
Definition: civetweb.c:822
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
Definition: RooAbsArg.cxx:1750
Int_t GetEntries() const
Return the number of objects in array (i.e.
Definition: TObjArray.cxx:522
char Text_t
Definition: RtypesCore.h:58
RooAbsArg * findArg(const RooAbsArg *) const
Return pointer to object with given name in collection.
void Add(TObject *obj)
Definition: TObjArray.h:73
#define cxcoutF(a)
Definition: RooMsgService.h:99
Definition: first.py:1
virtual void printTree(std::ostream &os, TString indent="") const
Print object tree structure.
Definition: RooAbsArg.cxx:1450
Bool_t isShapeDirty() const
Definition: RooAbsArg.h:331
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66
static std::map< RooAbsArg *, TRefArray * > _ioEvoList
Definition: RooAbsArg.h:598
virtual void Compress()
Remove empty slots from array.
Definition: TObjArray.cxx:333
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:357
void addServer(RooAbsArg &server, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE)
Register another RooAbsArg as a server to us, ie, declare that we depend on it.
Definition: RooAbsArg.cxx:339
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
Definition: RooAbsArg.cxx:1084
virtual void printCompactTreeHook(std::ostream &os, const char *ind="")
Hook function interface for object to insert additional information when printed in the context of a ...
Definition: RooAbsArg.cxx:2028
virtual void ioStreamerPass2()
In which workspace do I live, if any.
Definition: RooAbsArg.cxx:2441
const char * aggregateCacheUniqueSuffix() const
Definition: RooAbsArg.cxx:2350
Bool_t redirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t isRecursionStep=kFALSE)
Iterator over _clientListValue.
Definition: RooAbsArg.cxx:925
void removeServer(RooAbsArg &server, Bool_t force=kFALSE)
Unregister another RooAbsArg as a server to us, ie, declare that we no longer depend on its value and...
Definition: RooAbsArg.cxx:390
const Bool_t kTRUE
Definition: RtypesCore.h:87
virtual void print(std::ostream &os, Bool_t addContents=kFALSE) const
Print proxy name.
Definition: RooAbsProxy.cxx:75
RooExpensiveObjectCache * _eocache
Prohibit server redirects – Debugging tool.
Definition: RooAbsArg.h:583
char name[80]
Definition: TGX11.cxx:109
std::set< std::string > _boolAttribTransient
Definition: RooAbsArg.h:530
static UInt_t fnv1a32(const char *data)
Definition: RooAbsArg.cxx:1989
Bool_t isConstant() const
Definition: RooAbsArg.h:266
const TNamed * namePtr() const
Definition: RooAbsArg.h:461
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:48