2 #include "l3BankUtils.h"
8 void *offlen2ptr(
void *base,
struct offlen ol)
12 if( ((
bankHeader*)base)->byte_order == DAQ_RAW_FORMAT_ORDER) {
22 ptr = (
void *)((
char *)base + off*4);
31 void *offlen2ptr(
void *base,
struct offlen ol,
char *type)
34 void *ptr = offlen2ptr(base, ol);
36 return validate(ptr, type);
41 void *validate(
void * ptr,
char *type)
43 if(validateBank(ptr, type))
50 bool validateBank(
void * ptr,
char *type)
54 for(typelen = 1; typelen<8 && type[typelen-1]!=
' ';typelen++);
60 else if (strncmp(type, bh->bank_type, typelen))
73 if (bh.byte_order == DAQ_RAW_FORMAT_ORDER) {
74 return (bh.length * 4);
76 return (swap32(bh.length) * 4);