60#ifdef ROOFIT_LEGACY_EVAL_BACKEND
66using std::string, std::map, std::list, std::pair, std::endl, std::vector;
68#define BUFFER_SIZE 64000
129 coutE(
ObjectHandling) <<
"RooFactoryWSTool::createFactory() ERROR: variable with name '" <<
name <<
"' already exists" << std::endl ;
157 std::vector<char> tmp(
tmpSize);
165 Int_t id = atoi(sep+1) ;
184 bool isEnum(
const char* classname) {
235 if (
string(classname) !=
gInterpreter->MethodInfo_TypeName(func)) {
284 coutE(
ObjectHandling) <<
"RooFactoryWSTool::createArg() ERROR class " << className <<
" not found in factory alias table, nor in ROOT class table" << std::endl;
289 className =
tc->GetName();
293 coutE(
ObjectHandling) <<
"RooFactoryWSTool::createArg() ERROR class " << className <<
" does not inherit from RooAbsArg" << std::endl;
324 if (
ca.first.empty()) {
325 coutE(
ObjectHandling) <<
"RooFactoryWSTool::createArg() ERROR no suitable constructor found for class " << className << std::endl ;
333 if (
ca.second==
ca.first.size()) {
334 coutE(
ObjectHandling) <<
"RooFactoryWSTool::createArg() ERROR number of arguments provided (" <<
_args.size() <<
") for class is invalid, " << className
335 <<
" expects " <<
ca.first.size()-2 << std::endl ;
338 coutE(
ObjectHandling) <<
"RooFactoryWSTool::createArg() ERROR number of arguments provided (" <<
_args.size() <<
") for class is invalid " << className
339 <<
" expect number between " <<
ca.second-2 <<
" and " <<
ca.first.size()-2 << std::endl ;
355 for (vector<string>::iterator
ai =
_args.begin() ;
ai !=
_args.end() ; ++
ai,++
ti,++i) {
356 if ((*
ti)==
"RooAbsReal&" || (*ti)==
"const RooAbsReal&" || (*ti)==
"RooAbsReal::Ref") {
359 }
else if ((*
ti)==
"RooAbsArg&" || (*
ti)==
"const RooAbsArg&") {
362 }
else if ((*
ti)==
"RooRealVar&" || (*
ti)==
"const RooRealVar&") {
365 }
else if ((*
ti)==
"RooAbsRealLValue&" || (*
ti)==
"const RooAbsRealLValue&") {
368 }
else if ((*
ti)==
"RooCategory&" || (*
ti)==
"const RooCategory&") {
371 }
else if ((*
ti)==
"RooAbsCategory&" || (*
ti)==
"const RooAbsCategory&") {
373 cintExpr +=
Form(
",RooFactoryWSTool::as_CATFUNC(%d)",i) ;
374 }
else if ((*
ti)==
"RooAbsCategoryLValue&" || (*
ti)==
"const RooAbsCategoryLValue&") {
377 }
else if ((*
ti)==
"RooAbsPdf&" || (*
ti)==
"const RooAbsPdf&") {
380 }
else if ((*
ti)==
"RooResolutionModel&" || (*
ti)==
"const RooResolutionModel&") {
382 cintExpr +=
Form(
",RooFactoryWSTool::as_RMODEL(%d)",i) ;
383 }
else if ((*
ti)==
"RooAbsData&" || (*
ti)==
"const RooAbsData&") {
386 }
else if ((*
ti)==
"RooDataSet&" || (*
ti)==
"const RooDataSet&") {
389 }
else if ((*
ti)==
"RooDataHist&" || (*
ti)==
"const RooDataHist&") {
392 }
else if ((*
ti)==
"const RooArgSet&") {
395 }
else if ((*
ti)==
"const RooArgList&") {
398 }
else if ((*
ti)==
"const char*") {
400 cintExpr +=
Form(
",RooFactoryWSTool::as_STRING(%d)",i) ;
401 }
else if ((*
ti)==
"Int_t" || (*
ti)==
"int" || (*
ti)==
"bool" || (*
ti)==
"bool") {
404 }
else if ((*
ti)==
"double") {
406 cintExpr +=
Form(
",RooFactoryWSTool::as_DOUBLE(%d)",i) ;
410 if (
_args[i].find(
Form(
"%s::",className)) != string::npos) {
418 throw string(
Form(
"Supplied argument %s does not represent a valid state of enum %s",
_args[i].c_str(),
ti->c_str())) ;
426 if (
ti->find(
"const ")==0) {
427 btype =
ti->c_str()+6 ;
431 if (btype.find(
'&')) {
432 btype.erase(btype.size()-1,btype.size()) ;
439 cintExpr +=
Form(
",(%s&)RooFactoryWSTool::as_OBJ(%d)",
ti->c_str(),i) ;
441 throw string(
Form(
"Required argument with name %s of type '%s' is not in the workspace",
_args[i].c_str(),
ti->c_str())) ;
446 }
catch (
const string &err) {
447 coutE(
ObjectHandling) <<
"RooFactoryWSTool::createArg() ERROR constructing " << className <<
"::" <<
objName <<
": " << err << std::endl ;
455 if (std::unique_ptr<RooAbsArg> arg{
reinterpret_cast<RooAbsArg*
>(
gROOT->ProcessLineFast(
cintExpr.c_str()))}) {
456 if (
string(className)==
"RooGenericPdf") {
458 }
else if (
string(className)==
"RooFormulaVar") {
467 coutE(
ObjectHandling) <<
"RooFactoryWSTool::createArg() ERROR in CINT constructor call to create object" << std::endl ;
502 }
catch (
const string &err) {
544 }
catch (
const string &err) {
586 }
catch (
const string &err) {
587 coutE(
ObjectHandling) <<
"RooFactoryWSTool::prod(" <<
objName <<
") ERROR creating RooProdPdf Conditional argument: " << err << std::endl ;
603 std::unique_ptr<RooProdPdf> pdf;
606 }
catch (
const string &err) {
607 coutE(
ObjectHandling) <<
"RooFactoryWSTool::prod(" <<
objName <<
") ERROR creating RooProdPdf input set of regular pdfs: " << err << std::endl ;
613 pdf->setStringAttribute(
"factory_tag",
Form(
"PROD::%s(%s)",
objName,pdfList)) ;
637 <<
" expect mapping token of form 'state=pdfName', but found '" <<
tok <<
"'" << std::endl ;
645 }
catch (
const string &err ) {
655 std::unique_ptr<RooSimultaneous> pdf;
658 }
catch (
const string &err) {
665 pdf->setStringAttribute(
"factory_tag",
Form(
"SIMUL::%s(%s,%s)",
objName,indexCat,
pdfMap)) ;
698 }
catch (
const string &err) {
705 coutE(
ObjectHandling) <<
"RooFactoryWSTool::addfunc(" <<
objName <<
") ERROR creating RooAddition: syntax error: either all sum terms must be products or none" << std::endl ;
834 char*
buftmp = buf.data();
853 }
catch (
const string &error) {
854 coutE(
ObjectHandling) <<
"RooFactoryWSTool::processExpression() ERROR in parsing: " << error << std::endl ;
860 coutE(
ObjectHandling) <<
"RooFactoryWSTool::processExpression() ERRORS detected, transaction to workspace aborted, no objects committed" << std::endl ;
866 return !out.empty() ?
ws().
arg(out) : nullptr ;
885 if (
string(
token).find(
"$Alias(")==0) {
924 if (*
p==
'{' || *
p==
'(' || *
p==
'[')
blevel++ ;
925 if (*
p==
'}' || *
p==
')' || *
p==
']')
blevel-- ;
933 separator.push_back(*
p) ;
949 list<char>::iterator
ic = separator.
begin() ;
952 if (
ic != separator.
end()) {
979 if (arg[0]==
'\'' || arg[0]==
'"') {
985 std::vector<char> buf(
bufSize);
987 char*
bufptr = buf.data();
1011 if (*
p==
'{' || *
p==
'(' || *
p==
'[')
blevel++ ;
1012 if (*
p==
'}' || *
p==
')' || *
p==
']')
blevel-- ;
1023 args.push_back(
tok) ;
1032 if (
p>
bufptr && (*(
p-1)==
')'||*(
p-1)==
']')) {
1043 args.push_back(tmp) ;
1051 for(
const char* pp=arg ; *pp!=0 ; pp++) {
1052 if (*pp==
'(' || *pp==
'[' || *pp==
'{') {
1058 if (
strstr(func.c_str(),
"::")) {
1063 coutE(
ObjectHandling) <<
"RooFactoryWSTool::processSingleExpression(" << arg <<
"): ERROR: Syntax error: Class::Instance must be followed by (...)" << std::endl ;
1066 }
else if (func[0]!=
'$'){
1070 }
else if (
lb==
'(') {
1092 coutE(
ObjectHandling) <<
"RooFactoryWSTool::processSingleExpression(" << arg <<
"): ERROR: Syntax error: expect either Class(...) or Instance[...]" << std::endl ;
1100 coutE(
ObjectHandling) <<
"RooFactoryWSTool::processSingleExpression(" << arg <<
"): ERROR: Syntax error: $MetaClass must be followed by (...)" << std::endl ;
1121 std::vector<char> buf(
bufSize);
1124 std::vector<string> args ;
1127 char*
tok = buf.data()+1 ;
1128 char*
p = buf.data()+1 ;
1135 if (*
p==
'{' || *
p==
'(' || *
p==
'[') level++ ;
1136 if (*
p==
'}' || *
p==
')' || *
p==
']') level-- ;
1142 if (level==0 && ((*
p)==
',')) {
1144 args.push_back(
tok) ;
1152 if (
p>buf.data() && *(
p-1)==
'}') {
1155 args.push_back(
tok) ;
1160 vector<string>::iterator iter = args.begin() ;
1162 while(iter!= args.end()) {
1187 if (args.size()!=2) {
1188 coutE(
ObjectHandling) <<
"RooFactorWSTool::processAliasExpression() ERROR $Alias() takes exactly two arguments, " << args.size() <<
" args found" << std::endl ;
1208 map<string,string>::iterator item =
_typeAliases.find(className) ;
1212 className = item->second.c_str() ;
1225 coutE(
ObjectHandling) <<
"RooFactoryWSTool::createArg() ERROR class " << className <<
" not defined in ROOT class table" << std::endl ;
1242 for (vector<string>::iterator iter = args.
begin() ; iter!=args.
end() ; ++iter) {
1243 if (iter!=args.
begin()) {
1270 string first = *(args.
begin()) ;
1271 if (
isdigit(first[0]) || first[0]==
'.' || first[0]==
'+' || first[0]==
'-') {
1274 vector<string>::iterator
ai = args.
begin() ;
1275 if (args.size()==1) {
1278 double xinit = atof((
ai)->c_str()) ;
1281 tmp.setStringAttribute(
"factory_tag",
varTag(func,args).c_str()) ;
1286 }
else if (args.size()==2) {
1289 double xlo = atof((
ai++)->c_str()) ;
1290 double xhi = atof(
ai->c_str()) ;
1291 cxcoutD(
ObjectHandling) <<
"CREATE variable " << func <<
" xlo = " << xlo <<
" xhi = " << xhi << std::endl ;
1292 RooRealVar tmp(func.c_str(),func.c_str(),xlo,xhi) ;
1293 tmp.setStringAttribute(
"factory_tag",
varTag(func,args).c_str()) ;
1298 }
else if (args.size()==3) {
1301 double xinit = atof((
ai++)->c_str()) ;
1302 double xlo = atof((
ai++)->c_str()) ;
1303 double xhi = atof(
ai->c_str()) ;
1304 cxcoutD(
ObjectHandling) <<
"CREATE variable " << func <<
" xinit = " <<
xinit <<
" xlo = " << xlo <<
" xhi = " << xhi << std::endl ;
1306 tmp.setStringAttribute(
"factory_tag",
varTag(func,args).c_str()) ;
1315 for (vector<string>::iterator
ai = args.
begin() ;
ai!=args.
end() ; ++
ai) {
1344 const char *className =
R__STRTOK_R(buf,
":",&save) ;
1346 if (!className) className =
"";
1352 vector<string>::iterator iter = args.
begin() ;
1355 while(iter!=args.
end()) {
1361 pargv.push_back(tmp) ;
1388 vector<string>::iterator iter = args.begin() ;
1390 while(iter!=args.end()) {
1394 pargv.push_back(tmp) ;
1411 std::vector<char> buf(
bufSize);
1413 char*
bufptr = buf.data();
1435 if (*
p==
'{' || *
p==
'(' || *
p==
'[')
blevel++ ;
1436 if (*
p==
'}' || *
p==
')' || *
p==
']')
blevel-- ;
1447 args.push_back(
tok) ;
1467 args.push_back(tmp) ;
1486 const char* ptr = arg ;
1501 coutE(
ObjectHandling) <<
"RooFactoryWSTool::checkSyntax ERROR non-matching '" << (
nBracket>0?
"[":
"]") <<
"' in expression" << std::endl ;
1505 coutE(
ObjectHandling) <<
"RooFactoryWSTool::checkSyntax ERROR non-matching '" << (
nAccolade>0?
"{":
"}") <<
"' in expression" << std::endl ;
1517 if (idx>
_of->_args.size()-1) {
1518 throw string(
Form(
"Need argument number %d, but only %d args are provided",idx,(
Int_t)
_of->_args.size())) ;
1530 if (arg[0]==
'.' || arg[0]==
'+' || arg[0] ==
'-' ||
isdigit(arg[0])) {
1537 throw string(
Form(
"RooAbsArg named %s not found",arg)) ;
1550 if (arg[0]==
'.' || arg[0]==
'+' || arg[0] ==
'-' ||
isdigit(arg[0])) {
1556 throw string(
Form(
"RooAbsReal named %s not found",arg)) ;
1560 throw string(
Form(
"Object named %s is not of type RooAbsReal",arg)) ;
1573 if (arg[0]==
'.' || arg[0]==
'+' || arg[0] ==
'-' ||
isdigit(arg[0])) {
1574 throw string(
Form(
"Numeric literal provided for argument (%s), but lvalue is required",arg)) ;
1579 throw string(
Form(
"RooAbsRealLValue named %s not found",arg)) ;
1583 throw string(
Form(
"Object named %s is not of type RooAbsRealLValue",arg)) ;
1597 throw string(
Form(
"RooRealVar named %s not found",arg)) ;
1612 throw string(
Form(
"RooAbsPdf named %s not found",arg)) ;
1627 throw string(
Form(
"RooResolutionModel named %s not found",arg)) ;
1631 throw string(
Form(
"Object named %s is not of type RooResolutionModel",arg)) ;
1646 throw string(
Form(
"RooAbsCategory named %s not found",arg)) ;
1650 throw string(
Form(
"Object named %s is not of type RooAbsCategory",arg)) ;
1664 throw string(
Form(
"RooAbsCategoryLValue named %s not found",arg)) ;
1669 throw string(
Form(
"Object named %s is not of type RooAbsCategoryLValue",arg)) ;
1683 throw string(
Form(
"RooCategory named %s not found",arg)) ;
1721 }
else if (
tok[0] ==
'\'') {
1730 throw string(
Form(
"RooAbsArg named %s not found",
tok)) ;
1757 }
else if (
tok[0] ==
'\'') {
1766 throw string(
Form(
"RooAbsArg named %s not found",
tok)) ;
1784 throw string(
Form(
"RooAbsData named %s not found",arg)) ;
1798 throw string(
Form(
"RooAbsData named %s not found",arg)) ;
1802 throw string(
Form(
"Dataset named %s is not of type RooDataHist",arg)) ;
1815 throw string(
Form(
"RooAbsData named %s not found",arg)) ;
1819 throw string(
Form(
"Dataset named %s is not of type RooDataSet",arg)) ;
1832 throw string(
Form(
"Object named %s not found",arg)) ;
1848 if (arg==
nullptr ||
strlen(arg)==0) {
1855 const char*
p = arg+1 ;
1856 while(*
p && (*
p) !=
'"' && (*
p) !=
'\'' ) {
1915 vector<string>::iterator iter = args.begin() ;
1917 while(iter!=args.end()) {
1919 string tmp =
ft.processExpression(iter->c_str()) ;
1921 pargv.push_back(tmp) ;
1926 string cl(typeName) ;
1932 }
else if (cl==
"RSUM") {
1937 }
else if (cl==
"ASUM") {
1942 }
else if (cl==
"PROD") {
1947 }
else if (cl==
"SIMUL") {
1950 if (
pargv.size()>1) {
1956 }
else if (cl==
"EXPR") {
1959 if (args.size()<=2) {
1965 for (
UInt_t i=1 ; i<args.size() ; i++) {
1973 }
else if (cl==
"FCONV") {
1978 }
else if (cl==
"NCONV") {
1983 }
else if (cl==
"sum") {
1988 }
else if (cl==
"prod") {
1993 }
else if (cl==
"expr") {
1996 if (args.size()<=2) {
2002 for (
UInt_t i=1 ; i<args.size() ; i++) {
2010 }
else if (cl ==
"taylorexpand") {
2018 if (
pargv.size() < 2)
2019 throw string(
Form(
"taylorexpand::%s, requires atleast 2 arguments (function, observables) atleast, has %d arguments",
instName, (
Int_t)
pargv.size()));
2024 if (
pargv.size() > 3)
2025 order = atoi(
pargv[3].c_str());
2026 if (
pargv.size() > 2) {
2027 if (
pargv[2].find(
',') != string::npos) {
2029 Form(
"taylorexpand::%s, factory syntax supports expansion only around same value for all observables",
instName));
2035 if (
pargv.size() > 3)
2036 order = atoi(
pargv[3].c_str());
2037 if (
pargv.size() > 4)
2039 if (
pargv.size() > 5)
2042 if (
pargv.size() > 6) {
2050 }
else if (cl==
"nconv") {
2055#ifdef ROOFIT_LEGACY_EVAL_BACKEND
2056 }
else if (cl==
"nll") {
2060 if (
ft.ws().import(nll,
Silence()))
ft.logError() ;
2062 }
else if (cl==
"chi2") {
2066 if (
ft.ws().import(nll,
Silence()))
ft.logError() ;
2069 }
else if (cl==
"profile") {
2074 }
else if (cl==
"dataobs") {
2080 if (
ft.ws().import(*arg,
Silence()))
ft.logError() ;
2083 }
else if (cl==
"int") {
2091 throw string(
Form(
"int::%s, requires 2 or 3 arguments, have %d arguments",
instName,(
Int_t)
pargv.size())) ;
2100 if (!intobs) intobs=
"" ;
2105 std::unique_ptr<RooAbsReal> integral;
2106 if (
pargv.size()==2) {
2110 integral = std::unique_ptr<RooAbsReal>{func.
createIntegral(
ft.asSET(intobs))};
2121 if (
ft.ws().import(*integral,
Silence()))
ft.logError() ;
2123 }
else if (cl==
"deriv") {
2128 throw string(
Form(
"deriv::%s, requires 2 or 3 arguments, have %d arguments",
instName,(
Int_t)
pargv.size())) ;
2133 std::unique_ptr<RooAbsReal> derivative;
2134 if (
pargv.size()==2) {
2141 if (
ft.ws().import(*derivative,
Silence()))
ft.logError() ;
2143 }
else if (cl==
"cdf") {
2148 throw string(
Form(
"cdf::%s, requires 2 or 3 arguments, have %d arguments",
instName,(
Int_t)
pargv.size())) ;
2153 std::unique_ptr<RooAbsReal>
cdf;
2154 if (
pargv.size()==2) {
2164 }
else if (cl==
"PROJ") {
2167 if (
pargv.size()!=2) {
2177 }
else if (cl==
"set") {
2187 throw string(
Form(
"RooFactoryWSTool::SpecialsIFace::create() ERROR: Unknown meta-type %s",typeName)) ;
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t property
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
const_iterator begin() const
const_iterator end() const
Common abstract base class for objects that represent a value and a "shape" in RooFit.
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
Abstract base class for objects that represent a discrete value that can be set from the outside,...
A space to attach TBranches.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
Storage_t::size_type size() const
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
RooFit::OwningPtr< RooAbsReal > createCdf(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Create a cumulative distribution function of this p.d.f in terms of the observables listed in iset.
virtual RooAbsPdf * createProjection(const RooArgSet &iset)
Return a p.d.f that represent a projection of this p.d.f integrated over given observables.
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
Abstract base class for objects that represent a real value and implements functionality common to al...
RooDerivative * derivative(RooRealVar &obs, Int_t order=1, double eps=0.001)
Return function representing first, second or third order derivative of this function.
RooFit::OwningPtr< RooAbsReal > createIntegral(const RooArgSet &iset, const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}) const
Create an object that represents the integral of the function over one or more observables listed in ...
Efficient implementation of a sum of PDFs of the form.
Calculates the sum of a set of RooAbsReal terms, or when constructed with two sets,...
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Object to represent discrete states.
bool defineType(const std::string &label)
Define a state with given name.
Simple calculation from a binned dataset and a PDF.
Container class to hold N-dimensional binned data.
Container class to hold unbinned data.
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
Implements a -log(likelihood) calculation from a dataset and a PDF.
static std::unique_ptr< RooPolyFunc > taylorExpand(const char *name, const char *title, RooAbsReal &func, const RooArgList &observables, int order=1, std::vector< double > const &observableValues={}, double eps1=1e-6, double eps2=1e-3)
Taylor expanding given function in terms of observables around observableValues.
Efficient implementation of a product of PDFs of the form.
Represents the product of a given set of RooAbsReal objects.
Implements a PDF constructed from a sum of functions:
Variable that can be changed from the outside.
RooResolutionModel is the base class for PDFs that represent a resolution model that can be convolute...
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
A RooAbsArg implementing string values.
TObject * obj(RooStringView name) const
Return any type of object (RooAbsArg, RooAbsData or generic object) with given name)
RooAbsPdf * pdf(RooStringView name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
RooCategory * cat(RooStringView name) const
Retrieve discrete variable (RooCategory) with given name. A null pointer is returned if not found.
const RooArgSet * set(RooStringView name)
Return pointer to previously defined named set with given nmame If no such set is found a null pointe...
bool cancelTransaction()
Cancel an ongoing import transaction.
bool startTransaction()
Open an import transaction operations.
RooAbsReal * function(RooStringView name) const
Retrieve function (RooAbsReal) with given name. Note that all RooAbsPdfs are also RooAbsReals....
RooAbsArg * arg(RooStringView name) const
Return RooAbsArg with given name. A null pointer is returned if none is found.
RooRealVar * var(RooStringView name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found.
RooAbsData * data(RooStringView name) const
Retrieve dataset (binned or unbinned) with given name. A null pointer is returned if not found.
bool import(const RooAbsArg &arg, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}, const RooCmdArg &arg9={})
Import a RooAbsArg object, e.g.
TClass instances represent classes, structs and namespaces in the ROOT type system.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
static TEnum * GetEnum(const std::type_info &ti, ESearchAction sa=kALoadAndInterpLookup)
TObject * Clone(const char *newname="") const override
Make a clone of an object using the Streamer facility.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
RooCmdArg Conditional(const RooArgSet &pdfSet, const RooArgSet &depSet, bool depsAreCond=false)
RooConstVar & RooConst(double val)
RooCmdArg Silence(bool flag=true)
RooCmdArg NormSet(Args_t &&... argsOrArgSet)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
static uint64_t sum(uint64_t i)