ProteoWizard
Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
pwiz::msdata::mz5::Configuration_mz5 Class Reference

Configuration class for mz5 im- and export. More...

#include <Configuration_mz5.hpp>

List of all members.

Public Types

enum  SpectrumLoadPolicy { SLP_InitializeAllOnCreation, SLP_InitializeAllOnFirstCall }
 Enumeration for different load strategies for spectra. More...
enum  ChromatogramLoadPolicy { CLP_InitializeAllOnCreation, CLP_InitializeAllOnFirstCall }
enum  MZ5DataSets {
  ControlledVocabulary, FileContent, Contact, CVReference,
  CVParam, UserParam, RefParam, ParamGroups,
  SourceFiles, Samples, Software, ScanSetting,
  InstrumentConfiguration, DataProcessing, Run, SpectrumMetaData,
  SpectrumBinaryMetaData, SpectrumIndex, SpectrumMZ, SpectrumIntensity,
  ChromatogramMetaData, ChromatogramBinaryMetaData, ChromatogramIndex, ChomatogramTime,
  ChromatogramIntensity, FileInformation
}
 Enumeration to simplify the use of datasets. More...

Public Member Functions

 Configuration_mz5 ()
 Default constructor.
 Configuration_mz5 (const Configuration_mz5 &)
 Copy constructor.
 Configuration_mz5 (const pwiz::msdata::MSDataFile::WriteConfig &config)
 Conversion constructor for WriteConfig objects.
Configuration_mz5operator= (const Configuration_mz5 &rhs)
 Assign operator.
const std::string & getNameFor (const MZ5DataSets v)
 Returns dataset name for a requested dataset.
MZ5DataSets getVariableFor (const std::string &name)
 Returns dataset enumeration value for a given string.
const H5::DataType & getDataTypeFor (const MZ5DataSets v)
 Returns dataset type.
const hsize_t & getChunkSizeFor (const MZ5DataSets v)
 Returns chunk size for a dataset.
const size_t & getBufferSizeFor (const MZ5DataSets v)
 Returns buffer size for a dataset.
const size_t & getBufferInMb ()
 Returns mz5 cache in Mb.
const size_t getBufferInB ()
 Returns mz5 cache in byte.
const size_t & getRdccSlots ()
 Returns number of used rdcc slots.
const SpectrumLoadPolicygetSpectrumLoadPolicy () const
 Getter for spectrum load policy.
const ChromatogramLoadPolicygetChromatogramLoadPolicy () const
 Getter for chromatogram load policy.
const bool doTranslating () const
 Getter for translation flag.
void setTranslating (const bool flag) const
 Setter for translation flag.
const int getDeflateLvl ()
 Getter for compression level.
const bool doShuffel ()
 Getter for shuffle flag.

Static Public Attributes

static unsigned short MZ5_FILE_MAJOR_VERSION
static unsigned short MZ5_FILE_MINOR_VERSION
static bool PRINT_HDF5_EXCEPTIONS
static hsize_t EMPTY_CHUNK_SIZE
 Value for empty chunk size.
static size_t NO_BUFFER_SIZE
 Default value to use no buffer.

Private Member Functions

void init (const bool deltamz, const bool translateinten)
 Initializes configuration object.

Private Attributes

pwiz::msdata::MSDataFile::WriteConfig config_
 Internal copy of pwiz configuration object.
std::map< MZ5DataSets,
std::string > 
variableNames_
 Map which holds the translation of datasets to dataset names.
std::map< std::string,
MZ5DataSets
variableVariables_
 Map which holds the translation of dataset names to datasets.
std::map< MZ5DataSets,
H5::DataType > 
variableTypes_
 Map which holds the data types for a dataset.
std::map< MZ5DataSets, hsize_t > variableChunkSizes_
 Map which holds the chunk size for a dataset.
std::map< MZ5DataSets, size_t > variableBufferSizes_
 Map which holds the buffer size for a dataset.
size_t bufferInMB_
 MZ5 cache in MB.
size_t rdccSolts_
 Number of rdcc slots.
SpectrumLoadPolicy spectrumLoadPolicy_
 Spectrum load policy.
ChromatogramLoadPolicy chromatogramLoadPolicy_
 Chromaogram load policy.
bool doTranslating_
 flag for translation.
int deflateLvl_
 Compression level.

Detailed Description

