53 _funcMaxVal(maxFuncVal), _verbose(verbose)
59 oocoutE(
nullptr, Generation) <<
"RooAbsNumGenerator::RooAbsNumGenerator(" << func.
GetName() <<
") Couldn't deep-clone function, abort," << endl ;
73 if(!arg->isFundamental()) {
74 oocoutE(
nullptr, Generation) << func.
GetName() <<
"::RooAbsNumGenerator: cannot generate values for derived \""
75 << arg->GetName() <<
"\"" << endl;
87 assert(
nullptr != arg);
91 if(
nullptr != catVar) {
94 else if(
nullptr != realVar) {
99 oocoutE(
nullptr, Generation) << func.
GetName() <<
"::RooAbsNumGenerator: cannot generate values for \""
100 << realVar->
GetName() <<
"\" with unbound range" << endl;
105 oocoutE(
nullptr, Generation) << func.
GetName() <<
"::RooAbsNumGenerator" <<
": cannot generate values for \""
106 << arg->GetName() <<
"\" with unexpected type" << endl;
111 oocoutE(
nullptr, Generation) << func.
GetName() <<
"::RooAbsNumGenerator" <<
": constructor failed with errors" << endl;
122 _cache= std::make_unique<RooDataSet>(
"cache",
"Accept-Reject Event Cache",cacheArgs);
126 assert(
nullptr != cacheVars);
Common abstract base class for objects that represent a value and a "shape" in RooFit.
bool recursiveRedirectServers(const RooAbsCollection &newServerList, bool mustReplaceAll=false, bool nameChange=false, bool recurseInNewSet=true)
Recursively replace all servers with the new servers in newSet.
virtual bool remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false)
Remove the specified argument from our list.
Storage_t const & get() const
Const access to the underlying stl container.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
virtual bool replace(const RooAbsArg &var1, const RooAbsArg &var2)
Replace var1 with var2 and return true for success.
virtual RooAbsArg * addClone(const RooAbsArg &var, bool silent=false)
Add a clone of the specified argument to list.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooArgSet _catVars
Set of discrete observabeles.
RooArgSet _realVars
Set of real valued observabeles.
std::unique_ptr< RooAbsArg > _funcValStore
RRV storing function value in context.
RooArgSet _cloneSet
Set owning clone of input function.
RooAbsReal * _funcClone
Pointer to top level node of cloned function.
virtual ~RooAbsNumGenerator()
RooRealVar * _funcValPtr
RRV storing function value in output dataset.
void attachParameters(const RooArgSet &vars)
Reattach original parameters to function clone.
std::unique_ptr< RooDataSet > _cache
Dataset holding generared values of observables.
bool hasMax(const char *name=nullptr) const
Check if variable has an upper bound.
bool hasMin(const char *name=nullptr) const
Check if variable has a lower bound.
Abstract base class for objects that represent a real value and implements functionality common to al...
RooFit::OwningPtr< RooAbsArg > createFundamental(const char *newname=nullptr) const override
Create a RooRealVar fundamental object with our properties.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
Object to represent discrete states.
static void softAbort()
Soft abort function that interrupts macro execution but doesn't kill ROOT.
Variable that can be changed from the outside.
const char * GetName() const override
Returns name of object.