00001 /***************************************************************************** 00002 * Project: RooFit * 00003 * Package: RooFitCore * 00004 * File: $Id: RooNumIntFactory.h,v 1.6 2007/05/11 09:11:30 verkerke Exp $ 00005 * Authors: * 00006 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * 00007 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * 00008 * * 00009 * Copyright (c) 2000-2005, Regents of the University of California * 00010 * and Stanford University. All rights reserved. * 00011 * * 00012 * Redistribution and use in source and binary forms, * 00013 * with or without modification, are permitted according to the terms * 00014 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * 00015 *****************************************************************************/ 00016 #ifndef ROO_NUM_INT_FACTORY 00017 #define ROO_NUM_INT_FACTORY 00018 00019 #include <map> 00020 #include <string> 00021 #include "TObject.h" 00022 #include "RooLinkedList.h" 00023 #include "RooAbsIntegrator.h" 00024 class RooNumIntConfig ; 00025 class RooAbsFunc ; 00026 00027 class RooNumIntFactory ; 00028 typedef void (*RooNumIntInitializerFunc)(RooNumIntFactory&) ; 00029 00030 class RooNumIntFactory : public TObject { 00031 public: 00032 00033 static RooNumIntFactory& instance() ; 00034 virtual ~RooNumIntFactory(); 00035 00036 Bool_t storeProtoIntegrator(RooAbsIntegrator* proto, const RooArgSet& defConfig, const char* depName="") ; 00037 const RooAbsIntegrator* getProtoIntegrator(const char* name) ; 00038 const char* getDepIntegratorName(const char* name) ; 00039 00040 RooAbsIntegrator* createIntegrator(RooAbsFunc& func, const RooNumIntConfig& config, Int_t ndim=0) ; 00041 00042 static void cleanup() ; 00043 00044 00045 protected: 00046 00047 friend class RooNumIntConfig ; 00048 00049 std::map<std::string,std::pair<RooAbsIntegrator*,std::string> > _map ; 00050 00051 RooNumIntFactory(); 00052 RooNumIntFactory(const RooNumIntFactory& other) ; 00053 00054 static RooNumIntFactory* _instance ; 00055 00056 00057 ClassDef(RooNumIntFactory,1) // Numeric Integrator factory 00058 }; 00059 00060 #endif 00061 00062