This is hstruct.h in view mode; [Download] [Up]
#ifndef _HIPPOSTRUCT_H_ #define _HIPPOSTRUCT_H_ /* * hippostruct.h - definitions to structures in hippo package. * Structures were put in a separate file so the RCS version * number changes only when the structures have been changed. * * Paul Rensing, May 2, 1991 * * Copyright (C) 1991 The Board of Trustees of The Leland Stanford * Junior University. All Rights Reserved. * * $Id: hstruct.h,v 5.0 1993/08/17 21:56:41 rensing Exp $ */ /* * ntuple/display structure version number (maintained by RCS) */ #define STRUCT_VERSION "$Id: hstruct.h,v 5.0 1993/08/17 21:56:41 rensing Exp $" /* * the "magic number", which is "h_" (in ASCII), * for the start of hippo data files. */ #define MAGIC "\150\137" /* circumvent the EBCDIC strings */ /* * allowed length of function name used in registry. */ #define FUNCNAMELEN 32 /* * a rectangle. Designed to match NeXT's NXRect */ typedef struct rectangle_s { struct origin_s { float x, y; } origin; struct size_s { float width, height; } size; } rectangle; /* * structure to keep lists of functions. * Maintain as linked lists for ease of use. */ typedef struct fid_str { char name[FUNCNAMELEN+1]; int (*funcPtr)(); double *paramBlk; int blkSize; /* parameter block size in nParam */ linestyle_t lineStyle; /* linestyle; needed for overplot funcs */ struct fid_str *next; } func_id_t, *func_id; typedef struct bins_s { struct bin_flags { char fixed; /* fixed bins */ char dirty; /* bins are dirty, re-bin */ char dummies[2]; /* keep struct length to multiply of 4 */ } flags; struct axis2_s { int nBins; float low; float high; float moments[3]; /* moments[n] = sum of weight*var^n */ } xAxis, yAxis; float *data; /* contents of bins */ float *variance; /* variance (error^2) of bins */ float totals[3][3]; /* overflow and underflow */ float binMin; float binMax; int binAlloc; /* amount of space allocated for bins */ int ndata; /* number of data points binned */ } bins_t; typedef struct axis_s { float low; /* lower limit for axis */ float high; /* upper limit for axis */ char *label; /* label for axis */ struct axis_flags { char log; /* false=linear axis,true=log10 axis */ char autoScale; /* flag to autoscale axis */ char tickLocation; /* or of LEFT,RIGHT,TOP,BOTTOM */ char labelLocation; char scaleLocation; char autoTick; char dummies[2]; /* keep struct length to multiple of 4 */ } flags; float tickLength; float scaleFontSize; float firstTick; float tickStep; int numMinorTicks; /* number of minor ticks betw. major */ } axis_t; typedef struct bind_strt_s { int x; /* n-tuple variable we use as x */ int y; /* " " " y */ int z; /* " " " z */ int weight; /* " " " weight */ int xerror; /* " " " x error */ int yerror; /* " " " y error */ } bind_strt_t; /* * Structure defining the data for an n-tuple. */ typedef struct ntuple_s { int ndim; /* number of dimensions of data */ int rev; /* revision number; incr if clear n-tuple */ float **data; /* array of data */ int ndata; /* number of data points */ int memAlloc; /* size of one data vector */ int extremeBad; /* TRUE if nlow/nhigh could be bad */ float *nlow; /* lowest value for dimension n */ float *nhigh; /* highest value for dimension n */ char *title; /* title of whole ntuple */ char **label; /* label for dimension n */ } ntuple_t, *ntuple; /* * Structure defining data for a hippo display. */ typedef struct display_s { ntuple tuple; /* ntuple from which bins are made */ int nt_rev; /* rev no. of ntuple when last displayed */ char *ntFile; /* file name for ntuple if by reference */ int dim; /* obsolete! */ graphtype_t graphtype; /* type of graph, e.g. lego, scatter, etc */ drawtype_t drawtype; /* type of drawing, e.g. point, line, etc */ struct display_flags { char drawTitles; /* if true, draw titles and axis labels */ char drawAxes; /* if true, draw axes */ char ntByReference; /* variable "ntuple" is actually integer */ char plotFuncs; /* plot the individual functions */ char plotFuncSum; /* plot the sum of the functions */ char dummies[3]; } flags; char *title; /* title */ bins_t bins; /* the bins */ axis_t xAxis,yAxis,zAxis; plotsymbol_t plotSymbol; /* plot symbol, line style */ float symbolSize; linestyle_t lineStyle; bind_strt_t binding; /* binding of n-tuple dim. to plot quantity */ rectangle drawRect; /* specify rectangle within which we draw */ rectangle marginRect; /* the margin area within the above */ func_id nt_cut; /* list of cuts on ntuple data */ func_id bin_func; /* list of bin transform funcs */ func_id plot_func; /* list of overplot functions */ linestyle_t fSumLineStyle; func_id binToColor; /* transfer function for greyscale/color */ void *threeDWorkArea; /* pointer to 3D plot workarea or null */ float theta, phi, dist; /* angles and distance for 3D plots */ int doCube, doWireFrame, doFill, doMesh, doScatter, doSpeedy; float color[5]; /* grey/color for lego plot faces */ } display_t, *display; /* * structure to hold a hippo record. Only used by the internal IO routines. */ typedef struct hippo_rec_s { char magic[4]; char *s_version; ntuple *nt_list; int num_nt; display *disp_list; int num_disp; } hippo_rec; #endif /* _HIPPOSTRUCT_H_ */
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.