Skip to content

Correctly initialize the peakList element of the MzSpectrum class #8

@edgargabriel

Description

@edgargabriel

TestChromatogram.cpp: documentation of the issue

I want to use this commit to document what is the problem with TestChromatogram.cpp.
I will not continue working on this for now, but might revisit it later.

When creating a Chromatogram object, peakList is allocated, but not set correctly, i.e. the Peak constructor for every pair of (x,y) should be called. See Spectra/Spectrum.h for his.
Trouble is that there are multiple classes derived from Spectrum (MzSpectrum, GeneratedMzSpectrum), and multiple Peaks (MzPeak, GeneratedMzPeak, ChromatographicPeak) and the issue is occurring on each of them.

Furthermore, I am a bit concerned about the inheritance aspects of all of these classes, it might require a re-design of this code section overall. Note also, that it makes a nervous that the template used for the Peak object is a pointer, since the actual class elements of the object are not available because of that.

See commit #ea07a492a1c4b139e253d25200f63533042dbfe2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions