#include #include "helper.hxx" using namespace std; helper::helper( std::ifstream * in, std::ofstream * out) { infile = in; outfile = out; } void helper::copy_ascii_header() { // copy first 0x2d00 bytes to new file const int ascii_header_size = 0x2d00; char * memblock = new char [ascii_header_size]; infile->seekg(0, ios::beg); infile->read(memblock, ascii_header_size); outfile->write(memblock, ascii_header_size); delete[] memblock; } void helper::copy_event_header() { // copy binary header to new file const int bin_header_size = 3390; char * memblock = new char [bin_header_size]; event_header_start = infile->tellg(); infile->read(memblock, bin_header_size); outfile->write(memblock, bin_header_size); delete[] memblock; }