36using std::endl, std::ostream;
47 static bool initStarted =
false;
70 _printEvalCounter(false),
71 _method1D(
"method1D",
"1D integration method"),
72 _method2D(
"method2D",
"2D integration method"),
73 _methodND(
"methodND",
"ND integration method"),
74 _method1DOpen(
"method1DOpen",
"1D integration method in open domain"),
75 _method2DOpen(
"method2DOpen",
"2D integration method in open domain"),
76 _methodNDOpen(
"methodNDOpen",
"ND integration method in open domain")
105 _epsAbs(other._epsAbs),
106 _epsRel(other._epsRel),
107 _printEvalCounter(other._printEvalCounter),
108 _method1D(other._method1D),
109 _method2D(other._method2D),
110 _methodND(other._methodND),
111 _method1DOpen(other._method1DOpen),
112 _method2DOpen(other._method2DOpen),
113 _methodNDOpen(other._methodNDOpen)
116 for(
auto * set : static_range_cast<RooArgSet*>(other.
_configSets)) {
119 setCopy->
setName(set->GetName()) ;
149 for(
auto * set : static_range_cast<RooArgSet*>(other.
_configSets)) {
152 setCopy->
setName(set->GetName()) ;
167 bool canIntegrate2D,
bool canIntegrateND,
bool canIntegrateOpenEnded)
170 if (canIntegrate1D) {
172 if (canIntegrateOpenEnded) {
177 if (canIntegrate2D) {
179 if (canIntegrateOpenEnded) {
184 if (canIntegrateND) {
186 if (canIntegrateOpenEnded) {
219 oocoutE(
nullptr,InputArguments) <<
"RooNumIntConfig::getConfigSection: ERROR: no configuration stored for integrator '" <<
name <<
"'" << endl ;
233 oocoutE(
nullptr,InputArguments) <<
"RooNumIntConfig::setEpsAbs: ERROR: target absolute precision must be greater or equal than zero" << endl ;
263 oocoutE(
nullptr,InputArguments) <<
"RooNumIntConfig::setEpsRel: ERROR: target absolute precision must be greater or equal than zero" << endl ;
276 os <<
indent <<
"Requested precision: " <<
_epsAbs <<
" absolute, " <<
_epsRel <<
" relative" << endl << endl ;
278 os <<
indent <<
"Printing of function evaluation counter for each integration enabled" << endl << endl ;
302 os << endl <<
"Available integration methods:" << endl << endl ;
303 for(
auto * configSet : static_range_cast<RooArgSet*>(
_configSets)) {
307 os <<
indent <<
"*** " << configSet->GetName() <<
" ***" << endl ;
308 os <<
indent <<
"Capabilities: " ;
309 if (info.canIntegrate1D) os <<
"[1-D] " ;
310 if (info.canIntegrate2D) os <<
"[2-D] " ;
311 if (info.canIntegrateND) os <<
"[N-D] " ;
312 if (info.canIntegrateOpenEnded) os <<
"[OpenEnded] " ;
315 os <<
"Configuration: " << endl ;
319 if (!info.depName.empty()) {
320 os <<
indent <<
"(Depends on '" << info.
depName <<
"')" << endl ;
static void indent(ostringstream &buf, int indent_level)
virtual const char * getCurrentLabel() const
Return label string of current state.
void setName(const char *name)
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
bool setIndex(Int_t index, bool printError=true) override
Set value by specifying the index code of the desired state.
bool defineType(const std::string &label)
Define a state with given name.
value_type getCurrentIndex() const final
Return current index.
void Delete(Option_t *o=nullptr) override
Remove all elements in collection and delete all elements NB: Collection does not own elements,...
virtual void Add(TObject *arg)
TObject * FindObject(const char *name) const override
Return pointer to object with given name.
Holds the configuration parameters of the various numeric integrators used by RooRealIntegral.
RooCategory _method1D
Selects integration method for 1D integrals.
RooCategory _method1DOpen
Selects integration method for open ended 1D integrals.
void printMultiline(std::ostream &os, Int_t content, bool verbose, TString indent="") const override
Detailed printing interface.
RooNumIntConfig()
Constructor.
RooLinkedList _configSets
List of configuration sets for individual integration methods.
void setEpsRel(double newEpsRel)
Set relative convergence criteria (convergence if std::abs(Err)/abs(Int)<newEpsRel)
RooCategory _methodND
Selects integration method for ND integrals.
const RooArgSet & getConfigSection(const char *name) const
Retrieve configuration information specific to integrator with given name.
double _epsAbs
Absolute precision.
RooCategory _methodNDOpen
Selects integration method for open ended ND integrals.
bool _printEvalCounter
Flag to control printing of function evaluation counter.
double _epsRel
Relative precision.
~RooNumIntConfig() override
Destructor.
StyleOption defaultPrintStyle(Option_t *opt) const override
bool addConfigSection(std::string const &name, const RooArgSet &inDefaultConfig, bool canIntegrate1D, bool canIntegrate2D, bool canIntegrateND, bool canIntegrateOpenEnded)
Add a configuration section for a particular integrator.
RooCategory _method2D
Selects integration method for 2D integrals.
RooCategory _method2DOpen
Selects integration method for open ended 2D integrals.
RooNumIntConfig & operator=(const RooNumIntConfig &other)
Assignment operator from other RooNumIntConfig.
void setEpsAbs(double newEpsAbs)
Set absolute convergence criteria (convergence if std::abs(Err)<newEpsAbs)
PluginInfo const * getPluginInfo(std::string const &name) const
static RooNumIntFactory & instance()
Static method returning reference to singleton instance of factory.
A 'mix-in' base class that define the standard RooFit plotting and printing methods.
Mother of all ROOT objects.
void ToLower()
Change string to lower-case.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const