Subversion Repositories f9daq

Rev

Rev 230 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. #ifndef _H1D_H_
  2. #define _H1D_H_
  3.  
  4. #ifdef _CVI_
  5. #include <cvidef.h>
  6. #include <ivi.h>
  7. #include <userint.h>
  8. #else
  9. #define _VI_FUNC  /*  */
  10. #endif
  11.  
  12. #include <stdio.h>
  13.  
  14.  
  15. /* 2d histogramming */
  16. #define H1D_ID 0x11
  17. #pragma pack(4)
  18. typedef struct {
  19.   unsigned int id,len;
  20.   unsigned int nx;
  21.   int nentries;
  22.   unsigned int size;
  23.   double min;
  24.   double max;
  25.   double minx;
  26.   double stepx;
  27.  
  28.   char name[20];
  29.   char title[100];
  30.   char titlex[40];
  31.   char titley[40];
  32.  
  33.   double *data;
  34.  
  35. } H1D;
  36. #pragma pack()
  37.  
  38.  
  39.  
  40.  
  41. double  _VI_FUNC  H1D_GetYBinCenter(int h2d,int ybin);
  42. double  _VI_FUNC  H1D_GetYBinCenter(int h2d,int xbin);
  43.  
  44. int  _VI_FUNC  H1D_Clear(int h2d);
  45. int  _VI_FUNC H1D_Print(int h2d);
  46. int  _VI_FUNC H1D_Exist(int h2d);
  47. int  _VI_FUNC H1D_GetBin(int h2d, double value);
  48. int  _VI_FUNC H1D_Fill(int h2d,double x, double val);
  49. int  _VI_FUNC H1D_FillBin(int h2d,int x, double val);
  50. int  _VI_FUNC H1D_SetBinContent(int h2d,int x, double val);
  51. double  _VI_FUNC H1D_GetBinContent(int h2d,int atx);
  52. int  _VI_FUNC H1D_Init(int h2d,char *name, char *title,int nx, double minx, double maxx);
  53. int  _VI_FUNC H1D_Write(int h2d,const char *fname,const char*opt);
  54. int  _VI_FUNC H1D_Write2File(int h2d,FILE *fp);
  55. int  _VI_FUNC H1D_SetTitle(int h2d,char *title);
  56. int  _VI_FUNC H1D_SetTitleX(int h2d,char *title);
  57. int  _VI_FUNC H1D_SetTitleY(int h2d,char *title);
  58. int  _VI_FUNC H1D_SetName(int h2d,char *title);
  59.  
  60. char *  _VI_FUNC H1D_GetTitleX(int h1d);
  61.  
  62. char *  _VI_FUNC H1D_GetTitleY(int h1d);
  63.  
  64. char *  _VI_FUNC H1D_GetTitle(int h1d);
  65.  
  66.  
  67.  
  68. int  _VI_FUNC H1D_GetNbinsX(int h);
  69.  
  70. double  _VI_FUNC H1D_GetMinX(int h);
  71. double  _VI_FUNC H1D_GetMaxX(int h);
  72.  
  73. double  _VI_FUNC H1D_GetStepX(int h);
  74. double  _VI_FUNC H1D_GetMin(int h);
  75. double  _VI_FUNC H1D_GetMax(int h);
  76. double *  _VI_FUNC H1D_GetData(int h);
  77. int  _VI_FUNC  H1D_Draw(int histogram,int panel, int control, int *plothandle) ;
  78.  
  79. #endif /* _H1D_H_ */
  80.