pub struct ReadNTuples { /* private fields */ }
Implementations
sourceimpl ReadNTuples
impl ReadNTuples
sourcepub fn open<P: AsRef<Path>>(filename: P) -> Option<ReadNTuples>
pub fn open<P: AsRef<Path>>(filename: P) -> Option<ReadNTuples>
This function opens an existing ntuple file filename for reading and returns a pointer to a corresponding ntuple struct. The ntuples in the file must have size size. A pointer to memory for the current ntuple row ntuple_data must be supplied—this is used to copy ntuples in and out of the file.
sourceimpl ReadNTuples
impl ReadNTuples
sourcepub fn project<T: Sized, V: Fn(&T) -> f64, S: Fn(&T) -> bool>(
&self,
h: &mut Histogram,
value_func: V,
select_func: S
) -> Value
pub fn project<T: Sized, V: Fn(&T) -> f64, S: Fn(&T) -> bool>(
&self,
h: &mut Histogram,
value_func: V,
select_func: S
) -> Value
This function updates the histogram h
from the ntuple ntuple
using the functions
value_func
and select_func
. For each ntuple row where the selection function
select_func
is non-zero the corresponding value of that row is computed using the function
value_func
and added to the histogram. Those ntuple rows where select_func
returns
false
are ignored. New entries are added to the histogram, so subsequent calls can be used
to accumulate further data in the same histogram.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ReadNTuples
impl !Send for ReadNTuples
impl !Sync for ReadNTuples
impl Unpin for ReadNTuples
impl UnwindSafe for ReadNTuples
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more