LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "DecrepitRelicInputSourceImplementation.h"
Classes | |
struct | Config |
Public Types | |
enum | ProcessingMode { Runs, RunsAndSubRuns, RunsSubRunsAndEvents } |
Public Member Functions | |
DecrepitRelicInputSourceImplementation (DecrepitRelicInputSourceImplementation const &)=delete | |
DecrepitRelicInputSourceImplementation & | operator= (DecrepitRelicInputSourceImplementation const &)=delete |
DecrepitRelicInputSourceImplementation (fhicl::TableFragment< Config > const &, ModuleDescription const &) | |
virtual | ~DecrepitRelicInputSourceImplementation () noexcept=0 |
input::ItemType | nextItemType () override |
std::unique_ptr< EventPrincipal > | readEvent (cet::exempt_ptr< SubRunPrincipal const > srp) override |
std::unique_ptr< EventPrincipal > | readEvent (EventID const &) override |
Read a specific event. More... | |
std::unique_ptr< SubRunPrincipal > | readSubRun (cet::exempt_ptr< RunPrincipal const > rp) override |
Read next subRun. More... | |
std::unique_ptr< RunPrincipal > | readRun () override |
Read next run. More... | |
std::unique_ptr< FileBlock > | readFile () override |
Read next file. 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 |
virtual std::unique_ptr< RangeSetHandler > | runRangeSetHandler ()=0 |
virtual std::unique_ptr< RangeSetHandler > | subRunRangeSetHandler ()=0 |
Protected Member Functions | |
void | setTimestamp (Timestamp const &theTime) |
To set the current time, as seen by the input source. More... | |
input::ItemType | state () const |
virtual void | finish () |
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 Member Functions | |
bool | eventLimitReached () const |
bool | subRunLimitReached () const |
bool | limitReached () const |
virtual input::ItemType | getNextItemType ()=0 |
input::ItemType | nextItemType_ () |
virtual std::unique_ptr< RunPrincipal > | readRun_ ()=0 |
virtual std::unique_ptr< SubRunPrincipal > | readSubRun_ ()=0 |
virtual std::unique_ptr< EventPrincipal > | readEvent_ ()=0 |
virtual std::unique_ptr< FileBlock > | readFile_ () |
virtual void | closeFile_ () |
virtual void | skip (int) |
virtual void | rewind_ () |
virtual void | beginJob () |
virtual void | endJob () |
Private Attributes | |
int | maxEvents_ |
int | maxSubRuns_ |
int const | reportFrequency_ |
int | remainingEvents_ {maxEvents_} |
int | remainingSubRuns_ {maxSubRuns_} |
int | readCount_ {} |
ProcessingMode | processingMode_ {RunsSubRunsAndEvents} |
Timestamp | time_ {Timestamp::invalidTimestamp()} |
bool | doneReadAhead_ {false} |
input::ItemType | state_ {input::IsInvalid} |
std::unique_ptr< RunPrincipal > | runPrincipal_ {nullptr} |
std::unique_ptr< SubRunPrincipal > | subRunPrincipal_ {nullptr} |
std::unique_ptr< EventPrincipal > | eventPrincipal_ {nullptr} |
cet::exempt_ptr< RunPrincipal > | cachedRunPrincipal_ {nullptr} |
cet::exempt_ptr< SubRunPrincipal > | cachedSubRunPrincipal_ {nullptr} |
Definition at line 67 of file DecrepitRelicInputSourceImplementation.h.
|
inherited |
Enumerator | |
---|---|
Runs | |
RunsAndSubRuns | |
RunsSubRunsAndEvents |
Definition at line 52 of file InputSource.h.
|
delete |
art::DecrepitRelicInputSourceImplementation::DecrepitRelicInputSourceImplementation | ( | fhicl::TableFragment< Config > const & | config, |
ModuleDescription const & | desc | ||
) |
Definition at line 58 of file DecrepitRelicInputSourceImplementation.cc.
References art::errors::Configuration, art::DecrepitRelicInputSourceImplementation::Config::defaultMode(), maxEvents_, maxSubRuns_, processingMode(), processingMode_, reportFrequency_, art::InputSource::Runs, and art::InputSource::RunsAndSubRuns.
|
pure virtualnoexcept |
Definition at line 52 of file DecrepitRelicInputSourceImplementation.cc.
|
privatevirtual |
Reimplemented in art::EmptyEvent.
Definition at line 343 of file DecrepitRelicInputSourceImplementation.cc.
Referenced by closeFile_(), and doBeginJob().
|
overridevirtual |
close current file
Implements art::InputSource.
Definition at line 225 of file DecrepitRelicInputSourceImplementation.cc.
References closeFile_().
|
inlineprivatevirtual |
Reimplemented in art::RootInput.
Definition at line 301 of file DecrepitRelicInputSourceImplementation.h.
References beginJob(), endJob(), rewind_(), and skip().
Referenced by closeFile().
|
overridevirtual |
Called by framework at beginning of job.
Reimplemented from art::InputSource.
Definition at line 202 of file DecrepitRelicInputSourceImplementation.cc.
References beginJob().
Referenced by remainingSubRuns().
|
overridevirtual |
Called by framework at end of job.
Reimplemented from art::InputSource.
Definition at line 208 of file DecrepitRelicInputSourceImplementation.cc.
References endJob().
Referenced by remainingSubRuns().
|
privatevirtual |
Reimplemented in art::RootInput, and art::EmptyEvent.
Definition at line 347 of file DecrepitRelicInputSourceImplementation.cc.
Referenced by closeFile_(), and doEndJob().
|
inlineprivate |
Definition at line 280 of file DecrepitRelicInputSourceImplementation.h.
References remainingEvents_.
Referenced by limitReached(), nextItemType(), and readEvent().
|
inlineprotected |
Definition at line 248 of file DecrepitRelicInputSourceImplementation.h.
References eventPrincipal_, setEventPrincipal(), setRunPrincipal(), and setSubRunPrincipal().
Referenced by art::RootInput::readEvent_().
|
inlineprotectedvirtual |
Reimplemented in art::RootInput.
Definition at line 219 of file DecrepitRelicInputSourceImplementation.h.
Referenced by nextItemType().
|
privatepure virtual |
Implemented in art::RootInput, and art::EmptyEvent.
Referenced by limitReached(), and nextItemType_().
void art::DecrepitRelicInputSourceImplementation::issueReports | ( | EventID const & | eventID | ) |
issue an event report
Definition at line 313 of file DecrepitRelicInputSourceImplementation.cc.
References readCount_.
Referenced by readEvent(), and rewind().
|
inlineprivate |
Definition at line 290 of file DecrepitRelicInputSourceImplementation.h.
References eventLimitReached(), getNextItemType(), nextItemType_(), readEvent_(), readFile_(), readRun_(), readSubRun_(), and subRunLimitReached().
Referenced by readFile(), readRun(), and readSubRun().
|
inline |
Accessor for maximum number of events to be read. -1 is used for unlimited.
Definition at line 153 of file DecrepitRelicInputSourceImplementation.h.
References maxEvents_.
|
inline |
Accessor for maximum number of subRuns to be read. -1 is used for unlimited.
Definition at line 169 of file DecrepitRelicInputSourceImplementation.h.
References maxSubRuns_.
|
inlineinherited |
Definition at line 59 of file InputSource.h.
Referenced by art::EmptyEvent::readRun_(), and art::EmptyEvent::readSubRun_().
|
overridevirtual |
Implements art::InputSource.
Reimplemented in art::RootInput.
Definition at line 140 of file DecrepitRelicInputSourceImplementation.cc.
References doneReadAhead_, eventLimitReached(), finish(), art::input::IsEvent, art::input::IsFile, art::input::IsInvalid, art::input::IsRun, art::input::IsStop, art::input::IsSubRun, nextItemType_(), processingMode(), readRun_(), readSubRun_(), runPrincipal_, art::InputSource::Runs, art::InputSource::RunsSubRunsAndEvents, state_, subRunLimitReached(), and subRunPrincipal_.
Referenced by art::RootInput::nextItemType().
|
private |
Definition at line 124 of file DecrepitRelicInputSourceImplementation.cc.
References getNextItemType(), art::input::IsEvent, art::input::IsSubRun, processingMode(), readEvent_(), readSubRun_(), art::InputSource::Runs, and art::InputSource::RunsSubRunsAndEvents.
Referenced by limitReached(), and nextItemType().
|
delete |
|
inlineinherited |
Definition at line 64 of file InputSource.h.
References n.
Referenced by art::EmptyEvent::readRun_(), art::EmptyEvent::readSubRun_(), art::EmptyEvent::reallyReadEvent(), and art::RootInput::RootInput().
|
inline |
RunsSubRunsAndEvents (default), RunsAndSubRuns, or Runs.
Definition at line 197 of file DecrepitRelicInputSourceImplementation.h.
References processingMode_.
Referenced by DecrepitRelicInputSourceImplementation(), art::EmptyEvent::getNextItemType(), nextItemType(), nextItemType_(), art::EmptyEvent::readEvent_(), art::EmptyEvent::readSubRun_(), art::EmptyEvent::reallyReadEvent(), and art::RootInput::RootInput().
|
overridevirtual |
Read next event Indicate inability to get a new event by returning a null unique_ptr.
Implements art::InputSource.
Reimplemented in art::RootInput.
Definition at line 273 of file DecrepitRelicInputSourceImplementation.cc.
References doneReadAhead_, eventLimitReached(), eventPrincipal_, art::input::IsEvent, issueReports(), readCount_, readEvent_(), remainingEvents_, reportFrequency_, setTimestamp(), and state_.
Referenced by art::RootInput::readEvent_().
|
overridevirtual |
Read a specific event.
Reimplemented from art::InputSource.
Definition at line 298 of file DecrepitRelicInputSourceImplementation.cc.
References art::errors::LogicError.
|
privatepure virtual |
Implemented in art::RootInput, and art::EmptyEvent.
Referenced by limitReached(), nextItemType_(), and readEvent().
|
overridevirtual |
Read next file.
Implements art::InputSource.
Reimplemented in art::RootInput.
Definition at line 215 of file DecrepitRelicInputSourceImplementation.cc.
References doneReadAhead_, art::input::IsFile, limitReached(), readFile_(), and state_.
Referenced by art::RootInput::readFile().
|
privatevirtual |
Reimplemented in art::RootInput.
Definition at line 235 of file DecrepitRelicInputSourceImplementation.cc.
Referenced by limitReached(), and readFile().
|
overridevirtual |
Read next run.
Implements art::InputSource.
Reimplemented in art::RootInput.
Definition at line 241 of file DecrepitRelicInputSourceImplementation.cc.
References cachedRunPrincipal_, doneReadAhead_, art::input::IsRun, limitReached(), runPrincipal_, and state_.
Referenced by art::RootInput::readRun().
|
privatepure virtual |
Implemented in art::RootInput, and art::EmptyEvent.
Referenced by limitReached(), and nextItemType().
|
overridevirtual |
Read next subRun.
Implements art::InputSource.
Reimplemented in art::RootInput.
Definition at line 255 of file DecrepitRelicInputSourceImplementation.cc.
References cachedSubRunPrincipal_, doneReadAhead_, art::input::IsSubRun, limitReached(), remainingSubRuns_, state_, and subRunPrincipal_.
Referenced by art::RootInput::readSubRun().
|
privatepure virtual |
Implemented in art::RootInput, and art::EmptyEvent.
Referenced by limitReached(), nextItemType(), and nextItemType_().
|
inline |
Accessor for remaining number of events to be read. -1 is used for unlimited.
Definition at line 161 of file DecrepitRelicInputSourceImplementation.h.
References remainingEvents_.
|
inline |
Accessor for remaining number of subRuns to be read. -1 is used for unlimited.
Definition at line 177 of file DecrepitRelicInputSourceImplementation.h.
References doBeginJob(), doEndJob(), and remainingSubRuns_.
|
inline |
Reset the remaining number of events/subRuns to the maximum number.
Definition at line 143 of file DecrepitRelicInputSourceImplementation.h.
References doneReadAhead_, maxEvents_, maxSubRuns_, remainingEvents_, and remainingSubRuns_.
Referenced by rewind().
|
inlineprotected |
Definition at line 272 of file DecrepitRelicInputSourceImplementation.h.
References doneReadAhead_, art::input::IsInvalid, and state_.
|
inlineprotected |
Definition at line 267 of file DecrepitRelicInputSourceImplementation.h.
References eventPrincipal_.
|
inlineprotected |
Definition at line 257 of file DecrepitRelicInputSourceImplementation.h.
References runPrincipal_.
Referenced by art::EmptyEvent::getNextItemType(), and art::EmptyEvent::rewind_().
|
inlineprotected |
Definition at line 262 of file DecrepitRelicInputSourceImplementation.h.
References subRunPrincipal_.
Referenced by art::EmptyEvent::getNextItemType(), and art::EmptyEvent::rewind_().
|
inlineoverridevirtual |
Begin again at the first event.
Reimplemented from art::InputSource.
Definition at line 130 of file DecrepitRelicInputSourceImplementation.h.
References doneReadAhead_, art::input::IsInvalid, issueReports(), repeat_(), rewind_(), and state_.
|
privatevirtual |
Reimplemented in art::RootInput, and art::EmptyEvent.
Definition at line 334 of file DecrepitRelicInputSourceImplementation.cc.
References art::errors::LogicError.
Referenced by closeFile_(), and rewind().
|
inlineprotected |
Definition at line 234 of file DecrepitRelicInputSourceImplementation.h.
References cachedRunPrincipal_, and runPrincipal_.
Referenced by art::RootInput::readRun().
|
inlineprotected |
Definition at line 223 of file DecrepitRelicInputSourceImplementation.h.
References cachedRunPrincipal_.
Referenced by art::RootInput::nextItemType(), and art::RootInput::readSubRun_().
|
pure virtualinherited |
Implemented in art::Source< T >, art::RootInput, and art::EmptyEvent.
|
protected |
Definition at line 105 of file DecrepitRelicInputSourceImplementation.cc.
References cachedSubRunPrincipal_, and eventPrincipal_.
Referenced by eventPrincipal(), and art::RootInput::nextItemType().
|
protected |
Definition at line 89 of file DecrepitRelicInputSourceImplementation.cc.
References runPrincipal_.
Referenced by eventPrincipal(), and art::RootInput::nextItemType().
|
protected |
Definition at line 96 of file DecrepitRelicInputSourceImplementation.cc.
References cachedRunPrincipal_, and subRunPrincipal_.
Referenced by eventPrincipal(), and art::RootInput::nextItemType().
|
inlineprotected |
To set the current time, as seen by the input source.
Definition at line 205 of file DecrepitRelicInputSourceImplementation.h.
References time_.
Referenced by readEvent(), and art::EmptyEvent::rewind_().
|
privatevirtual |
Reimplemented in art::EmptyEvent.
Definition at line 325 of file DecrepitRelicInputSourceImplementation.cc.
References art::errors::LogicError.
Referenced by closeFile_(), and skipEvents().
|
overridevirtual |
Skip the number of events specified. Offset may be negative.
Reimplemented from art::InputSource.
Definition at line 307 of file DecrepitRelicInputSourceImplementation.cc.
References skip().
|
inlineprotected |
Definition at line 211 of file DecrepitRelicInputSourceImplementation.h.
References state_.
Referenced by art::RootInput::AccessState::state().
|
inlineprivate |
Definition at line 285 of file DecrepitRelicInputSourceImplementation.h.
References remainingSubRuns_.
Referenced by limitReached(), and nextItemType().
|
inlineprotected |
Definition at line 241 of file DecrepitRelicInputSourceImplementation.h.
References cachedSubRunPrincipal_, and subRunPrincipal_.
Referenced by art::RootInput::readSubRun().
|
inlineprotected |
Definition at line 228 of file DecrepitRelicInputSourceImplementation.h.
References cachedSubRunPrincipal_.
|
pure virtualinherited |
Implemented in art::Source< T >, art::RootInput, and art::EmptyEvent.
|
inline |
Accessor for the current time, as seen by the input source.
Definition at line 190 of file DecrepitRelicInputSourceImplementation.h.
References time_.
Referenced by art::EmptyEvent::reallyReadEvent().
|
private |
Definition at line 323 of file DecrepitRelicInputSourceImplementation.h.
Referenced by readRun(), runPrincipal(), runPrincipalExemptPtr(), and setSubRunPrincipal().
|
private |
Definition at line 324 of file DecrepitRelicInputSourceImplementation.h.
Referenced by readSubRun(), setEventPrincipal(), subRunPrincipal(), and subRunPrincipalExemptPtr().
|
private |
Definition at line 318 of file DecrepitRelicInputSourceImplementation.h.
Referenced by nextItemType(), readEvent(), readFile(), readRun(), readSubRun(), repeat_(), reset(), and rewind().
|
private |
Definition at line 322 of file DecrepitRelicInputSourceImplementation.h.
Referenced by eventPrincipal(), readEvent(), resetEventPrincipal(), and setEventPrincipal().
|
private |
Definition at line 309 of file DecrepitRelicInputSourceImplementation.h.
Referenced by DecrepitRelicInputSourceImplementation(), maxEvents(), and repeat_().
|
private |
Definition at line 310 of file DecrepitRelicInputSourceImplementation.h.
Referenced by DecrepitRelicInputSourceImplementation(), maxSubRuns(), and repeat_().
|
private |
Definition at line 316 of file DecrepitRelicInputSourceImplementation.h.
Referenced by DecrepitRelicInputSourceImplementation(), art::RootInputFile::getNextEntryTypeWanted(), processingMode(), and art::RootInputFile::setIfFastClonable().
|
private |
Definition at line 315 of file DecrepitRelicInputSourceImplementation.h.
Referenced by issueReports(), and readEvent().
|
private |
Definition at line 313 of file DecrepitRelicInputSourceImplementation.h.
Referenced by eventLimitReached(), readEvent(), remainingEvents(), and repeat_().
|
private |
Definition at line 314 of file DecrepitRelicInputSourceImplementation.h.
Referenced by readSubRun(), remainingSubRuns(), repeat_(), and subRunLimitReached().
|
private |
Definition at line 311 of file DecrepitRelicInputSourceImplementation.h.
Referenced by DecrepitRelicInputSourceImplementation(), and readEvent().
|
private |
Definition at line 320 of file DecrepitRelicInputSourceImplementation.h.
Referenced by nextItemType(), readRun(), resetRunPrincipal(), runPrincipal(), and setRunPrincipal().
|
private |
Definition at line 319 of file DecrepitRelicInputSourceImplementation.h.
Referenced by nextItemType(), readEvent(), readFile(), readRun(), readSubRun(), reset(), art::RootInput::AccessState::resetState(), rewind(), art::RootInput::AccessState::state(), and state().
|
private |
Definition at line 321 of file DecrepitRelicInputSourceImplementation.h.
Referenced by nextItemType(), readSubRun(), resetSubRunPrincipal(), setSubRunPrincipal(), and subRunPrincipal().
|
private |
Definition at line 317 of file DecrepitRelicInputSourceImplementation.h.
Referenced by setTimestamp(), and timestamp().