Resolve the precursor hierarchy from bridge metadata without fetching peaks. Keeps isolation targets distinct from selected ions, and retains SPS selections and supplemental reactions. The filter fallback follows ThermoRawFileParser.
More...
#include <OpenMS/FORMAT/HANDLERS/ThermoRawFileMetadata.h>
|
| struct | State |
| | What is retained per seen scan to resolve later scans' parents. More...
|
| |
|
| static std::string | trailer (const ThermoScan &scan, const std::string &label) |
| | Value of the trailer-extra entry with exactly this label, or "" if absent.
|
| |
| static std::optional< double > | number (const std::string &value) |
| | Parse a trailer value as a number.
|
| |
| static double | selectedIon (double target, std::optional< double > mono, double width) |
| | Selected ion m/z of a precursor (ThermoRawFileParser rule).
|
| |
|
| int | parentFromFilter_ (const std::string &key) const |
| | Most recent scan whose filter key is the parent of key (0 if none).
|
| |
|
| static bool | supplemental_ (const ThermoReaction &first, const ThermoReaction &second) |
| | True if second is the supplemental (HCD / CID) step of an ETD / ECD reaction first on the same target.
|
| |
| static std::size_t | lastReaction_ (const std::vector< ThermoReaction > &reactions) |
| | Index of the reaction that isolated this scan's precursor when no parent is known.
|
| |
| static std::vector< double > | spsMasses_ (const ThermoScan &scan) |
| | SPS target masses from the legacy ("SPS Mass N:") or modern ("SPS Masses:") trailer labels.
|
| |
|
| std::map< int, State > | scans_ |
| | seen scans by scan number
|
| |
| std::map< std::string, int > | filters_ |
| | most recent scan per filter key ("" for MS1)
|
| |
Resolve the precursor hierarchy from bridge metadata without fetching peaks. Keeps isolation targets distinct from selected ions, and retains SPS selections and supplemental reactions. The filter fallback follows ThermoRawFileParser.
◆ OpenMS::Internal::ThermoRawFileMetadata::State
| struct OpenMS::Internal::ThermoRawFileMetadata::State |
What is retained per seen scan to resolve later scans' parents.
| Class Members |
|
int |
level = 1 |
MS order. |
|
string |
native_id |
spectrum reference for descendants |
|
vector< ThermoPrecursor > |
own |
this scan's own precursor descriptors |
|
int |
parent = 0 |
scan this one descends from (0 if unknown) |
|
size_t |
reactions = 0 |
reactions consumed up to and including this scan |
◆ lastReaction_()
| static std::size_t lastReaction_ |
( |
const std::vector< ThermoReaction > & |
reactions | ) |
|
|
staticprivate |
Index of the reaction that isolated this scan's precursor when no parent is known.
◆ number()
| static std::optional< double > number |
( |
const std::string & |
value | ) |
|
|
static |
Parse a trailer value as a number.
- Returns
- the number, or an empty optional when the value is empty, not fully numeric (e.g. "2,5" or "12.3abc") or not finite. A literal zero is a valid number, not "missing".
◆ parentFromFilter_()
| int parentFromFilter_ |
( |
const std::string & |
key | ) |
const |
|
private |
Most recent scan whose filter key is the parent of key (0 if none).
◆ precursors()
Precursor descriptors of one scan; scans must be passed in acquisition order.
MS1 scans return an empty vector and are only recorded as potential parents. For MSn scans the vector holds the scan's own precursor (isolation target, selected ion, charge, window, parent scan / spectrum reference, activation and supplemental activation), followed by further SPS selections and then the precursors of every ancestor scan, so an MS3 scan lists its MS2 parent's precursor as well. Only each scan's own precursors are retained internally; ancestors are resolved through parent links on request.
◆ selectedIon()
| static double selectedIon |
( |
double |
target, |
|
|
std::optional< double > |
mono, |
|
|
double |
width |
|
) |
| |
|
static |
Selected ion m/z of a precursor (ThermoRawFileParser rule).
- Parameters
-
| target | isolation window target m/z of the reaction |
| mono | "Monoisotopic M/Z:" trailer value as returned by number() |
| width | isolation width (0 if unknown) |
- Returns
- the monoisotopic m/z when it is set and plausibly inside the isolation window (narrow windows accept -3.0 / +2.5 Th around the target), otherwise the target
◆ spsMasses_()
| static std::vector< double > spsMasses_ |
( |
const ThermoScan & |
scan | ) |
|
|
staticprivate |
SPS target masses from the legacy ("SPS Mass N:") or modern ("SPS Masses:") trailer labels.
◆ supplemental_()
True if second is the supplemental (HCD / CID) step of an ETD / ECD reaction first on the same target.
◆ trailer()
| static std::string trailer |
( |
const ThermoScan & |
scan, |
|
|
const std::string & |
label |
|
) |
| |
|
static |
Value of the trailer-extra entry with exactly this label, or "" if absent.
◆ filters_
| std::map<std::string, int> filters_ |
|
private |
most recent scan per filter key ("" for MS1)
◆ scans_
| std::map<int, State> scans_ |
|
private |
seen scans by scan number