Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
art::RootInput Class Referencefinal

#include "/cvmfs/nova.opensciencegrid.org/externals/art/v2_13_00/source/art/Framework/IO/Root/RootInput.h"

Inheritance diagram for art::RootInput:
art::DecrepitRelicInputSourceImplementation art::InputSource

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)
 
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< RunPrincipalrunPrincipalExemptPtr ()
 
cet::exempt_ptr< SubRunPrincipalsubRunPrincipalExemptPtr ()
 
std::unique_ptr< RunPrincipalrunPrincipal ()
 
std::unique_ptr< SubRunPrincipalsubRunPrincipal ()
 
std::unique_ptr< EventPrincipaleventPrincipal ()
 
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< EventPrincipalreadEvent (cet::exempt_ptr< SubRunPrincipal const >) override
 
std::unique_ptr< EventPrincipalreadEvent_ () override
 
std::unique_ptr< EventPrincipalreadEvent_ (cet::exempt_ptr< SubRunPrincipal const >)
 
std::unique_ptr< SubRunPrincipalreadSubRun (cet::exempt_ptr< RunPrincipal const >) override
 Read next subRun. More...
 
std::unique_ptr< SubRunPrincipalreadSubRun_ () override
 
std::unique_ptr< RunPrincipalreadRun () override
 Read next run. More...
 
std::unique_ptr< RunPrincipalreadRun_ () override
 
std::unique_ptr< FileBlockreadFile () override
 Read next file. More...
 
std::unique_ptr< FileBlockreadFile_ () override
 
std::unique_ptr< RangeSetHandlerrunRangeSetHandler () override
 
std::unique_ptr< RangeSetHandlersubRunRangeSetHandler () 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, EventIDpostSeekChecks (EventID const &foundID, T eventSpec)
 
template<typename T >
std::enable_if_t<!std::is_convertible< T, off_t >::value, EventIDpostSeekChecks (EventID const &foundID, T eventSpec)
 

Private Attributes

InputFileCatalog catalog_
 
std::unique_ptr< RootInputFileSequenceprimaryFileSequence_
 
AccessState accessState_
 

Detailed Description

Definition at line 26 of file RootInput.h.

Member Typedef Documentation

Definition at line 104 of file RootInput.h.

Definition at line 44 of file RootInput.h.

Member Enumeration Documentation

Enumerator
Runs 
RunsAndSubRuns 
RunsSubRunsAndEvents 

Definition at line 52 of file InputSource.h.

Constructor & Destructor Documentation

RootInput::RootInput ( RootInput::Parameters const &  config,
InputSourceDescription desc 
)

Definition at line 49 of file RootInput_source.cc.

References accessState_, catalog_, gen_flatrecord::config, art::InputSourceDescription::moduleDescription, primaryFileSequence_, art::InputSource::processConfiguration(), and art::DecrepitRelicInputSourceImplementation::processingMode().

52  desc.moduleDescription}
53  , catalog_{config().ifc_config}
54  , primaryFileSequence_{std::make_unique<RootInputFileSequence>(
55  config().rifs_config,
56  catalog_,
59  desc.productRegistry,
61  desc.parentageEnabled_,
62  desc.rangesEnabled_)}
63  , accessState_{}
64 {}
MasterProductRegistry & productRegistry
AccessState accessState_
Definition: RootInput.h:109
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
InputFileCatalog catalog_
Definition: RootInput.h:107
auto const & processConfiguration() const
Definition: InputSource.h:64
ModuleDescription const & moduleDescription
ProcessingMode processingMode() const
RunsSubRunsAndEvents (default), RunsAndSubRuns, or Runs.

Member Function Documentation

void art::DecrepitRelicInputSourceImplementation::closeFile ( )
overridevirtualinherited

close current file

Implements art::InputSource.

void RootInput::closeFile_ ( )
overrideprivatevirtual

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 73 of file RootInput_source.cc.

References primaryFileSequence_.

74 {
75  primaryFileSequence_->closeFile_();
76 }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
void art::DecrepitRelicInputSourceImplementation::doBeginJob ( )
overridevirtualinherited

Called by framework at beginning of job.

Reimplemented from art::InputSource.

