LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "RangeSet.h"
Public Types | |
using | const_iterator = std::vector< EventRange >::const_iterator |
Public Member Functions | |
~RangeSet () | |
RangeSet (RunNumber_t) | |
RangeSet (RunNumber_t, std::vector< EventRange > const &eventRanges) | |
RangeSet (RangeSet const &) | |
RangeSet (RangeSet &&) | |
RangeSet & | operator= (RangeSet const &) |
RangeSet & | operator= (RangeSet &&) |
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 |
const_iterator | begin () const |
const_iterator | end () const |
std::size_t | begin_idx () const |
std::size_t | end_idx () const |
unsigned | checksum () const |
std::size_t | next_subrun_or_end (std::size_t const b) const |
EventRange & | front () |
EventRange & | back () |
EventRange & | at (std::size_t) |
std::vector< EventRange > | extract_ranges (std::size_t const b, std::size_t const e) |
void | assign_ranges (RangeSet const &rs, std::size_t const b, std::size_t const e) |
void | update (EventID const &) |
template<typename... ARGS> | |
void | emplace_range (ARGS &&...) |
RangeSet & | collapse () |
RangeSet & | merge (RangeSet const &other) |
std::pair< std::size_t, 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 constexpr unsigned | invalidChecksum () |
static RangeSet | invalid () |
static RangeSet | forRun (RunID) |
static RangeSet | forSubRun (SubRunID) |
Private Member Functions | |
RangeSet () | |
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 25 of file RangeSet.h.
using art::RangeSet::const_iterator = std::vector<EventRange>::const_iterator |
Definition at line 27 of file RangeSet.h.
|
default |
|
explicit |
Definition at line 71 of file RangeSet.cc.
References r.
|
explicit |
|
default |
|
default |
|
explicitprivatedefault |
void art::RangeSet::assign_ranges | ( | RangeSet const & | rs, |
std::size_t const | b, | ||
std::size_t const | e | ||
) |
EventRange & art::RangeSet::at | ( | std::size_t | ) |
Definition at line 246 of file RangeSet.cc.
References ranges_.
Referenced by art::ClosedRangeSetHandler::do_update().
EventRange & art::RangeSet::back | ( | ) |
Definition at line 240 of file RangeSet.cc.
References ranges_.
Referenced by collapse(), and update().
RangeSet::const_iterator art::RangeSet::begin | ( | ) | const |
size_t art::RangeSet::begin_idx | ( | ) | const |
Definition at line 189 of file RangeSet.cc.
Referenced by art::ClosedRangeSetHandler::begin_idx(), and art::OpenRangeSetHandler::do_getSeenRanges().
unsigned art::RangeSet::checksum | ( | ) | const |
void art::RangeSet::clear | ( | ) |
Definition at line 384 of file RangeSet.cc.
References ranges_.
Referenced by art::OpenRangeSetHandler::do_rebase().
RangeSet & art::RangeSet::collapse | ( | ) |
Definition at line 262 of file RangeSet.cc.
References back(), e, art::EventRange::is_adjacent(), is_sorted(), isCollapsed_, art::errors::LogicError, art::EventRange::merge(), r, ranges_, run_, std::swap(), and art::throw_if_not_disjoint().
Referenced by art::disjoint_ranges(), merge(), art::Run::put(), art::SubRun::put(), and RangeSet().
bool art::RangeSet::contains | ( | RunNumber_t | r, |
SubRunNumber_t | s, | ||
EventNumber_t | e | ||
) | const |
Definition at line 101 of file RangeSet.cc.
void art::RangeSet::emplace_range | ( | ARGS && | ... | ) |
void art::RangeSet::emplace_range | ( | ARGS &&... | args | ) |
Definition at line 120 of file RangeSet.h.
References art::disjoint_ranges(), art::left(), art::detail::operator<<(), art::detail::operator==(), art::overlapping_ranges(), r, art::right(), art::same_ranges(), and art::throw_if_not_disjoint().
bool art::RangeSet::empty | ( | ) | const |
Definition at line 179 of file RangeSet.cc.
References ranges_.
Referenced by art::disjoint_ranges().
RangeSet::const_iterator art::RangeSet::end | ( | void | ) | const |
size_t art::RangeSet::end_idx | ( | ) | const |
Definition at line 195 of file RangeSet.cc.
References ranges_.
Referenced by art::OpenRangeSetHandler::do_rebase(), art::OpenRangeSetHandler::do_update(), art::ClosedRangeSetHandler::end_idx(), and next_subrun_or_end().
vector< EventRange > art::RangeSet::extract_ranges | ( | std::size_t const | b, |
std::size_t const | e | ||
) |
Definition at line 51 of file RangeSet.cc.
References art::detail::full_run_event_range(), and art::RunID::run().
Referenced by art::detail::Producer::doBeginRun(), art::ProducingService::doPostReadRun(), art::Run::put(), and art::rangeSetFor().
Definition at line 57 of file RangeSet.cc.
References art::SubRunID::run(), and art::SubRunID::subRun().
Referenced by art::detail::Producer::doBeginSubRun(), art::ProducingService::doPostReadSubRun(), art::SubRun::put(), and art::rangeSetFor().
EventRange & art::RangeSet::front | ( | ) |
bool art::RangeSet::has_disjoint_ranges | ( | ) | const |
Definition at line 167 of file RangeSet.cc.
References is_sorted(), isCollapsed_, ranges_, and tmp.
Referenced by art::disjoint_ranges().
|
static |
Definition at line 45 of file RangeSet.cc.
Referenced by art::ProductInserter::commitProducts(), art::OutputHandle::invalid(), art::ProductInserter::put(), art::Principal::put(), art::put_product_in_principal(), art::Group::removeCachedProduct(), art::EventProcessor::setRunAuxiliaryRangeSetID(), and art::EventProcessor::setSubRunAuxiliaryRangeSetID().
|
inlinestatic |
Definition at line 31 of file RangeSet.h.
References util::begin(), clear(), e, util::empty(), util::end(), art::is_valid(), fhicl::other, and r.
bool art::RangeSet::is_collapsed | ( | ) | const |
bool art::RangeSet::is_full_run | ( | ) | const |
Definition at line 123 of file RangeSet.cc.
References art::detail::full_run_event_range(), and ranges_.
Referenced by art::operator<<(), art::Run::put(), and require_not_full_run().
bool art::RangeSet::is_full_subRun | ( | ) | const |
bool art::RangeSet::is_sorted | ( | ) | const |
Definition at line 136 of file RangeSet.cc.
References ranges_.
Referenced by collapse(), and has_disjoint_ranges().
bool art::RangeSet::is_valid | ( | ) | const |
Definition at line 117 of file RangeSet.cc.
References run_.
Referenced by art::disjoint_ranges(), art::SummedValue< T >::isValid(), merge(), art::operator==(), art::overlapping_ranges(), art::put_product_in_principal(), and art::SummedValue< sumdata::POTSummary >::update_impl().
Definition at line 295 of file RangeSet.cc.
References collapse(), is_valid(), isCollapsed_, ranges_, run(), run_, and std::swap().
Referenced by art::SummedValue< sumdata::POTSummary >::update_impl().
size_t art::RangeSet::next_subrun_or_end | ( | std::size_t const | b | ) | const |
Definition at line 220 of file RangeSet.cc.
References end_idx(), and ranges_.
Referenced by art::ClosedRangeSetHandler::do_update().
vector< EventRange > const & art::RangeSet::ranges | ( | ) | const |
Definition at line 95 of file RangeSet.cc.
References ranges_.
Referenced by art::disjoint_ranges(), art::operator<<(), and art::operator==().
|
private |
Definition at line 390 of file RangeSet.cc.
References is_full_run(), and art::errors::LogicError.
Referenced by assign_ranges(), split_range(), and update().
RunNumber_t art::RangeSet::run | ( | ) | const |
Definition at line 89 of file RangeSet.cc.
References run_.
Referenced by art::disjoint_ranges(), art::OpenRangeSetHandler::do_getSeenRanges(), art::ClosedRangeSetHandler::do_getSeenRanges(), art::ClosedRangeSetHandler::do_rebase(), merge(), art::operator<<(), art::operator==(), and art::SummedValue< sumdata::POTSummary >::update_impl().
void art::RangeSet::set_run | ( | RunNumber_t const | r | ) |
Definition at line 372 of file RangeSet.cc.
void art::RangeSet::sort | ( | void | ) |
pair< std::size_t, bool > art::RangeSet::split_range | ( | SubRunNumber_t | s, |
EventNumber_t | e | ||
) |
Definition at line 345 of file RangeSet.cc.
References begin(), e, end(), r, ranges_, require_not_full_run(), art::right(), and std::swap().
Referenced by art::ClosedRangeSetHandler::do_maybeSplitRange().
string art::RangeSet::to_compact_string | ( | ) | const |
Definition at line 148 of file RangeSet.cc.
References r, ranges_, run_, and art::to_string().
Referenced by checksum().
void art::RangeSet::update | ( | EventID const & | id | ) |
Definition at line 326 of file RangeSet.cc.
References back(), art::EventRange::end(), ranges_, require_not_full_run(), run_, art::EventRange::set_end(), and art::EventRange::subRun().
Referenced by art::OpenRangeSetHandler::do_update().
|
mutableprivate |
Definition at line 115 of file RangeSet.h.
Referenced by checksum().
|
private |
Definition at line 114 of file RangeSet.h.
Referenced by collapse(), has_disjoint_ranges(), is_collapsed(), and merge().
|
private |
Definition at line 111 of file RangeSet.h.
Referenced by assign_ranges(), at(), back(), begin(), clear(), collapse(), contains(), empty(), end(), end_idx(), extract_ranges(), front(), has_disjoint_ranges(), is_full_run(), is_full_subRun(), is_sorted(), merge(), next_subrun_or_end(), ranges(), RangeSet(), sort(), split_range(), to_compact_string(), and update().
|
private |
Definition at line 110 of file RangeSet.h.
Referenced by collapse(), contains(), is_valid(), merge(), run(), set_run(), to_compact_string(), and update().