Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 263 → Rev 264

/cvi/instr/HISTO/H1D.c
11,7 → 11,7
 
#include "H1D.h"
 
#define H1DMAX 500
 
H1D *h1[H1DMAX];
//int Printf(char *format, ...);
 
146,7 → 146,7
H1D_Clear(h1d);
H1D_Print(h1d);
//Printf("InitH1D 0x%x\n", h1d );
return 0;
return h1d;
 
}
 
/cvi/instr/HISTO/H1D.h
13,6 → 13,7
 
 
/* 2d histogramming */
#define H1DMAX 500
#define H1D_ID 0x11
#pragma pack(4)
typedef struct {
/cvi/instr/HISTO/H2D.c
8,7 → 8,7
 
#include "H2D.h"
 
#define H2DMAX 500
 
H2D *h2[H2DMAX];
//int Printf(char *format, ...);
 
128,7 → 128,7
H2D_Clear(h2d);
H2D_Print(h2d);
//Printf("InitH2D 0x%x\n", h2d );
return 0;
return h2d;
}
 
double _VI_FUNC H2D_GetXBinCenter(int h2d,int xbin) {
/cvi/instr/HISTO/H2D.h
36,6 → 36,7
 
/* 2d histogramming */
#define H2DMAX 500
#define H2D_ID 0x10
#pragma pack(4)
typedef struct {
59,7 → 60,7
#pragma pack()
 
double _VI_FUNC H2D_GetYBinCenter(int h2d,int ybin);
double _VI_FUNC H2D_GetYBinCenter(int h2d,int xbin);
double _VI_FUNC H2D_GetXBinCenter(int h2d,int xbin);
 
int _VI_FUNC H2D_Clear(int h2d);
int _VI_FUNC H2D_Print(int h2d);
/cvi/instr/HISTO/H3D.c
10,7 → 10,7
#include "H2D.h"
#include "H1D.h"
 
#define H3DMAX 500
 
H3D *h3[H3DMAX];
//int Printf(char *format, ...);
 
169,6 → 169,8
}
 
int hid=499;
int i=0;
int j=0;
switch (direction){
case 0:// xy
H2D_Init(hid,"projectionXY","projectionXY",
175,8 → 177,8
H3D_GetNbinsX(histogram), H3D_GetMinX(histogram),H3D_GetMaxX(histogram),
H3D_GetNbinsY(histogram), H3D_GetMinY(histogram),H3D_GetMaxY(histogram)
);
for (int i=0; i < H3D_GetNbinsX(histogram); i++ )
for (int j=0; j < H3D_GetNbinsY(histogram); j++ )
for (i=0; i < H3D_GetNbinsX(histogram); i++ )
for (j=0; j < H3D_GetNbinsY(histogram); j++ )
H2D_SetBinContent(hid,i,j,H3D_GetBinContent(histogram,i,j,slice));
break;
case 1:// xz
184,8 → 186,8
H3D_GetNbinsX(histogram), H3D_GetMinX(histogram),H3D_GetMaxX(histogram),
H3D_GetNbinsZ(histogram), H3D_GetMinZ(histogram),H3D_GetMaxZ(histogram)
);
for (int i=0; i < H3D_GetNbinsX(histogram); i++ )
for (int j=0; j < H3D_GetNbinsZ(histogram); j++ )
for (i=0; i < H3D_GetNbinsX(histogram); i++ )
for (j=0; j < H3D_GetNbinsZ(histogram); j++ )
H2D_SetBinContent(hid,i,j,H3D_GetBinContent(histogram,i,slice,j));
break;
case 2:// yz
194,8 → 196,8
H3D_GetNbinsY(histogram), H3D_GetMinY(histogram),H3D_GetMaxY(histogram),
H3D_GetNbinsZ(histogram), H3D_GetMinZ(histogram),H3D_GetMaxZ(histogram)
);
for (int i=0; i < H3D_GetNbinsY(histogram); i++ )
for (int j=0; j < H3D_GetNbinsZ(histogram); j++ )
for (i=0; i < H3D_GetNbinsY(histogram); i++ )
for (j=0; j < H3D_GetNbinsZ(histogram); j++ )
H2D_SetBinContent(hid,i,j,H3D_GetBinContent(histogram,slice,i,j));
break;
/cvi/instr/HISTO/H3D.h
23,6 → 23,7
#include <stdio.h>
 
/* 2d histogramming */
#define H3DMAX 500
#define H3D_ID 0x12
#pragma pack(4)
typedef struct
54,8 → 55,9
 
int _VI_FUNC H3D_SliXY(int histogram,int slice, int direction);
 
double _VI_FUNC H3D_GetZBinCenter(int h3d,int zbin);
double _VI_FUNC H3D_GetYBinCenter(int h3d,int ybin);
double _VI_FUNC H3D_GetYBinCenter(int h3d,int xbin);
double _VI_FUNC H3D_GetXBinCenter(int h3d,int xbin);
 
int _VI_FUNC H3D_Clear(int h3d);
int _VI_FUNC H3D_Print(int h3d);