3 #ifndef HBOOKCNV_NTUPLEINFO_H 4 #define HBOOKCNV_NTUPLEINFO_H 1 29 double frange[512][2];
31 void getBounds(
long i, TYPE& min, TYPE& max, TYPE& null )
const 34 min = ( type[i] ==
'R' ) ? TYPE( frange[i][0] ) : TYPE( irange[i][0] );
35 max = ( type[i] ==
'R' ) ? TYPE( frange[i][1] ) : TYPE( irange[i][1] );
42 TEMPLATE_SPECIALIZATION
43 void getBounds(
long ,
bool& min,
bool& max,
bool& null )
const 49 bool isRangeWithin(
long i, TYPE min, TYPE max )
const 52 return min <= (TYPE)irange[i][0] && (TYPE)irange[i][1] <= max;
53 }
else if ( type[i] ==
'I' || type[i] ==
'U' ) {
58 TEMPLATE_SPECIALIZATION
59 bool isRangeWithin(
long i,
float ,
float )
const 61 if ( size[i] == 32 )
return true;
64 TEMPLATE_SPECIALIZATION
65 bool isRangeWithin(
long i,
double ,
double )
const 67 if ( size[i] == 64 )
return true;
70 TEMPLATE_SPECIALIZATION
71 bool isRangeWithin(
long ,
bool min,
bool max )
const {
return min ==
false && max ==
true; }
72 long idist(
long i )
const {
return irange[i][1] - irange[i][0]; }
73 double fdist(
long i )
const {
return frange[i][1] - frange[i][0]; }
76 long getIndex(
const char* nam )
const 79 for (
int i = 0; i < numVar; i++ ) {
80 if (
strncmp( name[i], nam,
sizeof( name[i] ) ) == 0 ) {
88 #endif // HBOOKCNV_NTUPLEINFO_H 92 STRUCTURE / NTUPLEVAR / CHARACTER * 64 NAME INTEGER NDIM INTEGER THEDIM( 5 ) INTEGER HASINDEX CHARACTER *
93 64 INDEX CHARACTER * 1 TYPE INTEGER SIZE INTEGER HASRANGE UNION MAP INTEGER IMIN,
94 IMAX END MAP MAP REAL * 8 FMIN,
95 FMAX END MAP END UNION END STRUCTURE
98 / NTUPLEINFO / INTEGER ID CHARACTER * 128 TITLE INTEGER NOENT INTEGER NDIM CHARACTER * 8 BLOCK RECORD
99 / NTUPLEVAR / VAR( 512 ) END STRUCTURE
101 c TYPE NTUPLEVAR CHARACTER * 64
VNAME( 512 ) INTEGER
VNDIM( 512 ) INTEGER
VTHEDIM( 512, 5 ) INTEGER
106 VFMAX( 512 )
c END MAP
c END UNION
c END TYPE NTUPLEVAR
108 c TYPE NTUPLEINFO INTEGER
NTID CHARACTER
110 8 NTBLOCK
c TYPE( NTUPLEVAR ) VAR( 512 )
c END TYPE NTUPLEINFO COMMON / NTUPLEINFO /
VNAME,
111 VNDIM, VTHEDIM, &
VHASINDEX,
VINDEX,
VTYPE,
VSIZE, &
VHASRANGE, VIMIN,
VIMAX, VFMIN,
VFMAX, &
NTID,
NTTITLE,
NTNDIM,
c TYPE NTUPLEVAR CHARACTER INTEGER NTTITLE
c TYPE NTUPLEVAR CHARACTER INTEGER VSIZE
static TYP min()
Minimal number of data.
c TYPE NTUPLEVAR CHARACTER INTEGER VTHEDIM
c TYPE NTUPLEVAR CHARACTER INTEGER VTYPE
c TYPE NTUPLEVAR CHARACTER INTEGER & NTID
c TYPE NTUPLEVAR CHARACTER INTEGER VNDIM
c TYPE NTUPLEVAR CHARACTER INTEGER VINDEX
static TYP max()
Maximal number of data.
c TYPE NTUPLEVAR CHARACTER INTEGER VIMAX
c TYPE NTUPLEVAR CHARACTER * VNAME(512) INTEGER VNDIM(512) INTEGER VTHEDIM(512
c TYPE NTUPLEVAR CHARACTER INTEGER VIMIN
c TYPE NTUPLEVAR CHARACTER INTEGER VFMAX
c TYPE NTUPLEVAR CHARACTER INTEGER VFMIN
c TYPE NTUPLEVAR CHARACTER INTEGER & VHASRANGE
c TYPE NTUPLEVAR CHARACTER INTEGER NTNDIM
c TYPE NTUPLEVAR CHARACTER INTEGER & VHASINDEX