/**
 * \file core/spoms/alignmentbucket.h
 * \date 20/02/2026
 * \author Aurélien Berthier, BENOIST Emile, TESSIER Dominique
 * \brief store alignments candidates for post processing
 */


/*
 * PeptidOMS, Spectra to protein alignment tool
 * Copyright (C) 2026  Olivier Langella
 * <olivier.langella@cnrs.fr>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#pragma once


#include <cstddef>
#include <memory>
#include <vector>
#include "alignment.h"

namespace pappso
{
namespace spoms
{
class AlignmentBucket
{

  public:
  AlignmentBucket(int nb_interpretation_saved);
  virtual ~AlignmentBucket();

  void tryToAdd(std::shared_ptr<Alignment> new_alignment);

  std::shared_ptr<Alignment> getBestAlignment() const;

  /**
   * @brief returns the best alignment's score. If best alignment is nullptr,
   * returns 0 */
  int getBestAlignmentScore() const;

  private:
  std::vector<std::shared_ptr<Alignment>> m_alignmentList;
  std::size_t m_nbInterpretationsSaved;
};

} // namespace spoms
} // namespace pappso
