pub struct RootSource { /* private fields */ }Expand description
Event source backed by one or more ROOT TTrees.
Implementations§
Source§impl RootSource
impl RootSource
Sourcepub fn open(pattern: impl AsRef<str>) -> LadduDataResult<Self>
pub fn open(pattern: impl AsRef<str>) -> LadduDataResult<Self>
Opens files matching a glob with default options.
§Errors
Returns LadduDataError when the glob is invalid or empty, a ROOT
file or tree cannot be read, or schemas are incompatible.
Sourcepub fn builder(pattern: impl AsRef<str>) -> RootSourceBuilder
pub fn builder(pattern: impl AsRef<str>) -> RootSourceBuilder
Creates a configurable source builder for a file glob.
Sourcepub fn tree_names(path: impl AsRef<Path>) -> LadduDataResult<Vec<Name>>
pub fn tree_names(path: impl AsRef<Path>) -> LadduDataResult<Vec<Name>>
Lists TTrees in one ROOT file.
§Errors
Returns LadduDataError when the ROOT file cannot be opened or read.
Sourcepub fn columns(
path: impl AsRef<Path>,
tree: Option<&str>,
) -> LadduDataResult<Vec<RootColumnInfo>>
pub fn columns( path: impl AsRef<Path>, tree: Option<&str>, ) -> LadduDataResult<Vec<RootColumnInfo>>
Lists branch metadata for a selected or first TTree.
§Errors
Returns LadduDataError when the file or tree cannot be read, no tree
exists, or branch metadata is invalid.
Trait Implementations§
Source§impl Clone for RootSource
impl Clone for RootSource
Source§fn clone(&self) -> RootSource
fn clone(&self) -> RootSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RootSource
impl Debug for RootSource
Source§impl EventSource for RootSource
impl EventSource for RootSource
Source§fn capabilities(&self) -> SourceCapabilities
fn capabilities(&self) -> SourceCapabilities
Returns optional source capabilities.
Source§fn num_events(&self) -> LadduDataResult<Option<u64>>
fn num_events(&self) -> LadduDataResult<Option<u64>>
Returns the exact event count when cheaply available. Read more
Source§fn batches(
&self,
plan: ReadPlan,
) -> LadduDataResult<Box<dyn Iterator<Item = LadduDataResult<EventBatch>> + Send>>
fn batches( &self, plan: ReadPlan, ) -> LadduDataResult<Box<dyn Iterator<Item = LadduDataResult<EventBatch>> + Send>>
Opens a batch iterator using
plan. Read moreSource§fn weighted_total(&self) -> LadduDataResult<Option<f64>>
fn weighted_total(&self) -> LadduDataResult<Option<f64>>
Returns the exact sum of event weights when cheaply available. Read more
Source§impl FragmentedSource for RootSource
impl FragmentedSource for RootSource
Source§type Key = RootFragmentKey
type Key = RootFragmentKey
Source-specific fragment key.
Source§fn fragments(&self) -> LadduDataResult<Vec<DataFragment<Self::Key>>>
fn fragments(&self) -> LadduDataResult<Vec<DataFragment<Self::Key>>>
Lists all fragments in global row order. Read more
Source§fn read_fragment_range(
&self,
key: &Self::Key,
local_start: usize,
local_len: usize,
chunk_size: Option<usize>,
) -> LadduDataResult<Box<dyn Iterator<Item = LadduDataResult<EventBatch>> + Send>>
fn read_fragment_range( &self, key: &Self::Key, local_start: usize, local_len: usize, chunk_size: Option<usize>, ) -> LadduDataResult<Box<dyn Iterator<Item = LadduDataResult<EventBatch>> + Send>>
Reads a contiguous range within one fragment. Read more
Auto Trait Implementations§
impl Freeze for RootSource
impl RefUnwindSafe for RootSource
impl Send for RootSource
impl Sync for RootSource
impl Unpin for RootSource
impl UnsafeUnpin for RootSource
impl UnwindSafe for RootSource
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.