Configuration class for mz5 im- and export.

This class is holding several different configuration options, such as dataset names, dataset types and different buffering and chunking values.

Definition at line 39 of file Configuration_mz5.hpp.


Member Enumeration Documentation

Enumeration for different load strategies for spectra.

Enumerator:
SLP_InitializeAllOnCreation 

Initializes all meta information of all spectra at the creation a an spectrum list obeject.

SLP_InitializeAllOnFirstCall 

Initialzes all meta information of all spectra at the first getSpectrum() call.

Definition at line 50 of file Configuration_mz5.hpp.

{
/**
* Initializes all meta information of all spectra at the creation a an spectrum list obeject.
*/
/**
* Initialzes all meta information of all spectra at the first getSpectrum() call.
*/
//SLP_PreemptionMode not implemented yet
//SLP_OnDemand not implemented yet
//SLP_CachedOnDemand not implemented yet
};
Enumerator:
CLP_InitializeAllOnCreation 

Initialize and keep all chromatograms when initializing the chromatogram list.

CLP_InitializeAllOnFirstCall 

Initialize and keep all chromatograms when requesting the first chromatogram.

Definition at line 65 of file Configuration_mz5.hpp.

{
/**
* Initialize and keep all chromatograms when initializing the chromatogram list.
*/
/**
* Initialize and keep all chromatograms when requesting the first chromatogram.
*/
//CLP_PreemptionMode not implemented yet
//CLP_OnDemand not implemented yet
//CLP_CachedOnDemand not implemented yet
};

Enumeration to simplify the use of datasets.

These values are used to determine dataset specific parameters, such as chunk size, buffer size, name and type.

Enumerator:
ControlledVocabulary 

Dataset for the controlled vocabulary sets.

FileContent 

File content dataset.

Contact 

Dataset containing contact infomation.

CVReference 

Dataset containing all used controlled vocabulary accessions (prefix, accession, definition).

CVParam 

Dataset containing all controlled vocabulary parameters.

UserParam 

Dataset containing all user parameters.

RefParam 

Dataset containing all referenced parameter groups.

ParamGroups 

Dataset for parameter groups.

SourceFiles 

Source file dataset.

Samples 

Sample datatset.

Software 

Software dataset.

ScanSetting 

Scan setting datatset.

InstrumentConfiguration 

Instrument configuration datatset.

DataProcessing 

Data processing dataset.

Run 

Dataset containing all meta information for all runs.

SpectrumMetaData 

Dataset containing all meta information of all spectra.

SpectrumBinaryMetaData 

Dataset containing all meta information of all binary data elements for spectra.

SpectrumIndex 

Index dataset.

kth element points to the end of the kth spectrum in MZ and SIntensity.

SpectrumMZ 

Dataset containing all mz values for all spectra.

SpectrumIntensity 

Dataset containing all intensity values for all spectra.

ChromatogramMetaData 

Dataset containing all meta information of all chromatograms.

ChromatogramBinaryMetaData 

Dataset containing all meta information of all binary data elements for chromatograms.

ChromatogramIndex 

Index dataset.

kth element points to the end of the kth chromatogram in Time and CIntensity.

ChomatogramTime 

Dataset containing all time values.

ChromatogramIntensity 

Dataset containing all chromatogram intensities.

FileInformation 

Dataset containing information about the file and specific dataset configurations.

Definition at line 82 of file Configuration_mz5.hpp.

{
/**
* Dataset for the controlled vocabulary sets.
*/
/**
* File content dataset.
*/
/**
* Dataset containing contact infomation.
*/
/**
* Dataset containing all used controlled vocabulary accessions (prefix, accession, definition).
*/
/**
* Dataset containing all controlled vocabulary parameters.
*/
/**
* Dataset containing all user parameters.
*/
/**
* Dataset containing all referenced parameter groups.
*/
/**
* Dataset for parameter groups.
*/
/**
* Source file dataset.
*/
/**
* Sample datatset.
*/
/**
* Software dataset.
*/
/**
* Scan setting datatset.
*/
/**
* Instrument configuration datatset.
*/
/**
* Data processing dataset.
*/
/**
* Dataset containing all meta information for all runs.
*/
Run,
/**
* Dataset containing all meta information of all spectra.
*/
/**
* Dataset containing all meta information of all binary data elements for spectra.
*/
/**
* Index dataset. kth element points to the end of the kth spectrum in MZ and SIntensity.
*/
/**
* Dataset containing all mz values for all spectra.
*/
/**
* Dataset containing all intensity values for all spectra.
*/
/**
* Dataset containing all meta information of all chromatograms.
*/
/**
* Dataset containing all meta information of all binary data elements for chromatograms.
*/
/**
* Index dataset. kth element points to the end of the kth chromatogram in Time and CIntensity.
*/
/**
* Dataset containing all time values.
*/
/**
* Dataset containing all chromatogram intensities.
*/
/**
* Dataset containing information about the file and specific dataset configurations.
*/
};

