LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "FileIndex.h"
Classes | |
struct | Element |
struct | Transients |
Public Types | |
enum | EntryType { kRun, kSubRun, kEvent, kEnd } |
enum | SortState { kNotSorted, kSorted_Run_SubRun_Event, kSorted_Run_SubRun_EventEntry } |
using | EntryNumber_t = long long |
using | const_iterator = std::vector< Element >::const_iterator |
using | iterator = std::vector< Element >::iterator |
Public Member Functions | |
void | addEntry (EventID const &eID, EntryNumber_t entry) |
void | addEntryOnLoad (EventID const &eID, EntryNumber_t entry) |
void | sortBy_Run_SubRun_Event () |
void | sortBy_Run_SubRun_EventEntry () |
const_iterator | findPosition (EventID const &eID) const |
const_iterator | findPosition (EventID const &eID, bool exact) const |
const_iterator | findPosition (SubRunID const &srID, bool exact) const |
const_iterator | findPosition (RunID const &rID, bool exact) const |
const_iterator | findSubRunOrRunPosition (SubRunID const &srID) const |
bool | contains (EventID const &id, bool exact) const |
bool | contains (SubRunID const &id, bool exact) const |
bool | contains (RunID const &id, bool exact) const |
iterator | begin () |
const_iterator | begin () const |
const_iterator | cbegin () const |
iterator | end () |
const_iterator | end () const |
const_iterator | cend () const |
std::vector< Element >::size_type | size () const |
bool | empty () const |
bool | allEventsInEntryOrder () const |
bool | eventsUniqueAndOrdered () const |
void | print_event_list (std::ostream &os) const |
Private Member Functions | |
bool & | allInEntryOrder () const |
bool & | resultCached () const |
SortState & | sortState () const |
const_iterator | findEventForUnspecifiedSubRun (EventID const &eID, bool exact) const |
Private Attributes | |
std::vector< Element > | entries_ {} |
Transient< Transients > | transients_ {} |
Friends | |
bool | operator== (FileIndex const &, FileIndex const &) |
Definition at line 39 of file FileIndex.h.
using art::FileIndex::const_iterator = std::vector<Element>::const_iterator |
Definition at line 63 of file FileIndex.h.
using art::FileIndex::EntryNumber_t = long long |
Definition at line 41 of file FileIndex.h.
using art::FileIndex::iterator = std::vector<Element>::iterator |
Definition at line 64 of file FileIndex.h.
Enumerator | |
---|---|
kRun | |
kSubRun | |
kEvent | |
kEnd |
Definition at line 43 of file FileIndex.h.
Enumerator | |
---|---|
kNotSorted | |
kSorted_Run_SubRun_Event | |
kSorted_Run_SubRun_EventEntry |
Definition at line 66 of file FileIndex.h.
void art::FileIndex::addEntry | ( | EventID const & | eID, |
EntryNumber_t | entry | ||
) |
Definition at line 134 of file FileIndex.cc.
References entries_, kNotSorted, resultCached(), and sortState().
void art::FileIndex::addEntryOnLoad | ( | EventID const & | eID, |
EntryNumber_t | entry | ||
) |
bool art::FileIndex::allEventsInEntryOrder | ( | ) | const |
Definition at line 165 of file FileIndex.cc.
References allInEntryOrder(), e, entries_, art::FileIndex::Element::invalid, kEvent, and resultCached().
|
private |
Definition at line 98 of file FileIndex.cc.
References transients_.
Referenced by allEventsInEntryOrder().
FileIndex::iterator art::FileIndex::begin | ( | ) |
FileIndex::const_iterator art::FileIndex::begin | ( | ) | const |
FileIndex::const_iterator art::FileIndex::cbegin | ( | ) | const |
Definition at line 62 of file FileIndex.cc.
References entries_.
Referenced by eventsUniqueAndOrdered().
FileIndex::const_iterator art::FileIndex::cend | ( | ) | const |
Definition at line 80 of file FileIndex.cc.
References entries_.
Referenced by eventsUniqueAndOrdered().
bool art::FileIndex::contains | ( | EventID const & | id, |
bool | exact | ||
) | const |
Definition at line 116 of file FileIndex.cc.
References entries_, and findPosition().
bool art::FileIndex::contains | ( | SubRunID const & | id, |
bool | exact | ||
) | const |
Definition at line 122 of file FileIndex.cc.
References entries_, and findPosition().
bool art::FileIndex::contains | ( | RunID const & | id, |
bool | exact | ||
) | const |
Definition at line 128 of file FileIndex.cc.
References entries_, and findPosition().
bool art::FileIndex::empty | ( | ) | const |
FileIndex::iterator art::FileIndex::end | ( | void | ) |
FileIndex::const_iterator art::FileIndex::end | ( | void | ) | const |
bool art::FileIndex::eventsUniqueAndOrdered | ( | ) | const |
Definition at line 186 of file FileIndex.cc.
References cbegin(), cend(), and kEvent.
|
private |
Definition at line 347 of file FileIndex.cc.
References entries_, art::EventID::event(), findPosition(), art::EventID::firstEvent(), art::SubRunID::firstSubRun(), art::SubRunID::isValid(), art::SubRunID::next(), and art::EventID::runID().
Referenced by findPosition().
FileIndex::const_iterator art::FileIndex::findPosition | ( | EventID const & | eID | ) | const |
Definition at line 227 of file FileIndex.cc.
References entries_, kSorted_Run_SubRun_Event, and sortState().
Referenced by contains(), findEventForUnspecifiedSubRun(), findPosition(), findSubRunOrRunPosition(), and art::MixHelper::mixAndPut().
FileIndex::const_iterator art::FileIndex::findPosition | ( | EventID const & | eID, |
bool | exact | ||
) | const |
Definition at line 235 of file FileIndex.cc.
References entries_, findEventForUnspecifiedSubRun(), findPosition(), kEvent, kSorted_Run_SubRun_Event, and sortState().
FileIndex::const_iterator art::FileIndex::findPosition | ( | SubRunID const & | srID, |
bool | exact | ||
) | const |
Definition at line 256 of file FileIndex.cc.
References entries_, findPosition(), art::EventID::invalidEvent(), kNotSorted, kSorted_Run_SubRun_EventEntry, kSubRun, and sortState().
FileIndex::const_iterator art::FileIndex::findPosition | ( | RunID const & | rID, |
bool | exact | ||
) | const |
Definition at line 281 of file FileIndex.cc.
References entries_, findPosition(), art::EventID::invalidEvent(), kNotSorted, kRun, kSorted_Run_SubRun_EventEntry, and sortState().
FileIndex::const_iterator art::FileIndex::findSubRunOrRunPosition | ( | SubRunID const & | srID | ) | const |
Definition at line 306 of file FileIndex.cc.
References entries_, findPosition(), art::EventID::invalidEvent(), kNotSorted, kRun, kSorted_Run_SubRun_EventEntry, kSubRun, and sortState().
void art::FileIndex::print_event_list | ( | std::ostream & | os | ) | const |
Definition at line 325 of file FileIndex.cc.
|
private |
Definition at line 104 of file FileIndex.cc.
References transients_.
Referenced by addEntry(), addEntryOnLoad(), allEventsInEntryOrder(), sortBy_Run_SubRun_Event(), and sortBy_Run_SubRun_EventEntry().
std::vector< FileIndex::Element >::size_type art::FileIndex::size | ( | void | ) | const |
void art::FileIndex::sortBy_Run_SubRun_Event | ( | ) |
Definition at line 149 of file FileIndex.cc.
References entries_, kSorted_Run_SubRun_Event, resultCached(), and sortState().
void art::FileIndex::sortBy_Run_SubRun_EventEntry | ( | ) |
Definition at line 157 of file FileIndex.cc.
References entries_, kSorted_Run_SubRun_EventEntry, resultCached(), and sortState().
|
private |
Definition at line 110 of file FileIndex.cc.
References transients_.
Referenced by addEntry(), findPosition(), findSubRunOrRunPosition(), sortBy_Run_SubRun_Event(), and sortBy_Run_SubRun_EventEntry().
Definition at line 451 of file FileIndex.cc.
|
private |
Definition at line 126 of file FileIndex.h.
Referenced by addEntry(), addEntryOnLoad(), allEventsInEntryOrder(), begin(), cbegin(), cend(), contains(), empty(), end(), findEventForUnspecifiedSubRun(), findPosition(), findSubRunOrRunPosition(), art::operator==(), print_event_list(), size(), sortBy_Run_SubRun_Event(), and sortBy_Run_SubRun_EventEntry().
|
mutableprivate |
Definition at line 127 of file FileIndex.h.
Referenced by allInEntryOrder(), resultCached(), and sortState().