Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooClassFactory Class Reference

RooClassFactory is a clase like TTree::MakeClass() that generates skeleton code for RooAbsPdf and RooAbsReal functions given a list of input parameter names.

The factory can also compile the generated code on the fly, and on request also immediate instantiate objects.

Definition at line 31 of file RooClassFactory.h.

Public Member Functions

 RooClassFactory ()
 Default constructor.
 
 ~RooClassFactory ()
 Destructor.
 

Static Public Member Functions

static bool makeAndCompileFunction (const char *name, const char *expression, const RooArgList &args, const char *intExpression=nullptr)
 Write, compile and load code for a RooAbsReal implementation with class name 'name', taking all elements of 'vars' as constructor arguments.
 
static bool makeAndCompilePdf (const char *name, const char *expression, const RooArgList &vars, const char *intExpression=nullptr)
 
static bool makeClass (const char *className, const char *name, const char *realArgNames=nullptr, const char *catArgNames=nullptr, const char *expression="1.0", bool hasAnaInt=false, bool hasIntGen=false, const char *intExpression=nullptr)
 Write code for a 'baseName' implementation with class name 'className', taking RooAbsReal arguments with names listed in argNames and RooAbsCategory arguments with names listed in catArgNames as constructor arguments (use a comma separated list for multiple arguments).
 
static bool makeFunction (const char *name, const char *realArgNames=nullptr, const char *catArgNames=nullptr, const char *expression="1.0", bool hasAnaInt=false, const char *intExpression=nullptr)
 Write code for a RooAbsReal implementation with class name 'name', taking RooAbsReal arguments with names listed in argNames and RooAbsCategory arguments with names listed in catArgNames as constructor arguments (use a comma separated list for multiple arguments).
 
static RooAbsRealmakeFunctionInstance (const char *className, const char *name, const char *expression, const RooArgList &vars, const char *intExpression=nullptr)
 Write, compile and load code and instantiate object for a RooAbsReal implementation with class name 'name', taking all elements of 'vars' as constructor arguments.
 
static RooAbsRealmakeFunctionInstance (const char *name, const char *expression, const RooArgList &vars, const char *intExpression=nullptr)
 Write, compile and load code and instantiate object for a RooAbsReal implementation with class name 'name', taking all elements of 'vars' as constructor arguments.
 
static bool makePdf (const char *name, const char *realArgNames=nullptr, const char *catArgNames=nullptr, const char *expression="1.0", bool hasAnaInt=false, bool hasIntGen=false, const char *intExpression=nullptr)
 Write code for a RooAbsPdf implementation with class name 'name', taking RooAbsReal arguments with names listed in argNames and RooAbsCategory arguments with names listed in catArgNames as constructor arguments (use a comma separated list for multiple arguments).
 
static RooAbsPdfmakePdfInstance (const char *className, const char *name, const char *expression, const RooArgList &vars, const char *intExpression=nullptr)
 Write, compile and load code and instantiate object for a RooAbsPdf implementation with class name 'name', taking all elements of 'vars' as constructor arguments.
 
static RooAbsPdfmakePdfInstance (const char *name, const char *expression, const RooArgList &vars, const char *intExpression=nullptr)
 Write, compile and load code and instantiate object for a RooAbsPdf implementation with class name 'name', taking all elements of 'vars' as constructor arguments.
 

Protected Member Functions

 RooClassFactory (const RooClassFactory &)
 

#include <RooClassFactory.h>

Constructor & Destructor Documentation

◆ RooClassFactory() [1/2]

RooClassFactory::RooClassFactory ( )

Default constructor.

Definition at line 73 of file RooClassFactory.cxx.

◆ ~RooClassFactory()

RooClassFactory::~RooClassFactory ( )

Destructor.

Definition at line 82 of file RooClassFactory.cxx.

◆ RooClassFactory() [2/2]

RooClassFactory::RooClassFactory ( const RooClassFactory )
protected

Member Function Documentation

◆ makeAndCompileFunction()

bool RooClassFactory::makeAndCompileFunction ( const char *  name,
const char *  expression,
const RooArgList vars,
const char *  intExpression = nullptr 
)
static

Write, compile and load code for a RooAbsReal implementation with class name 'name', taking all elements of 'vars' as constructor arguments.

