6 void bin2EEsort(
int Nevents=1,
const Char_t *binFile =
"data.bin"){
8 gSystem->Load(
"EEmc.so");
11 fd=fopen(binFile,
"r");
14 for (i=1; i<=Nevents; i++ ) {
21 for(j=0;j<
sizeof(int);j++) cLen[j]=fgetc(fd);
22 cerr <<
"actual data len=" << len <<
" bytes " << endl;
24 for(j=0;j<len;j++) hitBuf[j]=fgetc(fd);
28 int nbw = data.read(hitBuf,len);
41 char *hitBuf =
new char[16384];
45 int nh = ev->decode(emc_hit);
46 cerr <<
"actual hits " << nh << endl;
48 int nbw = ev->write(hitBuf,4096);
49 cerr <<
"actual writ " << nbw <<
" bytes " << endl;
50 int nbr = evcopy->read(hitBuf,nbw);
51 cerr <<
"actual read " << nbr <<
" bytes " << endl;