LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "RootInput.h"
Classes | |
class | AccessState |
struct | Config |
Public Types | |
using | Parameters = fhicl::WrappedTable< Config, Config::KeysToIgnore > |
enum | ProcessingMode { Runs, RunsAndSubRuns, RunsSubRunsAndEvents } |
Public Member Functions | |
RootInput (Parameters const &, InputSourceDescription &) | |
template<typename T > | |
bool | seekToEvent (T eventSpec, bool exact=false) |
std::unique_ptr< EventPrincipal > | readEvent (EventID const &) override |
Read a specific event. More... | |
void | closeFile () override |
close current file More... | |
void | skipEvents (int offset) override |
void | rewind () override |
Begin again at the first event. More... | |
void | issueReports (EventID const &eventID) |
issue an event report More... | |
void | repeat_ () |
Reset the remaining number of events/subRuns to the maximum number. More... | |
int | maxEvents () const |
int | remainingEvents () const |
int | maxSubRuns () const |
int | remainingSubRuns () const |
void | doBeginJob () override |
Called by framework at beginning of job. More... | |
void | doEndJob () override |
Called by framework at end of job. More... | |
Timestamp const & | timestamp () const |
Accessor for the current time, as seen by the input source. More... | |
ProcessingMode | processingMode () const |
RunsSubRunsAndEvents (default), RunsAndSubRuns, or Runs. More... | |
auto const & | moduleDescription () const |
auto const & | processConfiguration () const |
Protected Member Functions | |
void | setTimestamp (Timestamp const &theTime) |
To set the current time, as seen by the input source. More... | |
input::ItemType | state () const |
cet::exempt_ptr< RunPrincipal > | runPrincipalExemptPtr () |
cet::exempt_ptr< SubRunPrincipal > | subRunPrincipalExemptPtr () |
std::unique_ptr< RunPrincipal > | runPrincipal () |
std::unique_ptr< SubRunPrincipal > | subRunPrincipal () |
std::unique_ptr< EventPrincipal > | eventPrincipal () |
void | setRunPrincipal (std::unique_ptr< RunPrincipal > &&rp) |
void | setSubRunPrincipal (std::unique_ptr< SubRunPrincipal > &&srp) |
void | setEventPrincipal (std::unique_ptr< EventPrincipal > &&ep) |
void | resetRunPrincipal () |
void | resetSubRunPrincipal () |
void | resetEventPrincipal () |
void | reset () |
Private Types | |
typedef input::EntryNumber | EntryNumber |
Private Member Functions | |
void | finish () override |
input::ItemType | nextItemType () override |
std::unique_ptr< EventPrincipal > | readEvent (cet::exempt_ptr< SubRunPrincipal const >) override |
std::unique_ptr< EventPrincipal > | readEvent_ () override |
std::unique_ptr< EventPrincipal > | readEvent_ (cet::exempt_ptr< SubRunPrincipal const >) |
std::unique_ptr< SubRunPrincipal > | readSubRun (cet::exempt_ptr< RunPrincipal const >) override |
Read next subRun. More... | |
std::unique_ptr< SubRunPrincipal > | readSubRun_ () override |
std::unique_ptr< RunPrincipal > | readRun () override |
Read next run. More... | |
std::unique_ptr< RunPrincipal > | readRun_ () override |
std::unique_ptr< FileBlock > | readFile () override |
Read next file. More... | |
std::unique_ptr< FileBlock > | readFile_ () override |
std::unique_ptr< RangeSetHandler > | runRangeSetHandler () override |
std::unique_ptr< RangeSetHandler > | subRunRangeSetHandler () override |
void | closeFile_ () override |
void | endJob () override |
input::ItemType | getNextItemType () override |
void | rewind_ () override |
template<typename T > | |
std::enable_if_t< std::is_convertible< T, off_t >::value, EventID > | postSeekChecks (EventID const &foundID, T eventSpec) |
template<typename T > | |
std::enable_if_t<!std::is_convertible< T, off_t >::value, EventID > | postSeekChecks (EventID const &foundID, T eventSpec) |
Private Attributes | |
InputFileCatalog | catalog_ |
std::unique_ptr< RootInputFileSequence > | primaryFileSequence_ |
AccessState | accessState_ |
Definition at line 26 of file RootInput.h.
|
private |
Definition at line 104 of file RootInput.h.
Definition at line 44 of file RootInput.h.
|
inherited |
Enumerator | |
---|---|
Runs | |
RunsAndSubRuns | |
RunsSubRunsAndEvents |
Definition at line 52 of file InputSource.h.
RootInput::RootInput | ( | RootInput::Parameters const & | config, |
InputSourceDescription & | desc | ||
) |
Definition at line 55 of file RootInput_source.cc.
References accessState_, catalog_, art::InputSourceDescription::moduleDescription, primaryFileSequence_, art::InputSource::processConfiguration(), and art::DecrepitRelicInputSourceImplementation::processingMode().
|
overridevirtualinherited |
close current file
Implements art::InputSource.
Definition at line 225 of file DecrepitRelicInputSourceImplementation.cc.
References art::DecrepitRelicInputSourceImplementation::closeFile_().
|
overrideprivatevirtual |
Reimplemented from art::DecrepitRelicInputSourceImplementation.
Definition at line 77 of file RootInput_source.cc.
References primaryFileSequence_.
|
overridevirtualinherited |
Called by framework at beginning of job.
Reimplemented from art::InputSource.
Definition at line 202 of file DecrepitRelicInputSourceImplementation.cc.
References art::DecrepitRelicInputSourceImplementation::beginJob().
Referenced by art::DecrepitRelicInputSourceImplementation::remainingSubRuns().
|
overridevirtualinherited |
Called by framework at end of job.
Reimplemented from art::InputSource.
Definition at line 208 of file DecrepitRelicInputSourceImplementation.cc.
References art::DecrepitRelicInputSourceImplementation::endJob().
Referenced by art::DecrepitRelicInputSourceImplementation::remainingSubRuns().
|
overrideprivatevirtual |
Reimplemented from art::DecrepitRelicInputSourceImplementation.
Definition at line 71 of file RootInput_source.cc.
References primaryFileSequence_.
|
inlineprotectedinherited |
Definition at line 248 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::eventPrincipal_, art::DecrepitRelicInputSourceImplementation::setEventPrincipal(), art::DecrepitRelicInputSourceImplementation::setRunPrincipal(), and art::DecrepitRelicInputSourceImplementation::setSubRunPrincipal().
Referenced by readEvent_().
|
overrideprivatevirtual |
Reimplemented from art::DecrepitRelicInputSourceImplementation.
Definition at line 97 of file RootInput_source.cc.
References primaryFileSequence_.
|
overrideprivatevirtual |
Implements art::DecrepitRelicInputSourceImplementation.
Definition at line 91 of file RootInput_source.cc.
References primaryFileSequence_.
|
inherited |
issue an event report
Definition at line 313 of file DecrepitRelicInputSourceImplementation.cc.
References art::DecrepitRelicInputSourceImplementation::readCount_.
Referenced by art::DecrepitRelicInputSourceImplementation::readEvent(), and art::DecrepitRelicInputSourceImplementation::rewind().
|
inlineinherited |
Accessor for maximum number of events to be read. -1 is used for unlimited.
Definition at line 153 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::maxEvents_.
|
inlineinherited |
Accessor for maximum number of subRuns to be read. -1 is used for unlimited.
Definition at line 169 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::maxSubRuns_.
|
inlineinherited |
Definition at line 59 of file InputSource.h.
Referenced by art::EmptyEvent::readRun_(), and art::EmptyEvent::readSubRun_().
|
overrideprivatevirtual |
Reimplemented from art::DecrepitRelicInputSourceImplementation.
Definition at line 103 of file RootInput_source.cc.
References accessState_, art::input::IsEvent, art::input::IsFile, art::input::IsRun, art::input::IsSubRun, art::errors::LogicError, art::DecrepitRelicInputSourceImplementation::nextItemType(), primaryFileSequence_, art::EventID::runID(), art::DecrepitRelicInputSourceImplementation::runPrincipalExemptPtr(), art::RootInput::AccessState::SEEKING_EVENT, art::RootInput::AccessState::SEEKING_FILE, art::RootInput::AccessState::SEEKING_RUN, art::RootInput::AccessState::SEEKING_SUBRUN, art::RootInput::AccessState::SEQUENTIAL, art::DecrepitRelicInputSourceImplementation::setEventPrincipal(), art::RootInput::AccessState::setLastReadEventID(), art::RootInput::AccessState::setRootFileForLastReadEvent(), art::DecrepitRelicInputSourceImplementation::setRunPrincipal(), art::DecrepitRelicInputSourceImplementation::setSubRunPrincipal(), art::RootInput::AccessState::state(), art::EventID::subRunID(), and art::RootInput::AccessState::wantedEventID().
|
private |
Definition at line 175 of file RootInput.h.
References accessState_, art::RootInput::AccessState::lastReadEventID(), primaryFileSequence_, and fhicl::detail::atom::value().
Referenced by seekToEvent().
|
private |
Definition at line 191 of file RootInput.h.
|
inlineinherited |
Definition at line 64 of file InputSource.h.
References n.
Referenced by art::EmptyEvent::readRun_(), art::EmptyEvent::readSubRun_(), art::EmptyEvent::reallyReadEvent(), and RootInput().
|
inlineinherited |
RunsSubRunsAndEvents (default), RunsAndSubRuns, or Runs.
Definition at line 197 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::processingMode_.
Referenced by art::DecrepitRelicInputSourceImplementation::DecrepitRelicInputSourceImplementation(), art::EmptyEvent::getNextItemType(), art::DecrepitRelicInputSourceImplementation::nextItemType(), art::DecrepitRelicInputSourceImplementation::nextItemType_(), art::EmptyEvent::readEvent_(), art::EmptyEvent::readSubRun_(), art::EmptyEvent::reallyReadEvent(), and RootInput().
|
overridevirtualinherited |
Read a specific event.
Reimplemented from art::InputSource.
Definition at line 298 of file DecrepitRelicInputSourceImplementation.cc.
References art::errors::LogicError.
|
overrideprivatevirtual |
Read next event Indicate inability to get a new event by returning a null unique_ptr.
Reimplemented from art::DecrepitRelicInputSourceImplementation.
Definition at line 214 of file RootInput_source.cc.
References readEvent_().
|
overrideprivatevirtual |
Implements art::DecrepitRelicInputSourceImplementation.
Definition at line 236 of file RootInput_source.cc.
References accessState_, DEFINE_ART_INPUT_SOURCE, art::EventPrincipal::id(), primaryFileSequence_, art::RootInput::AccessState::setLastReadEventID(), and art::RootInput::AccessState::setRootFileForLastReadEvent().
Referenced by readEvent().
|
private |
Definition at line 220 of file RootInput_source.cc.
References accessState_, art::DecrepitRelicInputSourceImplementation::eventPrincipal(), art::errors::LogicError, art::DecrepitRelicInputSourceImplementation::readEvent(), art::RootInput::AccessState::resetState(), art::RootInput::AccessState::SEEKING_EVENT, art::RootInput::AccessState::SEQUENTIAL, and art::RootInput::AccessState::state().
|
overrideprivatevirtual |
Read next file.
Reimplemented from art::DecrepitRelicInputSourceImplementation.
Definition at line 136 of file RootInput_source.cc.
References accessState_, art::errors::LogicError, art::DecrepitRelicInputSourceImplementation::readFile(), readFile_(), art::RootInput::AccessState::SEEKING_FILE, art::RootInput::AccessState::SEEKING_RUN, art::RootInput::AccessState::SEQUENTIAL, art::RootInput::AccessState::setState(), and art::RootInput::AccessState::state().
|
overrideprivatevirtual |
Reimplemented from art::DecrepitRelicInputSourceImplementation.
Definition at line 152 of file RootInput_source.cc.
References primaryFileSequence_.
Referenced by readFile().
|
overrideprivatevirtual |
Read next run.
Reimplemented from art::DecrepitRelicInputSourceImplementation.
Definition at line 158 of file RootInput_source.cc.
References accessState_, art::errors::LogicError, art::DecrepitRelicInputSourceImplementation::readRun(), art::DecrepitRelicInputSourceImplementation::runPrincipal(), art::RootInput::AccessState::SEEKING_RUN, art::RootInput::AccessState::SEEKING_SUBRUN, art::RootInput::AccessState::SEQUENTIAL, art::RootInput::AccessState::setState(), and art::RootInput::AccessState::state().
|
overrideprivatevirtual |
Implements art::DecrepitRelicInputSourceImplementation.
Definition at line 174 of file RootInput_source.cc.
References primaryFileSequence_.
|
overrideprivatevirtual |
Read next subRun.
Reimplemented from art::DecrepitRelicInputSourceImplementation.
Definition at line 186 of file RootInput_source.cc.
References accessState_, art::errors::LogicError, art::DecrepitRelicInputSourceImplementation::readSubRun(), art::RootInput::AccessState::SEEKING_EVENT, art::RootInput::AccessState::SEEKING_SUBRUN, art::RootInput::AccessState::SEQUENTIAL, art::RootInput::AccessState::setState(), art::RootInput::AccessState::state(), and art::DecrepitRelicInputSourceImplementation::subRunPrincipal().
|
overrideprivatevirtual |
Implements art::DecrepitRelicInputSourceImplementation.
Definition at line 202 of file RootInput_source.cc.
References primaryFileSequence_, and art::DecrepitRelicInputSourceImplementation::runPrincipalExemptPtr().
|
inlineinherited |
Accessor for remaining number of events to be read. -1 is used for unlimited.
Definition at line 161 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::remainingEvents_.
|
inlineinherited |
Accessor for remaining number of subRuns to be read. -1 is used for unlimited.
Definition at line 177 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::doBeginJob(), art::DecrepitRelicInputSourceImplementation::doEndJob(), and art::DecrepitRelicInputSourceImplementation::remainingSubRuns_.
|
inlineinherited |
Reset the remaining number of events/subRuns to the maximum number.
Definition at line 143 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::doneReadAhead_, art::DecrepitRelicInputSourceImplementation::maxEvents_, art::DecrepitRelicInputSourceImplementation::maxSubRuns_, art::DecrepitRelicInputSourceImplementation::remainingEvents_, and art::DecrepitRelicInputSourceImplementation::remainingSubRuns_.
Referenced by art::DecrepitRelicInputSourceImplementation::rewind().
|
inlineprotectedinherited |
Definition at line 272 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::doneReadAhead_, art::input::IsInvalid, and art::DecrepitRelicInputSourceImplementation::state_.
|
inlineprotectedinherited |
Definition at line 267 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::eventPrincipal_.
|
inlineprotectedinherited |
Definition at line 257 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::runPrincipal_.
Referenced by art::EmptyEvent::getNextItemType(), and art::EmptyEvent::rewind_().
|
inlineprotectedinherited |
Definition at line 262 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::subRunPrincipal_.
Referenced by art::EmptyEvent::getNextItemType(), and art::EmptyEvent::rewind_().
|
inlineoverridevirtualinherited |
Begin again at the first event.
Reimplemented from art::InputSource.
Definition at line 130 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::doneReadAhead_, art::input::IsInvalid, art::DecrepitRelicInputSourceImplementation::issueReports(), art::DecrepitRelicInputSourceImplementation::repeat_(), art::DecrepitRelicInputSourceImplementation::rewind_(), and art::DecrepitRelicInputSourceImplementation::state_.
|
overrideprivatevirtual |
Reimplemented from art::DecrepitRelicInputSourceImplementation.
Definition at line 83 of file RootInput_source.cc.
References accessState_, primaryFileSequence_, and art::RootInput::AccessState::resetState().
|
inlineprotectedinherited |
Definition at line 234 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::cachedRunPrincipal_, and art::DecrepitRelicInputSourceImplementation::runPrincipal_.
Referenced by readRun().
|
inlineprotectedinherited |
Definition at line 223 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::cachedRunPrincipal_.
Referenced by nextItemType(), and readSubRun_().
|
overrideprivatevirtual |
Implements art::InputSource.
Definition at line 180 of file RootInput_source.cc.
References primaryFileSequence_.
bool art::RootInput::seekToEvent | ( | T | eventSpec, |
bool | exact = false |
||
) |
Definition at line 145 of file RootInput.h.
References accessState_, art::EventID::isValid(), art::RootInput::AccessState::lastReadEventID(), art::errors::LogicError, postSeekChecks(), primaryFileSequence_, art::RootInput::AccessState::rootFileForLastReadEvent(), art::EventID::runID(), art::RootInput::AccessState::SEEKING_EVENT, art::RootInput::AccessState::SEEKING_FILE, art::RootInput::AccessState::SEEKING_RUN, art::RootInput::AccessState::SEEKING_SUBRUN, art::RootInput::AccessState::setState(), art::RootInput::AccessState::setWantedEventID(), art::RootInput::AccessState::state(), art::EventID::subRunID(), and fhicl::detail::atom::value().
Referenced by evd::LandedSocket::postProcessEvent(), and evdb::EventDisplay::postProcessEvent().
|
protectedinherited |
Definition at line 105 of file DecrepitRelicInputSourceImplementation.cc.
References art::DecrepitRelicInputSourceImplementation::cachedSubRunPrincipal_, and art::DecrepitRelicInputSourceImplementation::eventPrincipal_.
Referenced by art::DecrepitRelicInputSourceImplementation::eventPrincipal(), and nextItemType().
|
protectedinherited |
Definition at line 89 of file DecrepitRelicInputSourceImplementation.cc.
References art::DecrepitRelicInputSourceImplementation::runPrincipal_.
Referenced by art::DecrepitRelicInputSourceImplementation::eventPrincipal(), and nextItemType().
|
protectedinherited |
Definition at line 96 of file DecrepitRelicInputSourceImplementation.cc.
References art::DecrepitRelicInputSourceImplementation::cachedRunPrincipal_, and art::DecrepitRelicInputSourceImplementation::subRunPrincipal_.
Referenced by art::DecrepitRelicInputSourceImplementation::eventPrincipal(), and nextItemType().
|
inlineprotectedinherited |
To set the current time, as seen by the input source.
Definition at line 205 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::time_.
Referenced by art::DecrepitRelicInputSourceImplementation::readEvent(), and art::EmptyEvent::rewind_().
|
overridevirtualinherited |
Skip the number of events specified. Offset may be negative.
Reimplemented from art::InputSource.
Definition at line 307 of file DecrepitRelicInputSourceImplementation.cc.
References art::DecrepitRelicInputSourceImplementation::skip().
|
inlineprotectedinherited |
Definition at line 211 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::state_.
Referenced by art::RootInput::AccessState::state().
|
inlineprotectedinherited |
Definition at line 241 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::cachedSubRunPrincipal_, and art::DecrepitRelicInputSourceImplementation::subRunPrincipal_.
Referenced by readSubRun().
|
inlineprotectedinherited |
Definition at line 228 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::cachedSubRunPrincipal_.
|
overrideprivatevirtual |
Implements art::InputSource.
Definition at line 208 of file RootInput_source.cc.
References primaryFileSequence_.
|
inlineinherited |
Accessor for the current time, as seen by the input source.
Definition at line 190 of file DecrepitRelicInputSourceImplementation.h.
References art::DecrepitRelicInputSourceImplementation::time_.
Referenced by art::EmptyEvent::reallyReadEvent().
|
private |
Definition at line 109 of file RootInput.h.
Referenced by nextItemType(), postSeekChecks(), readEvent_(), readFile(), readRun(), readSubRun(), rewind_(), RootInput(), and seekToEvent().
|
private |
Definition at line 107 of file RootInput.h.
Referenced by RootInput().
|
private |
Definition at line 108 of file RootInput.h.
Referenced by closeFile_(), endJob(), finish(), getNextItemType(), nextItemType(), postSeekChecks(), readEvent_(), readFile_(), readRun_(), readSubRun_(), rewind_(), RootInput(), runRangeSetHandler(), seekToEvent(), and subRunRangeSetHandler().