69 #if ROOT_VERSION_CODE <= ROOT_VERSION(5,19,02) 104 _classDeclDirList.push_back(dir) ;
114 _classImplDirList.push_back(dir) ;
126 _classFileExportDir = dir ;
128 _classFileExportDir =
".wscode.%s.%s" ;
185 while((data2=iter->
Next())) {
201 for (map<string,RooArgSet>::const_iterator iter3 = other.
_namedSets.begin() ; iter3 != other.
_namedSets.end() ; ++iter3) {
211 while((gobj=iter4->
Next())) {
254 strlcpy(buf, fileSpec, 64000);
255 char* filename = strtok(buf,
":") ;
256 char* wsname = strtok(0,
":") ;
257 char* objname = strtok(0,
":") ;
260 if (!filename||!wsname||!objname) {
261 coutE(
InputArguments) <<
"RooWorkspace(" <<
GetName() <<
") ERROR in file specification, expecting for 'filename:wsname:objname'" << endl ;
276 <<
" or object is not a RooWorkspace" << endl ;
283 Bool_t ret =
import(*warg,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) ;
289 Bool_t ret =
import(*wdata,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) ;
295 <<
" in workspace " << wsname <<
" in file " << filename << endl ;
313 ret |=
import(*oneArg,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) ;
363 pc.
defineString(
"conflictSuffix",
"RenameConflictNodes",0) ;
364 pc.
defineInt(
"renameConflictOrig",
"RenameConflictNodes",0,0) ;
366 pc.
defineString(
"allVarsSuffix",
"RenameAllVariables",0) ;
367 pc.
defineString(
"allVarsExcept",
"RenameAllVariables",1) ;
371 pc.
defineInt(
"useExistingNodes",
"RecycleConflictNodes",0,0) ;
373 pc.
defineInt(
"noRecursion",
"NoRecursion",0,0) ;
374 pc.
defineMutex(
"RenameConflictNodes",
"RenameAllNodes") ;
375 pc.
defineMutex(
"RenameConflictNodes",
"RecycleConflictNodes") ;
376 pc.
defineMutex(
"RenameAllNodes",
"RecycleConflictNodes") ;
377 pc.
defineMutex(
"RenameVariable",
"RenameAllVariables") ;
386 const char* suffixC = pc.
getString(
"conflictSuffix") ;
387 const char* suffixA = pc.
getString(
"allSuffix") ;
388 const char* suffixV = pc.
getString(
"allVarsSuffix") ;
389 const char* exceptVars = pc.
getString(
"allVarsExcept") ;
390 const char* varChangeIn = pc.
getString(
"varChangeIn") ;
391 const char* varChangeOut = pc.
getString(
"varChangeOut") ;
392 Bool_t renameConflictOrig = pc.
getInt(
"renameConflictOrig") ;
393 Int_t useExistingNodes = pc.
getInt(
"useExistingNodes") ;
399 if (suffixC && strlen(suffixC)==0) suffixC = 0 ;
400 if (suffixA && strlen(suffixA)==0) suffixA = 0 ;
403 const char* suffix = suffixA ? suffixA : suffixC ;
406 map<string,string> varMap ;
407 if (strlen(varChangeIn)>0) {
411 strlcpy(tmp, varChangeIn, 64000);
412 list<string> tmpIn,tmpOut ;
413 char* ptr = strtok(tmp,
", ") ;
415 tmpIn.push_back(ptr) ;
416 ptr = strtok(0,
", ") ;
418 strlcpy(tmp, varChangeOut, 64000);
419 ptr = strtok(tmp,
", ") ;
421 tmpOut.push_back(ptr) ;
422 ptr = strtok(0,
", ") ;
424 list<string>::iterator iin = tmpIn.begin() ;
425 list<string>::iterator iout = tmpOut.begin() ;
426 for (;iin!=tmpIn.end() ; ++iin,++iout) {
433 std::set<string> exceptVarNames ;
435 if (exceptVars && strlen(exceptVars)) {
436 strlcpy(tmp, exceptVars, 64000);
437 char *ptr = strtok(tmp,
", ");
439 exceptVarNames.insert(ptr);
440 ptr = strtok(0,
", ");
444 if (suffixV != 0 && strlen(suffixV)>0) {
449 if (exceptVarNames.find(v->
GetName())==exceptVarNames.end()) {
463 Bool_t factoryMatch = (tagIn && tagWs && !strcmp(tagIn,tagWs)) ;
465 ((
RooAbsArg&)inArg).setAttribute(
"RooWorkspace::Recycle") ;
468 if (!suffix && wsarg && !useExistingNodes && !(inArg.
isFundamental() && varMap[inArg.
GetName()]!=
"")) {
472 <<
": another instance with same name already in the workspace and no conflict resolution protocol specified" << endl ;
481 coutI(
ObjectHandling) <<
"RooWorkSpace::import(" <<
GetName() <<
") Recycling existing object " << inArg.
GetName() <<
" created with identical factory specification" << endl ;
489 branchSet.
add(inArg) ;
497 if (wsbranch && wsbranch!=branch && !branch->
getAttribute(
"RooWorkspace::Recycle") && !useExistingNodes) {
498 conflictNodes.
add(*branch) ;
504 if (conflictNodes.
getSize()>0 && !suffix && !useExistingNodes) {
506 << conflictNodes <<
" already in the workspace and no conflict resolution protocol specified" << endl ;
517 conflictNodes.
add(branchSet) ;
521 string topName2 = cloneTop->
GetName() ;
522 if (!renameConflictOrig) {
528 string origName = cnode2->
GetName() ;
531 string tag =
Form(
"ORIGNAME:%s",origName.c_str()) ;
534 string tag2 =
Form(
"%s",origName.c_str()) ;
539 if (cnode2==cloneTop) {
545 <<
") Resolving name conflict in workspace by changing name of imported node " 546 << origName <<
" to " << cnode2->
GetName() << endl ;
557 string origName = cnode->
GetName() ;
572 string newname =
Form(
"%s_%s_%d",cnode->
GetName(),suffix,
n) ;
574 wsnode->
SetName(newname.c_str()) ;
583 <<
") Resolving name conflict in workspace by changing name of original node " 584 << origName <<
" to " << wsnode->
GetName() << endl ;
588 << origName <<
" to be renamed, but didn't find it..." << endl ;
597 if (strlen(varChangeIn)>0 || (suffixV && strlen(suffixV)>0)) {
604 if (varMap.find(cnode->
GetName())!=varMap.end()) {
605 string origName = cnode->
GetName() ;
607 string tag =
Form(
"ORIGNAME:%s",origName.c_str()) ;
610 string tag2 =
Form(
"%s",origName.c_str()) ;
616 << origName <<
" to " << cnode->
GetName() <<
" on request" << endl ;
619 if (cnode==cloneTop) {
640 conflictNodes2.
add(*branch2) ;
646 if (conflictNodes2.
getSize()) {
648 << conflictNodes2 <<
" cause naming conflict after conflict resolution protocol was executed" << endl ;
660 <<
" has an error in importing in one or more of its auxiliary objects, aborting" << endl ;
675 << node->IsA()->
GetName() <<
"::" << node->
GetName() <<
", reading of workspace will require external definition of class" << endl ;
689 if (!silence && useExistingNodes) {
691 <<
"::" << node->
GetName() <<
" for import of " << cloneTop2->IsA()->
GetName() <<
"::" 692 << cloneTop2->
GetName() << endl ;
733 if (recycledNodes.
getSize()>0) {
784 pc.
defineInt(
"embedded",
"Embedded",0,0) ;
793 const char* dsetName = pc.
getString(
"dsetName") ;
794 const char* varChangeIn = pc.
getString(
"varChangeIn") ;
795 const char* varChangeOut = pc.
getString(
"varChangeOut") ;
799 if (dsetName && strlen(dsetName)==0) {
806 if (dsetName && dataList.
FindObject(dsetName)) {
807 coutE(
ObjectHandling) <<
"RooWorkspace::import(" <<
GetName() <<
") ERROR dataset with name " << dsetName <<
" already exists in workspace, import aborted" << endl ;
811 coutE(
ObjectHandling) <<
"RooWorkspace::import(" <<
GetName() <<
") ERROR dataset with name " << inData.
GetName() <<
" already exists in workspace, import aborted" << endl ;
826 if (strlen(varChangeIn)>0) {
830 strlcpy(tmp, varChangeIn, 64000);
831 list<string> tmpIn,tmpOut ;
832 char* ptr = strtok(tmp,
",") ;
834 tmpIn.push_back(ptr) ;
835 ptr = strtok(0,
",") ;
837 strlcpy(tmp, varChangeOut, 64000);
838 ptr = strtok(tmp,
",") ;
840 tmpOut.push_back(ptr) ;
841 ptr = strtok(0,
",") ;
843 list<string>::iterator iin = tmpIn.begin() ;
844 list<string>::iterator iout = tmpOut.begin() ;
846 for (; iin!=tmpIn.end() ; ++iin,++iout) {
847 coutI(
ObjectHandling) <<
"RooWorkSpace::import(" <<
GetName() <<
") changing name of dataset observable " << *iin <<
" to " << *iout << endl ;
864 dataList.
Add(clone) ;
874 while ((carg=iter2.
next())) {
893 map<string,RooArgSet>::iterator i =
_namedSets.find(name) ;
895 coutW(
InputArguments) <<
"RooWorkspace::defineSet(" <<
GetName() <<
") WARNING redefining previously defined named set " << name << endl ;
910 <<
"\" is not in workspace and importMissing option is disabled" << endl ;
933 map<string, RooArgSet>::iterator i =
_namedSets.find(name);
936 <<
") WARNING redefining previously defined named set " << name << endl;
953 map<string,RooArgSet>::iterator i =
_namedSets.find(name) ;
955 coutW(
InputArguments) <<
"RooWorkspace::defineSet(" <<
GetName() <<
") WARNING redefining previously defined named set " << name << endl ;
962 strlcpy(buf, contentList, 64000);
963 char* token = strtok(buf,
",") ;
968 <<
"\" is not in workspace" << endl ;
972 token = strtok(0,
",") ;
995 strlcpy(buf, newContents, 64000);
996 char* token = strtok(buf,
",") ;
1001 <<
"\" is not in workspace" << endl ;
1004 wsargs.
add(*
arg(token)) ;
1005 token = strtok(0,
",") ;
1022 map<string,RooArgSet>::iterator i =
_namedSets.find(name) ;
1023 return (i!=
_namedSets.end()) ? &(i->second) : 0 ;
1037 <<
" does not exist" << endl ;
1044 <<
" already exists" << endl ;
1068 <<
" does not exist" << endl ;
1185 TString className = carg->IsA()->
GetName() ;
1188 << carg->IsA()->
GetName() <<
"::" << carg->
GetName() <<
", reading of workspace will require external definition of class" << endl ;
1226 delete actualParams ;
1231 *snapshot = params ;
1236 coutI(
ObjectHandling) <<
"RooWorkspace::saveSnaphot(" <<
GetName() <<
") replacing previous snapshot with name " << name << endl ;
1257 coutE(
ObjectHandling) <<
"RooWorkspace::loadSnapshot(" <<
GetName() <<
") no snapshot with name " << name <<
" is available" << endl ;
1262 *actualParams = *snap ;
1263 delete actualParams ;
1280 coutE(
ObjectHandling) <<
"RooWorkspace::loadSnapshot(" <<
GetName() <<
") no snapshot with name " << name <<
" is available" << endl ;
1383 strlcpy(tmp, nameList, 64000);
1384 char* token = strtok(tmp,
",") ;
1390 coutE(
InputArguments) <<
" RooWorkspace::argSet(" <<
GetName() <<
") no RooAbsArg named \"" << token <<
"\" in workspace" << endl ;
1392 token = strtok(0,
",") ;
1568 list<RooAbsData*> ret ;
1572 ret.push_back(dat) ;
1584 list<RooAbsData*> ret ;
1588 ret.push_back(dat) ;
1601 list<TObject*> ret ;
1610 ret.push_back(gobj) ;
1631 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo(" << _wspace->GetName() <<
") request to import code of class " << tc->
GetName() << endl ;
1636 if (!doReplace && _c2fmap.find(tc->
GetName())!=_c2fmap.end()) {
1637 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo(" << _wspace->GetName() <<
") code of class " << tc->
GetName() <<
" already imported, skipping" << endl ;
1643 if (mapEntry && strlen(mapEntry)>0) {
1644 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo(" << _wspace->GetName() <<
") code of class " << tc->
GetName() <<
" is in ROOT distribution, skipping " << endl ;
1653 if (implfile.empty() || declfile.empty()) {
1654 oocoutE(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo(" << _wspace->GetName() <<
") ERROR: cannot retrieve code file names for class " 1655 << tc->
GetName() <<
" through ROOT TClass interface, unable to import code" << endl ;
1661 if (TString(implfile.c_str()).
Index(rootsys)>=0) {
1662 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo(" << _wspace->GetName() <<
") code of class " << tc->
GetName() <<
" is in ROOT distribution, skipping " << endl ;
1665 const char* implpath=0 ;
1671 oocoutW(_wspace,
ObjectHandling) <<
"RooWorkspace::autoImportClass(" << _wspace->GetName() <<
") WARNING cannot import class " 1672 << tc->
GetName() <<
" : it cannot be persisted because it doesn't have a default constructor. Please fix " << endl ;
1679 char* declpath = 0 ;
1686 list<string>::iterator diter = RooWorkspace::_classDeclDirList.begin() ;
1688 while(diter!= RooWorkspace::_classDeclDirList.end()) {
1704 oocoutW(_wspace,
ObjectHandling) <<
"RooWorkspace::autoImportClass(" << _wspace->GetName() <<
") WARNING Cannot access code of class " 1705 << tc->
GetName() <<
" because header file " << declfile <<
" is not found in current directory nor in $ROOTSYS" ;
1708 diter = RooWorkspace::_classDeclDirList.begin() ;
1710 while(diter!= RooWorkspace::_classDeclDirList.end()) {
1712 if (diter!=RooWorkspace::_classDeclDirList.begin()) {
1720 <<
"path using RooWorkspace::addClassDeclDir(const char* dir)" << endl ;
1732 list<string>::iterator iiter = RooWorkspace::_classImplDirList.begin() ;
1734 while(iiter!= RooWorkspace::_classImplDirList.end()) {
1750 oocoutW(_wspace,
ObjectHandling) <<
"RooWorkspace::autoImportClass(" << _wspace->GetName() <<
") WARNING Cannot access code of class " 1751 << tc->
GetName() <<
" because implementation file " << implfile <<
" is not found in current directory nor in $ROOTSYS" ;
1754 iiter = RooWorkspace::_classImplDirList.begin() ;
1756 while(iiter!= RooWorkspace::_classImplDirList.end()) {
1758 if (iiter!=RooWorkspace::_classImplDirList.begin()) {
1766 <<
"path using RooWorkspace::addClassImplDir(const char* dir)" << endl ;
1787 int dotpos2 = strrchr(declfilename.c_str(),
'.') - declfilename.c_str() ;
1788 string declfilebase = declfilename.substr(0,dotpos2) ;
1789 string declfileext = declfilename.substr(dotpos2+1) ;
1791 list<string> extraHeaders ;
1794 if (_fmap.find(declfilebase) == _fmap.end()) {
1797 fstream fdecl(declpath?declpath:declfile.c_str()) ;
1802 <<
") ERROR opening declaration file " << declfile << endl ;
1807 <<
") importing code of class " << tc->
GetName()
1808 <<
" from " << (implpath?implpath:implfile.c_str())
1809 <<
" and " << (declpath?declpath:declfile.c_str()) << endl ;
1814 while(fdecl.getline(buf,1023)) {
1818 char* extincfile = 0 ;
1821 if (strstr(buf,
"#include")) {
1824 strlcpy(tmp, buf, 64000);
1825 Bool_t stdinclude = strchr(buf,
'<');
1826 strtok(tmp,
" <\"");
1827 char *incfile = strtok(0,
" <>\"");
1832 hpath +=
"/include/";
1836 <<
") scheduling include file " << incfile <<
" for import" << endl;
1837 extraHeaders.push_back(incfile);
1838 extincfile = incfile;
1839 processedInclude =
kTRUE;
1844 if (processedInclude) {
1845 decl +=
"// external include file below retrieved from workspace code storage\n" ;
1846 decl +=
Form(
"#include \"%s\"\n",extincfile) ;
1854 fstream fimpl(implpath?implpath:implfile.c_str()) ;
1859 <<
") ERROR opening implementation file " << implfile << endl ;
1866 while(fimpl.getline(buf,1023)) {
1872 char* extincfile = 0 ;
1875 if (strstr(buf,
"#include")) {
1878 strlcpy(tmp, buf, 64000);
1879 Bool_t stdinclude = strchr(buf,
'<');
1880 strtok(tmp,
" <\"");
1881 char *incfile = strtok(0,
" <>\"");
1883 if (strstr(incfile, declfilename.c_str())) {
1884 foundSelfInclude =
kTRUE;
1887 if (!stdinclude && !foundSelfInclude) {
1890 hpath +=
"/include/";
1895 <<
") scheduling include file " << incfile <<
" for import" << endl;
1896 extraHeaders.push_back(incfile);
1897 extincfile = incfile;
1898 processedInclude =
kTRUE;
1905 if (foundSelfInclude) {
1908 impl +=
"// class declaration include file below retrieved from workspace code storage\n" ;
1909 impl +=
Form(
"#include \"%s.%s\"\n",declfilebase.c_str(),declfileext.c_str()) ;
1910 }
else if (processedInclude) {
1911 impl +=
"// external include file below retrieved from workspace code storage\n" ;
1912 impl +=
Form(
"#include \"%s\"\n",extincfile) ;
1920 _fmap[declfilebase]._hfile = decl ;
1921 _fmap[declfilebase]._cxxfile = impl ;
1922 _fmap[declfilebase]._hext = declfileext ;
1925 for (list<string>::iterator ehiter = extraHeaders.begin() ; ehiter != extraHeaders.end() ; ++ehiter ) {
1926 if (_ehmap.find(*ehiter) == _ehmap.end()) {
1929 eh.
_hname = ehiter->c_str() ;
1930 fstream fehdr(ehiter->c_str()) ;
1933 while(fehdr.getline(buf2,1023)) {
1936 if (strstr(buf2,
"#include")) {
1939 strlcpy(tmp, buf2, 64000);
1940 Bool_t stdinclude = strchr(buf,
'<');
1941 strtok(tmp,
" <\"");
1942 char *incfile = strtok(0,
" <>\"");
1947 hpath +=
"/include/";
1951 <<
") scheduling recursive include file " << incfile <<
" for import" 1953 extraHeaders.push_back(incfile);
1961 eh.
_hfile = ehimpl.c_str();
1963 _ehmap[ehiter->c_str()] = eh;
1971 <<
") code of class " << tc->
GetName()
1972 <<
" was already imported from " << (implpath?implpath:implfile.c_str())
1973 <<
" and " << (declpath?declpath:declfile.c_str()) << endl ;
1984 TString baseNameList ;
1988 list<TClass*> bases ;
1990 if (baseNameList.Length()>0) {
1991 baseNameList +=
"," ;
1999 _c2fmap[tc->
GetName()]._baseName = baseNameList ;
2000 _c2fmap[tc->
GetName()]._fileBase = declfilebase ;
2003 list<TClass*>::iterator biter = bases.begin() ;
2004 while(biter!=bases.end()) {
2005 autoImportClass(*biter,doReplace) ;
2036 TString title=
Form(
"TDirectory representation of RooWorkspace %s",
GetName()) ;
2041 while((darg=(
RooAbsArg*)iter->Next())) {
2063 if (oldObj && !replaceExisting) {
2065 <<
object.GetName() <<
" is already in workspace and replaceExisting flag is set to false" << endl ;
2071 object.IsA()->SetDirectoryAutoAdd(0);
2082 object.IsA()->SetDirectoryAutoAdd(func);
2104 if (oldObj && !replaceExisting) {
2106 <<
object.GetName() <<
" is already in workspace and replaceExisting flag is set to false" << endl ;
2160 if (ret)
return ret ;
2164 if (ret)
return ret ;
2181 if (!gobj)
return 0 ;
2206 TFile f(fileName,recreate?
"RECREATE":
"UPDATE") ;
2221 cxcoutD(
ObjectHandling) <<
"INFO: Creating RooFactoryWSTool associated with this workspace" << endl ;
2247 if (TString(opts).Contains(
"t")) {
2250 if (TString(opts).Contains(
"v")) {
2254 cout << endl <<
"RooWorkspace(" <<
GetName() <<
") " <<
GetTitle() <<
" contents" << endl << endl ;
2287 funcSet.
add(*parg) ;
2295 catfuncSet.
add(*parg) ;
2303 convResoSet.
add(*parg) ;
2305 resoSet.
add(*parg) ;
2318 funcSet.
add(*parg) ;
2323 catfuncSet.
add(*parg) ;
2344 cout <<
"variables" << endl ;
2345 cout <<
"---------" << endl ;
2346 cout << varSet << endl ;
2351 cout <<
"p.d.f.s" << endl ;
2352 cout <<
"-------" << endl ;
2368 cout <<
"analytical resolution models" << endl ;
2369 cout <<
"----------------------------" << endl ;
2386 cout <<
"functions" << endl ;
2387 cout <<
"--------" << endl ;
2402 cout <<
"category functions" << endl ;
2403 cout <<
"------------------" << endl ;
2418 cout <<
"datasets" << endl ;
2419 cout <<
"--------" << endl ;
2423 cout << data2->IsA()->
GetName() <<
"::" << data2->
GetName() << *data2->
get() << endl ;
2430 cout <<
"embedded datasets (in pdfs and functions)" << endl ;
2431 cout <<
"-----------------------------------------" << endl ;
2435 cout << data2->IsA()->
GetName() <<
"::" << data2->
GetName() << *data2->
get() << endl ;
2442 cout <<
"parameter snapshots" << endl ;
2443 cout <<
"-------------------" << endl ;
2447 cout << snap->
GetName() <<
" = (" ;
2452 if (first) { first=
kFALSE ; }
else { cout <<
"," ; }
2459 cout <<
")" << endl ;
2468 cout <<
"named sets" << endl ;
2469 cout <<
"----------" << endl ;
2470 for (map<string,RooArgSet>::const_iterator it =
_namedSets.begin() ; it !=
_namedSets.end() ; it++) {
2471 if (verbose || !TString(it->first.c_str()).BeginsWith(
"CACHE_")) {
2472 cout << it->first <<
":" << it->second << endl;
2481 cout <<
"generic objects" << endl ;
2482 cout <<
"---------------" << endl ;
2487 cout << ((
RooTObjWrap*)gobj)->obj()->IsA()->
GetName() <<
"::" << gobj->GetName() << endl ;
2489 cout << gobj->IsA()->
GetName() <<
"::" << gobj->
GetName() << endl ;
2498 cout <<
"study modules" << endl ;
2499 cout <<
"-------------" << endl ;
2503 cout << smobj->IsA()->
GetName() <<
"::" << smobj->
GetName() << endl ;
2511 cout <<
"embedded class code" << endl ;
2512 cout <<
"-------------------" << endl ;
2518 cout <<
"embedded precalculated expensive components" << endl ;
2519 cout <<
"-------------------------------------------" << endl ;
2535 void RooWorkspace::CodeRepo::Streamer(
TBuffer &R__b)
2537 typedef ::RooWorkspace::CodeRepo thisClass;
2550 name.Streamer(R__b) ;
2551 _fmap[
name]._hext.Streamer(R__b) ;
2552 _fmap[
name]._hfile.Streamer(R__b) ;
2553 _fmap[
name]._cxxfile.Streamer(R__b) ;
2561 name.Streamer(R__b) ;
2562 _c2fmap[
name]._baseName.Streamer(R__b) ;
2563 _c2fmap[
name]._fileBase.Streamer(R__b) ;
2572 name.Streamer(R__b) ;
2573 _ehmap[
name]._hname.Streamer(R__b) ;
2574 _ehmap[
name]._hfile.Streamer(R__b) ;
2581 _compiledOK = !compileClasses() ;
2589 UInt_t count = _fmap.size() ;
2591 map<TString,ClassFiles>::iterator iter = _fmap.begin() ;
2592 while(iter!=_fmap.end()) {
2593 TString key_copy(iter->first) ;
2594 key_copy.Streamer(R__b) ;
2595 iter->second._hext.Streamer(R__b) ;
2596 iter->second._hfile.Streamer(R__b);
2597 iter->second._cxxfile.Streamer(R__b);
2603 count = _c2fmap.size() ;
2605 map<TString,ClassRelInfo>::iterator iter2 = _c2fmap.begin() ;
2606 while(iter2!=_c2fmap.end()) {
2607 TString key_copy(iter2->first) ;
2608 key_copy.Streamer(R__b) ;
2609 iter2->second._baseName.Streamer(R__b) ;
2610 iter2->second._fileBase.Streamer(R__b);
2615 count = _ehmap.size() ;
2617 map<TString,ExtraHeader>::iterator iter3 = _ehmap.begin() ;
2618 while(iter3!=_ehmap.end()) {
2619 TString key_copy(iter3->first) ;
2620 key_copy.Streamer(R__b) ;
2621 iter3->second._hname.Streamer(R__b) ;
2622 iter3->second._hfile.Streamer(R__b);
2640 void RooWorkspace::Streamer(
TBuffer &R__b)
2649 while((node=fiter.
next())) {
2663 cout <<
"RooWorkspace::Streamer(" <<
GetName() <<
") " << node->IsA()->
GetName() <<
"::" << node->
GetName()
2675 map<RooAbsArg*,list<RooAbsArg*> > extClients, extValueClients, extShapeClients ;
2688 extClients[tmparg].push_back(client) ;
2700 <<
" has external value client link to " << vclient <<
" (" << vclient->
GetName() <<
") with ref count " << tmparg->
_clientListValue.
refCount(vclient) << endl ;
2703 extValueClients[tmparg].push_back(vclient) ;
2707 delete vclientIter ;
2715 <<
" has external shape client link to " << sclient <<
" (" << sclient->
GetName() <<
") with ref count " << tmparg->
_clientListShape.
refCount(sclient) << endl ;
2718 extShapeClients[tmparg].push_back(sclient) ;
2722 delete sclientIter ;
2732 for (map<
RooAbsArg*,list<RooAbsArg*> >::iterator iterx = extClients.begin() ; iterx!=extClients.end() ; iterx++) {
2733 for (list<RooAbsArg*>::iterator citer = iterx->second.begin() ; citer!=iterx->second.end() ; citer++) {
2734 iterx->first->_clientList.Add(*citer) ;
2738 for (map<
RooAbsArg*,list<RooAbsArg*> >::iterator iterx = extValueClients.begin() ; iterx!=extValueClients.end() ; iterx++) {
2739 for (list<RooAbsArg*>::iterator citer = iterx->second.begin() ; citer!=iterx->second.end() ; citer++) {
2740 iterx->first->_clientListValue.Add(*citer) ;
2744 for (map<
RooAbsArg*,list<RooAbsArg*> >::iterator iterx = extShapeClients.begin() ; iterx!=extShapeClients.end() ; iterx++) {
2745 for (list<RooAbsArg*>::iterator citer = iterx->second.begin() ; citer!=iterx->second.end() ; citer++) {
2746 iterx->first->_clientListShape.Add(*citer) ;
2762 map<TString,ClassRelInfo>::const_iterator iter = _c2fmap.begin() ;
2763 while(iter!=_c2fmap.end()) {
2767 ret += iter->first ;
2795 map<TString,ClassRelInfo>::iterator iter = _c2fmap.begin() ;
2796 while(iter!=_c2fmap.end()) {
2798 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() now processing class " << iter->first.Data() << endl ;
2803 << iter->first <<
" already in ROOT class table, skipping" << endl ;
2813 oocoutI(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() reusing code export directory " << dirName.c_str()
2814 <<
" to extract coded embedded in workspace" << endl ;
2817 oocoutI(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() creating code export directory " << dirName.c_str()
2818 <<
" to extract coded embedded in workspace" << endl ;
2820 oocoutE(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() ERROR creating code export directory " << dirName.c_str()
2821 <<
" to extract coded embedded in workspace" << endl ;
2830 if (!writeExtraHeaders) {
2831 writeExtraHeaders =
kTRUE ;
2833 map<TString,ExtraHeader>::iterator eiter = _ehmap.begin() ;
2834 while(eiter!=_ehmap.end()) {
2838 string fdname =
Form(
"%s/%s",dirName.c_str(),eiter->second._hname.Data()) ;
2839 ifstream ifdecl(fdname.c_str()) ;
2843 while (ifdecl.getline(buf, 64000)) {
2849 needEHWrite = (crcFile != crcWS);
2854 oocoutI(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() Extracting extra header file " 2860 ofstream fdecl(fdname.c_str());
2862 oocoutE(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() ERROR opening file " << fdname
2863 <<
" for writing" << endl;
2866 fdecl << eiter->second._hfile.Data();
2875 ClassFiles& cfinfo = _fmap[iter->second._fileBase] ;
2877 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() now processing file with base " << iter->second._fileBase << endl ;
2881 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() file with base name " << iter->second._fileBase
2882 <<
" has already been extracted, skipping to next class" << endl ;
2888 string fdname =
Form(
"%s/%s.%s",dirName.c_str(),iter->second._fileBase.Data(),cfinfo.
_hext.Data()) ;
2889 ifstream ifdecl(fdname.c_str()) ;
2893 while (ifdecl.getline(buf, 64000)) {
2899 needDeclWrite = (crcFile!=crcWS) ;
2903 if (needDeclWrite) {
2904 oocoutI(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() Extracting declaration code of class " << iter->first <<
", file " << fdname << endl ;
2905 ofstream fdecl(fdname.c_str()) ;
2908 << fdname <<
" for writing" << endl ;
2917 string finame =
Form(
"%s/%s.cxx",dirName.c_str(),iter->second._fileBase.Data()) ;
2918 ifstream ifimpl(finame.c_str()) ;
2922 while (ifimpl.getline(buf, 64000)) {
2928 needImplWrite = (crcFile!=crcWS) ;
2932 if (needImplWrite) {
2933 oocoutI(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() Extracting implementation code of class " << iter->first <<
", file " << finame << endl ;
2934 ofstream fimpl(finame.c_str()) ;
2937 << finame <<
" for writing" << endl ;
2946 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() marking code unit " << iter->second._fileBase <<
" as extracted" << endl ;
2949 oocoutI(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() Compiling code unit " << iter->second._fileBase.Data() <<
" to define class " << iter->first << endl ;
2953 oocoutE(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() ERROR compiling class " << iter->first.Data() <<
", to fix this you can do the following: " << endl
2954 <<
" 1) Fix extracted source code files in directory " << dirName.c_str() <<
"/" << endl
2955 <<
" 2) In clean ROOT session compiled fixed classes by hand using '.x " << dirName.c_str() <<
"/ClassName.cxx+'" << endl
2956 <<
" 3) Reopen file with RooWorkspace with broken source code in UPDATE mode. Access RooWorkspace to force loading of class" << endl
2957 <<
" Broken instances in workspace will _not_ be compiled, instead precompiled fixed instances will be used." << endl
2958 <<
" 4) Reimport fixed code in workspace using 'RooWorkspace::importClassCode(\"*\",kTRUE)' method, Write() updated workspace to file and close file" << endl
2959 <<
" 5) Reopen file in clean ROOT session to confirm that problems are fixed" << endl ;
2976 #if ROOT_VERSION_CODE <= ROOT_VERSION(5,19,02) 2988 #if ROOT_VERSION_CODE <= ROOT_VERSION(5,19,02) 2994 if (dynamic_cast<RooAbsArg*>(obj) || dynamic_cast<RooAbsData*>(obj)) {
2995 coutE(
ObjectHandling) <<
"RooWorkspace::WSDir::Add(" <<
GetName() <<
") ERROR: Directory is read-only representation of a RooWorkspace, use RooWorkspace::import() to add objects" << endl ;
2997 InternalAppend(obj) ;
3005 #if ROOT_VERSION_CODE <= ROOT_VERSION(5,19,02) 3011 if (dynamic_cast<RooAbsArg*>(obj) || dynamic_cast<RooAbsData*>(obj)) {
3012 coutE(
ObjectHandling) <<
"RooWorkspace::WSDir::Add(" <<
GetName() <<
") ERROR: Directory is read-only representation of a RooWorkspace, use RooWorkspace::import() to add objects" << endl ;
3014 InternalAppend(obj) ;
3028 coutE(
ObjectHandling) <<
"RooWorkspace::exportToCint(" <<
GetName() <<
") WARNING: repeated calls to exportToCint() have no effect" << endl ;
3036 if (!nsname) nsname =
GetName() ;
3040 <<
") INFO: references to all objects in this workspace will be created in CINT in 'namespace " <<
_exportNSName <<
"'" << endl ;
3045 while((wobj=iter->
Next())) {
3050 while((wobj=iter->
Next())) {
3075 cxcoutD(
ObjectHandling) <<
"RooWorkspace::exportObj(" <<
GetName() <<
") INFO: Workspace object name " << wobj->
GetName() <<
" is not a valid C++ identifier and is not exported to CINT" << endl ;
3081 gROOT->ProcessLine(cintExpr.c_str()) ;
3091 string oname(name) ;
3092 if (isdigit(oname[0])) {
3095 for (
UInt_t i=0 ; i<oname.size() ; i++) {
3097 if (!isalnum(c) && (c!=
'_')) {
3113 while ((wobj = iter->
Next())) {
3129 if (removedObj ==
_dir)
_dir =
nullptr;
3141 c.second.RecursiveRemove(removedObj);
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual const char * GetName() const
Returns name of object.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Bool_t saveSnapshot(const char *name, const char *paramNames)
Save snapshot of values and attributes (including "Constant") of parameters 'params' If importValues ...
TIterator * createIterator(Bool_t dir=kIterForward) const
RooArgSet allCatFunctions() const
Return set with all category function objects.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
TObject * FindObject(const char *name) const
Return pointer to obejct with given name.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
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...
RooExpensiveObjectCache _eocache
Transient ROOT directory representation of workspace.
const char * GetDeclFileName() const
void sort(Bool_t ascend=kTRUE)
void exportToCint(const char *namespaceName=0)
Activate export of workspace symbols to CINT in a namespace with given name.
std::list< RooAbsData * > allEmbeddedData() const
Return list of all dataset in the workspace.
static void ioStreamerPass2Finalize()
Method called by workspace container to finalize schema evolution issues that cannot be handled in a ...
const char * GetImplFileName() const
virtual const RooArgSet * get() const
virtual Bool_t Remove(TObject *arg)
Remove object from collection.
R__EXTERN TClassTable * gClassTable
RooAbsCategory * catfunc(const char *name) const
Retrieve discrete function (RooAbsCategory) with given name. A null pointer is returned if not found...
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
static std::list< std::string > _classDeclDirList
RooExpensiveObjectCache is a singleton class that serves as repository for objects that are expensive...
const char * getString(const char *name, const char *defaultValue="", Bool_t convEmptyToNull=kFALSE)
Return string property registered with name 'name'.
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
virtual void Append(TObject *)
Overload TDirectory interface method to prohibit insertion of objects in read-only directory workspac...
virtual void SetName(const char *name)
Set the name of the TNamed.
RooLinkedList _embeddedDataList
Bool_t cancelTransaction()
Cancel an ongoing import transaction.
virtual Bool_t changeObservableName(const char *from, const char *to)
TObject * find(const char *name) const
Return pointer to object with given name in collection.
~RooWorkspace()
Workspace destructor.
RooFactoryWSTool * _factory
virtual int MakeDirectory(const char *name)
Make a directory.
Buffer base class used for serializing objects.
TIterator * componentIterator() const
Regular expression class.
RooFit::MsgLevel globalKillBelow() const
RooAbsData * embeddedData(const char *name) const
Retrieve dataset (binned or unbinned) with given name. A null pointer is returned if not found...
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
Int_t refCount(TObject *obj)
Return reference count associated with 'obj'.
virtual void printValue(std::ostream &os) const
Interface to print value of object.
RooAbsReal * function(const char *name) const
Retrieve function (RooAbsReal) with given name. Note that all RooAbsPdfs are also RooAbsReals...
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
RooAbsArg * fundArg(const char *name) const
Return fundamental (i.e.
static void addClassImplImportDir(const char *dir)
Add 'dir' to search path for class implementation (.cxx) files, when attempting to import class code ...
TObject * genobj(const char *name) const
Return generic object with given name.
static std::list< std::string > _classImplDirList
RooAbsArg * arg(const char *name) const
Return RooAbsArg with given name. A null pointer is returned if none is found.
static RooMsgService & instance()
Return reference to singleton instance.
Bool_t compileClasses()
For all classes in the workspace for which no class definition is found in the ROOT class table extra...
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
static void autoImportClassCode(Bool_t flag)
If flag is true, source code of classes not the the ROOT distribution is automatically imported if on...
RooLinkedList _genObjects
Bool_t cd(const char *path=0)
RooArgSet argSet(const char *nameList) const
Return set of RooAbsArgs matching to given list of names.
Iterator abstract base class.
const char * sealNotice() const
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
Bool_t Replace(const TObject *oldArg, const TObject *newArg)
Replace object 'oldArg' in collection with new object 'newArg'.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
Bool_t importClassCode(const char *pat="*", Bool_t doReplace=kFALSE)
Inport code of all classes in the workspace that have a class name that matches pattern 'pat' and whi...
virtual void RecursiveRemove(TObject *obj)
Recursively remove this object from a list.
RooRefCountList _clientListValue
virtual void RecursiveRemove(TObject *obj)
If one of the TObject we have a referenced to is deleted, remove the reference.
Bool_t process(const RooCmdArg &arg)
Process given RooCmdArg.
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
Bool_t startTransaction()
Open an import transaction operations.
void unExport()
Delete exported reference in CINT namespace.
RooArgSet allFunctions() const
Return set with all function objects.
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
void setWorkspace(RooWorkspace &ws)
The TNamed class is the base class for all named ROOT classes.
Bool_t extendSet(const char *name, const char *newContents)
Define a named set in the work space through a comma separated list of names of objects already in th...
virtual int CompileMacro(const char *filename, Option_t *opt="", const char *library_name="", const char *build_dir="", UInt_t dirmode=0)
This method compiles and loads a shared library containing the code from the file "filename"...
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
virtual const char * Getenv(const char *env)
Get environment variable.
Bool_t defineString(const char *name, const char *argName, Int_t stringNum, const char *defValue="", Bool_t appendMode=kFALSE)
Define Double_t property name 'name' mapped to Double_t in slot 'stringNum' in RooCmdArg with name ar...
RooWorkspace()
Default constructor.
RooCategory * cat(const char *name) const
Retrieve discrete variable (RooCategory) with given name. A null pointer is returned if not found...
const RooArgSet * getSnapshot(const char *name) const
Return the RooArgSet containgin a snapshot of variables contained in the workspace.
std::list< RooAbsData * > allData() const
Return list of all dataset in the workspace.
Bool_t defineInt(const char *name, const char *argName, Int_t intNum, Int_t defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
RooRealVar represents a fundamental (non-derived) real valued object.
virtual Bool_t isFundamental() const
RooAbsStudy is an abstract base class for RooStudyManager modules.
RooAbsData * data(const char *name) const
Retrieve dataset (binned or unbinned) with given name. A null pointer is returned if not found...
virtual void Add(TObject *)
Overload TDirectory interface method to prohibit insertion of objects in read-only directory workspac...
void importCacheObjects(RooExpensiveObjectCache &other, const char *ownerName, Bool_t verbose=kFALSE)
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
virtual void Add(TObject *arg)
Bool_t autoImportClass(TClass *tc, Bool_t doReplace=kFALSE)
Import code of class 'tc' into the repository.
virtual Bool_t importWorkspaceHook(RooWorkspace &ws)
void defineMutex(const char *argName1, const char *argName2)
Define arguments named argName1 and argName2 mutually exclusive.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
Bool_t renameSet(const char *name, const char *newName)
Rename set to a new name.
R__EXTERN TSystem * gSystem
RooExpensiveObjectCache & expensiveObjectCache() const
virtual void RecursiveRemove(TObject *obj)
If one of the TObject we have a referenced to is deleted, remove the reference.
Bool_t HasDefaultConstructor() const
Bool_t ok(Bool_t verbose) const
Return true of parsing was successful.
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...
Bool_t defineSet(const char *name, const RooArgSet &aset, Bool_t importMissing=kFALSE)
Define a named RooArgSet with given constituents.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
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.
RooArgSet _sandboxNodes
Is there a transaction open?
void SetName(const char *name)
Set the name of the TNamed.
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
char * Form(const char *fmt,...)
RooRefCountList _clientList
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
static UInt_t crc32(const char *data)
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...
void setGlobalKillBelow(RooFit::MsgLevel level)
Bool_t writeToFile(const char *fileName, Bool_t recreate=kTRUE)
Save this current workspace into given file.
The ROOT global object gROOT contains a list of all defined classes.
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
RooAbsData is the common abstract base class for binned and unbinned datasets.
Bool_t loadSnapshot(const char *name)
Load the values and attributes of the parameters in the snapshot saved with the given name...
RooRefCountList _clientListShape
RooArgSet allVars() const
Return set with all variable objects.
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
RooCategory represents a fundamental (non-derived) discrete value object.
Bool_t _openTrans
Name of CINT namespace to which contents are exported.
std::list< TObject * > allGenericObjects() const
Return list of all generic objects in the workspace.
Each class (see TClass) has a linked list of its base class(es).
TObject * obj(const char *name) const
Return any type of object (RooAbsArg, RooAbsData or generic object) with given name) ...
virtual Bool_t Remove(TObject *obj)
Remove object from list and if reference count reaches zero delete object itself as well...
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
Bool_t isValidCPPID(const char *name)
Return true if given name is a valid C++ identifier name.
virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache)
RooCmdArg Index(RooCategory &icat)
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Bool_t defineSetInternal(const char *name, const RooArgSet &aset)
void Delete(Option_t *o=0)
Remove all elements in collection and delete all elements NB: Collection does not own elements...
static void addClassDeclImportDir(const char *dir)
Add 'dir' to search path for class declaration (header) files, when attempting to import class code w...
RooAbsArg * find(const char *name) const
Find object with given name in list.
std::string _exportNSName
Export contents of workspace to CINT?
RooAbsPdf * pdf(const char *name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
Bool_t hasClients() const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooFIter fwdIterator() const
static DictFuncPtr_t GetDict(const char *cname)
Given the class name returns the Dictionary() function of a class (uses hash of name).
Bool_t removeSet(const char *name)
Remove a named set from the workspace.
Bool_t _doExport
Factory tool associated with workspace.
static Bool_t setAddDirectoryStatus(Bool_t flag)
virtual void RecursiveRemove(TObject *obj)
If one of the TObject we have a referenced to is deleted, remove the reference.
RooArgSet allResolutionModels() const
Return set with all resolution model objects.
RooRealVar * var(const char *name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found...
const char * GetName() const
Returns name of object.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
Mother of all ROOT objects.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
RooFactoryWSTool & factory()
Return instance to factory tool.
Bool_t commitTransaction()
Bool_t containsInstance(const RooAbsArg &var) const
std::string listOfClassNames() const
Return STL string with last of class names contained in the code repository.
static void setClassFileExportDir(const char *dir=0)
Specify the name of the directory in which embedded source code is unpacked and compiled.
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Bool_t import(const RooAbsArg &arg, const RooCmdArg &arg1=RooCmdArg(), const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg(), const RooCmdArg &arg9=RooCmdArg())
Import a RooAbsArg object, e.g.
void clearStudies()
Remove all RooStudyManager modules.
void(* DirAutoAdd_t)(void *, TDirectory *)
TIterator * MakeIterator(Bool_t dir=kTRUE) const
Return an iterator over this list.
RooExpensiveObjectCache & expensiveObjectCache()
virtual TObject * Next()=0
RooAbsCategory is the common abstract base class for objects that represent a discrete value with a f...
void setOwning(Bool_t flag)
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...
void setName(const char *name)
static constexpr double pc
RooInt is a minimal implementation of a TNamed holding a TObject.
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
void setHashTableSize(Int_t i)
virtual const char * GetName() const
Returns name of object.
virtual void ioStreamerPass2()
In which workspace do I live, if any.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
void Print(Option_t *opts=0) const
Print contents of the workspace.
RooArgSet allCats() const
Return set with all category objects.
Bool_t redirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t isRecursionStep=kFALSE)
Iterator over _clientListValue.
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
Bool_t addStudy(RooAbsStudy &study)
Insert RooStudyManager module.
static std::string _classFileExportDir
std::map< std::string, RooArgSet > _namedSets
Bool_t isConstant() const
The RooWorkspace is a persistable container for RooFit projects.
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.
RooArgSet allPdfs() const
Return set with all probability density function objects.
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
void InternalAppend(TObject *obj)
Internal access to TDirectory append method.
Bool_t makeDir()
Create transient TDirectory representation of this workspace.
void exportObj(TObject *obj)
Export reference to given workspace object to CINT.