Subversion Repositories f9daq

Rev

Rev 209 | Rev 248 | Go to most recent revision | 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 */
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];
234 f9daq 32
  char x[4]; // correct alignment on the 64 bit windows
209 f9daq 33
  double *data;
34
} H1D;
35
#pragma pack()
36
 
37
 
38
 
39
 
40
double  _VI_FUNC  H1D_GetYBinCenter(int h2d,int ybin);
41
double  _VI_FUNC  H1D_GetYBinCenter(int h2d,int xbin);
42
 
43
int  _VI_FUNC  H1D_Clear(int h2d);
44
int  _VI_FUNC H1D_Print(int h2d);
45
int  _VI_FUNC H1D_Exist(int h2d);
46
int  _VI_FUNC H1D_GetBin(int h2d, double value);
47
int  _VI_FUNC H1D_Fill(int h2d,double x, double val);
48
int  _VI_FUNC H1D_FillBin(int h2d,int x, double val);
49
int  _VI_FUNC H1D_SetBinContent(int h2d,int x, double val);
50
double  _VI_FUNC H1D_GetBinContent(int h2d,int atx);
51
int  _VI_FUNC H1D_Init(int h2d,char *name, char *title,int nx, double minx, double maxx);
52
int  _VI_FUNC H1D_Write(int h2d,const char *fname,const char*opt);
53
int  _VI_FUNC H1D_Write2File(int h2d,FILE *fp);
54
int  _VI_FUNC H1D_SetTitle(int h2d,char *title);
55
int  _VI_FUNC H1D_SetTitleX(int h2d,char *title);
56
int  _VI_FUNC H1D_SetTitleY(int h2d,char *title);
57
int  _VI_FUNC H1D_SetName(int h2d,char *title);
58
 
59
char *  _VI_FUNC H1D_GetTitleX(int h1d);
60
 
61
char *  _VI_FUNC H1D_GetTitleY(int h1d);
62
 
63
char *  _VI_FUNC H1D_GetTitle(int h1d);
64
 
65
 
66
 
67
int  _VI_FUNC H1D_GetNbinsX(int h);
68
 
69
double  _VI_FUNC H1D_GetMinX(int h);
70
double  _VI_FUNC H1D_GetMaxX(int h);
71
 
72
double  _VI_FUNC H1D_GetStepX(int h);
73
double  _VI_FUNC H1D_GetMin(int h);
74
double  _VI_FUNC H1D_GetMax(int h);
75
double *  _VI_FUNC H1D_GetData(int h);
76
int  _VI_FUNC  H1D_Draw(int histogram,int panel, int control, int *plothandle) ;
77
 
78
#endif /* _H1D_H_ */