Subversion Repositories f9daq

Rev

Rev 234 | 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
 
248 f9daq 38
double  _VI_FUNC  H1D_GetXBinCenter(int h2d,int xbin);
209 f9daq 39
 
40
int  _VI_FUNC  H1D_Clear(int h2d);
41
int  _VI_FUNC H1D_Print(int h2d);
42
int  _VI_FUNC H1D_Exist(int h2d);
43
int  _VI_FUNC H1D_GetBin(int h2d, double value);
44
int  _VI_FUNC H1D_Fill(int h2d,double x, double val);
45
int  _VI_FUNC H1D_FillBin(int h2d,int x, double val);
46
int  _VI_FUNC H1D_SetBinContent(int h2d,int x, double val);
47
double  _VI_FUNC H1D_GetBinContent(int h2d,int atx);
48
int  _VI_FUNC H1D_Init(int h2d,char *name, char *title,int nx, double minx, double maxx);
49
int  _VI_FUNC H1D_Write(int h2d,const char *fname,const char*opt);
50
int  _VI_FUNC H1D_Write2File(int h2d,FILE *fp);
51
int  _VI_FUNC H1D_SetTitle(int h2d,char *title);
52
int  _VI_FUNC H1D_SetTitleX(int h2d,char *title);
53
int  _VI_FUNC H1D_SetTitleY(int h2d,char *title);
54
int  _VI_FUNC H1D_SetName(int h2d,char *title);
55
 
56
char *  _VI_FUNC H1D_GetTitleX(int h1d);
57
 
58
char *  _VI_FUNC H1D_GetTitleY(int h1d);
59
 
60
char *  _VI_FUNC H1D_GetTitle(int h1d);
61
 
62
 
63
 
64
int  _VI_FUNC H1D_GetNbinsX(int h);
65
 
66
double  _VI_FUNC H1D_GetMinX(int h);
67
double  _VI_FUNC H1D_GetMaxX(int h);
68
 
69
double  _VI_FUNC H1D_GetStepX(int h);
70
double  _VI_FUNC H1D_GetMin(int h);
71
double  _VI_FUNC H1D_GetMax(int h);
72
double *  _VI_FUNC H1D_GetData(int h);
73
int  _VI_FUNC  H1D_Draw(int histogram,int panel, int control, int *plothandle) ;
74
 
75
#endif /* _H1D_H_ */