37using boost::logic::tribool;
45 os <<
"size: " << sl.
size() << endl;
47 for (
size_t i=0, end=sl.
size(); i<end; i++)
50 os << chromatogram->index <<
" "
51 << chromatogram->id <<
" "
63 chromatogram->index = sl->size();
65 chromatogram->id =
"TIC";
69 sl->chromatograms.push_back(chromatogram);
74 chromatogram->index = sl->size();
76 chromatogram->id =
"SRM SIC Q1=123.45 Q3=234.56";
80 chromatogram->precursor.activation.set(
MS_CID);
83 sl->chromatograms.push_back(chromatogram);
88 chromatogram->index = sl->size();
90 chromatogram->id =
"SIM SIC Q1=123.45";
95 sl->chromatograms.push_back(chromatogram);
100 *
os_ <<
"original chromatogram list:\n";
113 return chromatogramIdentity.
index%2 == 0;
120 if (
os_) *
os_ <<
"testEven:\n";
149 return (chromatogramIdentity.
index==1 ||
150 chromatogramIdentity.
index==2);
162 if (
os_) *
os_ <<
"testSelectedIndices:\n";
180 if (
os_) *
os_ <<
"testIndexSet:\n";
209int main(
int argc,
char* argv[])
215 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
void testIndexSet(ChromatogramListPtr sl)
int main(int argc, char *argv[])
void testSelectedIndices(ChromatogramListPtr sl)
void testEven(ChromatogramListPtr sl)
void printChromatogramList(const ChromatogramList &sl, ostream &os)
ChromatogramListPtr createChromatogramList()
ChromatogramList filter, for creating Chromatogram sub-lists.
Interface for accessing chromatograms, which may be stored in memory or backed by a data file (RAW,...
virtual size_t size() const =0
returns the number of chromatograms
virtual ChromatogramPtr chromatogram(size_t index, bool getBinaryData=false) const =0
retrieve a chromatogram by index
a virtual container of integers, accessible via an iterator interface, stored as union of intervals
void insert(Interval interval)
insert an interval of integers into the virtual container
MS_TIC_chromatogram
TIC chromatogram (total ion current chromatogram): Chromatogram obtained by plotting the total ion cu...
MS_CID
CID (collision-induced dissociation): The dissociation of an ion after collisional excitation....
MS_selected_ion_monitoring_chromatogram
selected ion monitoring chromatogram: Chromatogram created by creating an array of the measurements o...
MS_m_z
m/z: Three-character symbol m/z is used to denote the quantity formed by dividing the mass of an ion ...
MS_isolation_window_target_m_z
isolation window target m/z: The primary or reference m/z about which the isolation window is defined...
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...
MS_selected_reaction_monitoring_chromatogram
selected reaction monitoring chromatogram: Chromatogram created by creating an array of the measureme...
UO_second
second: A time unit which is equal to the duration of 9 192 631 770 periods of the radiation correspo...
boost::shared_ptr< Chromatogram > ChromatogramPtr
boost::shared_ptr< ChromatogramListSimple > ChromatogramListSimplePtr
boost::shared_ptr< ChromatogramList > ChromatogramListPtr
virtual tribool accept(const ChromatogramIdentity &chromatogramIdentity) const
return values: true: accept the Chromatogram false: reject the Chromatogram indeterminate: need to se...
virtual tribool accept(const ChromatogramIdentity &chromatogramIdentity) const
return values: true: accept the Chromatogram false: reject the Chromatogram indeterminate: need to se...
virtual bool done() const
return true iff done accepting chromatograms; this allows early termination of the iteration through ...
client-implemented filter predicate – called during construction of ChromatogramList_Filter to create...
Identifying information for a chromatogram.
size_t index
the zero-based, consecutive index of the chromatogram in the ChromatogramList.
Simple writeable in-memory implementation of ChromatogramList.
#define unit_assert_operator_equal(expected, actual)
#define TEST_PROLOG(argc, argv)