Loading...
Searching...
No Matches
pappso::TimsDiaSlices::MsMsWindowGroupList Struct Reference

`#include <timsdiaslices.h>`

Inheritance diagram for pappso::TimsDiaSlices::MsMsWindowGroupList:

## Public Member Functions

| ~MsMsWindowGroupList ()
void | addInGroup (const MsMsWindow &window)
MsMsWindowGroup * | getWindowGroupPtrByGroupId (std::size_t window_group_id) const

## Detailed Description

Definition at line 69 of file timsdiaslices.h.

## Constructor & Destructor Documentation

## ~MsMsWindowGroupList()

pappso::TimsDiaSlices::MsMsWindowGroupList::~MsMsWindowGroupList | ( |  | ) |

Definition at line 46 of file timsdiaslices.cpp.

{
for(MsMsWindowGroup *p_group : *this)
{
delete p_group;
}
}

## Member Function Documentation

## addInGroup()

void pappso::TimsDiaSlices::MsMsWindowGroupList::addInGroup | ( | const MsMsWindow & | window | ) |

Definition at line 55 of file timsdiaslices.cpp.

{
std::size_t group_id = window.WindowGroup;
auto it_in_list =
std::find_if(begin(), end(), [group_id](const MsMsWindowGroup *group) {
if(group->WindowGroup == group_id)
return true;
return false;
});
if(it_in_list == end())
{
qDebug();
MsMsWindowGroup *new_group = new MsMsWindowGroup();
new_group->WindowGroup = group_id;
new_group->push_back(window);
push_back(new_group);
}
else
{
qDebug();
(*it_in_list)->push_back(window);
std::sort((*it_in_list)->begin(),
(*it_in_list)->end(),
[](const MsMsWindow &a, const MsMsWindow &b) {
return (a.ScanNumBegin < b.ScanNumBegin);
});
std::size_t i = 0;
for(MsMsWindow &window : *(*it_in_list))
{
window.SliceIndex = i;
i++;
}
}
qDebug();
}
pappso::PeptideIonNter::a
@ a
pappso::PeptideIonNter::b
@ b

References pappso::a, pappso::b, pappso::TimsDiaSlices::MsMsWindow::SliceIndex, pappso::TimsDiaSlices::MsMsWindow::WindowGroup, and pappso::TimsDiaSlices::MsMsWindowGroup::WindowGroup.

Referenced by pappso::TimsDiaSlices::TimsDiaSlices().

## getWindowGroupPtrByGroupId()

TimsDiaSlices::MsMsWindowGroup * pappso::TimsDiaSlices::MsMsWindowGroupList::getWindowGroupPtrByGroupId | ( | std::size_t | window_group_id | ) | const

Definition at line 94 of file timsdiaslices.cpp.

{
auto it_in_list = std::find_if(
begin(), end(), [window_group_id](const MsMsWindowGroup *group) {
if(group->WindowGroup == window_group_id)
return true;
return false;
});
if(it_in_list == end())
{
throw pappso::ExceptionNotFound(
QObject::tr("MsMsWindowGroup %1 not found").arg(window_group_id));
}
return *it_in_list;
}
pappso::ExceptionNotFound
Definition exceptionnotfound.h:32

References pappso::TimsDiaSlices::MsMsWindowGroup::WindowGroup.

Referenced by pappso::TimsDiaSlices::TimsDiaSlices().

The documentation for this struct was generated from the following files:

- pappsomspp/vendors/tims/timsdiaslices.h
- pappsomspp/vendors/tims/timsdiaslices.cpp