Referenced by art::DecrepitRelicInputSourceImplementation::remainingSubRuns().

void art::DecrepitRelicInputSourceImplementation::doEndJob ( )
overridevirtualinherited

Called by framework at end of job.

Reimplemented from art::InputSource.

Referenced by art::DecrepitRelicInputSourceImplementation::remainingSubRuns().

void RootInput::endJob ( )
overrideprivatevirtual

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 67 of file RootInput_source.cc.

References primaryFileSequence_.

68 {
69  primaryFileSequence_->endJob();
70 }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
std::unique_ptr<EventPrincipal> art::DecrepitRelicInputSourceImplementation::eventPrincipal ( )
inlineprotectedinherited
void RootInput::finish ( )
overrideprivatevirtual

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 93 of file RootInput_source.cc.

References primaryFileSequence_.

94 {
95  primaryFileSequence_->finish();
96 }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
input::ItemType RootInput::getNextItemType ( )
overrideprivatevirtual

Implements art::DecrepitRelicInputSourceImplementation.

Definition at line 87 of file RootInput_source.cc.

References primaryFileSequence_.

88 {
89  return primaryFileSequence_->getNextItemType();
90 }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
void art::DecrepitRelicInputSourceImplementation::issueReports ( EventID const &  eventID)
inherited

issue an event report

Referenced by art::DecrepitRelicInputSourceImplementation::rewind().

int art::DecrepitRelicInputSourceImplementation::maxEvents ( ) const
inlineinherited

Accessor for maximum number of events to be read. -1 is used for unlimited.

Definition at line 150 of file DecrepitRelicInputSourceImplementation.h.

References art::DecrepitRelicInputSourceImplementation::maxEvents_.

int art::DecrepitRelicInputSourceImplementation::maxSubRuns ( ) const
inlineinherited

Accessor for maximum number of subRuns to be read. -1 is used for unlimited.

Definition at line 166 of file DecrepitRelicInputSourceImplementation.h.

References art::DecrepitRelicInputSourceImplementation::maxSubRuns_.

auto const& art::InputSource::moduleDescription ( ) const
inlineinherited

Definition at line 59 of file InputSource.h.

Referenced by art::EmptyEvent::readRun_(), and art::EmptyEvent::readSubRun_().

60  {
61  return moduleDescription_;
62  }
ModuleDescription moduleDescription_
Definition: InputSource.h:93
input::ItemType RootInput::nextItemType ( )
overrideprivatevirtual

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 99 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().

100 {
101  switch (accessState_.state()) {
105  return input::IsFile;
109  return input::IsRun;
111  // RunPrincipal has been handed off to the EventProcessor by this point.
112  // Used the cached pointer.
115  return input::IsSubRun;
117  auto const wantedEventID = accessState_.wantedEventID();
118  setEventPrincipal(primaryFileSequence_->readIt(wantedEventID, true));
119  accessState_.setLastReadEventID(wantedEventID);
121  primaryFileSequence_->rootFileForLastReadEvent());
122  return input::IsEvent;
123  }
124  default:
126  << "RootInputSource::nextItemType encountered an "
127  "unknown AccessState.\n";
128  }
129 }
State state() const
Definition: RootInput.h:69
void setEventPrincipal(std::unique_ptr< EventPrincipal > &&ep)
RunID const & runID() const
Definition: EventID.h:92
EventID const & wantedEventID() const
Definition: RootInput.h:86
AccessState accessState_
Definition: RootInput.h:109
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
input::ItemType nextItemType() override
SubRunID const & subRunID() const
Definition: EventID.h:104
void setSubRunPrincipal(std::unique_ptr< SubRunPrincipal > &&srp)
void setRunPrincipal(std::unique_ptr< RunPrincipal > &&rp)
void setLastReadEventID(EventID const &eid)
void setRootFileForLastReadEvent(RootInputFile *)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
template<typename T >
std::enable_if_t< std::is_convertible< T, off_t >::value, EventID > art::RootInput::postSeekChecks ( EventID const &  foundID,
T  eventSpec 
)
private

Definition at line 174 of file RootInput.h.

References accessState_, art::RootInput::AccessState::lastReadEventID(), and primaryFileSequence_.

