LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "RangeSet.h"
Public Types | |
using | const_iterator = std::vector< EventRange >::const_iterator |
Public Member Functions | |
RangeSet (RunNumber_t) | |
RangeSet (RunNumber_t, std::vector< EventRange > const &eventRanges) | |
RunNumber_t | run () const |
std::vector< EventRange > const & | ranges () const |
bool | contains (RunNumber_t, SubRunNumber_t, EventNumber_t) const |
bool | is_valid () const |
bool | is_full_run () const |
bool | is_full_subRun () const |
bool | is_sorted () const |
bool | is_collapsed () const |
std::string | to_compact_string () const |
bool | has_disjoint_ranges () const |
bool | empty () const |
auto | begin () const |
auto | end () const |
unsigned | checksum () const |
decltype(auto) | front () |
decltype(auto) | back () |
void | assign_ranges (const_iterator b, const_iterator e) |
void | update (EventID const &) |
template<typename... ARGS> | |
void | emplace_range (ARGS &&...) |
RangeSet & | collapse () |
RangeSet & | merge (RangeSet const &other) |
std::pair< const_iterator, bool > | split_range (SubRunNumber_t, EventNumber_t) |
void | set_run (RunNumber_t const r) |
void | sort () |
void | clear () |
template<typename... ARGS> | |
void | emplace_range (ARGS &&...args) |
Static Public Member Functions | |
static RangeSet | invalid () |
static RangeSet | forRun (RunID) |
static RangeSet | forSubRun (SubRunID) |
static constexpr unsigned | invalidChecksum () |
Private Member Functions | |
RangeSet ()=default | |
void | require_not_full_run () |
Private Attributes | |
RunNumber_t | run_ {IDNumber<Level::Run>::invalid()} |
std::vector< EventRange > | ranges_ {} |
bool | isCollapsed_ {false} |
unsigned | checksum_ {invalidChecksum()} |
Definition at line 24 of file RangeSet.h.
using art::RangeSet::const_iterator = std::vector<EventRange>::const_iterator |
Definition at line 33 of file RangeSet.h.
|
explicit |
Definition at line 63 of file RangeSet.cc.
|
explicit |
|
explicitprivatedefault |
void RangeSet::assign_ranges | ( | const_iterator | b, |
const_iterator | e | ||
) |
|
inline |
Definition at line 88 of file RangeSet.h.
References e, and fhicl::other.
Referenced by collapse(), and update().
|
inline |
Definition at line 70 of file RangeSet.h.
Referenced by art::ClosedRangeSetHandler::begin(), art::OpenRangeSetHandler::do_getSeenRanges(), split_range(), and to_compact_string().
unsigned RangeSet::checksum | ( | ) | const |
|
inline |
RangeSet & RangeSet::collapse | ( | ) |
Definition at line 74 of file RangeSet.cc.
References back(), e, is_sorted(), isCollapsed_, art::errors::LogicError, ranges_, run_, and art::throw_if_not_disjoint().
Referenced by art::disjoint_ranges(), merge(), art::Run::put(), art::SubRun::put(), and RangeSet().
bool RangeSet::contains | ( | RunNumber_t | r, |
SubRunNumber_t | s, | ||
EventNumber_t | e | ||
) | const |
void art::RangeSet::emplace_range | ( | ARGS && | ... | ) |
void art::RangeSet::emplace_range | ( | ARGS &&... | args | ) |
Definition at line 173 of file RangeSet.h.
bool RangeSet::empty | ( | void | ) | const |
Definition at line 204 of file RangeSet.cc.
References ranges_.
Referenced by art::disjoint_ranges().
|
inline |
Definition at line 75 of file RangeSet.h.
Referenced by art::OpenRangeSetHandler::do_rebase(), art::OpenRangeSetHandler::do_update(), art::ClosedRangeSetHandler::end(), split_range(), and to_compact_string().
Definition at line 52 of file RangeSet.cc.
References art::detail::full_run_event_range(), and art::RunID::run().
Referenced by art::EDProducer::doBeginRun(), art::EDFilter::doBeginRun(), art::ProducingService::doPostReadRun(), art::RootDelayedReader::getProduct_(), art::detail::makeFullRangeSet< InRun, RunID >(), art::Run::put(), and art::rangeSetFor().
Definition at line 58 of file RangeSet.cc.
References art::EventRange::forSubRun(), art::SubRunID::run(), and art::SubRunID::subRun().
Referenced by art::EDProducer::doBeginSubRun(), art::EDFilter::doBeginSubRun(), art::ProducingService::doPostReadSubRun(), art::RootDelayedReader::getProduct_(), art::detail::makeFullRangeSet< InSubRun, SubRunID >(), art::SubRun::put(), and art::rangeSetFor().
|
inline |
Definition at line 83 of file RangeSet.h.
bool RangeSet::has_disjoint_ranges | ( | ) | const |
Definition at line 191 of file RangeSet.cc.
References is_sorted(), isCollapsed_, ranges_, and tmp.
Referenced by art::disjoint_ranges().
|
static |
Definition at line 46 of file RangeSet.cc.
Referenced by art::ResultsPrincipal::fillGroup(), art::RunPrincipal::fillGroup(), art::SubRunPrincipal::fillGroup(), art::EventPrincipal::fillGroup(), art::OutputHandle::invalid(), art::ResultsPrincipal::put(), art::Results::put(), art::EventPrincipal::put(), art::Event::put(), art::ResultsPrincipal::seenRanges(), and art::EventPrincipal::seenRanges().
|
inlinestatic |
Definition at line 126 of file RangeSet.h.
References max.
|
inline |
Definition at line 56 of file RangeSet.h.
bool RangeSet::is_full_run | ( | ) | const |
Definition at line 246 of file RangeSet.cc.
References art::detail::full_run_event_range(), and ranges_.
Referenced by is_valid(), art::operator<<(), and art::Run::put().
bool RangeSet::is_full_subRun | ( | ) | const |
bool RangeSet::is_sorted | ( | ) | const |
Definition at line 259 of file RangeSet.cc.
References ranges_.
Referenced by collapse(), and has_disjoint_ranges().
bool RangeSet::is_valid | ( | ) | const |
Definition at line 230 of file RangeSet.cc.
References is_full_run(), ranges_, and run_.
Referenced by art::RootOutputFile::fillBranches(), art::RootOutputFile::getProduct(), art::RootDelayedReader::getProduct_(), art::SummedValue< T >::isValid(), merge(), art::Run::put_(), art::SubRun::put_(), and art::SummedValue< T >::update_impl().
Definition at line 134 of file RangeSet.cc.
References collapse(), is_valid(), isCollapsed_, ranges_, run(), and run_.
Referenced by art::RootDelayedReader::getProduct_(), and art::SummedValue< T >::update_impl().
|
inline |
Definition at line 42 of file RangeSet.h.
References art::is_valid().
Referenced by art::disjoint_ranges(), art::operator<<(), and art::operator==().
|
inlineprivate |
Definition at line 135 of file RangeSet.h.
References art::errors::LogicError.
Referenced by assign_ranges(), split_range(), and update().
|
inline |
Definition at line 36 of file RangeSet.h.
Referenced by art::disjoint_ranges(), art::OpenRangeSetHandler::do_getSeenRanges(), art::ClosedRangeSetHandler::do_getSeenRanges(), art::ClosedRangeSetHandler::do_rebase(), merge(), art::operator<<(), art::operator==(), art::RootOutputFile::setRunAuxiliaryRangeSetID(), and art::RootOutputFile::setSubRunAuxiliaryRangeSetID().
|
inline |
Definition at line 108 of file RangeSet.h.
|
inline |
std::pair< RangeSet::const_iterator, bool > RangeSet::split_range | ( | SubRunNumber_t | s, |
EventNumber_t | e | ||
) |
Definition at line 156 of file RangeSet.cc.
References begin(), contains(), e, end(), ranges_, require_not_full_run(), art::right(), and s.
Referenced by art::ClosedRangeSetHandler::do_maybeSplitRange().
std::string RangeSet::to_compact_string | ( | ) | const |
Definition at line 265 of file RangeSet.cc.
References begin(), end(), ranges_, run_, s, and art::to_string().
Referenced by checksum().
void art::RangeSet::update | ( | EventID const & | id | ) |
Definition at line 117 of file RangeSet.cc.
References back(), ranges_, require_not_full_run(), and run_.
Referenced by art::OpenRangeSetHandler::do_update().
|
mutableprivate |
Definition at line 149 of file RangeSet.h.
Referenced by checksum().
|
private |
Definition at line 148 of file RangeSet.h.
Referenced by collapse(), has_disjoint_ranges(), and merge().
|
private |
Definition at line 145 of file RangeSet.h.
Referenced by assign_ranges(), collapse(), contains(), empty(), has_disjoint_ranges(), is_full_run(), is_full_subRun(), is_sorted(), is_valid(), merge(), RangeSet(), split_range(), to_compact_string(), and update().
|
private |
Definition at line 144 of file RangeSet.h.
Referenced by collapse(), contains(), is_valid(), merge(), to_compact_string(), and update().