The initial value expression is taken to be 'expression' which can be any one-line C++ expression in terms of variables that occur in 'vars'. You can add optional expressions for analytical integrals to be advertised by your class in the syntax "<intObsName>:<CPPAnaIntExpression>;<intObsName,intObsName>:<CPPAnaIntExpression>" where "<intObsName>" a name of the observable integrated over and "<CPPAnaIntExpression>" is the C++ expression that calculates that integral.

Definition at line 131 of file RooClassFactory.cxx.

◆ makeAndCompilePdf()

bool RooClassFactory::makeAndCompilePdf ( const char *  name,
const char *  expression,
const RooArgList vars,
const char *  intExpression = nullptr 
)
static

Definition at line 90 of file RooClassFactory.cxx.

◆ makeClass()

bool RooClassFactory::makeClass ( const char *  baseName,
const char *  className,
const char *  realArgNames = nullptr,
const char *  catArgNames = nullptr,
const char *  expression = "1.0",
bool  hasAnaInt = false,
bool  hasIntGen = false,
const char *  intExpression = nullptr 
)
static

Write code for a 'baseName' implementation with class name 'className', taking RooAbsReal arguments with names listed in argNames and RooAbsCategory arguments with names listed in catArgNames as constructor arguments (use a comma separated list for multiple arguments).

The initial value expression is taken to be 'expression' which can be any one-line C++ expression in terms of variables that occur in 'vars'. Skeleton code for handling of analytical integrals is added if hasAnaInt is true. You can add optional expressions for analytical integrals to be advertised by your class in the syntax "<intObsName>:<CPPAnaIntExpression>;<intObsName,intObsName>:<CPPAnaIntExpression>" where "<intObsName>" a name of the observable integrated over and "<CPPAnaIntExpression>" is the C++ expression that calculates that integral. Skeleton code for internal event generation is added if hasIntGen is true

Definition at line 404 of file RooClassFactory.cxx.

◆ makeFunction()

bool RooClassFactory::makeFunction ( const char *  name,
const char *  argNames = nullptr,
const char *  catArgNames = nullptr,
const char *  expression = "1.0",
bool  hasAnaInt = false,
const char *  intExpression = nullptr 
)
static

Write code for a RooAbsReal implementation with class name 'name', taking RooAbsReal arguments with names listed in argNames and RooAbsCategory arguments with names listed in catArgNames as constructor arguments (use a comma separated list for multiple arguments).

The initial value expression is taken to be 'expression' which can be any one-line C++ expression in terms of variables that occur in 'vars'. Skeleton code for handling of analytical integrals is added if hasAnaInt is true. You can add optional expressions for analytical integrals to be advertised by your class in the syntax "<intObsName>:<CPPAnaIntExpression>;<intObsName,intObsName>:<CPPAnaIntExpression>" where "<intObsName>" a name of the observable integrated over and "<CPPAnaIntExpression>" is the C++ expression that calculates that integral.

Definition at line 380 of file RooClassFactory.cxx.

◆ makeFunctionInstance() [1/2]

RooAbsReal * RooClassFactory::makeFunctionInstance ( const char *  className,
const char *  name,
const char *  expression,
const RooArgList vars,
const char *  intExpression = nullptr 
)
static

Write, compile and load code and instantiate object for a RooAbsReal implementation with class name 'name', taking all elements of 'vars' as constructor arguments.

The initial value expression is taken to be 'expression' which can be any one-line C++ expression in terms of variables that occur in 'vars'.

The returned object is an instance of the object you just defined connected to the variables listed in 'vars'. The name of the object is 'name', its class name Roo<name>Class.

This function is an effective compiled replacement of RooFormulaVar

You can add optional expressions for analytical integrals to be advertised by your class in the syntax "<intObsName>:<CPPAnaIntExpression>;<intObsName,intObsName>:<CPPAnaIntExpression>" where "<intObsName>" a name of the observable integrated over and "<CPPAnaIntExpression>" is the C++ expression that calculates that integral.

Definition at line 208 of file RooClassFactory.cxx.

◆ makeFunctionInstance() [2/2]

