ROOT logo
/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 *    File: $Id: RooClassFactory.h,v 1.2 2007/05/11 09:11:30 verkerke Exp $
 * Authors:                                                                  *
 *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
 *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
 *                                                                           *
 * Copyright (c) 2000-2005, Regents of the University of California          *
 *                          and Stanford University. All rights reserved.    *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/

#ifndef ROO_CODE_FACTORY
#define ROO_CODE_FACTORY

#include "TNamed.h"
#include "RooArgSet.h"
#include "RooPrintable.h"
#include "RooFactoryWSTool.h"

class RooAbsReal ;
class RooAbsPdf ;

class RooClassFactory : public TNamed, public RooPrintable {

public:

  // Constructors, assignment etc
  RooClassFactory() ;
  virtual ~RooClassFactory() ;

  static RooAbsReal* makeFunctionInstance(const char* className, const char* name, const char* expression, const RooArgList& vars, const char* intExpression=0) ;
  static RooAbsReal* makeFunctionInstance(const char* name, const char* expression, const RooArgList& vars, const char* intExpression=0) ;

  static RooAbsPdf* makePdfInstance(const char* className, const char* name, const char* expression, const RooArgList& vars, const char* intExpression=0) ;
  static RooAbsPdf* makePdfInstance(const char* name, const char* expression, const RooArgList& vars, const char* intExpression=0) ;

  static Bool_t makeAndCompilePdf(const char* name, const char* expression, const RooArgList& vars, const char* intExpression=0) ;
  static Bool_t makeAndCompileFunction(const char* name, const char* expression, const RooArgList& args, const char* intExpression=0) ;

  static Bool_t makePdf(const char* name, const char* realArgNames=0, const char* catArgNames=0, 
			const char* expression="1.0", Bool_t hasAnaInt=kFALSE, Bool_t hasIntGen=kFALSE, const char* intExpression=0) ;
  static Bool_t makeFunction(const char* name, const char* realArgNames=0, const char* catArgNames=0, 
			     const char* expresion="1.0", Bool_t hasAnaInt=kFALSE, const char* intExpression=0) ;
  static Bool_t makeClass(const char* className, const char* name, const char* realArgNames=0, const char* catArgNames=0, 
			  const char* expression="1.0", Bool_t hasAnaInt=kFALSE, Bool_t hasIntGen=kFALSE, const char* intExpression=0) ;

  class ClassFacIFace : public RooFactoryWSTool::IFace {
  public:
    std::string create(RooFactoryWSTool& ft, const char* typeName, const char* instanceName, std::vector<std::string> args) ;
  } ;
  
protected:


  
  RooClassFactory(const RooClassFactory&) ;

  ClassDef(RooClassFactory,0) // RooFit class code and instance factory 
} ;

#endif
 RooClassFactory.h:1
 RooClassFactory.h:2
 RooClassFactory.h:3
 RooClassFactory.h:4
 RooClassFactory.h:5
 RooClassFactory.h:6
 RooClassFactory.h:7
 RooClassFactory.h:8
 RooClassFactory.h:9
 RooClassFactory.h:10
 RooClassFactory.h:11
 RooClassFactory.h:12
 RooClassFactory.h:13
 RooClassFactory.h:14
 RooClassFactory.h:15
 RooClassFactory.h:16
 RooClassFactory.h:17
 RooClassFactory.h:18
 RooClassFactory.h:19
 RooClassFactory.h:20
 RooClassFactory.h:21
 RooClassFactory.h:22
 RooClassFactory.h:23
 RooClassFactory.h:24
 RooClassFactory.h:25
 RooClassFactory.h:26
 RooClassFactory.h:27
 RooClassFactory.h:28
 RooClassFactory.h:29
 RooClassFactory.h:30
 RooClassFactory.h:31
 RooClassFactory.h:32
 RooClassFactory.h:33
 RooClassFactory.h:34
 RooClassFactory.h:35
 RooClassFactory.h:36
 RooClassFactory.h:37
 RooClassFactory.h:38
 RooClassFactory.h:39
 RooClassFactory.h:40
 RooClassFactory.h:41
 RooClassFactory.h:42
 RooClassFactory.h:43
 RooClassFactory.h:44
 RooClassFactory.h:45
 RooClassFactory.h:46
 RooClassFactory.h:47
 RooClassFactory.h:48
 RooClassFactory.h:49
 RooClassFactory.h:50
 RooClassFactory.h:51
 RooClassFactory.h:52
 RooClassFactory.h:53
 RooClassFactory.h:54
 RooClassFactory.h:55
 RooClassFactory.h:56
 RooClassFactory.h:57
 RooClassFactory.h:58
 RooClassFactory.h:59
 RooClassFactory.h:60
 RooClassFactory.h:61
 RooClassFactory.h:62
 RooClassFactory.h:63
 RooClassFactory.h:64
 RooClassFactory.h:65
 RooClassFactory.h:66