15 namespace illumina {
namespace interop {
namespace logic {
namespace plot
34 template<
typename Plot>
42 # define INTEROP_TUPLE7(Enum, Unused1, Unused2, Unused3, Metric, Method, Param) \
43 case constants:: Enum:\
44 select_metric_##Method##Param(metrics.get< model::metrics:: Metric >(),\
45 options, options.channel(),\
47 options.read(), plot);\
49 # define INTEROP_TUPLE4(Unused1, Unused2, Unused3, Unused4)
50 # define INTEROP_TUPLE1(Unused1)
52 # undef INTEROP_TUPLE4 // Reuse this for another conversion
53 # undef INTEROP_TUPLE7 // Reuse this for another conversion
54 # undef INTEROP_TUPLE1
70 # define INTEROP_TUPLE7(Enum, Unused1, Unused2, Unused3, Metric, Method, Param) \
71 case constants:: Enum:\
72 return is_metric_present_##Method##Param(metrics.get< model::metrics:: Metric >(), 0u, \
74 # define INTEROP_TUPLE4(Unused1, Unused2, Unused3, Unused4)
75 # define INTEROP_TUPLE1(Unused1)
77 # undef INTEROP_TUPLE4 // Reuse this for another conversion
78 # undef INTEROP_TUPLE7 // Reuse this for another conversion
79 # undef INTEROP_TUPLE1
86 # define INTEROP_TUPLE7(Enum, Unused1, Unused2, Unused3, Metric, Method, Param) \
87 template<typename Plot>\
88 static void select_metric_##Method##Param(const model::metric_base::metric_set< model::metrics:: Metric >& metrics,\
89 const model::plot::filter_options& options,\
90 const size_t channel, \
91 const constants::dna_bases base,\
95 const util::op::dummy_arg Void;\
96 (void)channel;(void)base;(void)read;(void)Void;\
97 plot(metrics, options, util::op::const_member_function(Param, &model::metrics:: Metric::Method));\
99 # define INTEROP_TUPLE4(Unused1, Unused2, Unused3, Unused4)
100 # define INTEROP_TUPLE1(Unused1)
102 # undef INTEROP_TUPLE7 // Reuse this for another conversion
103 # undef INTEROP_TUPLE4 // Reuse this for another conversion
104 # undef INTEROP_TUPLE1
107 # define INTEROP_TUPLE7(Enum, Unused1, Unused2, Unused3, Metric, Method, Param) \
108 static bool is_metric_present_##Method##Param(const model::metric_base::metric_set< model::metrics:: Metric >& metrics,\
109 const size_t channel, \
110 const constants::dna_bases base,\
113 const util::op::dummy_arg Void;\
114 (void)channel;(void)base;(void)read;(void)Void;\
115 return is_metric_present_in(metrics, util::op::const_member_function(Param, &model::metrics:: Metric::Method));\
117 # define INTEROP_TUPLE4(Unused1, Unused2, Unused3, Unused4)
118 # define INTEROP_TUPLE1(Unused1)
120 # undef INTEROP_TUPLE7 // Reuse this for another conversion
121 # undef INTEROP_TUPLE4 // Reuse this for another conversion
122 # undef INTEROP_TUPLE1
123 template<
class MetricSet,
typename Func>
124 static bool is_metric_present_in(
const MetricSet& metricset, Func proxy)
126 for(
typename MetricSet::const_iterator it = metricset.begin(); it != metricset.end();++it)
128 if(is_valid(proxy(*it)))
return true;
138 static bool is_valid(
const float val)
140 return !std::isnan(val);
149 static bool is_valid(
const T val)
151 return val < std::numeric_limits<T>::max();
::uint32_t uint_t
Definition: base_metric.h:144
Definition: filter_options.h:28
Definition: metric_set.h:40
metric_type
Definition: enums.h:284
Definition: enum_description.h:15
Definition: plot_metric_proxy.h:21
Definition: run_metrics.h:54
#define INTEROP_THROW(EXCEPTION, MESSAGE)
Definition: exception.h:18
Definition: model_exceptions.h:38
static bool is_present(const model::metrics::run_metrics &metrics, const constants::metric_type type)
Definition: plot_metric_proxy.h:65
static void select(const model::metrics::run_metrics &metrics, const model::plot::filter_options &options, const constants::metric_type type, Plot &plot)
Definition: plot_metric_proxy.h:35
#define INTEROP_ENUM_METRIC_TYPES
Definition: enums.h:42
std::string to_string(Enum value)
Definition: enums.h:43