@brief Clears the meta data arrays of all contained spectra (float, integer and string arrays) @return @em true if meta data arrays were present and removed. @em false otherwise. */
| 444 | @return @em true if meta data arrays were present and removed. @em false otherwise. |
| 445 | */ |
| 446 | bool MSExperiment::clearMetaDataArrays() |
| 447 | { |
| 448 | bool meta_present = false; |
| 449 | for (Size i = 0; i < spectra_.size(); ++i) |
| 450 | { |
| 451 | if (!spectra_[i].getFloatDataArrays().empty() |
| 452 | || !spectra_[i].getIntegerDataArrays().empty() |
| 453 | || !spectra_[i].getStringDataArrays().empty()) |
| 454 | { |
| 455 | meta_present = true; |
| 456 | } |
| 457 | spectra_[i].getStringDataArrays().clear(); |
| 458 | spectra_[i].getStringDataArrays().shrink_to_fit(); |
| 459 | spectra_[i].getIntegerDataArrays().clear(); |
| 460 | spectra_[i].getIntegerDataArrays().shrink_to_fit(); |
| 461 | spectra_[i].getFloatDataArrays().clear(); |
| 462 | spectra_[i].getFloatDataArrays().shrink_to_fit(); |
| 463 | } |
| 464 | return meta_present; |
| 465 | } |
| 466 | |
| 467 | /// returns the meta information of this experiment (const access) |
| 468 | const ExperimentalSettings& MSExperiment::getExperimentalSettings() const |