Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 326 | f9daq | 1 | #ifndef _H2D_H_ |
| 2 | #define _H2D_H_ |
||
| 3 | |||
| 4 | #ifdef __CINT__ |
||
| 5 | #define HALIGN 41 |
||
| 6 | #else |
||
| 7 | #define HALIGN 40 |
||
| 8 | #endif |
||
| 9 | |||
| 10 | |||
| 11 | /* 2d histogramming */ |
||
| 12 | #define H2D_ID 0x10 |
||
| 13 | #pragma pack(4) |
||
| 14 | typedef struct { |
||
| 15 | unsigned int id,len; |
||
| 16 | unsigned int nx; |
||
| 17 | unsigned int ny; |
||
| 18 | int nentries; |
||
| 19 | unsigned int size; // 6*4 |
||
| 20 | double min; |
||
| 21 | double max; |
||
| 22 | double minx; |
||
| 23 | double miny; |
||
| 24 | double stepx; |
||
| 25 | double stepy; // 6*8 |
||
| 26 | char name[20]; |
||
| 27 | char title[100]; |
||
| 28 | char titlex[40]; |
||
| 29 | char titley[HALIGN]; // 196 |
||
| 30 | double *data; |
||
| 31 | } H2D; |
||
| 32 | #pragma pack() |
||
| 33 | |||
| 34 | double H2DGetYBinCenter(int h2d,int ybin); |
||
| 35 | double H2DGetYBinCenter(int h2d,int xbin); |
||
| 36 | |||
| 37 | int H2DClear(int h2d); |
||
| 38 | int H2DPrint(int h2d); |
||
| 39 | int H2DExist(int h2d); |
||
| 40 | int H2DCalculateBin(int h2d, int axis, double value); |
||
| 41 | int H2DGetBin(int h2d,int x, int y); |
||
| 42 | int H2DFill(int h2d,double x, double y, double val); |
||
| 43 | int H2DFillBin(int h2d,int x, int y, double val); |
||
| 44 | double H2DGetBinContent(int h2d,int atx, int aty); |
||
| 45 | int H2DInit(int h2d,const char *name,const char *title,int nx, double minx, double stepx, int ny, double miny, double stepy); |
||
| 46 | int H2DWrite(int h2d,const char *fname,const char*opt); |
||
| 47 | int H2DWrite2File(int h2d,FILE *fp); |
||
| 48 | int H2DSetTitle(int h2d,const char *title); |
||
| 49 | int H2DSetTitleX(int h2d,const char *title); |
||
| 50 | int H2DSetTitleY(int h2d,const char *title); |
||
| 51 | int H2DSetName(int h2d,const char *title); |
||
| 52 | |||
| 53 | int H2DGetNbinsY(int h); |
||
| 54 | int H2DGetNbinsX(int h); |
||
| 55 | double H2DGetMinY(int h); |
||
| 56 | double H2DGetMinX(int h); |
||
| 57 | double H2DGetStepY(int h); |
||
| 58 | double H2DGetStepX(int h); |
||
| 59 | double H2DGetMin(int h); |
||
| 60 | double H2DGetMax(int h); |
||
| 61 | double * H2DGetData(int h); |
||
| 62 | |||
| 63 | #endif /* _H2D_H_ */ |