Subversion Repositories f9daq

Rev

Rev 248 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
209 f9daq 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 */
264 f9daq 16
#define H1DMAX 500
209 f9daq 17
#define H1D_ID 0x11
18
#pragma pack(4)
19
typedef struct {
20
  unsigned int id,len;
21
  unsigned int nx;
22
  int nentries;
23
  unsigned int size;
24
  double min;
25
  double max;
26
  double minx;
27
  double stepx;
28
 
29
  char name[20];
30
  char title[100];
31
  char titlex[40];
32
  char titley[40];
234 f9daq 33
  char x[4]; // correct alignment on the 64 bit windows
209 f9daq 34
  double *data;
35
} H1D;
36
#pragma pack()
37
 
38
 
248 f9daq 39
double  _VI_FUNC  H1D_GetXBinCenter(int h2d,int xbin);
209 f9daq 40
 
41
int  _VI_FUNC  H1D_Clear(int h2d);
42
int  _VI_FUNC H1D_Print(int h2d);
43
int  _VI_FUNC H1D_Exist(int h2d);
44
int  _VI_FUNC H1D_GetBin(int h2d, double value);
45
int  _VI_FUNC H1D_Fill(int h2d,double x, double val);
46
int  _VI_FUNC H1D_FillBin(int h2d,int x, double val);
47
int  _VI_FUNC H1D_SetBinContent(int h2d,int x, double val);
48
double  _VI_FUNC H1D_GetBinContent(int h2d,int atx);
49
int  _VI_FUNC H1D_Init(int h2d,char *name, char *title,int nx, double minx, double maxx);
50
int  _VI_FUNC H1D_Write(int h2d,const char *fname,const char*opt);
51
int  _VI_FUNC H1D_Write2File(int h2d,FILE *fp);
52
int  _VI_FUNC H1D_SetTitle(int h2d,char *title);
53
int  _VI_FUNC H1D_SetTitleX(int h2d,char *title);
54
int  _VI_FUNC H1D_SetTitleY(int h2d,char *title);
55
int  _VI_FUNC H1D_SetName(int h2d,char *title);
56
 
57
char *  _VI_FUNC H1D_GetTitleX(int h1d);
58
 
59
char *  _VI_FUNC H1D_GetTitleY(int h1d);
60
 
61
char *  _VI_FUNC H1D_GetTitle(int h1d);
62
 
63
 
64
 
65
int  _VI_FUNC H1D_GetNbinsX(int h);
66
 
67
double  _VI_FUNC H1D_GetMinX(int h);
68
double  _VI_FUNC H1D_GetMaxX(int h);
69
 
70
double  _VI_FUNC H1D_GetStepX(int h);
71
double  _VI_FUNC H1D_GetMin(int h);
72
double  _VI_FUNC H1D_GetMax(int h);
73
double *  _VI_FUNC H1D_GetData(int h);
74
int  _VI_FUNC  H1D_Draw(int histogram,int panel, int control, int *plothandle) ;
75
 
76
#endif /* _H1D_H_ */