36 ostream& operator<< (ostream& os, const vector<double>& v)
39 for (
size_t i=0; i < v.size(); ++i)
58 {
"112 112.0000001 112.1 120 121 123 124 128 129",
64 {
"112.0001 119 120 121 122 123 124 127 128 129",
65 " 1 4 5 6 7 8 9 10 11 12",
70 {
"200 200.1 200.2 200.9 202",
71 "1.0 3.0 1.0 0.0 3.0",
82 {
"200.1 200.2 200.3 200.8 200.9",
83 "1.0 3.0 1.0 1.0 4.0",
88 {
"200.1 200.2 200.3 200.8 200.9",
89 "1.0 3.0 1.0 1.0 4.0",
98 {
"112 112.1 119 120 121 122 123 124 126 127 128 129",
99 "6 5 4 12 7 7 12 11 7 17 12 19",
104 {
"200 200.1 200.2 200.3 200.8 200.9 202",
105 "1.0 4.0 4.0 1.0 1.0 4.0 3.0",
110 {
"200.1 200.2 200.3 200.8 200.9",
111 "1.0 3.0 1.0 1.0 4.0",
122 vector<double> doubleVector;
123 vector<string> tokens;
124 bal::split(tokens, doubleArray, bal::is_space(), bal::token_compress_on);
126 for (
size_t i=0; i < tokens.size(); ++i)
127 if (!tokens[i].empty())
128 doubleVector.push_back(lexical_cast<double>(tokens[i]));
147 s->scanList.scans.push_back(
Scan());
148 Scan& scanRef = s->scanList.scans[0];
157 s->defaultArrayLength = inputMZArray.size();
167 vector<double> goldMZArray =
parseDoubleArray(goldStandard[0].inputMZArray);
168 vector<double> goldIntensityArray =
parseDoubleArray(goldStandard[0].inputIntensityArray);
176 for (
size_t i=0; i < calculator->size(); ++i)
187 vector<double> goldMZArray =
parseDoubleArray(goldStandard[i].inputMZArray);
188 vector<double> goldIntensityArray =
parseDoubleArray(goldStandard[i].inputIntensityArray);
196 for (
size_t j=0; j < mzs.
size(); ++j)
210 cerr <<
"Test failed:\n" << e.what() << endl;
217 int main(
int argc,
char* argv[])
223 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
224 int failedTests =
test();
MS_MSn_spectrum
MSn spectrum: MSn refers to multi-stage MS2 experiments designed to record product ion spectra where ...
CVParam cvParam(CVID cvid) const
finds cvid in the container:
The method of precursor ion selection and activation.
int main(int argc, char *argv[])
TestScanSummerCalculator goldStandard[]
boost::shared_ptr< Spectrum > SpectrumPtr
Provides a custom-sorted spectrum list.
MS_scan_start_time
scan start time: The time that an analyzer started a scan, relative to the start of the MS run...
const size_t goldStandardSize
#define unit_assert_equal(x, y, epsilon)
MS_scan_window_upper_limit
scan window upper limit: The lower m/z bound of a mass spectrometer scan window.
MS_ms_level
ms level: Stages of ms achieved in a multi stage mass spectrometry experiment.
UO_second
second: A time unit which is equal to the duration of 9 192 631 770 periods of the radiation correspo...
MS_selected_ion_m_z
selected ion m/z: Mass-to-charge ratio of an selected ion.
MS_volt_second_per_square_centimeter
volt-second per square centimeter: An electrical mobility unit that equals the speed [cm/s] an ion re...
vector< double > parseDoubleArray(const string &doubleArray)
#define unit_assert_operator_equal(expected, actual)
MS_scan_window_lower_limit
scan window lower limit: The upper m/z bound of a mass spectrometer scan window.
boost::shared_ptr< SpectrumList > SpectrumListPtr
const char * inputIntensityArray
const size_t testScanSummerSize
const char * inputMZArray
std::vector< SelectedIon > selectedIons
this list of precursor ions that were selected.
std::vector< SpectrumPtr > spectra
MS_number_of_detector_counts
number of detector counts: The number of counted events observed in one or a group of elements of a d...
TestScanSummerCalculator testScanSummerCalculators[]
#define TEST_PROLOG(argc, argv)
The structure that captures the generation of a peak list (including the underlying acquisitions) ...
value_type valueAs() const
templated value access with type conversion
Simple writeable in-memory implementation of SpectrumList.
MS_inverse_reduced_ion_mobility
inverse reduced ion mobility: Ion mobility measurement for an ion or spectrum of ions as measured in ...