RooAbsReal * RooClassFactory::makeFunctionInstance ( const char *  name,
const char *  expression,
const RooArgList vars,
const char *  intExpression = nullptr 
)
static

Write, compile and load code and instantiate object for a RooAbsReal implementation with class name 'name', taking all elements of 'vars' as constructor arguments.

The initial value expression is taken to be 'expression' which can be any one-line C++ expression in terms of variables that occur in 'vars'.

The returned object is an instance of the object you just defined connected to the variables listed in 'vars'. The name of the object is 'name', its class name Roo<name>Class.

This function is an effective compiled replacement of RooFormulaVar

You can add optional expressions for analytical integrals to be advertised by your class in the syntax "<intObsName>:<CPPAnaIntExpression>;<intObsName,intObsName>:<CPPAnaIntExpression>" where "<intObsName>" a name of the observable integrated over and "<CPPAnaIntExpression>" is the C++ expression that calculates that integral.

Definition at line 178 of file RooClassFactory.cxx.

◆ makePdf()

bool RooClassFactory::makePdf ( const char *  name,
const char *  argNames = nullptr,
const char *  catArgNames = nullptr,
const char *  expression = "1.0",
bool  hasAnaInt = false,
bool  hasIntGen = false,
const char *  intExpression = nullptr 
)
static

Write code for a RooAbsPdf implementation with class name 'name', taking RooAbsReal arguments with names listed in argNames and RooAbsCategory arguments with names listed in catArgNames as constructor arguments (use a comma separated list for multiple arguments).

The initial value expression is taken to be 'expression' which can be any one-line C++ expression in terms of variables that occur in 'vars'. Skeleton code for handling of analytical integrals is added if hasAnaInt is true. You can add optional expressions for analytical integrals to be advertised by your class in the syntax "<intObsName>:<CPPAnaIntExpression>;<intObsName,intObsName>:<CPPAnaIntExpression>" where "<intObsName>" a name of the observable integrated over and "<CPPAnaIntExpression>" is the C++ expression that calculates that integral. Skeleton code for internal event generation is added if hasIntGen is true

Definition at line 357 of file RooClassFactory.cxx.

◆ makePdfInstance() [1/2]

RooAbsPdf * RooClassFactory::makePdfInstance ( const char *  className,
const char *  name,
const char *  expression,
const RooArgList vars,
const char *  intExpression = nullptr 
)
static

Write, compile and load code and instantiate object for a RooAbsPdf implementation with class name 'name', taking all elements of 'vars' as constructor arguments.

The initial value expression is taken to be 'expression' which can be any one-line C++ expression in terms of variables that occur in 'vars'.

The returned object is an instance of the object you just defined connected to the variables listed in 'vars'. The name of the object is 'name', its class name Roo<name>Class.

This function is an effective compiled replacement of RooGenericPdf

You can add optional expressions for analytical integrals to be advertised by your class in the syntax "<intObsName>:<CPPAnaIntExpression>;<intObsName,intObsName>:<CPPAnaIntExpression>" where "<intObsName>" a name of the observable integrated over and "<CPPAnaIntExpression>" is the C++ expression that calculates that integral.

Definition at line 299 of file RooClassFactory.cxx.

◆ makePdfInstance() [2/2]

RooAbsPdf * RooClassFactory::makePdfInstance ( const char *  name,
const char *  expression,
const RooArgList vars,
const char *  intExpression = nullptr 
)
static

Write, compile and load code and instantiate object for a RooAbsPdf implementation with class name 'name', taking all elements of 'vars' as constructor arguments.

The initial value expression is taken to be 'expression' which can be any one-line C++ expression in terms of variables that occur in 'vars'.

The returned object is an instance of the object you just defined connected to the variables listed in 'vars'. The name of the object is 'name', its class name Roo<name>Class.

This function is an effective compiled replacement of RooGenericPdf

You can add optional expressions for analytical integrals to be advertised by your class in the syntax "<intObsName>:<CPPAnaIntExpression>;<intObsName,intObsName>:<CPPAnaIntExpression>" where "<intObsName>" a name of the observable integrated over and "<CPPAnaIntExpression>" is the C++ expression that calculates that integral.

Definition at line 268 of file RooClassFactory.cxx.


The documentation for this class was generated from the following files: