OpenMS
QCBase::SpectraMap Class Reference

Map to find a spectrum via its NativeID. More...

#include <OpenMS/QC/QCBase.h>

Collaboration diagram for QCBase::SpectraMap:
[legend]

Public Member Functions

 SpectraMap ()=default
 Constructor. More...
 
 SpectraMap (const MSExperiment &exp)
 CTor which allows immediate indexing of an MSExperiment. More...
 
 ~SpectraMap ()=default
 Destructor. More...
 
void calculateMap (const MSExperiment &exp)
 calculate a new map, delete the old one More...
 
UInt64 at (const String &identifier) const
 
void clear ()
 clear the map More...
 
bool empty () const
 check if empty More...
 
Size size () const
 get size of map More...
 

Private Attributes

std::map< String, UInt64nativeid_to_index_
 

Detailed Description

Map to find a spectrum via its NativeID.

Constructor & Destructor Documentation

◆ SpectraMap() [1/2]

SpectraMap ( )
default

Constructor.

◆ SpectraMap() [2/2]

SpectraMap ( const MSExperiment exp)
explicit

CTor which allows immediate indexing of an MSExperiment.

◆ ~SpectraMap()

~SpectraMap ( )
default

Destructor.

Member Function Documentation

◆ at()

UInt64 at ( const String identifier) const

get index from identifier

Exceptions
Exception::ElementNotFoundif identifier is unknown

◆ calculateMap()

void calculateMap ( const MSExperiment exp)

calculate a new map, delete the old one

◆ clear()

void clear ( )

clear the map

◆ empty()

bool empty ( ) const

check if empty

◆ size()

Size size ( ) const

get size of map

Member Data Documentation

◆ nativeid_to_index_

std::map<String, UInt64> nativeid_to_index_
private