OpenMS
AppliedProcessingStep Struct Reference

#include <OpenMS/METADATA/ID/AppliedProcessingStep.h>

Collaboration diagram for AppliedProcessingStep:
[legend]

Public Member Functions

 AppliedProcessingStep (const std::optional< ProcessingStepRef > &processing_step_opt=std::nullopt, const std::map< ScoreTypeRef, double > &scores=std::map< ScoreTypeRef, double >())
 Constructor. More...
 
bool operator== (const AppliedProcessingStep &other) const
 Equality operator (needed for multi-index container) More...
 
std::vector< std::pair< ScoreTypeRef, double > > getScoresInOrder (bool primary_only=false) const
 Return scores in order of priority (primary first). More...
 

Public Attributes

std::optional< ProcessingStepRefprocessing_step_opt
 (Optional) reference to the processing step More...
 
std::map< ScoreTypeRef, double > scores
 Map of scores and their types. More...
 

Detailed Description

A processing step that was applied to a data item, possibly with associated scores.

Constructor & Destructor Documentation

◆ AppliedProcessingStep()

AppliedProcessingStep ( const std::optional< ProcessingStepRef > &  processing_step_opt = std::nullopt,
const std::map< ScoreTypeRef, double > &  scores = std::map<ScoreTypeRef, double>() 
)
inlineexplicit

Constructor.

Member Function Documentation

◆ getScoresInOrder()

std::vector<std::pair<ScoreTypeRef, double> > getScoresInOrder ( bool  primary_only = false) const
inline

Return scores in order of priority (primary first).

The order is defined in the ProcessingSoftware referenced by the processing step (if available). Scores not listed there are included at the end of the output.

Parameters
primary_onlyOnly return the primary score (ignoring any others)?

References AppliedProcessingStep::processing_step_opt, and AppliedProcessingStep::scores.

◆ operator==()

bool operator== ( const AppliedProcessingStep other) const
inline

Equality operator (needed for multi-index container)

References AppliedProcessingStep::processing_step_opt, and AppliedProcessingStep::scores.

Member Data Documentation

◆ processing_step_opt

std::optional<ProcessingStepRef> processing_step_opt

(Optional) reference to the processing step

If there are only scores, the processing step may be missing.

Referenced by ScoredProcessingResult::addProcessingStep(), AppliedProcessingStep::getScoresInOrder(), and AppliedProcessingStep::operator==().

◆ scores