FreeHEP API
Version current

hep.aida.ref.function
Class FunctionFactory

java.lang.Object
  extended byhep.aida.ref.function.FunctionFactory
All Implemented Interfaces:
hep.aida.IFunctionFactory

public class FunctionFactory
extends Object
implements hep.aida.IFunctionFactory

Version:
$Id:
Author:
serbo
Source Code:
FunctionFactory.java

Constructor Summary
  FunctionFactory(hep.aida.ITree tree)
          Create a new FunctionFactory.
protected FunctionFactory(Tree tree)
          Create a new FunctionFactory.
 
Method Summary
 hep.aida.IFunctionCatalog catalog()
          get access to the function catalog
 hep.aida.IFunction cloneFunction(String path, hep.aida.IFunction f)
           
 hep.aida.IFunction createFunctionByName(String path, String model)
          Create function from a name registered in the catalog.
 hep.aida.IFunction createFunctionFromScript(String path, int dim, String valexpr, String parameters, String description)
          Create function from script.
 hep.aida.IFunction createFunctionFromScript(String path, int dim, String valexpr, String parameters, String description, String gradexpr)
          Create function from script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionFactory

public FunctionFactory(hep.aida.ITree tree)
Create a new FunctionFactory. This constructor is used by AnalysisFactory, the Master Factory.

Parameters:
tree - the ITree where the histogram is added.

FunctionFactory

protected FunctionFactory(Tree tree)
Create a new FunctionFactory. This constructor is used by AnalysisFactory, the Master Factory.

Parameters:
tree - the Tree where the histogram is added.
Method Detail

createFunctionByName

public hep.aida.IFunction createFunctionByName(String path,
                                               String model)
Create function from a name registered in the catalog. This is the easiest way to create simple model functions for fitting. Every AIDA compliant implementation should predefine "G", "E", "Pn" (n is an integer, e.e "P0","P5"). Simple operations are permitted, e.g. "G+P2".

Specified by:
createFunctionByName in interface hep.aida.IFunctionFactory

createFunctionFromScript

public hep.aida.IFunction createFunctionFromScript(String path,
                                                   int dim,
                                                   String valexpr,
                                                   String parameters,
                                                   String description)
Create function from script. Script conventions: example: createFunctionFromScript(2, "a*x[0]*x[0] + b*x[1]", "a,b", "this is my function", "2*a*x[0],b")

Specified by:
createFunctionFromScript in interface hep.aida.IFunctionFactory

createFunctionFromScript

public hep.aida.IFunction createFunctionFromScript(String path,
                                                   int dim,
                                                   String valexpr,
                                                   String parameters,
                                                   String description,
                                                   String gradexpr)
Create function from script. Script conventions: example: createFunctionFromScript(2, "a*x[0]*x[0] + b*x[1]", "a,b", "this is my function", "2*a*x[0],b")

Specified by:
createFunctionFromScript in interface hep.aida.IFunctionFactory

cloneFunction

public hep.aida.IFunction cloneFunction(String path,
                                        hep.aida.IFunction f)
Specified by:
cloneFunction in interface hep.aida.IFunctionFactory

catalog

public hep.aida.IFunctionCatalog catalog()
get access to the function catalog

Specified by:
catalog in interface hep.aida.IFunctionFactory

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.