tof_dataclasses::series

Trait MoniSeries

Source
pub trait MoniSeries<T>
where T: Copy + MoniData,
{ // Required methods fn get_data(&self) -> &HashMap<u8, VecDeque<T>>; fn get_data_mut(&mut self) -> &mut HashMap<u8, VecDeque<T>>; fn get_max_size(&self) -> usize; // Provided methods fn get_var(&self, varname: &str) -> HashMap<u8, Vec<f32>> { ... } fn get_var_for_board(&self, varname: &str, rb_id: &u8) -> Option<Vec<f32>> { ... } fn keys() -> Vec<&'static str> { ... } fn get_board_ids(&self) -> Vec<u8> { ... } fn add(&mut self, data: T) { ... } fn get_last_moni(&self, board_id: u8) -> Option<T> { ... } }
Expand description

A MoniSeries is a collection of (primarily) monitoring data, which comes from multiple senders. E.g. a MoniSeries could hold RBMoniData from all 40 ReadoutBoards.

Required Methods§

Source

fn get_data(&self) -> &HashMap<u8, VecDeque<T>>

Source

fn get_data_mut(&mut self) -> &mut HashMap<u8, VecDeque<T>>

Source

fn get_max_size(&self) -> usize

Provided Methods§

Source

fn get_var(&self, varname: &str) -> HashMap<u8, Vec<f32>>

A HashMap of -> rbid, Vec<var>

Source

fn get_var_for_board(&self, varname: &str, rb_id: &u8) -> Option<Vec<f32>>

Get a certain variable, but only for a single board

Source

fn keys() -> Vec<&'static str>

A list of the variables in this MoniSeries

Source

fn get_board_ids(&self) -> Vec<u8>

A list of boards in this series

Source

fn add(&mut self, data: T)

Add another instance of the data container to the series

Source

fn get_last_moni(&self, board_id: u8) -> Option<T>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§