/* * $Id: hfpanel.c,v 1.1.1.1 1996/03/01 11:39:07 mclareni Exp $ * * $Log: hfpanel.c,v $ * Revision 1.1.1.1 1996/03/01 11:39:07 mclareni * Paw * */ /*CMZ : 2.07/05 28/06/95 10.36.29 by Unknown*/ /*-- Author : Gregory Kozlovsky 09/04/95*/ /******************************************************************************* Create, start, change status, and destroy Histo Fit Panel --- outside callable functions. =====================> Author: G. Kozlovsky, 1994 <=========================== *******************************************************************************/ #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif #include "fpanelsh/errordb.h" #include "fpanelsh/fplocal.h" #include "hmotif/uxxt.h" #undef UxParent #define CONTEXT_MACRO_ACCESS 1 #include "fpanelsh/mainpanel.h" #undef CONTEXT_MACRO_ACCESS #ifdef __cplusplus } /* extern "C" */ #endif extern int mnInitialized; /*********************************************************************** Destroy callback for the panel invoked by PAW command histo/fit. ***********************************************************************/ static void clb_destroyCmnd( Widget shell, XtPointer client_data, XtPointer call_data) { F77_CALLS_(fphgrend); /* end the graphics */ free(parLines); free(parname); free(vpar); free(vlow); free(vupp); free(vstep); free(veparab); free(veminus); free(veplus); free(par_start); free(par_store); free(vscalemin); free(vscalemax); free(par_active); free(vfixrel); free(par_enabled); endPanelEventLoop = True; } /*********************************************************************** Create and start histo fit panel invoked by PAW command histo/fit. ***********************************************************************/ #ifndef vms void fphcmndpanel_( int *_Uxhistid, char *_Uxfexpr, void *_Uxfcn, void *_Uxufcn, int *_Uxnpar, double *_Uxvpar, double *_Uxvlow, double *_Uxvupp, double *_Uxvstep, double *_Uxveparab, int felen) { #else /* vms */ void fphcmndpanel( int *_Uxhistid, struct dsc$descriptor_s *dsc_Uxfexpr, void *_Uxfcn, void *_Uxufcn, int *_Uxnpar, double *_Uxvpar, double *_Uxvlow, double *_Uxvupp, double *_Uxvstep, double *_Uxveparab) { int felen = dsc_Uxfexpr->dsc$w_length; char *_Uxfexpr = dsc_Uxfexpr->dsc$a_pointer; #endif char *cptr; int i,iline,ipar; char tstr[50]; float xmi, xma, ymi, yma; setbuf(stdout, NULL); mnInitialized = True; /* Minuit was initialized in hminut */ /***** create the panel *****/ UxMainPanelShellContext = (_UxCmainPanelShell *)createHistoFitPanel(); /* create main panel */ if (UxMainPanelShellContext==NULL) return; XtAddCallback( mainPanelShell, XmNdestroyCallback, (XtCallbackProc) clb_destroyCmnd, (XtPointer) UxMainPanelShellContext ); grupdate = hfgrupdate; /* set appropriate graphics update */ F77_CALLS_(fphgrinit); /* initialize the graphical data */ /***** define vectors for parameters data *****/ npar = MAX_PARNUMBER; parLines = (Widget *)malloc(npar*sizeof(Widget)); for (iline=0; iline