66 #if ROOT_VERSION_CODE <= ROOT_VERSION(5,19,02) 100 _classDeclDirList.push_back(dir) ;
110 _classImplDirList.push_back(dir) ;
122 _classFileExportDir = dir ;
124 _classFileExportDir =
".wscode.%s.%s" ;
181 while((data2=iter->
Next())) {
197 for (map<string,RooArgSet>::const_iterator iter3 = other.
_namedSets.begin() ; iter3 != other.
_namedSets.end() ; ++iter3) {
207 while((gobj=iter4->
Next())) {
250 strlcpy(buf, fileSpec, 64000);
251 char* filename = strtok(buf,
":") ;
252 char* wsname = strtok(0,
":") ;
253 char* objname = strtok(0,
":") ;
256 if (!filename||!wsname||!objname) {
257 coutE(
InputArguments) <<
"RooWorkspace(" <<
GetName() <<
") ERROR in file specification, expecting for 'filename:wsname:objname'" << endl ;
272 <<
" or object is not a RooWorkspace" << endl ;
279 Bool_t ret =
import(*warg,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) ;
285 Bool_t ret =
import(*wdata,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) ;
291 <<
" in workspace " << wsname <<
" in file " << filename << endl ;
309 ret |=
import(*oneArg,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) ;
359 pc.
defineString(
"conflictSuffix",
"RenameConflictNodes",0) ;
360 pc.
defineInt(
"renameConflictOrig",
"RenameConflictNodes",0,0) ;
362 pc.
defineString(
"allVarsSuffix",
"RenameAllVariables",0) ;
363 pc.
defineString(
"allVarsExcept",
"RenameAllVariables",1) ;
367 pc.
defineInt(
"useExistingNodes",
"RecycleConflictNodes",0,0) ;
369 pc.
defineInt(
"noRecursion",
"NoRecursion",0,0) ;
370 pc.
defineMutex(
"RenameConflictNodes",
"RenameAllNodes") ;
371 pc.
defineMutex(
"RenameConflictNodes",
"RecycleConflictNodes") ;
372 pc.
defineMutex(
"RenameAllNodes",
"RecycleConflictNodes") ;
373 pc.
defineMutex(
"RenameVariable",
"RenameAllVariables") ;
382 const char* suffixC = pc.
getString(
"conflictSuffix") ;
383 const char* suffixA = pc.
getString(
"allSuffix") ;
384 const char* suffixV = pc.
getString(
"allVarsSuffix") ;
385 const char* exceptVars = pc.
getString(
"allVarsExcept") ;
386 const char* varChangeIn = pc.
getString(
"varChangeIn") ;
387 const char* varChangeOut = pc.
getString(
"varChangeOut") ;
388 Bool_t renameConflictOrig = pc.
getInt(
"renameConflictOrig") ;
389 Int_t useExistingNodes = pc.
getInt(
"useExistingNodes") ;
395 if (suffixC && strlen(suffixC)==0) suffixC = 0 ;
396 if (suffixA && strlen(suffixA)==0) suffixA = 0 ;
399 const char* suffix = suffixA ? suffixA : suffixC ;
402 map<string,string> varMap ;
403 if (strlen(varChangeIn)>0) {
407 strlcpy(tmp, varChangeIn, 64000);
408 list<string> tmpIn,tmpOut ;
409 char* ptr = strtok(tmp,
", ") ;
411 tmpIn.push_back(ptr) ;
412 ptr = strtok(0,
", ") ;
414 strlcpy(tmp, varChangeOut, 64000);
415 ptr = strtok(tmp,
", ") ;
417 tmpOut.push_back(ptr) ;
418 ptr = strtok(0,
", ") ;
420 list<string>::iterator iin = tmpIn.begin() ;
421 list<string>::iterator iout = tmpOut.begin() ;
422 for (;iin!=tmpIn.end() ; ++iin,++iout) {
429 std::set<string> exceptVarNames ;
431 if (exceptVars && strlen(exceptVars)) {
432 strlcpy(tmp, exceptVars, 64000);
433 char *ptr = strtok(tmp,
", ");
435 exceptVarNames.insert(ptr);
436 ptr = strtok(0,
", ");
440 if (suffixV != 0 && strlen(suffixV)>0) {
445 if (exceptVarNames.find(v->
GetName())==exceptVarNames.end()) {
459 Bool_t factoryMatch = (tagIn && tagWs && !strcmp(tagIn,tagWs)) ;
461 ((
RooAbsArg&)inArg).setAttribute(
"RooWorkspace::Recycle") ;
464 if (!suffix && wsarg && !useExistingNodes && !(inArg.
isFundamental() && varMap[inArg.
GetName()]!=
"")) {
468 <<
": another instance with same name already in the workspace and no conflict resolution protocol specified" << endl ;
477 coutI(
ObjectHandling) <<
"RooWorkSpace::import(" <<
GetName() <<
") Recycling existing object " << inArg.
GetName() <<
" created with identical factory specification" << endl ;
485 branchSet.
add(inArg) ;
493 if (wsbranch && wsbranch!=branch && !branch->
getAttribute(
"RooWorkspace::Recycle") && !useExistingNodes) {
494 conflictNodes.
add(*branch) ;
500 if (conflictNodes.
getSize()>0 && !suffix && !useExistingNodes) {
502 << conflictNodes <<
" already in the workspace and no conflict resolution protocol specified" << endl ;
513 conflictNodes.
add(branchSet) ;
517 string topName2 = cloneTop->
GetName() ;
518 if (!renameConflictOrig) {
524 string origName = cnode2->
GetName() ;
527 string tag =
Form(
"ORIGNAME:%s",origName.c_str()) ;
530 string tag2 =
Form(
"%s",origName.c_str()) ;
535 if (cnode2==cloneTop) {
541 <<
") Resolving name conflict in workspace by changing name of imported node " 542 << origName <<
" to " << cnode2->
GetName() << endl ;
553 string origName = cnode->
GetName() ;
568 string newname =
Form(
"%s_%s_%d",cnode->
GetName(),suffix,
n) ;
570 wsnode->
SetName(newname.c_str()) ;
579 <<
") Resolving name conflict in workspace by changing name of original node " 580 << origName <<
" to " << wsnode->
GetName() << endl ;
584 << origName <<
" to be renamed, but didn't find it..." << endl ;
593 if (strlen(varChangeIn)>0 || (suffixV && strlen(suffixV)>0)) {
600 if (varMap.find(cnode->
GetName())!=varMap.end()) {
601 string origName = cnode->
GetName() ;
603 string tag =
Form(
"ORIGNAME:%s",origName.c_str()) ;
606 string tag2 =
Form(
"%s",origName.c_str()) ;
612 << origName <<
" to " << cnode->
GetName() <<
" on request" << endl ;
615 if (cnode==cloneTop) {
636 conflictNodes2.
add(*branch2) ;
642 if (conflictNodes2.
getSize()) {
644 << conflictNodes2 <<
" cause naming conflict after conflict resolution protocol was executed" << endl ;
656 <<
" has an error in importing in one or more of its auxiliary objects, aborting" << endl ;
671 << node->IsA()->
GetName() <<
"::" << node->
GetName() <<
", reading of workspace will require external definition of class" << endl ;
685 if (!silence && useExistingNodes) {
687 <<
"::" << node->
GetName() <<
" for import of " << cloneTop2->IsA()->
GetName() <<
"::" 688 << cloneTop2->
GetName() << endl ;
729 if (recycledNodes.
getSize()>0) {
780 pc.
defineInt(
"embedded",
"Embedded",0,0) ;
789 const char* dsetName = pc.
getString(
"dsetName") ;
790 const char* varChangeIn = pc.
getString(
"varChangeIn") ;
791 const char* varChangeOut = pc.
getString(
"varChangeOut") ;
795 if (dsetName && strlen(dsetName)==0) {
802 if (dsetName && dataList.
FindObject(dsetName)) {
803 coutE(
ObjectHandling) <<
"RooWorkspace::import(" <<
GetName() <<
") ERROR dataset with name " << dsetName <<
" already exists in workspace, import aborted" << endl ;
807 coutE(
ObjectHandling) <<
"RooWorkspace::import(" <<
GetName() <<
") ERROR dataset with name " << inData.
GetName() <<
" already exists in workspace, import aborted" << endl ;
822 if (strlen(varChangeIn)>0) {
826 strlcpy(tmp, varChangeIn, 64000);
827 list<string> tmpIn,tmpOut ;
828 char* ptr = strtok(tmp,
",") ;
830 tmpIn.push_back(ptr) ;
831 ptr = strtok(0,
",") ;
833 strlcpy(tmp, varChangeOut, 64000);
834 ptr = strtok(tmp,
",") ;
836 tmpOut.push_back(ptr) ;
837 ptr = strtok(0,
",") ;
839 list<string>::iterator iin = tmpIn.begin() ;
840 list<string>::iterator iout = tmpOut.begin() ;
842 for (; iin!=tmpIn.end() ; ++iin,++iout) {
843 coutI(
ObjectHandling) <<
"RooWorkSpace::import(" <<
GetName() <<
") changing name of dataset observable " << *iin <<
" to " << *iout << endl ;
860 dataList.
Add(clone) ;
870 while ((carg=iter2.
next())) {
889 map<string,RooArgSet>::iterator i =
_namedSets.find(name) ;
891 coutW(
InputArguments) <<
"RooWorkspace::defineSet(" <<
GetName() <<
") WARNING redefining previously defined named set " << name << endl ;
906 <<
"\" is not in workspace and importMissing option is disabled" << endl ;
929 map<string, RooArgSet>::iterator i =
_namedSets.find(name);
932 <<
") WARNING redefining previously defined named set " << name << endl;
949 map<string,RooArgSet>::iterator i =
_namedSets.find(name) ;
951 coutW(
InputArguments) <<
"RooWorkspace::defineSet(" <<
GetName() <<
") WARNING redefining previously defined named set " << name << endl ;
958 strlcpy(buf, contentList, 64000);
959 char* token = strtok(buf,
",") ;
964 <<
"\" is not in workspace" << endl ;
968 token = strtok(0,
",") ;
991 strlcpy(buf, newContents, 64000);
992 char* token = strtok(buf,
",") ;
997 <<
"\" is not in workspace" << endl ;
1000 wsargs.
add(*
arg(token)) ;
1001 token = strtok(0,
",") ;
1018 map<string,RooArgSet>::iterator i =
_namedSets.find(name) ;
1019 return (i!=
_namedSets.end()) ? &(i->second) : 0 ;
1033 <<
" does not exist" << endl ;
1040 <<
" already exists" << endl ;
1064 <<
" does not exist" << endl ;
1181 TString className = carg->IsA()->
GetName() ;
1184 << carg->IsA()->
GetName() <<
"::" << carg->
GetName() <<
", reading of workspace will require external definition of class" << endl ;
1222 delete actualParams ;
1227 *snapshot = params ;
1232 coutI(
ObjectHandling) <<
"RooWorkspace::saveSnaphot(" <<
GetName() <<
") replacing previous snapshot with name " << name << endl ;
1253 coutE(
ObjectHandling) <<
"RooWorkspace::loadSnapshot(" <<
GetName() <<
") no snapshot with name " << name <<
" is available" << endl ;
1258 *actualParams = *snap ;
1259 delete actualParams ;
1276 coutE(
ObjectHandling) <<
"RooWorkspace::loadSnapshot(" <<
GetName() <<
") no snapshot with name " << name <<
" is available" << endl ;
1379 strlcpy(tmp, nameList, 64000);
1380 char* token = strtok(tmp,
",") ;
1386 coutE(
InputArguments) <<
" RooWorkspace::argSet(" <<
GetName() <<
") no RooAbsArg named \"" << token <<
"\" in workspace" << endl ;
1388 token = strtok(0,
",") ;
1564 list<RooAbsData*> ret ;
1568 ret.push_back(dat) ;
1580 list<RooAbsData*> ret ;
1584 ret.push_back(dat) ;
1597 list<TObject*> ret ;
1606 ret.push_back(gobj) ;
1627 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo(" << _wspace->GetName() <<
") request to import code of class " << tc->
GetName() << endl ;
1632 if (!doReplace && _c2fmap.find(tc->
GetName())!=_c2fmap.end()) {
1633 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo(" << _wspace->GetName() <<
") code of class " << tc->
GetName() <<
" already imported, skipping" << endl ;
1639 if (mapEntry && strlen(mapEntry)>0) {
1640 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo(" << _wspace->GetName() <<
") code of class " << tc->
GetName() <<
" is in ROOT distribution, skipping " << endl ;
1649 if (implfile.empty() || declfile.empty()) {
1650 oocoutE(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo(" << _wspace->GetName() <<
") ERROR: cannot retrieve code file names for class " 1651 << tc->
GetName() <<
" through ROOT TClass interface, unable to import code" << endl ;
1657 if (TString(implfile.c_str()).
Index(rootsys)>=0) {
1658 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo(" << _wspace->GetName() <<
") code of class " << tc->
GetName() <<
" is in ROOT distribution, skipping " << endl ;
1661 const char* implpath=0 ;
1667 oocoutW(_wspace,
ObjectHandling) <<
"RooWorkspace::autoImportClass(" << _wspace->GetName() <<
") WARNING cannot import class " 1668 << tc->
GetName() <<
" : it cannot be persisted because it doesn't have a default constructor. Please fix " << endl ;
1675 char* declpath = 0 ;
1682 list<string>::iterator diter = RooWorkspace::_classDeclDirList.begin() ;
1684 while(diter!= RooWorkspace::_classDeclDirList.end()) {
1700 oocoutW(_wspace,
ObjectHandling) <<
"RooWorkspace::autoImportClass(" << _wspace->GetName() <<
") WARNING Cannot access code of class " 1701 << tc->
GetName() <<
" because header file " << declfile <<
" is not found in current directory nor in $ROOTSYS" ;
1704 diter = RooWorkspace::_classDeclDirList.begin() ;
1706 while(diter!= RooWorkspace::_classDeclDirList.end()) {
1708 if (diter!=RooWorkspace::_classDeclDirList.begin()) {
1716 <<
"path using RooWorkspace::addClassDeclDir(const char* dir)" << endl ;
1728 list<string>::iterator iiter = RooWorkspace::_classImplDirList.begin() ;
1730 while(iiter!= RooWorkspace::_classImplDirList.end()) {
1746 oocoutW(_wspace,
ObjectHandling) <<
"RooWorkspace::autoImportClass(" << _wspace->GetName() <<
") WARNING Cannot access code of class " 1747 << tc->
GetName() <<
" because implementation file " << implfile <<
" is not found in current directory nor in $ROOTSYS" ;
1750 iiter = RooWorkspace::_classImplDirList.begin() ;
1752 while(iiter!= RooWorkspace::_classImplDirList.end()) {
1754 if (iiter!=RooWorkspace::_classImplDirList.begin()) {
1762 <<
"path using RooWorkspace::addClassImplDir(const char* dir)" << endl ;
1783 int dotpos2 = strrchr(declfilename.c_str(),
'.') - declfilename.c_str() ;
1784 string declfilebase = declfilename.substr(0,dotpos2) ;
1785 string declfileext = declfilename.substr(dotpos2+1) ;
1787 list<string> extraHeaders ;
1790 if (_fmap.find(declfilebase) == _fmap.end()) {
1793 fstream fdecl(declpath?declpath:declfile.c_str()) ;
1798 <<
") ERROR opening declaration file " << declfile << endl ;
1803 <<
") importing code of class " << tc->
GetName()
1804 <<
" from " << (implpath?implpath:implfile.c_str())
1805 <<
" and " << (declpath?declpath:declfile.c_str()) << endl ;
1810 while(fdecl.getline(buf,1023)) {
1814 char* extincfile = 0 ;
1817 if (strstr(buf,
"#include")) {
1820 strlcpy(tmp, buf, 64000);
1821 Bool_t stdinclude = strchr(buf,
'<');
1822 strtok(tmp,
" <\"");
1823 char *incfile = strtok(0,
" <>\"");
1828 hpath +=
"/include/";
1832 <<
") scheduling include file " << incfile <<
" for import" << endl;
1833 extraHeaders.push_back(incfile);
1834 extincfile = incfile;
1835 processedInclude =
kTRUE;
1840 if (processedInclude) {
1841 decl +=
"// external include file below retrieved from workspace code storage\n" ;
1842 decl +=
Form(
"#include \"%s\"\n",extincfile) ;
1850 fstream fimpl(implpath?implpath:implfile.c_str()) ;
1855 <<
") ERROR opening implementation file " << implfile << endl ;
1862 while(fimpl.getline(buf,1023)) {
1868 char* extincfile = 0 ;
1871 if (strstr(buf,
"#include")) {
1874 strlcpy(tmp, buf, 64000);
1875 Bool_t stdinclude = strchr(buf,
'<');
1876 strtok(tmp,
" <\"");
1877 char *incfile = strtok(0,
" <>\"");
1879 if (strstr(incfile, declfilename.c_str())) {
1880 foundSelfInclude =
kTRUE;
1883 if (!stdinclude && !foundSelfInclude) {
1886 hpath +=
"/include/";
1891 <<
") scheduling include file " << incfile <<
" for import" << endl;
1892 extraHeaders.push_back(incfile);
1893 extincfile = incfile;
1894 processedInclude =
kTRUE;
1901 if (foundSelfInclude) {
1904 impl +=
"// class declaration include file below retrieved from workspace code storage\n" ;
1905 impl +=
Form(
"#include \"%s.%s\"\n",declfilebase.c_str(),declfileext.c_str()) ;
1906 }
else if (processedInclude) {
1907 impl +=
"// external include file below retrieved from workspace code storage\n" ;
1908 impl +=
Form(
"#include \"%s\"\n",extincfile) ;
1916 _fmap[declfilebase]._hfile = decl ;
1917 _fmap[declfilebase]._cxxfile = impl ;
1918 _fmap[declfilebase]._hext = declfileext ;
1921 for (list<string>::iterator ehiter = extraHeaders.begin() ; ehiter != extraHeaders.end() ; ++ehiter ) {
1922 if (_ehmap.find(*ehiter) == _ehmap.end()) {
1925 eh.
_hname = ehiter->c_str() ;
1926 fstream fehdr(ehiter->c_str()) ;
1929 while(fehdr.getline(buf2,1023)) {
1932 if (strstr(buf2,
"#include")) {
1935 strlcpy(tmp, buf2, 64000);
1936 Bool_t stdinclude = strchr(buf,
'<');
1937 strtok(tmp,
" <\"");
1938 char *incfile = strtok(0,
" <>\"");
1943 hpath +=
"/include/";
1947 <<
") scheduling recursive include file " << incfile <<
" for import" 1949 extraHeaders.push_back(incfile);
1957 eh.
_hfile = ehimpl.c_str();
1959 _ehmap[ehiter->c_str()] = eh;
1967 <<
") code of class " << tc->
GetName()
1968 <<
" was already imported from " << (implpath?implpath:implfile.c_str())
1969 <<
" and " << (declpath?declpath:declfile.c_str()) << endl ;
1980 TString baseNameList ;
1984 list<TClass*> bases ;
1986 if (baseNameList.Length()>0) {
1987 baseNameList +=
"," ;
1995 _c2fmap[tc->
GetName()]._baseName = baseNameList ;
1996 _c2fmap[tc->
GetName()]._fileBase = declfilebase ;
1999 list<TClass*>::iterator biter = bases.begin() ;
2000 while(biter!=bases.end()) {
2001 autoImportClass(*biter,doReplace) ;
2032 TString title=
Form(
"TDirectory representation of RooWorkspace %s",
GetName()) ;
2037 while((darg=(
RooAbsArg*)iter->Next())) {
2059 if (oldObj && !replaceExisting) {
2061 <<
object.GetName() <<
" is already in workspace and replaceExisting flag is set to false" << endl ;
2067 object.IsA()->SetDirectoryAutoAdd(0);
2078 object.IsA()->SetDirectoryAutoAdd(func);
2100 if (oldObj && !replaceExisting) {
2102 <<
object.GetName() <<
" is already in workspace and replaceExisting flag is set to false" << endl ;
2156 if (ret)
return ret ;
2160 if (ret)
return ret ;
2177 if (!gobj)
return 0 ;
2202 TFile
f(fileName,recreate?
"RECREATE":
"UPDATE") ;
2217 cxcoutD(
ObjectHandling) <<
"INFO: Creating RooFactoryWSTool associated with this workspace" << endl ;
2218 _factory = make_unique<RooFactoryWSTool>(*this);
2243 if (TString(opts).Contains(
"t")) {
2246 if (TString(opts).Contains(
"v")) {
2250 cout << endl <<
"RooWorkspace(" <<
GetName() <<
") " <<
GetTitle() <<
" contents" << endl << endl ;
2283 funcSet.
add(*parg) ;
2291 catfuncSet.
add(*parg) ;
2299 convResoSet.
add(*parg) ;
2301 resoSet.
add(*parg) ;
2314 funcSet.
add(*parg) ;
2319 catfuncSet.
add(*parg) ;
2340 cout <<
"variables" << endl ;
2341 cout <<
"---------" << endl ;
2342 cout << varSet << endl ;
2347 cout <<
"p.d.f.s" << endl ;
2348 cout <<
"-------" << endl ;
2364 cout <<
"analytical resolution models" << endl ;
2365 cout <<
"----------------------------" << endl ;
2382 cout <<
"functions" << endl ;
2383 cout <<
"--------" << endl ;
2398 cout <<
"category functions" << endl ;
2399 cout <<
"------------------" << endl ;
2414 cout <<
"datasets" << endl ;
2415 cout <<
"--------" << endl ;
2419 cout << data2->IsA()->
GetName() <<
"::" << data2->
GetName() << *data2->
get() << endl ;
2426 cout <<
"embedded datasets (in pdfs and functions)" << endl ;
2427 cout <<
"-----------------------------------------" << endl ;
2431 cout << data2->IsA()->
GetName() <<
"::" << data2->
GetName() << *data2->
get() << endl ;
2438 cout <<
"parameter snapshots" << endl ;
2439 cout <<
"-------------------" << endl ;
2443 cout << snap->
GetName() <<
" = (" ;
2448 if (first) { first=
kFALSE ; }
else { cout <<
"," ; }
2455 cout <<
")" << endl ;
2464 cout <<
"named sets" << endl ;
2465 cout <<
"----------" << endl ;
2466 for (map<string,RooArgSet>::const_iterator it =
_namedSets.begin() ; it !=
_namedSets.end() ; ++it) {
2467 if (verbose || !TString(it->first.c_str()).BeginsWith(
"CACHE_")) {
2468 cout << it->first <<
":" << it->second << endl;
2477 cout <<
"generic objects" << endl ;
2478 cout <<
"---------------" << endl ;
2483 cout << ((
RooTObjWrap*)gobj)->obj()->IsA()->
GetName() <<
"::" << gobj->GetName() << endl ;
2485 cout << gobj->IsA()->
GetName() <<
"::" << gobj->
GetName() << endl ;
2494 cout <<
"study modules" << endl ;
2495 cout <<
"-------------" << endl ;
2499 cout << smobj->IsA()->
GetName() <<
"::" << smobj->
GetName() << endl ;
2507 cout <<
"embedded class code" << endl ;
2508 cout <<
"-------------------" << endl ;
2514 cout <<
"embedded precalculated expensive components" << endl ;
2515 cout <<
"-------------------------------------------" << endl ;
2531 void RooWorkspace::CodeRepo::Streamer(
TBuffer &R__b)
2533 typedef ::RooWorkspace::CodeRepo thisClass;
2546 name.Streamer(R__b) ;
2547 _fmap[
name]._hext.Streamer(R__b) ;
2548 _fmap[
name]._hfile.Streamer(R__b) ;
2549 _fmap[
name]._cxxfile.Streamer(R__b) ;
2557 name.Streamer(R__b) ;
2558 _c2fmap[
name]._baseName.Streamer(R__b) ;
2559 _c2fmap[
name]._fileBase.Streamer(R__b) ;
2568 name.Streamer(R__b) ;
2569 _ehmap[
name]._hname.Streamer(R__b) ;
2570 _ehmap[
name]._hfile.Streamer(R__b) ;
2577 _compiledOK = !compileClasses() ;
2585 UInt_t count = _fmap.size() ;
2587 map<TString,ClassFiles>::iterator iter = _fmap.begin() ;
2588 while(iter!=_fmap.end()) {
2589 TString key_copy(iter->first) ;
2590 key_copy.Streamer(R__b) ;
2591 iter->second._hext.Streamer(R__b) ;
2592 iter->second._hfile.Streamer(R__b);
2593 iter->second._cxxfile.Streamer(R__b);
2599 count = _c2fmap.size() ;
2601 map<TString,ClassRelInfo>::iterator iter2 = _c2fmap.begin() ;
2602 while(iter2!=_c2fmap.end()) {
2603 TString key_copy(iter2->first) ;
2604 key_copy.Streamer(R__b) ;
2605 iter2->second._baseName.Streamer(R__b) ;
2606 iter2->second._fileBase.Streamer(R__b);
2611 count = _ehmap.size() ;
2613 map<TString,ExtraHeader>::iterator iter3 = _ehmap.begin() ;
2614 while(iter3!=_ehmap.end()) {
2615 TString key_copy(iter3->first) ;
2616 key_copy.Streamer(R__b) ;
2617 iter3->second._hname.Streamer(R__b) ;
2618 iter3->second._hfile.Streamer(R__b);
2636 void RooWorkspace::Streamer(
TBuffer &R__b)
2645 while((node=fiter.
next())) {
2659 cout <<
"RooWorkspace::Streamer(" <<
GetName() <<
") " << node->IsA()->
GetName() <<
"::" << node->
GetName()
2671 map<RooAbsArg*,list<RooAbsArg*> > extClients, extValueClients, extShapeClients ;
2684 extClients[tmparg].push_back(client) ;
2696 <<
" has external value client link to " << vclient <<
" (" << vclient->
GetName() <<
") with ref count " << tmparg->
_clientListValue.
refCount(vclient) << endl ;
2699 extValueClients[tmparg].push_back(vclient) ;
2703 delete vclientIter ;
2711 <<
" has external shape client link to " << sclient <<
" (" << sclient->
GetName() <<
") with ref count " << tmparg->
_clientListShape.
refCount(sclient) << endl ;
2714 extShapeClients[tmparg].push_back(sclient) ;
2718 delete sclientIter ;
2728 for (map<
RooAbsArg*,list<RooAbsArg*> >::iterator iterx = extClients.begin() ; iterx!=extClients.end() ; ++iterx) {
2729 for (list<RooAbsArg*>::iterator citer = iterx->second.begin() ; citer!=iterx->second.end() ; ++citer) {
2730 iterx->first->_clientList.Add(*citer) ;
2734 for (map<
RooAbsArg*,list<RooAbsArg*> >::iterator iterx = extValueClients.begin() ; iterx!=extValueClients.end() ; ++iterx) {
2735 for (list<RooAbsArg*>::iterator citer = iterx->second.begin() ; citer!=iterx->second.end() ; ++citer) {
2736 iterx->first->_clientListValue.Add(*citer) ;
2740 for (map<
RooAbsArg*,list<RooAbsArg*> >::iterator iterx = extShapeClients.begin() ; iterx!=extShapeClients.end() ; ++iterx) {
2741 for (list<RooAbsArg*>::iterator citer = iterx->second.begin() ; citer!=iterx->second.end() ; ++citer) {
2742 iterx->first->_clientListShape.Add(*citer) ;
2758 map<TString,ClassRelInfo>::const_iterator iter = _c2fmap.begin() ;
2759 while(iter!=_c2fmap.end()) {
2763 ret += iter->first ;
2791 map<TString,ClassRelInfo>::iterator iter = _c2fmap.begin() ;
2792 while(iter!=_c2fmap.end()) {
2794 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() now processing class " << iter->first.Data() << endl ;
2799 << iter->first <<
" already in ROOT class table, skipping" << endl ;
2809 oocoutI(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() reusing code export directory " << dirName.c_str()
2810 <<
" to extract coded embedded in workspace" << endl ;
2813 oocoutI(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() creating code export directory " << dirName.c_str()
2814 <<
" to extract coded embedded in workspace" << endl ;
2816 oocoutE(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() ERROR creating code export directory " << dirName.c_str()
2817 <<
" to extract coded embedded in workspace" << endl ;
2826 if (!writeExtraHeaders) {
2827 writeExtraHeaders =
kTRUE ;
2829 map<TString,ExtraHeader>::iterator eiter = _ehmap.begin() ;
2830 while(eiter!=_ehmap.end()) {
2834 string fdname =
Form(
"%s/%s",dirName.c_str(),eiter->second._hname.Data()) ;
2835 ifstream ifdecl(fdname.c_str()) ;
2839 while (ifdecl.getline(buf, 64000)) {
2845 needEHWrite = (crcFile != crcWS);
2850 oocoutI(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() Extracting extra header file " 2856 ofstream fdecl(fdname.c_str());
2858 oocoutE(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() ERROR opening file " << fdname
2859 <<
" for writing" << endl;
2862 fdecl << eiter->second._hfile.Data();
2871 ClassFiles& cfinfo = _fmap[iter->second._fileBase] ;
2873 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() now processing file with base " << iter->second._fileBase << endl ;
2877 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() file with base name " << iter->second._fileBase
2878 <<
" has already been extracted, skipping to next class" << endl ;
2884 string fdname =
Form(
"%s/%s.%s",dirName.c_str(),iter->second._fileBase.Data(),cfinfo.
_hext.Data()) ;
2885 ifstream ifdecl(fdname.c_str()) ;
2889 while (ifdecl.getline(buf, 64000)) {
2895 needDeclWrite = (crcFile!=crcWS) ;
2899 if (needDeclWrite) {
2900 oocoutI(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() Extracting declaration code of class " << iter->first <<
", file " << fdname << endl ;
2901 ofstream fdecl(fdname.c_str()) ;
2904 << fdname <<
" for writing" << endl ;
2913 string finame =
Form(
"%s/%s.cxx",dirName.c_str(),iter->second._fileBase.Data()) ;
2914 ifstream ifimpl(finame.c_str()) ;
2918 while (ifimpl.getline(buf, 64000)) {
2924 needImplWrite = (crcFile!=crcWS) ;
2928 if (needImplWrite) {
2929 oocoutI(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() Extracting implementation code of class " << iter->first <<
", file " << finame << endl ;
2930 ofstream fimpl(finame.c_str()) ;
2933 << finame <<
" for writing" << endl ;
2942 oocxcoutD(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() marking code unit " << iter->second._fileBase <<
" as extracted" << endl ;
2945 oocoutI(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() Compiling code unit " << iter->second._fileBase.Data() <<
" to define class " << iter->first << endl ;
2949 oocoutE(_wspace,
ObjectHandling) <<
"RooWorkspace::CodeRepo::compileClasses() ERROR compiling class " << iter->first.Data() <<
", to fix this you can do the following: " << endl
2950 <<
" 1) Fix extracted source code files in directory " << dirName.c_str() <<
"/" << endl
2951 <<
" 2) In clean ROOT session compiled fixed classes by hand using '.x " << dirName.c_str() <<
"/ClassName.cxx+'" << endl
2952 <<
" 3) Reopen file with RooWorkspace with broken source code in UPDATE mode. Access RooWorkspace to force loading of class" << endl
2953 <<
" Broken instances in workspace will _not_ be compiled, instead precompiled fixed instances will be used." << endl
2954 <<
" 4) Reimport fixed code in workspace using 'RooWorkspace::importClassCode(\"*\",kTRUE)' method, Write() updated workspace to file and close file" << endl
2955 <<
" 5) Reopen file in clean ROOT session to confirm that problems are fixed" << endl ;
2972 #if ROOT_VERSION_CODE <= ROOT_VERSION(5,19,02) 2984 #if ROOT_VERSION_CODE <= ROOT_VERSION(5,19,02) 2990 if (dynamic_cast<RooAbsArg*>(obj) || dynamic_cast<RooAbsData*>(obj)) {
2991 coutE(
ObjectHandling) <<
"RooWorkspace::WSDir::Add(" <<
GetName() <<
") ERROR: Directory is read-only representation of a RooWorkspace, use RooWorkspace::import() to add objects" << endl ;
2993 InternalAppend(obj) ;
3001 #if ROOT_VERSION_CODE <= ROOT_VERSION(5,19,02) 3007 if (dynamic_cast<RooAbsArg*>(obj) || dynamic_cast<RooAbsData*>(obj)) {
3008 coutE(
ObjectHandling) <<
"RooWorkspace::WSDir::Add(" <<
GetName() <<
") ERROR: Directory is read-only representation of a RooWorkspace, use RooWorkspace::import() to add objects" << endl ;
3010 InternalAppend(obj) ;
3024 coutE(
ObjectHandling) <<
"RooWorkspace::exportToCint(" <<
GetName() <<
") WARNING: repeated calls to exportToCint() have no effect" << endl ;
3032 if (!nsname) nsname =
GetName() ;
3036 <<
") INFO: references to all objects in this workspace will be created in CINT in 'namespace " <<
_exportNSName <<
"'" << endl ;
3041 while((wobj=iter->
Next())) {
3046 while((wobj=iter->
Next())) {
3071 cxcoutD(
ObjectHandling) <<
"RooWorkspace::exportObj(" <<
GetName() <<
") INFO: Workspace object name " << wobj->
GetName() <<
" is not a valid C++ identifier and is not exported to CINT" << endl ;
3077 gROOT->ProcessLine(cintExpr.c_str()) ;
3087 string oname(name) ;
3088 if (isdigit(oname[0])) {
3091 for (
UInt_t i=0 ; i<oname.size() ; i++) {
3093 if (!isalnum(c) && (c!=
'_')) {
3109 while ((wobj = iter->
Next())) {
3125 if (removedObj ==
_dir)
_dir =
nullptr;
3137 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.
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...
std::unique_ptr< RooFactoryWSTool > _factory
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.