#include <run_metrics.h>

Public Types

typedef make_type_list< corrected_intensity_metric, dynamic_phasing_metric, error_metric, extended_tile_metric, extraction_metric, image_metric, index_metric, phasing_metric, q_metric, q_by_lane_metric, q_collapsed_metric, tile_metric, summary_run_metric >::result_t metric_type_list_t
 
typedef metric_base::base_metric::id_t id_t
 
typedef std::map< id_t, metric_base::base_metrictile_metric_map_t
 
typedef std::map< id_t, metric_base::base_cycle_metriccycle_metric_map_t
 
typedef metric_base::metric_set< error_metric >::id_set_t id_set_t
 

Public Member Functions

 run_metrics ()
 
 run_metrics (const run::info &run_info, const run::parameters &run_param=run::parameters())
 
void legacy_channel_update (const constants::instrument_type type)
 
void set_naming_method (const constants::tile_naming_method naming_method)
 
size_t count_legacy_bins (const size_t legacy_bin_count=std::numeric_limits< size_t >::max()) const
 
bool is_run_parameters_required (const size_t legacy_bin_count=std::numeric_limits< size_t >::max()) const
 
const run::inforun_info () const
 
void run_info (const run::info &info)
 
const run::parametersrun_parameters () const
 
void run_parameters (const run::parameters &param)
 
void list_filenames (const constants::metric_group group, std::vector< std::string > &files, const std::string &run_folder, const bool use_out=true) INTEROP_THROW_SPEC((invalid_run_info_exception))
 
void list_filenames (std::vector< std::string > &files, const std::string &run_folder, const bool bycycle=false, const bool use_out=true) INTEROP_THROW_SPEC((invalid_run_info_exception))
 
template<class T >
void set (const T &metrics)
 
template<class T >
metric_base::metric_set_helper< T >::metric_set_t & get ()
 
template<class T >
const metric_base::metric_set_helper< T >::metric_set_t & get () const
 
template<class T >
metric_base::metric_set< T > & get_metric_set ()
 
void copy_tile (const run_metrics &metrics, const metric_base::base_metric &tile_id)
 
void append_tiles (const run_metrics &metrics, const metric_base::base_metric &tile_id)
 
void check_for_data_sources (const std::string &run_folder, const size_t last_cycle)
 
template<class ReadFunc >
void read_callback (ReadFunc &func)
 
template<class Func >
void metrics_callback (Func &func)
 
template<class Func >
void metrics_callback (Func &func) const
 
bool is_group_empty (const std::string &group_name) const
 
bool is_group_empty (const constants::metric_group group_id) const
 
void populate_id_map (tile_metric_map_t &map) const
 
void populate_id_map (cycle_metric_map_t &map) const
 
void sort ()
 
void clear ()
 

Public Attributes

