Go to the documentation of this file.
44 SimpleAnalyzer(
size_t _index) : index(_index), opened(false), updateCount(0), closed(false) {}
58 const SpectrumIdentity& entry)
const
65 const Spectrum& spectrum)
67 if (
os_) *
os_ <<
"[" << index <<
"]" <<
" update: " << spectrum.index << endl;
83 virtual MSDataAnalyzerDriver::Status
progress(
size_t index,
size_t size)
85 if (
os_) *
os_ <<
"progress: " << index <<
"/" << size << endl;
100 virtual MSDataAnalyzerDriver::Status
progress(
size_t index,
size_t size)
102 if (
os_) *
os_ <<
"progress: " << index <<
"/" << size << endl;
111 if (
os_) *
os_ <<
"test()\n";
120 for (MSDataAnalyzerContainer::const_iterator it=analyzers.begin(); it!=analyzers.end(); ++it)
132 const int spectrumCount = 30;
133 for (
int i=0; i<spectrumCount; i++)
136 sl->spectra.back()->index = i;
144 MSDataAnalyzerDriver::Status status = driver.
analyze(dummy, &callback);
148 for (MSDataAnalyzerContainer::const_iterator it=analyzers.begin(); it!=analyzers.end(); ++it)
160 if (
os_) *
os_ <<
"testing cancel callback:\n";
163 status = driver.
analyze(dummy, &cancelCallback);
165 unit_assert(status == MSDataAnalyzerDriver::Status_Cancel);
167 if (
os_) *
os_ <<
"cancelled!\n";
169 for (MSDataAnalyzerContainer::const_iterator it=analyzers.begin(); it!=analyzers.end(); ++it)
181 int main(
int argc,
char* argv[])
187 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
event generator for MSDataAnalyzer
progress callback interface
The structure that captures the generation of a peak list (including the underlying acquisitions)
virtual size_t iterationsPerCallback() const
virtual UpdateRequest updateRequested(const DataInfo &dataInfo, const SpectrumIdentity &entry) const
virtual void open(const DataInfo &dataInfo)
start analysis of the data
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.
boost::shared_ptr< MSDataAnalyzer > MSDataAnalyzerPtr
virtual void close(const DataInfo &dataInfo)
end analysis of the data
virtual MSDataAnalyzerDriver::Status progress(size_t index, size_t size)
SimpleAnalyzer(size_t _index)
const char * anal(const CVParam &cvParam)
Status analyze(const MSDataAnalyzer::DataInfo &dataInfo, ProgressCallback *progressCallback=0) const
analyze a single MSData object, calling back to client if requested
boost::shared_ptr< Spectrum > SpectrumPtr
Simple writeable in-memory implementation of SpectrumList.
virtual MSDataAnalyzerDriver::Status progress(size_t index, size_t size)
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here....
#define TEST_PROLOG(argc, argv)
int main(int argc, char *argv[])
Interface for MSData analyzers.
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
virtual size_t iterationsPerCallback() const
container of MSDataAnalyzer (composite pattern)
information about the data to be analyzed
virtual void update(const DataInfo &dataInfo, const Spectrum &spectrum)
boost::shared_ptr< SpectrumListSimple > SpectrumListSimplePtr