Rev 209 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line | 
|---|---|---|---|
| 209 | f9daq | 1 | #ifndef _H2D_H_ | 
        
| 2 | #define _H2D_H_ | 
        ||
| 3 | |||
| 4 | |||
| 5 | #ifdef _CVI_  | 
        ||
| 6 | #include <cvidef.h> | 
        ||
| 7 | #include <ivi.h> | 
        ||
| 8 | #include <userint.h> | 
        ||
| 9 | #include "toolbox.h" | 
        ||
| 10 | |||
| 11 | #ifndef _HCOLORMAP_ | 
        ||
| 12 | #define _HCOLORMAP_  | 
        ||
| 13 | typedef struct {  | 
        ||
| 14 | ColorMapEntry *array;  | 
        ||
| 15 | int numberofColors;  | 
        ||
| 16 | int HiColor;  | 
        ||
| 17 | } HColorMap;  | 
        ||
| 18 | #endif | 
        ||
| 19 | |||
| 20 | HColorMap _VI_FUNC *H2D_GetColorMap(void);  | 
        ||
| 21 | |||
| 22 | #else | 
        ||
| 23 | #define _VI_FUNC | 
        ||
| 24 | #endif | 
        ||
| 25 | |||
| 26 | #include <stdio.h> | 
        ||
| 27 | |||
| 28 | |||
| 29 | |||
| 30 | |||
| 31 | #ifdef __CINT__ | 
        ||
| 32 | #define HALIGN 41 | 
        ||
| 33 | #else | 
        ||
| 34 | #define HALIGN 40 | 
        ||
| 35 | #endif | 
        ||
| 36 | |||
| 37 | |||
| 38 | /* 2d histogramming */ | 
        ||
| 264 | f9daq | 39 | #define H2DMAX 500  | 
        
| 209 | f9daq | 40 | #define H2D_ID 0x10 | 
        
| 41 | #pragma pack(4) | 
        ||
| 42 | typedef struct {  | 
        ||
| 43 | unsigned int id,len;  | 
        ||
| 44 | unsigned int nx;  | 
        ||
| 45 | unsigned int ny;  | 
        ||
| 46 | int nentries;  | 
        ||
| 47 | unsigned int size; // 6*4  | 
        ||
| 48 | double min;  | 
        ||
| 49 | double max;  | 
        ||
| 50 | double minx;  | 
        ||
| 51 | double miny;  | 
        ||
| 52 | double stepx;  | 
        ||
| 53 | double stepy; // 6*8  | 
        ||
| 54 | char name[20];  | 
        ||
| 55 | char title[100];  | 
        ||
| 56 | char titlex[40];  | 
        ||
| 57 | char titley[HALIGN]; // 196  | 
        ||
| 58 | double *data;  | 
        ||
| 59 | } H2D;  | 
        ||
| 60 | #pragma pack() | 
        ||
| 61 | |||
| 62 | double _VI_FUNC H2D_GetYBinCenter(int h2d,int ybin);  | 
        ||
| 264 | f9daq | 63 | double _VI_FUNC H2D_GetXBinCenter(int h2d,int xbin);  | 
        
| 209 | f9daq | 64 | |
| 65 | int _VI_FUNC H2D_Clear(int h2d);  | 
        ||
| 66 | int _VI_FUNC H2D_Print(int h2d);  | 
        ||
| 67 | int _VI_FUNC H2D_Exist(int h2d);  | 
        ||
| 68 | int _VI_FUNC H2D_CalculateBin(int h2d, int axis, double value);  | 
        ||
| 69 | int _VI_FUNC H2D_GetBin(int h2d,int x, int y);  | 
        ||
| 70 | int _VI_FUNC H2D_Fill(int h2d,double x, double y, double val);  | 
        ||
| 71 | int _VI_FUNC H2D_SetBinContent(int h2d,int x, int y, double val);  | 
        ||
| 72 | double _VI_FUNC H2D_GetBinContent(int h2d,int atx, int aty);  | 
        ||
| 73 | int _VI_FUNC H2D_Init(int h2d,const char *name,const char *title,int nx, double minx, double maxx, int ny, double miny, double maxy);  | 
        ||
| 74 | int _VI_FUNC H2D_Write(int h2d,const char *fname,const char*opt);  | 
        ||
| 75 | int _VI_FUNC H2D_Write2File(int h2d,FILE *fp);  | 
        ||
| 76 | int _VI_FUNC H2D_SetTitle(int h2d,const char *title);  | 
        ||
| 77 | int _VI_FUNC H2D_SetTitleX(int h2d,const char *title);  | 
        ||
| 78 | int _VI_FUNC H2D_SetTitleY(int h2d,const char *title);  | 
        ||
| 79 | int _VI_FUNC H2D_SetName(int h2d,const char *title);  | 
        ||
| 80 | |||
| 81 | int _VI_FUNC H2D_GetNbinsY(int h);  | 
        ||
| 82 | int _VI_FUNC H2D_GetNbinsX(int h);  | 
        ||
| 83 | double _VI_FUNC H2D_GetMinY(int h);  | 
        ||
| 84 | double _VI_FUNC H2D_GetMinX(int h);  | 
        ||
| 85 | double _VI_FUNC H2D_GetMaxX(int h);  | 
        ||
| 86 | double _VI_FUNC H2D_GetMaxY(int h);  | 
        ||
| 87 | double _VI_FUNC H2D_GetStepY(int h);  | 
        ||
| 88 | double _VI_FUNC H2D_GetStepX(int h);  | 
        ||
| 89 | double _VI_FUNC H2D_GetMin(int h);  | 
        ||
| 90 | double _VI_FUNC H2D_GetMax(int h);  | 
        ||
| 91 | double * _VI_FUNC H2D_GetData(int h);  | 
        ||
| 92 | |||
| 93 | |||
| 94 | int _VI_FUNC H2D_SetRangeColors(double min, double max);  | 
        ||
| 95 | int _VI_FUNC H2D_Draw(int histogram,int panel, int control, int *plothandle);  | 
        ||
| 96 | |||
| 97 | |||
| 98 | #endif /* _H2D_H_ */ |