Referenced by seekToEvent().

175  {
176  if (eventspec == 0 && foundID == accessState_.lastReadEventID()) {
177  // We're supposed to be reading the, "next" event but it's a
178  // duplicate of the current one: skip it.
179  mf::LogWarning("DuplicateEvent")
180  << "Duplicate Events found: "
181  << "both events were " << foundID << ".\n"
182  << "The duplicate will be skipped.\n";
183  return primaryFileSequence_->seekToEvent(1, false);
184  }
185  return foundID;
186  }
AccessState accessState_
Definition: RootInput.h:109
EventID const & lastReadEventID() const
Definition: RootInput.h:80
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
template<typename T >
std::enable_if_t<!std::is_convertible< T, off_t >::value, EventID > art::RootInput::postSeekChecks ( EventID const &  foundID,
T  eventSpec 
)
private

Definition at line 190 of file RootInput.h.

191  {
192  // Default implementation is NOP.
193  return foundID;
194  }
auto const& art::InputSource::processConfiguration ( ) const
inlineinherited

Definition at line 64 of file InputSource.h.

References getGoodRuns4SAM::n.

Referenced by art::EmptyEvent::readRun_(), art::EmptyEvent::readSubRun_(), art::EmptyEvent::reallyReadEvent(), and RootInput().

65  {
67  }
ModuleDescription moduleDescription_
Definition: InputSource.h:93
ProcessConfiguration const & processConfiguration() const
ProcessingMode art::DecrepitRelicInputSourceImplementation::processingMode ( ) const
inlineinherited
std::unique_ptr< EventPrincipal > RootInput::readEvent ( cet::exempt_ptr< SubRunPrincipal const >  srp)
overrideprivatevirtual

Read next event Indicate inability to get a new event by returning a null unique_ptr.

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 210 of file RootInput_source.cc.

References readEvent_().

211 {
212  return readEvent_(srp);
213 }
std::unique_ptr< EventPrincipal > readEvent_() override
std::unique_ptr< EventPrincipal > RootInput::readEvent_ ( )
overrideprivatevirtual

Implements art::DecrepitRelicInputSourceImplementation.

Definition at line 232 of file RootInput_source.cc.

References accessState_, DEFINE_ART_INPUT_SOURCE, primaryFileSequence_, fillBadChanDBTables::result, art::RootInput::AccessState::setLastReadEventID(), and art::RootInput::AccessState::setRootFileForLastReadEvent().

Referenced by readEvent().

233 {
234  std::unique_ptr<EventPrincipal> result;
235  if (!result.get()) {
236  result = primaryFileSequence_->readEvent_();
237  }
238  if (result.get()) {
239  accessState_.setLastReadEventID(result->id());
241  primaryFileSequence_->rootFileForLastReadEvent());
242  }
243  return result;
244 }
AccessState accessState_
Definition: RootInput.h:109
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
void setLastReadEventID(EventID const &eid)
void setRootFileForLastReadEvent(RootInputFile *)
std::unique_ptr< EventPrincipal > RootInput::readEvent_ ( cet::exempt_ptr< SubRunPrincipal const >  srp)
private

Definition at line 216 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().

217 {
218  switch (accessState_.state()) {
223  return eventPrincipal();
224  default:
226  << "RootInputSource::readEvent encountered an "
227  "unknown or inappropriate AccessState.\n";
228  }
229 }
State state() const
Definition: RootInput.h:69
std::unique_ptr< EventPrincipal > readEvent(cet::exempt_ptr< SubRunPrincipal const > srp) override
AccessState accessState_
Definition: RootInput.h:109
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::unique_ptr< FileBlock > RootInput::readFile ( )
overrideprivatevirtual

Read next file.

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 132 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().

133 {
134  switch (accessState_.state()) {
139  return readFile_();
140  default:
142  << "RootInputSource::readFile encountered an "
143  "unknown or inappropriate AccessState.\n";
144  }
145 }
State state() const
Definition: RootInput.h:69
AccessState accessState_
Definition: RootInput.h:109
std::unique_ptr< FileBlock > readFile_() override
std::unique_ptr< FileBlock > readFile() override
Read next file.
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::unique_ptr< FileBlock > RootInput::readFile_ ( )
overrideprivatevirtual

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 148 of file RootInput_source.cc.