void read(const std::string &run_folder, const size_t thread_count=1) INTEROP_THROW_SPEC((xml void read(const std::string &run_folder, const std::vector< unsigned char > &valid_to_load, const size_t thread_count=1, const bool skip_loaded=false) INTEROP_THROW_SPEC((xml size_t read_xml(const std::string &run_folder) INTEROP_THROW_SPEC((io void read_run_info(const std::string &run_folder) INTEROP_THROW_SPEC((xml size_t read_run_parameters(const std::string &run_folder, const bool force_load=false) INTEROP_THROW_SPEC((io void finalize_after_load(size_t count=std::numeric_limits< size_t >::max()) INTEROP_THROW_SPEC((model bool empty () const
 
void read_metrics(const std::string &run_folder, const size_t last_cycle, const size_t thread_count) INTEROP_THROW_SPEC((io void read_metrics(const std::string &run_folder, const size_t last_cycle, const std::vector< unsigned char > &valid_to_load, const size_t thread_count, const bool skip_loaded=false) INTEROP_THROW_SPEC((io void write_metrics(const std::string &run_folder, const bool use_out=true) const INTEROP_THROW_SPEC((io void read_metrics_from_buffer(const constants::metric_group group,::uint8_t *buffer, const size_t buffer_size) INTEROP_THROW_SPEC((io void write_metrics_to_buffer(const constants::metric_group group,::uint8_t *buffer, const size_t buffer_size) const INTEROP_THROW_SPEC((io size_t calculate_buffer_size(const constants::metric_group group) const INTEROP_THROW_SPEC((io voi validate )() INTEROP_THROW_SPEC((invalid_run_info_exception
 
void read_metrics(const std::string &run_folder, const size_t last_cycle, const size_t thread_count) INTEROP_THROW_SPEC((io void read_metrics(const std::string &run_folder, const size_t last_cycle, const std::vector< unsigned char > &valid_to_load, const size_t thread_count, const bool skip_loaded=false) INTEROP_THROW_SPEC((io void write_metrics(const std::string &run_folder, const bool use_out=true) const INTEROP_THROW_SPEC((io void read_metrics_from_buffer(const constants::metric_group group,::uint8_t *buffer, const size_t buffer_size) INTEROP_THROW_SPEC((io void write_metrics_to_buffer(const constants::metric_group group,::uint8_t *buffer, const size_t buffer_size) const INTEROP_THROW_SPEC((io size_t calculate_buffer_size(const constants::metric_group group) const INTEROP_THROW_SPEC((io voi invalid_run_info_cycle_exception )
 

Detailed Description

Collection of all metric sets for a run

See also
corrected_intensity_metrics
dynamic_phasing_metric
error_metrics
extended_tile_metric
extraction_metrics
image_metrics
index_metrics
phasing_metric
q_metrics
tile_metrics
q_by_lane_metric
q_collapsed_metric
summary_run_metric

Member Typedef Documentation

Define a map of ids to a base cycle metric

Define an id type

Define a map of ids to a base metric

Constructor & Destructor Documentation

run_metrics ( )
inline

Constructor

run_metrics ( const run::info run_info,
const run::parameters run_param = run::parameters() 
)
inline

Constructor

Parameters
run_inforun information
run_paramrun parameters

Member Function Documentation

void append_tiles ( const run_metrics metrics,
const metric_base::base_metric tile_id 
)

Adds records only for a specific tile

Parameters
metricsfull metric set
tile_idselected tile

Adds records only for a specific tile

Parameters
originfull metric set
tile_idselected tile
void check_for_data_sources ( const std::string &  run_folder,
const size_t  last_cycle 
)

Check if the InterOp file for each metric set exists

This will set the metric_set::data_source_exists flag.

Parameters
run_folderrun folder path
last_cyclelast cycle to search for by cycle interops
void clear ( )

Clear all the metrics

void copy_tile ( const run_metrics metrics,
const metric_base::base_metric tile_id 
)

Copy records only for a specific tile

Parameters
metricsfull metric set
tile_idselected tile

Copy records only for a specific tile

Parameters
originfull metric set
tile_idselected tile
metric_base::metric_set_helper<T>::metric_set_t& get ( )
inline

Get a metric set

Returns
metric set
const metric_base::metric_set_helper<T>::metric_set_t& get ( ) const
inline

Get a metric set

Returns
metric set
metric_base::metric_set<T>& get_metric_set ( )
inline

Get a metric set given a metric type

bool is_group_empty ( const std::string &  group_name) const

Check if the metric group is empty

Parameters
group_nameprefix of interop group metric
Returns
true if metric is empty
bool is_group_empty ( const constants::metric_group  group_id) const

Check if the metric group is empty

Parameters
group_idprefix of interop group metric id
Returns
true if metric is empty

Check if the metric group is empty

Parameters
group_idid of interop group metric
Returns
true if metric is empty
void list_filenames ( const constants::metric_group  group,
std::vector< std::string > &  files,
const std::string &  run_folder,
const bool  use_out = true 
)

List all filenames for a specific metric

Parameters
groupmetric group type
filesdestination interop file names (first one is legacy, all subsequent are by cycle)
run_folderrun folder location
use_outuse the copied version
void list_filenames ( std::vector< std::string > &  files,
const std::string &  run_folder,
const bool  bycycle = false,
const bool  use_out = true 
)

List all filenames for all metrics

Parameters
filesdestination interop file names (first one is legacy, all subsequent are by cycle)
run_folderrun folder location
bycycleif true, list all by cycle file name
use_outuse the copied version
void metrics_callback ( Func &  func)
inline

Read binary metrics from the run folder

Parameters
funccall back for metric reading
void metrics_callback ( Func &  func) const
inline

Read binary metrics from the run folder

Parameters
funccall back for metric reading
void populate_id_map ( tile_metric_map_t map) const

Populate a map of valid tiles

Parameters
mapmapping between tile has and base_metric
void populate_id_map ( cycle_metric_map_t map) const

Populate a map of valid tiles and cycles

Parameters
mapmapping between tile has and base_cycle_metric

Populate a map of valid tiles and cycles

Parameters
mapmapping between tile has and base_metric
void read_callback ( ReadFunc &  func)
inline

Read binary metrics and XML files from the run folder

Parameters
funccall back for metric and XML reading
const run::parameters& run_parameters ( ) const
inline

Get parameters describing the run

Returns
run parameters
void run_parameters ( const run::parameters param)
inline

Set parameters describing the run

Parameters
paramrun parameters
void set ( const T &  metrics)
inline

Set a given metric set

Parameters
metricsmetric set
void sort ( )

Sort the metrics by id

Sort the metrics by lane, then tile, then cycle

Member Data Documentation

void read_metrics (const std::string &run_folder, const size_t last_cycle, const size_t thread_count) INTEROP_THROW_SPEC(( io void read_metrics (const std::string &run_folder, const size_t last_cycle, const std::vector<unsigned char>& valid_to_load, const size_t thread_count, const bool skip_loaded=false) INTEROP_THROW_SPEC(( io void write_metrics (const std::string &run_folder, const bool use_out=true) const INTEROP_THROW_SPEC(( io void read_metrics_from_buffer (const constants::metric_group group, ::uint8_t* buffer, const size_t buffer_size) INTEROP_THROW_SPEC(( io void write_metrics_to_buffer (const constants::metric_group group, ::uint8_t* buffer, const size_t buffer_size) const INTEROP_THROW_SPEC(( io size_t calculate_buffer_size (const constants::metric_group group) const INTEROP_THROW_SPEC(( io voi invalid_run_info_cycle_exception)
void validate

Read binary metrics from the run folder

This function ignores:

  • Missing InterOp files
  • Incomplete InterOp files
  • Missing RunParameters.xml for non-legacy run folders
Parameters
run_folderrun folder path
last_cyclelast cycle of run
thread_countnumber of threads to use for network loading Read binary metrics from the run folder

This function ignores:

  • Missing InterOp files
  • Incomplete InterOp files
  • Missing RunParameters.xml for non-legacy run folders
Parameters
run_folderrun folder path
last_cyclelast cycle of run
valid_to_loadboolean vector indicating which files to load
thread_countnumber of threads to use for network loading
skip_loadedskip metrics that are already loaded Write binary metrics to the run folder
run_folderrun folder path
use_outuse the copied version Read a single metric set from a binary buffer
groupmetric set to write
bufferbinary buffer
buffer_sizesize of binary buffer Write a single metric set to a binary buffer
groupmetric set to write
bufferbinary buffer
buffer_sizesize of binary buffer Calculate the required size of the buffer for writing
groupmetric set to write
Returns
required size of the binary buffer Validate whether the RunInfo.xml matches the InterOp files
Exceptions
invalid_run_info_exception
invalid_run_info_cycle_exceptionValidate whether the RunInfo.xml matches the InterOp files
invalid_run_info_exception

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