Constructor & Destructor Documentation

pwiz::msdata::mz5::Configuration_mz5::Configuration_mz5 ( )

Default constructor.

Initializes default parameters.

pwiz::msdata::mz5::Configuration_mz5::Configuration_mz5 ( const Configuration_mz5 )

Copy constructor.

pwiz::msdata::mz5::Configuration_mz5::Configuration_mz5 ( const pwiz::msdata::MSDataFile::WriteConfig config)

Conversion constructor for WriteConfig objects.

Uses values in config to set up specific options such as compression or precision.

Parameters:
configa pwiz config object

Member Function Documentation

Configuration_mz5& pwiz::msdata::mz5::Configuration_mz5::operator= ( const Configuration_mz5 rhs)

Assign operator.

Parameters:
rhsright hand side of assign operator.
Returns:
the altered object
const std::string& pwiz::msdata::mz5::Configuration_mz5::getNameFor ( const MZ5DataSets  v)

Returns dataset name for a requested dataset.

Parameters:
vdataset
Returns:
dataset name
MZ5DataSets pwiz::msdata::mz5::Configuration_mz5::getVariableFor ( const std::string &  name)

Returns dataset enumeration value for a given string.

Returns out_of_range if string does not exist.

Parameters:
namedataset name
Returns:
dataset enumeration value
const H5::DataType& pwiz::msdata::mz5::Configuration_mz5::getDataTypeFor ( const MZ5DataSets  v)

Returns dataset type.

Parameters:
vdataset
Returns:
mz5 data type reference
const hsize_t& pwiz::msdata::mz5::Configuration_mz5::getChunkSizeFor ( const MZ5DataSets  v)

Returns chunk size for a dataset.

Parameters:
vdataset
Returns:
chunk size. EMPTY_CHUNK_SIZE if no chunking should be used.
const size_t& pwiz::msdata::mz5::Configuration_mz5::getBufferSizeFor ( const MZ5DataSets  v)

Returns buffer size for a dataset.

Buffers are mainly used to speed up writing of mz and spectrum intensities.

Parameters:
vdataset
Returns:
buffer size. NO_BUFFER_SIZE if no buffer will be used.
const size_t& pwiz::msdata::mz5::Configuration_mz5::getBufferInMb ( )

Returns mz5 cache in Mb.

The mz5 cache is used for chunked datasets. This effects the random read time.

Returns:
mz5 cache size
const size_t pwiz::msdata::mz5::Configuration_mz5::getBufferInB ( )

Returns mz5 cache in byte.

See getBufferInMb()

Returns:
mz5 cache in byte
const size_t& pwiz::msdata::mz5::Configuration_mz5::getRdccSlots ( )

Returns number of used rdcc slots.

This is currently constant 41957L, but should be the the next prime after 10-100 times the number of chunks fitting into the cache.

Returns:
number of rdcc slots
const SpectrumLoadPolicy& pwiz::msdata::mz5::Configuration_mz5::getSpectrumLoadPolicy ( ) const

Getter for spectrum load policy.

Returns:
spectrum load policy
const ChromatogramLoadPolicy& pwiz::msdata::mz5::Configuration_mz5::getChromatogramLoadPolicy ( ) const

Getter for chromatogram load policy.

Returns:
spectrum load policy
const bool pwiz::msdata::mz5::Configuration_mz5::doTranslating ( ) const

Getter for translation flag.

If this flag is set, mz values of mass spectra are saved as delta mz's. This greatly improves compression rate and significantly reduces file size.

Returns:
true of tranlating is enabled, otherwise false.
void pwiz::msdata::mz5::Configuration_mz5::setTranslating ( const bool  flag) const

