/* * $Id: minimenu.c,v 1.3 1999/03/01 09:11:08 couet Exp $ * * $Log: minimenu.c,v $ * Revision 1.3 1999/03/01 09:11:08 couet * - previous commit was wrong * * Revision 1.2 1999/03/01 09:04:47 couet * - ERROR * * Revision 1.1.1.1 1996/03/01 11:39:08 mclareni * Paw * */ /*CMZ : 2.07/00 18/04/95 17.36.41 by O.Couet*/ /*-- Author : Gregory Kozlovsky 09/04/95*/ /******************************************************************************* Callback functions for Minimize menu. =====================> Author: G. Kozlovsky, 1994 <=========================== *******************************************************************************/ #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif #include "hmotif/uxxt.h" #include "fpanelsh/fplocal.h" #define CONTEXT_MACRO_ACCESS 1 #include "fpanelsh/parlineform.h" #undef UxParent #include "fpanelsh/parhdrform.h" #undef UxParent #include "fpanelsh/mainpanel.h" #undef CONTEXT_MACRO_ACCESS #ifdef __cplusplus } /* extern "C" */ #endif static void blockParameterChange(); static void unblockParameterChange(); /*********************************************************************** Call Minuit command with up to two arguments and update the panel. ***********************************************************************/ static int min_cmnd(char cmnd[],int narg, double arg1, double arg2) { int ierflg; double arglis[1]; /*int ncalls = 2*npar*npar+10;*/ /* number of calls for one time */ int ncalls = (int)arg1; double fmin,fedm; int npari,nparx; int istat; arglis[1] = arg2; createBusyDialog(mainPanelShell, UxMainPanelShellContext); do { arglis[0] = ncalls; F77_CALLS_ECDIIE(mnexcm, fcn, cmnd, strlen(cmnd), arglis, &narg, &ierflg, ufcn); processXEvents(); get_mnparms(UxMainPanelShellContext, True); istat = 3; } while (istat != 3 && interrCompute==False); destroyBusyDialog(mainPanelShell, UxMainPanelShellContext); if (istat!=3 && interrCompute==True) { printf("Computing interrrupted by the user\n"); } else { printf("Computing completed: istat=%d ierflg=%d\n",istat,ierflg); } if (ierflg) { printf("Error executing %s\n",cmnd); } return(ierflg); } /*********************************************************************** A function to execute before each minimizing call. ***********************************************************************/ static void pre_min() { blockParameterChange(); set_mnparms(UxMainPanelShellContext); } /*********************************************************************** A function to execute after each minimizing call. ***********************************************************************/ static void post_min(int ierflg) { int iline; unblockParameterChange(); if (ierflg == 0) { if (eparab_valid==False) { eparab_valid = True; for (iline=0; iline