Project

General

Profile

« Previous | Next » 

Revision 33bb5385

Added by David Sorber about 4 years ago

read_test: Add optional comment block to output input data one chunk per
file. This can be used to verify that the output data matches the input
data.

View differences:

software/read_test/src/ExecDriver.cc
* Unpublished -- all rights reserved under the copyright laws *
* of the United States. *
********************************************************************/
#include <iomanip>
#include <sys/stat.h>
#include <sys/types.h>
#include "ExecDriver.h"
#include "Utilities/ChunkConstants.h"
......
}
}
// Uncomment this to output each chunk's buffer to a file
#if 0
// Create directory to hold chunk files
mkdir("chunks", 0777);
// Output each chunk with a filename corresponding to its chunk ID.
// E.g. chunk_235.bin
std::ostringstream fname;
fname << "chunks/chunk_" << std::setw(3) << std::setfill('0')
<< chunk->m_chunkId << ".bin";
BlnxLog(error) << "FNAME: " << fname.str();
std::ofstream output(fname.str());
output.write(chunk->p_chunkData, chunk->m_chunkSize);
output.close();
#endif
bufAllocator->release(chunk->p_chunkData);
delete chunk;
}

Also available in: Unified diff