index_flowcell_summary.h
Go to the documentation of this file.
1 
8 #pragma once
9 #include <vector>
10 #include "interop/util/exception.h"
11 #include "interop/util/assert.h"
15 
16 namespace illumina { namespace interop { namespace model { namespace summary
17 {
18 
22  {
23  public:
25  typedef std::vector<index_lane_summary> lane_summary_vector_t;
26  public:
28  typedef lane_summary_vector_t::reference reference;
30  typedef lane_summary_vector_t::const_reference const_reference;
32  typedef lane_summary_vector_t::iterator iterator;
34  typedef lane_summary_vector_t::const_iterator const_iterator;
36  typedef lane_summary_vector_t::size_type size_type;
37  public:
42  index_flowcell_summary(const size_t n=0) : m_lane_summaries(n)
43  {
44  }
45 
46  public:
62  {
63  INTEROP_BOUNDS_CHECK(n, m_lane_summaries.size(), "Lane index exceeds lane count");
64  return m_lane_summaries[n];
65  }
74  {
75  INTEROP_BOUNDS_CHECK(n, m_lane_summaries.size(), "Lane index exceeds lane count");
76  return m_lane_summaries[n];
77  }
85  {
86  INTEROP_BOUNDS_CHECK(n, m_lane_summaries.size(), "Lane index exceeds lane count");
87  return m_lane_summaries[n];
88  }
95  const_reference at(const size_type n)const INTEROP_THROW_SPEC(( model::index_out_of_bounds_exception ))
96  {
97  INTEROP_BOUNDS_CHECK(n, m_lane_summaries.size(), "Lane index exceeds lane count");
98  return m_lane_summaries[n];
99  }
104  size_t size()const
105  {
106  return m_lane_summaries.size();
107  }
108 
111  public:
116  void resize(const size_type n)
117  {
118  m_lane_summaries.resize(n);
119  }
124  iterator begin()
125  {
126  return m_lane_summaries.begin();
127  }
132  iterator end()
133  {
134  return m_lane_summaries.end();
135  }
140  const_iterator begin()const
141  {
142  return m_lane_summaries.begin();
143  }
148  const_iterator end()const
149  {
150  return m_lane_summaries.end();
151  }
154  void sort()
155  {
156  for(iterator b = begin(), e=end();b != e;++b)
157  b->sort();
158  }
161  void clear()
162  {
163  m_lane_summaries.clear();
164  }
165 
166  friend std::ostream& operator<<(std::ostream& out, const index_flowcell_summary& summary);
167  friend std::istream& operator>>(std::istream& in, index_flowcell_summary& summary);
168 
169  private:
170  lane_summary_vector_t m_lane_summaries;
171 
172 
173  template<class MetricType, int Version>
174  friend struct io::generic_layout;
175  };
176 
177 }}}}
178 
lane_summary_vector_t::reference reference
Definition: index_flowcell_summary.h:28
friend std::istream & operator>>(std::istream &in, index_flowcell_summary &summary)
Definition: index_summary.cpp:134
lane_summary_vector_t::size_type size_type
Definition: index_flowcell_summary.h:36
Definition: enum_description.h:15
index_flowcell_summary(const size_t n=0)
Definition: index_flowcell_summary.h:42
void resize(const size_type n)
Definition: index_flowcell_summary.h:116
#define INTEROP_THROW_SPEC(SPEC)
Definition: exception_specification.h:15
const_iterator begin() const
Definition: index_flowcell_summary.h:140
const_iterator end() const
Definition: index_flowcell_summary.h:148
index_lane_summary & at(const size_t n) INTEROP_THROW_SPEC((model
Definition: index_flowcell_summary.h:84
def summary(run_metrics, level='Total', columns=None, dtype='f4', ignore_missing_columns=True, extra)
Definition: core.py:217
Definition: generic_layout.h:24
index_lane_summary & operator[](const size_t n) INTEROP_THROW_SPEC((model
Definition: index_flowcell_summary.h:61
const_reference at(const size_type n) const INTEROP_THROW_SPEC((model
Definition: index_flowcell_summary.h:95
lane_summary_vector_t::const_iterator const_iterator
Definition: index_flowcell_summary.h:34
iterator begin()
Definition: index_flowcell_summary.h:124
void sort()
Definition: index_flowcell_summary.h:154
const index_lane_summary & operator[](const size_t n) const INTEROP_THROW_SPEC((model
Definition: index_flowcell_summary.h:73
void clear()
Definition: index_flowcell_summary.h:161
#define INTEROP_BOUNDS_CHECK(VALUE, RANGE, MESSAGE)
Definition: exception.h:24
size_t size() const
Definition: index_flowcell_summary.h:104
friend std::ostream & operator<<(std::ostream &out, const index_flowcell_summary &summary)
Definition: index_summary.cpp:120
Definition: index_flowcell_summary.h:21
lane_summary_vector_t::iterator iterator
Definition: index_flowcell_summary.h:32
lane_summary_vector_t::const_reference const_reference
Definition: index_flowcell_summary.h:30
iterator end()
Definition: index_flowcell_summary.h:132
std::vector< index_lane_summary > lane_summary_vector_t
Definition: index_flowcell_summary.h:25