LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "InputFileCatalog.h"
Classes | |
struct | Config |
Public Member Functions | |
InputFileCatalog (fhicl::TableFragment< Config > const &config) | |
virtual | ~InputFileCatalog ()=default |
std::vector< FileCatalogItem > const & | fileCatalogItems () const |
FileCatalogItem const & | currentFile () const |
size_t | currentIndex () const |
bool | getNextFile (int attempts=5) |
bool | hasNextFile (int attempts=5) |
void | rewind () |
void | rewindTo (size_t index) |
bool | isSearchable () |
bool | empty () const |
void | finish () |
std::vector< std::string > const & | fileSources () const |
void | commitCatalog () |
std::string & | url () |
std::string const & | url () const |
void | setActive () |
bool | active () const |
Static Public Member Functions | |
static bool | isPhysical (std::string const &name) |
Static Public Attributes | |
static constexpr size_t | indexEnd {std::numeric_limits<size_t>::max()} |
Private Member Functions | |
bool | retrieveNextFile (FileCatalogItem &item, int attempts, bool transferOnly=false) |
FileCatalogStatus | retrieveNextFileFromCacheOrService (FileCatalogItem &item) |
FileCatalogStatus | transferNextFile (FileCatalogItem &item) |
Private Attributes | |
std::vector< std::string > | fileSources_ |
std::vector< FileCatalogItem > | fileCatalogItems_ {{}} |
FileCatalogItem | nextItem_ {} |
size_t | fileIdx_ {indexEnd} |
size_t | maxIdx_ {} |
bool | searchable_ {false} |
bool | nextFileProbed_ {false} |
bool | hasNextFile_ {false} |
ServiceHandle< CatalogInterface > | ci_ |
ServiceHandle< FileTransfer > | ft_ |
Definition at line 33 of file InputFileCatalog.h.
|
explicit |
Definition at line 19 of file InputFileCatalog.cc.
References art::errors::CatalogServiceError, ci_, fileCatalogItems_, fileSources_, and searchable_.
|
virtualdefault |
|
inlineinherited |
Definition at line 113 of file FileCatalog.h.
|
inlineinherited |
Definition at line 90 of file FileCatalog.h.
FileCatalogItem const & art::InputFileCatalog::currentFile | ( | ) | const |
Definition at line 40 of file InputFileCatalog.cc.
References fileCatalogItems_, fileIdx_, indexEnd, art::errors::LogicError, and maxIdx_.
Referenced by finish(), and art::RootInputFileSequence::initFile().
size_t art::InputFileCatalog::currentIndex | ( | ) | const |
Definition at line 52 of file InputFileCatalog.cc.
References fileIdx_.
Referenced by art::RootInputFileSequence::initFile(), and art::RootInputFileSequence::previousFile().
|
inline |
Definition at line 58 of file InputFileCatalog.h.
|
inline |
Definition at line 42 of file InputFileCatalog.h.
Referenced by art::RootInputFileSequence::fileCatalogItems().
|
inline |
Definition at line 64 of file InputFileCatalog.h.
Referenced by art::RootInputFileSequence::RootInputFileSequence().
void art::InputFileCatalog::finish | ( | ) |
Definition at line 256 of file InputFileCatalog.cc.
References ci_, art::CONSUMED, currentFile(), fileCatalogItems_, fileIdx_, and indexEnd.
Referenced by art::RootInputFileSequence::closeFile_(), and retrieveNextFile().
bool art::InputFileCatalog::getNextFile | ( | int | attempts = 5 | ) |
Definition at line 58 of file InputFileCatalog.cc.
References fileCatalogItems_, fileIdx_, hasNextFile_, indexEnd, maxIdx_, nextFileProbed_, nextItem_, retrieveNextFile(), and searchable_.
Referenced by art::RootInputFileSequence::nextFile(), art::RootInputFileSequence::readIt(), art::RootInputFileSequence::RootInputFileSequence(), and art::RootInputFileSequence::seekToEvent().
bool art::InputFileCatalog::hasNextFile | ( | int | attempts = 5 | ) |
Definition at line 88 of file InputFileCatalog.cc.
References hasNextFile_, nextFileProbed_, nextItem_, and retrieveNextFile().
Referenced by art::RootInputFileSequence::getNextItemType().
|
inlinestaticinherited |
Definition at line 93 of file FileCatalog.h.
Referenced by transferNextFile().
|
inline |
Definition at line 53 of file InputFileCatalog.h.
Referenced by art::RootInputFileSequence::previousFile(), art::RootInputFileSequence::readIt(), art::RootInputFileSequence::rewind_(), and art::RootInputFileSequence::seekToEvent().
|
private |
Definition at line 103 of file InputFileCatalog.cc.
References ci_, art::errors::Configuration, art::DELIVERY_ERROR, finish(), art::NO_MORE_FILES, retrieveNextFileFromCacheOrService(), art::SKIPPED, art::SUCCESS, art::TRANSFER_ERROR, transferNextFile(), art::TRANSFERRED, and art::FileCatalogItem::uri().
Referenced by getNextFile(), and hasNextFile().
|
private |
Definition at line 160 of file InputFileCatalog.cc.
References ci_, art::DELIVERY_ERROR, fileCatalogItems_, fileIdx_, maxIdx_, art::NO_MORE_FILES, art::SUCCESS, and transferNextFile().
Referenced by retrieveNextFile().
void art::InputFileCatalog::rewind | ( | ) |
Definition at line 224 of file InputFileCatalog.cc.
References fileIdx_, art::errors::LogicError, and searchable_.
Referenced by art::RootInputFileSequence::rewind_().
void art::InputFileCatalog::rewindTo | ( | size_t | index | ) |
Definition at line 235 of file InputFileCatalog.cc.
References fileIdx_, art::errors::InvalidNumber, art::errors::LogicError, maxIdx_, and searchable_.
Referenced by art::RootInputFileSequence::previousFile(), art::RootInputFileSequence::readIt(), and art::RootInputFileSequence::seekToEvent().
|
inlineinherited |
Definition at line 108 of file FileCatalog.h.
|
private |
Definition at line 188 of file InputFileCatalog.cc.
References art::errors::Configuration, art::FileCatalogItem::fileName(), ft_, art::FileCatalog::isPhysical(), art::FileCatalogItem::logicalFileName(), art::FileCatalogItem::skip(), art::SUCCESS, art::TRANSFER_ERROR, and art::FileCatalogItem::uri().
Referenced by retrieveNextFile(), and retrieveNextFileFromCacheOrService().
|
inlineinherited |
Definition at line 98 of file FileCatalog.h.
Referenced by art::RootInputFileSequence::initFile().
|
inlineinherited |
Definition at line 103 of file FileCatalog.h.
|
private |
Definition at line 87 of file InputFileCatalog.h.
Referenced by finish(), InputFileCatalog(), retrieveNextFile(), and retrieveNextFileFromCacheOrService().
|
private |
Definition at line 79 of file InputFileCatalog.h.
Referenced by currentFile(), finish(), getNextFile(), InputFileCatalog(), and retrieveNextFileFromCacheOrService().
|
private |
Definition at line 81 of file InputFileCatalog.h.
Referenced by currentFile(), currentIndex(), finish(), getNextFile(), retrieveNextFileFromCacheOrService(), rewind(), and rewindTo().
|
private |
Definition at line 78 of file InputFileCatalog.h.
Referenced by InputFileCatalog().
|
private |
Definition at line 88 of file InputFileCatalog.h.
Referenced by transferNextFile().
|
private |
Definition at line 85 of file InputFileCatalog.h.
Referenced by getNextFile(), and hasNextFile().
|
static |
Definition at line 69 of file InputFileCatalog.h.
Referenced by currentFile(), finish(), getNextFile(), art::RootInputFileSequence::initFile(), and art::RootInputFileSequence::previousFile().
|
private |
Definition at line 82 of file InputFileCatalog.h.
Referenced by currentFile(), getNextFile(), retrieveNextFileFromCacheOrService(), and rewindTo().
|
private |
Definition at line 84 of file InputFileCatalog.h.
Referenced by getNextFile(), and hasNextFile().
|
private |
Definition at line 80 of file InputFileCatalog.h.
Referenced by getNextFile(), and hasNextFile().
|
private |
Definition at line 83 of file InputFileCatalog.h.
Referenced by getNextFile(), InputFileCatalog(), rewind(), and rewindTo().