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;
87 return MSDataAnalyzerDriver::Status_Ok;
100 virtual MSDataAnalyzerDriver::Status
progress(
size_t index,
size_t size)
102 if (
os_) *
os_ <<
"progress: " << index <<
"/" << size << endl;
104 return index<5 ? MSDataAnalyzerDriver::Status_Ok : MSDataAnalyzerDriver::Status_Cancel;
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);
146 unit_assert(status == MSDataAnalyzerDriver::Status_Ok);
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)
181int main(
int argc,
char* argv[])
187 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
int main(int argc, char *argv[])
const char * anal(const CVParam &cvParam)
container of MSDataAnalyzer (composite pattern)
progress callback interface
event generator for MSDataAnalyzer
Status analyze(const MSDataAnalyzer::DataInfo &dataInfo, ProgressCallback *progressCallback=0) const
analyze a single MSData object, calling back to client if requested
Interface for MSData analyzers.
boost::shared_ptr< MSDataAnalyzer > MSDataAnalyzerPtr
boost::shared_ptr< Spectrum > SpectrumPtr
boost::shared_ptr< SpectrumListSimple > SpectrumListSimplePtr
virtual size_t iterationsPerCallback() const
virtual MSDataAnalyzerDriver::Status progress(size_t index, size_t size)
virtual void update(const DataInfo &dataInfo, const Spectrum &spectrum)
analyze a single spectrum
SimpleAnalyzer(size_t _index)
virtual void close(const DataInfo &dataInfo)
end analysis of the data
virtual void open(const DataInfo &dataInfo)
start analysis of the data
virtual UpdateRequest updateRequested(const DataInfo &dataInfo, const SpectrumIdentity &entry) const
ask analyzer if it wants an update
virtual MSDataAnalyzerDriver::Status progress(size_t index, size_t size)
virtual size_t iterationsPerCallback() const
information about the data to be analyzed
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here....
The structure that captures the generation of a peak list (including the underlying acquisitions)
Identifying information for a spectrum.
size_t index
the zero-based, consecutive index of the spectrum in the SpectrumList.
Simple writeable in-memory implementation of SpectrumList.
#define TEST_PROLOG(argc, argv)