References primaryFileSequence_.

Referenced by readFile().

149 {
150  return primaryFileSequence_->readFile_();
151 }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
std::unique_ptr< RunPrincipal > RootInput::readRun ( )
overrideprivatevirtual

Read next run.

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 154 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().

155 {
156  switch (accessState_.state()) {
161  return runPrincipal();
162  default:
164  << "RootInputSource::readRun encountered an "
165  "unknown or inappropriate AccessState.\n";
166  }
167 }
State state() const
Definition: RootInput.h:69
AccessState accessState_
Definition: RootInput.h:109
std::unique_ptr< RunPrincipal > readRun() override
Read next run.
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::unique_ptr< RunPrincipal > RootInput::readRun_ ( )
overrideprivatevirtual

Implements art::DecrepitRelicInputSourceImplementation.

Definition at line 170 of file RootInput_source.cc.

References primaryFileSequence_.

171 {
172  return primaryFileSequence_->readRun_();
173 }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
std::unique_ptr< SubRunPrincipal > RootInput::readSubRun ( cet::exempt_ptr< RunPrincipal const >  rp)
overrideprivatevirtual

Read next subRun.

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 182 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().

183 {
184  switch (accessState_.state()) {
189  return subRunPrincipal();
190  default:
192  << "RootInputSource::readSubRun encountered an "
193  "unknown or inappropriate AccessState.\n";
194  }
195 }
State state() const
Definition: RootInput.h:69
std::unique_ptr< SubRunPrincipal > readSubRun(cet::exempt_ptr< RunPrincipal const > rp) override
Read next subRun.
AccessState accessState_
Definition: RootInput.h:109
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::unique_ptr< SubRunPrincipal > RootInput::readSubRun_ ( )
overrideprivatevirtual

Implements art::DecrepitRelicInputSourceImplementation.

Definition at line 198 of file RootInput_source.cc.

References primaryFileSequence_, and art::DecrepitRelicInputSourceImplementation::runPrincipalExemptPtr().

199 {
200  return primaryFileSequence_->readSubRun_(runPrincipalExemptPtr());
201 }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
int art::DecrepitRelicInputSourceImplementation::remainingEvents ( ) const
inlineinherited

Accessor for remaining number of events to be read. -1 is used for unlimited.

Definition at line 158 of file DecrepitRelicInputSourceImplementation.h.

References art::DecrepitRelicInputSourceImplementation::remainingEvents_.

int art::DecrepitRelicInputSourceImplementation::remainingSubRuns ( ) const
inlineinherited
void art::DecrepitRelicInputSourceImplementation::repeat_ ( )
inlineinherited
void art::DecrepitRelicInputSourceImplementation::reset ( )
inlineprotectedinherited
void art::DecrepitRelicInputSourceImplementation::resetEventPrincipal ( )
inlineprotectedinherited
void art::DecrepitRelicInputSourceImplementation::resetRunPrincipal ( )
inlineprotectedinherited
void art::DecrepitRelicInputSourceImplementation::resetSubRunPrincipal ( )
inlineprotectedinherited
void art::DecrepitRelicInputSourceImplementation::rewind ( )
inlineoverridevirtualinherited
void RootInput::rewind_ ( )
overrideprivatevirtual

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 79 of file RootInput_source.cc.

References accessState_, primaryFileSequence_, and art::RootInput::AccessState::resetState().

80 {
81  // Rewind to before the first event that was read.
83  primaryFileSequence_->rewind_();
84 }
AccessState accessState_
Definition: RootInput.h:109
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
std::unique_ptr<RunPrincipal> art::DecrepitRelicInputSourceImplementation::runPrincipal ( )
inlineprotectedinherited
cet::exempt_ptr<RunPrincipal> art::DecrepitRelicInputSourceImplementation::runPrincipalExemptPtr ( )
inlineprotectedinherited
std::unique_ptr< RangeSetHandler > RootInput::runRangeSetHandler ( )
overrideprivatevirtual

Implements art::InputSource.

