Logo ROOT  
Reference Guide
RooNumIntFactory.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooNumIntFactory.h,v 1.6 2007/05/11 09:11:30 verkerke Exp $
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 #ifndef ROO_NUM_INT_FACTORY
17 #define ROO_NUM_INT_FACTORY
18 
19 #include <map>
20 #include <string>
21 #include "TObject.h"
22 #include "RooLinkedList.h"
23 #include "RooAbsIntegrator.h"
24 class RooNumIntConfig ;
25 class RooAbsFunc ;
26 
27 class RooNumIntFactory ;
29 
30 class RooNumIntFactory : public TObject {
31 public:
32 
33  static RooNumIntFactory& instance() ;
34  virtual ~RooNumIntFactory() = default;
35 
36  Bool_t storeProtoIntegrator(RooAbsIntegrator* proto, const RooArgSet& defConfig, const char* depName="") ;
37  const RooAbsIntegrator* getProtoIntegrator(const char* name) const;
38  const char* getDepIntegratorName(const char* name) const;
39 
40  RooAbsIntegrator* createIntegrator(RooAbsFunc& func, const RooNumIntConfig& config, Int_t ndim=0, Bool_t isBinned=kFALSE) const;
41 
42 
43 private:
44 
45  friend class RooNumIntConfig ;
46 
47  std::map<std::string,std::pair<std::unique_ptr<RooAbsIntegrator>,std::string> > _map;
48 
49  RooNumIntFactory() {} // NOLINT: not allowed to use = default because of TObject::kIsOnHeap detection, see ROOT-10300
50  RooNumIntFactory(const RooNumIntFactory& other) = delete;
51 
52  void init();
53 
54 
55  ClassDef(RooNumIntFactory, 0) // Numeric Integrator factory
56 };
57 
58 #endif
59 
60 
RooNumIntFactory::_map
std::map< std::string, std::pair< std::unique_ptr< RooAbsIntegrator >, std::string > > _map
Definition: RooNumIntFactory.h:47
RooNumIntFactory
Definition: RooNumIntFactory.h:30
RooNumIntInitializerFunc
void(* RooNumIntInitializerFunc)(RooNumIntFactory &)
Definition: RooNumIntFactory.h:28
RooNumIntFactory::init
void init()
Register all known integrators by calling their static registration functions.
Definition: RooNumIntFactory.cxx:65
RooNumIntFactory::RooNumIntFactory
RooNumIntFactory()
Definition: RooNumIntFactory.h:49
RooNumIntFactory::createIntegrator
RooAbsIntegrator * createIntegrator(RooAbsFunc &func, const RooNumIntConfig &config, Int_t ndim=0, Bool_t isBinned=kFALSE) const
Construct a numeric integrator instance that operates on function 'func' and is configured with 'conf...
Definition: RooNumIntFactory.cxx:172
RooNumIntFactory::getProtoIntegrator
const RooAbsIntegrator * getProtoIntegrator(const char *name) const
Return prototype integrator with given (class) name.
Definition: RooNumIntFactory.cxx:142
bool
RooAbsFunc
Definition: RooAbsFunc.h:23
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooAbsIntegrator.h
RooNumIntFactory::storeProtoIntegrator
Bool_t storeProtoIntegrator(RooAbsIntegrator *proto, const RooArgSet &defConfig, const char *depName="")
Method accepting registration of a prototype numeric integrator along with a RooArgSet of its default...
Definition: RooNumIntFactory.cxx:119
void
typedef void((*Func_t)())
proto
const char * proto
Definition: civetweb.c:16604
TObject.h
RooNumIntFactory::getDepIntegratorName
const char * getDepIntegratorName(const char *name) const
Get list of class names of integrators needed by integrator named 'name'.
Definition: RooNumIntFactory.cxx:154
RooLinkedList.h
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooNumIntFactory::~RooNumIntFactory
virtual ~RooNumIntFactory()=default
name
char name[80]
Definition: TGX11.cxx:110
RooNumIntConfig
Definition: RooNumIntConfig.h:25
RooAbsIntegrator
Definition: RooAbsIntegrator.h:22
RooNumIntFactory::instance
static RooNumIntFactory & instance()
Static method returning reference to singleton instance of factory.
Definition: RooNumIntFactory.cxx:96
RooArgSet
Definition: RooArgSet.h:28
int