Subversion Repositories f9daq

Rev

Go to most recent revision | Details | 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 */
39
#define H2D_ID 0x10
40
#pragma pack(4)
41
typedef struct {
42
  unsigned int id,len;
43
  unsigned int nx;
44
  unsigned int ny;
45
  int nentries;
46
  unsigned int size;   // 6*4
47
  double min;
48
  double max;
49
  double minx;
50
  double miny;
51
  double stepx;
52
  double stepy;  // 6*8
53
  char name[20];
54
  char title[100];
55
  char titlex[40];
56
  char titley[HALIGN]; // 196
57
  double *data;
58
} H2D;
59
#pragma pack()
60
 
61
double _VI_FUNC H2D_GetYBinCenter(int h2d,int ybin);
62
double _VI_FUNC H2D_GetYBinCenter(int h2d,int xbin);
63
 
64
int _VI_FUNC  H2D_Clear(int h2d);
65
int _VI_FUNC  H2D_Print(int h2d);
66
int _VI_FUNC  H2D_Exist(int h2d);
67
int _VI_FUNC  H2D_CalculateBin(int h2d, int axis, double value);
68
int _VI_FUNC  H2D_GetBin(int h2d,int x, int y);
69
int _VI_FUNC  H2D_Fill(int h2d,double x, double y, double val);
70
int _VI_FUNC  H2D_SetBinContent(int h2d,int x, int y, double val);
71
double _VI_FUNC H2D_GetBinContent(int h2d,int atx, int aty);
72
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);
73
int _VI_FUNC  H2D_Write(int h2d,const char *fname,const char*opt);
74
int _VI_FUNC  H2D_Write2File(int h2d,FILE *fp);
75
int _VI_FUNC  H2D_SetTitle(int h2d,const char *title);
76
int _VI_FUNC  H2D_SetTitleX(int h2d,const char *title);
77
int _VI_FUNC  H2D_SetTitleY(int h2d,const char *title);
78
int _VI_FUNC  H2D_SetName(int h2d,const char *title);
79
 
80
int _VI_FUNC  H2D_GetNbinsY(int h);
81
int _VI_FUNC  H2D_GetNbinsX(int h);
82
double _VI_FUNC H2D_GetMinY(int h);
83
double _VI_FUNC H2D_GetMinX(int h);
84
double  _VI_FUNC H2D_GetMaxX(int h);
85
double  _VI_FUNC H2D_GetMaxY(int h);
86
double _VI_FUNC H2D_GetStepY(int h);
87
double _VI_FUNC H2D_GetStepX(int h);
88
double _VI_FUNC H2D_GetMin(int h);
89
double _VI_FUNC H2D_GetMax(int h);
90
double * _VI_FUNC H2D_GetData(int h);
91
 
92
 
93
int _VI_FUNC  H2D_SetRangeColors(double min, double max);
94
int _VI_FUNC  H2D_Draw(int histogram,int panel, int control, int *plothandle);
95
 
96
 
97
#endif /* _H2D_H_ */