Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:28:08

0001 // -*- C++ -*-
0002 // AID-GENERATED
0003 // =========================================================================
0004 // This class was generated by AID - Abstract Interface Definition          
0005 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it. 
0006 // =========================================================================
0007 #ifndef AIDA_IFUNCTIONFACTORY_H
0008 #define AIDA_IFUNCTIONFACTORY_H 1
0009 
0010 //  This file is part of the AIDA library
0011 //  Copyright (C) 2002 by the AIDA team.  All rights reserved.
0012 //  This library is free software and under the terms of the
0013 //  GNU Library General Public License described in the LGPL.txt 
0014 
0015 #include <string>
0016 
0017 namespace AIDA {
0018 
0019 class IFunction;
0020 class IFunctionCatalog;
0021 
0022 /** @interface IFunctionFactory
0023  *
0024  * Function factory.
0025  *
0026  * @author The AIDA team (http://aida.freehep.org/)
0027  *
0028  * @stereotype abstractfactory
0029  */
0030  
0031 class IFunctionFactory {
0032 
0033 public: 
0034     /// Destructor.
0035     virtual ~IFunctionFactory() { /* nop */; }
0036 
0037     /**
0038      * Create function from a model registered in the catalog.
0039      * This is the easiest way to create simple model functions for fitting.
0040      * Every AIDA compliant implementation should predefine "G", "E", "Pn"
0041      * (n is an integer, e.e "P0","P5"). Simple operations are permitted,
0042      * e.g. "G+P2".
0043      * @param path  The path of the IFunction. The path can either be a relative or full path.
0044      *              ("/folder1/folder2/functionName" and "../folder/functionName" are valid paths).
0045      *              All the directories in the path must exist. The characther `/` cannot be used
0046      *              in names; it is only used to delimit directories within paths.
0047      * @param model The model of the function to be created.
0048      * @return      The newly created function.
0049      *
0050      */
0051     virtual IFunction * createFunctionByName(const std::string & path, const std::string & model) = 0;
0052 
0053     /**
0054      * Create function from script. Script conventions:
0055      *         createFunctionFromScript("f1", 2, "a*x[0]*x[0] + b*x[1]", "a,b","this is my function", "x[0]*x[0],x[1]")
0056      * @param path        The path of the IFunction. The path can either be a relative or full path.
0057      *                    ("/folder1/folder2/functionName" and "../folder/functionName" are valid paths).
0058      *                    All the directories in the path must exist. The characther `/` cannot be used
0059      *                    in names; it is only used to delimit directories within paths.
0060      * @param dim         The dimension of the function, i.e. the number of variables.
0061      * @param valexpr     The expression of the scripted function.
0062      * @param parameters  A comma separeted list of what has to be considered as a parameter in the valexpr expression.
0063      * @param description The description of the function.
0064      * @param gradexpr    A comma separated list of the expressions for the derivatives of the function with respect to the parameters.
0065      * @return            The newly created function
0066      *                    provided expressions is illigal.
0067      *
0068      */
0069     virtual IFunction * createFunctionFromScript(const std::string & name, int dim, const std::string & valexpr, const std::string & parameters, const std::string & description, const std::string & gradexpr = "") = 0;
0070 
0071     /**
0072      * Create a clone of an existing function.
0073      * @param path The path of the IFunction. The path can either be a relative or full path.
0074      *             ("/folder1/folder2/functionName" and "../folder/functionName" are valid paths).
0075      *             All the directories in the path must exist. The characther `/` cannot be used
0076      *             in names; it is only used to delimit directories within paths.
0077      * @param f    The IFunction to be cloned.
0078      * @return     The clone of the provided IFunction.
0079      *
0080      */
0081     virtual IFunction * cloneFunction(const std::string & path, IFunction & f) = 0;
0082 
0083     /**
0084      * get access to the function catalog
0085      */
0086     virtual IFunctionCatalog * catalog() = 0;
0087 
0088     /** @link association 
0089      * @directed*/
0090     /*# IFunctionCatalog lnkIFunctionCatalog; */
0091 }; // class
0092 } // namespace AIDA
0093 #endif /* ifndef AIDA_IFUNCTIONFACTORY_H */