Setter for translation flag.

Parameters:
flagtrue of translation of mz and intensity values is be enabled;
const int pwiz::msdata::mz5::Configuration_mz5::getDeflateLvl ( )

Getter for compression level.

Default is 1 if compression is enabled, since the gain in compression rate of >2 is negligible.

Returns:
value between 0-9(0=no compression, 1=fast compression, 9=high compression)
const bool pwiz::msdata::mz5::Configuration_mz5::doShuffel ( )

Getter for shuffle flag.

Shuffle greatly increases compression rate.

Returns:
true if shuffel is enabled, otherwise false.
void pwiz::msdata::mz5::Configuration_mz5::init ( const bool  deltamz,
const bool  translateinten 
)
private

Initializes configuration object.


Member Data Documentation

unsigned short pwiz::msdata::mz5::Configuration_mz5::MZ5_FILE_MAJOR_VERSION
static

Definition at line 43 of file Configuration_mz5.hpp.

unsigned short pwiz::msdata::mz5::Configuration_mz5::MZ5_FILE_MINOR_VERSION
static

Definition at line 44 of file Configuration_mz5.hpp.

bool pwiz::msdata::mz5::Configuration_mz5::PRINT_HDF5_EXCEPTIONS
static

Definition at line 45 of file Configuration_mz5.hpp.

hsize_t pwiz::msdata::mz5::Configuration_mz5::EMPTY_CHUNK_SIZE
static

Value for empty chunk size.

Should be 0.

Definition at line 314 of file Configuration_mz5.hpp.

size_t pwiz::msdata::mz5::Configuration_mz5::NO_BUFFER_SIZE
static

Default value to use no buffer.

Should be 0.

Definition at line 318 of file Configuration_mz5.hpp.

pwiz::msdata::MSDataFile::WriteConfig pwiz::msdata::mz5::Configuration_mz5::config_
mutableprivate

Internal copy of pwiz configuration object.

Definition at line 329 of file Configuration_mz5.hpp.

std::map<MZ5DataSets, std::string> pwiz::msdata::mz5::Configuration_mz5::variableNames_
private

Map which holds the translation of datasets to dataset names.

Definition at line 333 of file Configuration_mz5.hpp.

std::map<std::string, MZ5DataSets> pwiz::msdata::mz5::Configuration_mz5::variableVariables_
private

Map which holds the translation of dataset names to datasets.

Definition at line 337 of file Configuration_mz5.hpp.

std::map<MZ5DataSets, H5::DataType> pwiz::msdata::mz5::Configuration_mz5::variableTypes_
private

Map which holds the data types for a dataset.

Definition at line 341 of file Configuration_mz5.hpp.

std::map<MZ5DataSets, hsize_t> pwiz::msdata::mz5::Configuration_mz5::variableChunkSizes_
private

Map which holds the chunk size for a dataset.

Definition at line 345 of file Configuration_mz5.hpp.

std::map<MZ5DataSets, size_t> pwiz::msdata::mz5::Configuration_mz5::variableBufferSizes_
private

Map which holds the buffer size for a dataset.

Definition at line 349 of file Configuration_mz5.hpp.

size_t pwiz::msdata::mz5::Configuration_mz5::bufferInMB_
private

MZ5 cache in MB.

Definition at line 353 of file Configuration_mz5.hpp.

size_t pwiz::msdata::mz5::Configuration_mz5::rdccSolts_
private

Number of rdcc slots.

Definition at line 357 of file Configuration_mz5.hpp.

SpectrumLoadPolicy pwiz::msdata::mz5::Configuration_mz5::spectrumLoadPolicy_
private

Spectrum load policy.

Definition at line 361 of file Configuration_mz5.hpp.

ChromatogramLoadPolicy pwiz::msdata::mz5::Configuration_mz5::chromatogramLoadPolicy_
private

Chromaogram load policy.

Definition at line 365 of file Configuration_mz5.hpp.

bool pwiz::msdata::mz5::Configuration_mz5::doTranslating_
mutableprivate

flag for translation.

Definition at line 369 of file Configuration_mz5.hpp.

int pwiz::msdata::mz5::Configuration_mz5::deflateLvl_
private

Compression level.

If compression level is > 0, shuffle is enable by default.

Definition at line 373 of file Configuration_mz5.hpp.


The documentation for this class was generated from the following file: