[ROOT] Problem with array of pointers to the function,

From: Tomasz Bold (bold@fatcat.ftj.agh.edu.pl)
Date: Fri Sep 24 2004 - 11:32:24 MEST

Dear ROOTers,
	I want to perform number of fits. The functions which are supposed
to be fitted are plain c coded.
	I wanted to put pointers to this functions in the table and the
loop over this table and do following:
1. create TF1 with function from table (double) (*)(double *, double *)
2. fit TF1
3. go to 1

Unfotunelly I can't deal with table of pointers to plain C functions.
I have functions defined in the *.C file which I load with ACLIC.

In the code there is table to functions
functions defined
typedef Double_t (*ff_t) ( Double_t *x, Double_t *par);
ff_t pileupscanfun[] = { pileupscanfun0, pileupscanfun1, pileupscanfun2}

But when I type following then I can't understand the result.

root [0] .L pileupscanfunAll.C++
Info in <TUnixSystem::ACLiC>: creating shared library
root [1] pileupscanfun0
(const void*)0x4175a728
root [2] pileupscanfun[0]
Error: Symbol pileupscanfun[0] is not defined in current scope
FILE:(tmpfile) LINE:1
*** Interpreter error recovered ***

Any idea how to deal with the problem? Or do fits in loop in other way?

	Tomaks Bold

Tomasz Bold
mail me:
or call:
+48 12 617 4729 (AGH)
+48 12 662 8023 (IFJ)

This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET