ProteoWizard
|
A class for writing demux matrices to file. More...
#include <DemuxDebugWriter.hpp>
Public Member Functions | |
DemuxDebugWriter (const std::string &fileName) | |
Constructs a DemuxDebugWriter to write the debug file with the given filename. | |
~DemuxDebugWriter () | |
Destructor writes header and closes the file. | |
bool | IsOpen () const |
Should be called after construction to verify that the file was opened successfully. | |
void | WriteDeconvBlock (uint64_t spectrumIndex, DemuxTypes::MatrixPtr masks, DemuxTypes::MatrixPtr solution, DemuxTypes::MatrixPtr signal) |
Writes a set of matrices with the given spectrum index to file. | |
Private Member Functions | |
void | WriteHeader () |
Writes the the header. The header is simply a pointer to the footer (fileIndex). | |
void | WriteIndex () |
Writes the file index at the end of the file. | |
Private Attributes | |
std::ofstream | _writer |
Output file stream. | |
std::vector< std::pair< uint64_t, int64_t > > | _fileIndex |
Set of spectrum indices and filepointers to their respective blocks. | |
A class for writing demux matrices to file.
The primary purpose of writing demux matrices to file is for analysis externally. Exporting matrices is useful for comparing output with Skyline, which has a similar functionality for writing demux matrices to file. Python code exists for reading and interpreting these matrices. This class follows the RAII of ifstream and so the file is kept open until the destructor is called.
Definition at line 37 of file DemuxDebugWriter.hpp.
|
explicit |
Constructs a DemuxDebugWriter to write the debug file with the given filename.
pwiz::analysis::DemuxDebugWriter::~DemuxDebugWriter | ( | ) |
Destructor writes header and closes the file.
bool pwiz::analysis::DemuxDebugWriter::IsOpen | ( | ) | const |
Should be called after construction to verify that the file was opened successfully.
Referenced by DemuxDebugRWTest::ReadWriteTest().
void pwiz::analysis::DemuxDebugWriter::WriteDeconvBlock | ( | uint64_t | spectrumIndex, |
DemuxTypes::MatrixPtr | masks, | ||
DemuxTypes::MatrixPtr | solution, | ||
DemuxTypes::MatrixPtr | signal | ||
) |
Writes a set of matrices with the given spectrum index to file.
Referenced by DemuxDebugRWTest::ReadWriteTest().
|
private |
Writes the the header. The header is simply a pointer to the footer (fileIndex).
|
private |
Writes the file index at the end of the file.
This is the footer pointed to by the header. The footer contains information about the locations of the beginning of each block. Each matrix has it's own header for information about its size. This means that individual matrices must be accessed sequentially.
|
private |
Output file stream.
Definition at line 67 of file DemuxDebugWriter.hpp.
|
private |
Set of spectrum indices and filepointers to their respective blocks.
Definition at line 70 of file DemuxDebugWriter.hpp.