root [0] TF1 *(pks[100]); Error: No symbol pks[100] in current scope FILE:/tmp/08973aaa LINE:1 *** Interpreter error recovered *** root [1] TF1 *pks[100]; - is OK But I think that the first way is also correct ? What I want is array of pointers, not TF1 (*pksa)[100]; which also gives no error. ======================= Another thing: when I tried to fit 15 gauss functions to TGraph following multifit.C.html, I got: MINUIT USER ERROR. TOO MANY VARIABLE PARAMETERS. [...] ********** ** 80 **MIGRAD 5000 0.01 ********** CALL LIMIT EXCEEDED IN MIGRAD. Fatal in <operator delete>: storage area overwritten aborting (root crashed). I was using function=-2.4+gaus(0)+gaus(3)+gaus(6)+gaus(9)+gaus(12)+gaus(15)+gaus(18)+gaus(21)+gaus(24)+gaus(27)+gaus(30)+gaus(33)+gaus(36)+gaus(39)+gaus(42) (OK, I did: gMinuit = new TMinuit(npks*3+5); to fix it, and it has worked) ===================== Yet another thing: I miss an easy way of zooming TGraph (both GUI and command line). Setting Y limits is easy, but what about X ? I have started using root, because I was not satisfied with fitting and "database" in xmgr. But xmgr has optimal user interface for viewing data and manipulation on x-y data. Making it a "visual data browser" for ROOT would be very cool, but probably is lots of work. Or may be it is easier to call ROOT from xmgr which has support for shared libraries? ===================== Is TGraph::InitGaus() taking into account the limits set, or is it averaging over the whole graph ?: //*-*- Compute mean value and RMS of the graph in the given range allcha = sumx = sumx2 = 0; for (bin=0;bin<fNpoints;bin++) { x = fX[bin]; val = fY[bin]; sumx += val*x; sumx2 += val*x*x; allcha += val; } this will fail when only a part of a peak is in the fit range: gF1->SetParameter(0,binwidx*allcha/(sqrtpi*rms)); ==================== It looks like TF1:SetParLimits(n,xmin,xmax) is not working for me. All files needed to reproduce are in: http://crds.chemie.unibas.ch/~exp/myroot/root-test.tgz (also uncompressed in that directory) =================== Last remark - looking through sources of ROOT classes I am seeing too many global variables. It makes this library non-reentrant. Reentrancy could be important not only for multithreaded applications. I realise that all that global variables make interactive work easier (less arguments for function calls), but may be they could be made fields of some TStatus class and put into a sigle variable - switching that would switch the whole context. (sorry, I just can not resist comparing each code I see with the networking part of Linux kernel). Or what about adding to most methods parameters with default values set to the global variables? Regards, -- Tomasz Motylewski
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:36 MET