Definition at line 176 of file RootInput_source.cc.

References primaryFileSequence_.

177 {
178  return primaryFileSequence_->runRangeSetHandler();
179 }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
template<typename T >
bool art::RootInput::seekToEvent ( T  eventSpec,
bool  exact = false 
)

Definition at line 144 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(), and art::EventID::subRunID().

Referenced by evdb::EventDisplay::postProcessEvent().

145  {
146  if (accessState_.state()) {
148  << "Attempted to initiate a random access seek "
149  << "with one already in progress at state = " << accessState_.state()
150  << ".\n";
151  }
152  EventID foundID = primaryFileSequence_->seekToEvent(eventSpec, exact);
153  if (!foundID.isValid()) {
154  return false;
155  }
156  foundID = postSeekChecks(foundID, eventSpec);
158  if (primaryFileSequence_->rootFile() !=
161  } else if (foundID.runID() != accessState_.lastReadEventID().runID()) {
163  } else if (foundID.subRunID() !=
166  } else {
168  }
169  return true;
170  }
State state() const
Definition: RootInput.h:69
RunID const & runID() const
Definition: EventID.h:92
void setWantedEventID(EventID const &eid)
AccessState accessState_
Definition: RootInput.h:109
EventID const & lastReadEventID() const
Definition: RootInput.h:80
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
SubRunID const & subRunID() const
Definition: EventID.h:104
std::enable_if_t< std::is_convertible< T, off_t >::value, EventID > postSeekChecks(EventID const &foundID, T eventSpec)
Definition: RootInput.h:174
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
RootInputFile * rootFileForLastReadEvent() const
Definition: RootInput.h:92
void art::DecrepitRelicInputSourceImplementation::setEventPrincipal ( std::unique_ptr< EventPrincipal > &&  ep)
protectedinherited
void art::DecrepitRelicInputSourceImplementation::setRunPrincipal ( std::unique_ptr< RunPrincipal > &&  rp)
protectedinherited
void art::DecrepitRelicInputSourceImplementation::setSubRunPrincipal ( std::unique_ptr< SubRunPrincipal > &&  srp)
protectedinherited
void art::DecrepitRelicInputSourceImplementation::setTimestamp ( Timestamp const &  theTime)
inlineprotectedinherited

To set the current time, as seen by the input source.

Definition at line 202 of file DecrepitRelicInputSourceImplementation.h.

References art::DecrepitRelicInputSourceImplementation::time_.

Referenced by art::EmptyEvent::rewind_().

void art::DecrepitRelicInputSourceImplementation::skipEvents ( int  offset)
overridevirtualinherited

Skip the number of events specified. Offset may be negative.

Reimplemented from art::InputSource.

input::ItemType art::DecrepitRelicInputSourceImplementation::state ( ) const
inlineprotectedinherited
std::unique_ptr<SubRunPrincipal> art::DecrepitRelicInputSourceImplementation::subRunPrincipal ( )
inlineprotectedinherited
cet::exempt_ptr<SubRunPrincipal> art::DecrepitRelicInputSourceImplementation::subRunPrincipalExemptPtr ( )
inlineprotectedinherited
std::unique_ptr< RangeSetHandler > RootInput::subRunRangeSetHandler ( )
overrideprivatevirtual

Implements art::InputSource.

Definition at line 204 of file RootInput_source.cc.

References primaryFileSequence_.

205 {
206  return primaryFileSequence_->subRunRangeSetHandler();
207 }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: RootInput.h:108
Timestamp const& art::DecrepitRelicInputSourceImplementation::timestamp ( ) const
inlineinherited

Accessor for the current time, as seen by the input source.

Definition at line 187 of file DecrepitRelicInputSourceImplementation.h.

References art::DecrepitRelicInputSourceImplementation::time_.

Referenced by art::EmptyEvent::reallyReadEvent().

Member Data Documentation

AccessState art::RootInput::accessState_
private
InputFileCatalog art::RootInput::catalog_
private

Definition at line 107 of file RootInput.h.

Referenced by RootInput().

std::unique_ptr<RootInputFileSequence> art::RootInput::primaryFileSequence_
private

The documentation for this class was generated from the following files: