extended_tile_metric.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include <cstring>
14 #include <limits>
21 
22 namespace illumina { namespace interop { namespace model { namespace metrics
23 {
32  {
33  public:
34  enum
35  {
40  };
41  public:
45  metric_base::base_metric(0, 0),
46  m_cluster_count_occupied(std::numeric_limits<float>::quiet_NaN()),
47  m_percent_occupied(std::numeric_limits<float>::quiet_NaN())
48  {
49  }
53  metric_base::base_metric(0, 0),
54  m_cluster_count_occupied(std::numeric_limits<float>::quiet_NaN()),
55  m_percent_occupied(std::numeric_limits<float>::quiet_NaN())
56  {
57  }
66  const uint_t tile,
67  const float occupied,
68  const point2d& upper_left=point2d()) :
69  metric_base::base_metric(lane, tile),
70  m_cluster_count_occupied(occupied),
71  m_percent_occupied(std::numeric_limits<float>::quiet_NaN()),
72  m_upper_left(upper_left)
73  {
74  }
75 
76  public:
85  void set(const uint_t lane,
86  const uint_t tile,
87  const float occupied,
88  const point2d& upper_left=point2d())
89  {
91  m_cluster_count_occupied = occupied;
92  m_upper_left = upper_left;
93  }
108  {
109  return m_cluster_count_occupied;
110  }
111 
118  {
119  return m_cluster_count_occupied / 1000;
120  }
121 
129  float percent_occupied() const
130  {
131  return m_percent_occupied;
132  }
138  const point2d& upper_left()const
139  {
140  return m_upper_left;
141  }
142 
150  void set_cluster_count_k(const float cluster_count_k)
151  {
152  m_percent_occupied = (m_cluster_count_occupied / 1000) / cluster_count_k * 100;
153  }
154 
155  public:
160  static const char *prefix()
161  { return "ExtendedTile"; }
162 
163  private:
164  float m_cluster_count_occupied;
165  float m_percent_occupied;//Derived from tile_metric
166  point2d m_upper_left;
167  template<class MetricType, int Version>
168  friend
169  struct io::generic_layout;
170  };
171 }}}}
172 
173 
Definition: enum_description.h:15
uint_t tile() const
Definition: base_metric.h:284
void set_cluster_count_k(const float cluster_count_k)
Definition: extended_tile_metric.h:150
extended_tile_metric(const header_type &)
Definition: extended_tile_metric.h:52
extended_tile_metric()
Definition: extended_tile_metric.h:44
void set_base(const uint_t lane, const uint_t tile)
Definition: base_metric.h:188
const point2d & upper_left() const
Definition: extended_tile_metric.h:138
float percent_occupied() const
Definition: extended_tile_metric.h:129
float cluster_count_occupied_k() const
Definition: extended_tile_metric.h:117
extended_tile_metric(const uint_t lane, const uint_t tile, const float occupied, const point2d &upper_left=point2d())
Definition: extended_tile_metric.h:65
::uint32_t uint_t
Definition: base_metric.h:77
Definition: generic_layout.h:24
void set(const uint_t lane, const uint_t tile, const float occupied, const point2d &upper_left=point2d())
Definition: extended_tile_metric.h:85
uint_t lane() const
Definition: base_metric.h:269
base_metric(const uint_t lane=0, const uint_t tile=0)
Definition: base_metric.h:178
Definition: extended_tile_metric.h:31
static const char * prefix()
Definition: extended_tile_metric.h:160
float cluster_count_occupied() const
Definition: extended_tile_metric.h:107