LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
art::DecrepitRelicInputSourceImplementation Class Referenceabstract

#include "DecrepitRelicInputSourceImplementation.h"

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

Classes

struct  Config
 

Public Types

enum  ProcessingMode { Runs, RunsAndSubRuns, RunsSubRunsAndEvents }
 

Public Member Functions

 DecrepitRelicInputSourceImplementation (DecrepitRelicInputSourceImplementation const &)=delete
 
DecrepitRelicInputSourceImplementationoperator= (DecrepitRelicInputSourceImplementation const &)=delete
 
 DecrepitRelicInputSourceImplementation (fhicl::TableFragment< Config > const &, ModuleDescription const &)
 
virtual ~DecrepitRelicInputSourceImplementation () noexcept=0
 
input::ItemType nextItemType () override
 
std::unique_ptr< EventPrincipalreadEvent (cet::exempt_ptr< SubRunPrincipal const > srp) override
 
std::unique_ptr< EventPrincipalreadEvent (EventID const &) override
 Read a specific event. More...
 
std::unique_ptr< SubRunPrincipalreadSubRun (cet::exempt_ptr< RunPrincipal const > rp) override
 Read next subRun. More...
 
std::unique_ptr< RunPrincipalreadRun () override
 Read next run. More...
 
std::unique_ptr< FileBlockreadFile () 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< RangeSetHandlerrunRangeSetHandler ()=0
 
virtual std::unique_ptr< RangeSetHandlersubRunRangeSetHandler ()=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< 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 Member Functions

bool eventLimitReached () const
 
bool subRunLimitReached () const
 
bool limitReached () const
 
virtual input::ItemType getNextItemType ()=0
 
input::ItemType nextItemType_ ()
 
virtual std::unique_ptr< RunPrincipalreadRun_ ()=0
 
virtual std::unique_ptr< SubRunPrincipalreadSubRun_ ()=0
 
virtual std::unique_ptr< EventPrincipalreadEvent_ ()=0
 
virtual std::unique_ptr< FileBlockreadFile_ ()
 
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< RunPrincipalrunPrincipal_ {nullptr}
 
std::unique_ptr< SubRunPrincipalsubRunPrincipal_ {nullptr}
 
std::unique_ptr< EventPrincipaleventPrincipal_ {nullptr}
 
cet::exempt_ptr< RunPrincipalcachedRunPrincipal_ {nullptr}
 
cet::exempt_ptr< SubRunPrincipalcachedSubRunPrincipal_ {nullptr}
 

Detailed Description

Definition at line 67 of file DecrepitRelicInputSourceImplementation.h.

Member Enumeration Documentation

Enumerator
Runs 
RunsAndSubRuns 
RunsSubRunsAndEvents 

Definition at line 52 of file InputSource.h.

Constructor & Destructor Documentation

art::DecrepitRelicInputSourceImplementation::DecrepitRelicInputSourceImplementation ( DecrepitRelicInputSourceImplementation const &  )
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.

61  : InputSource{desc}
62  , maxEvents_{config().maxEvents()}
63  , maxSubRuns_{config().maxSubRuns()}
64  , reportFrequency_{config().reportFrequency()}
65  {
66  if (reportFrequency_ < 0) {
68  << "reportFrequency has a negative value, which is not meaningful.";
69  }
70  std::string const runMode{"Runs"};
71  std::string const runSubRunMode{"RunsAndSubRuns"};
72  std::string const processingMode = config().processingMode();
73  if (processingMode == runMode) {
75  } else if (processingMode == runSubRunMode) {
77  } else if (processingMode != Config::defaultMode()) {
79  << "DecrepitRelicInputSourceImplementation::"
80  "DecrepitRelicInputSourceImplementation()\n"
81  << "The 'processingMode' parameter for sources has an illegal value '"
82  << processingMode << "'\n"
83  << "Legal values are '" << Config::defaultMode() << "', '"
84  << runSubRunMode << "', or '" << runMode << "'.\n";
85  }
86  }
InputSource(ModuleDescription const &md)
Definition: InputSource.h:54
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
ProcessingMode processingMode() const
RunsSubRunsAndEvents (default), RunsAndSubRuns, or Runs.
art::DecrepitRelicInputSourceImplementation::~DecrepitRelicInputSourceImplementation ( )
pure virtualnoexcept

Definition at line 52 of file DecrepitRelicInputSourceImplementation.cc.

53  {}

Member Function Documentation

void art::DecrepitRelicInputSourceImplementation::beginJob ( )
privatevirtual

Reimplemented in art::EmptyEvent.

Definition at line 343 of file DecrepitRelicInputSourceImplementation.cc.

Referenced by closeFile_(), and doBeginJob().

344  {}
void art::DecrepitRelicInputSourceImplementation::closeFile ( )
overridevirtual

close current file

Implements art::InputSource.

Definition at line 225 of file DecrepitRelicInputSourceImplementation.cc.

References closeFile_().

virtual void art::DecrepitRelicInputSourceImplementation::closeFile_ ( )
inlineprivatevirtual

Reimplemented in art::RootInput.

Definition at line 301 of file DecrepitRelicInputSourceImplementation.h.

References beginJob(), endJob(), rewind_(), and skip().

Referenced by closeFile().

302  {}
void art::DecrepitRelicInputSourceImplementation::doBeginJob ( )
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().

void art::DecrepitRelicInputSourceImplementation::doEndJob ( )
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().

void art::DecrepitRelicInputSourceImplementation::endJob ( )
privatevirtual

Reimplemented in art::RootInput, and art::EmptyEvent.

Definition at line 347 of file DecrepitRelicInputSourceImplementation.cc.

Referenced by closeFile_(), and doEndJob().

348  {}
bool art::DecrepitRelicInputSourceImplementation::eventLimitReached ( ) const
inlineprivate
std::unique_ptr<EventPrincipal> art::DecrepitRelicInputSourceImplementation::eventPrincipal ( )
inlineprotected
virtual void art::DecrepitRelicInputSourceImplementation::finish ( )
inlineprotectedvirtual

Reimplemented in art::RootInput.

Definition at line 219 of file DecrepitRelicInputSourceImplementation.h.

Referenced by nextItemType().

220  {}
virtual input::ItemType art::DecrepitRelicInputSourceImplementation::getNextItemType ( )
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().

314  {
315  time_t t = time(0);
316  char ts[] = "dd-Mon-yyyy hh:mm:ss TZN ";
317  strftime(ts, strlen(ts) + 1, "%d-%b-%Y %H:%M:%S %Z", localtime(&t));
318  mf::LogVerbatim("ArtReport")
319  << "Begin processing the " << readCount_ << suffix(readCount_)
320  << " record. " << eventID << " at " << ts;
321  // At some point we may want to initiate checkpointing here
322  }
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
bool art::DecrepitRelicInputSourceImplementation::limitReached ( ) const
inlineprivate
int art::DecrepitRelicInputSourceImplementation::maxEvents ( ) const
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_.

int art::DecrepitRelicInputSourceImplementation::maxSubRuns ( ) const
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_.

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:100
input::ItemType art::DecrepitRelicInputSourceImplementation::nextItemType ( )
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().

141  {
142  if (doneReadAhead_) {
143  return state_;
144  }
145  doneReadAhead_ = true;
146  input::ItemType oldState = state_;
147  if (eventLimitReached()) {
148  // If the maximum event limit has been reached, stop.
150  } else if (subRunLimitReached()) {
151  // If the maximum subRun limit has been reached, stop
152  // when reaching a new file, run, or subRun.
153  if (oldState == input::IsInvalid || oldState == input::IsFile ||
154  oldState == input::IsRun ||
157  } else {
158  input::ItemType newState = nextItemType_();
159  if (newState == input::IsEvent) {
162  } else {
164  }
165  }
166  } else {
167  input::ItemType newState = nextItemType_();
168  if (newState == input::IsStop) {
170  } else if (newState == input::IsFile || oldState == input::IsInvalid) {
172  } else if (newState == input::IsRun || oldState == input::IsFile) {
175  } else if (newState == input::IsSubRun || oldState == input::IsRun) {
176  assert(processingMode() != Runs);
179  } else {
182  }
183  }
184  if (state_ == input::IsStop) {
185  subRunPrincipal_.reset();
186  runPrincipal_.reset();
187  // FIXME: upon the advent of a catalog system which can do
188  // something intelligent with the difference between whole-file
189  // success, partial-file success, partial-file failure and
190  // whole-file failure (such as file-open failure), we will need to
191  // communicate that difference here. The file disposition options
192  // as they are now (and the mapping to any concrete implementation
193  // we are are aware of currently) are not sufficient to the task,
194  // so we deliberately do not distinguish here between partial-file
195  // and whole-file success in particular.
196  finish();
197  }
198  return state_;
199  }
virtual std::unique_ptr< SubRunPrincipal > readSubRun_()=0
virtual std::unique_ptr< RunPrincipal > readRun_()=0
ProcessingMode processingMode() const
RunsSubRunsAndEvents (default), RunsAndSubRuns, or Runs.
input::ItemType art::DecrepitRelicInputSourceImplementation::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().

125  {
126  input::ItemType itemType = getNextItemType();
127  if (itemType == input::IsEvent &&
129  readEvent_();
130  return nextItemType_();
131  }
132  if (itemType == input::IsSubRun && processingMode() == Runs) {
133  readSubRun_();
134  return nextItemType_();
135  }
136  return itemType;
137  }
virtual std::unique_ptr< SubRunPrincipal > readSubRun_()=0
virtual std::unique_ptr< EventPrincipal > readEvent_()=0
virtual input::ItemType getNextItemType()=0
ProcessingMode processingMode() const
RunsSubRunsAndEvents (default), RunsAndSubRuns, or Runs.
DecrepitRelicInputSourceImplementation& art::DecrepitRelicInputSourceImplementation::operator= ( DecrepitRelicInputSourceImplementation const &  )
delete
auto const& art::InputSource::processConfiguration ( ) const
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().

65  {
67  }
ModuleDescription moduleDescription_
Definition: InputSource.h:100
ProcessConfiguration const & processConfiguration() const
ProcessingMode art::DecrepitRelicInputSourceImplementation::processingMode ( ) const
inline
std::unique_ptr< EventPrincipal > art::DecrepitRelicInputSourceImplementation::readEvent ( cet::exempt_ptr< SubRunPrincipal const >  srp)
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_().

275  {
276  assert(doneReadAhead_);
277  assert(state_ == input::IsEvent);
278  assert(!eventLimitReached());
279  doneReadAhead_ = false;
280 
282  assert(srp->run() == eventPrincipal_->run());
283  assert(srp->subRun() == eventPrincipal_->subRun());
284  eventPrincipal_->setSubRunPrincipal(srp);
285  if (eventPrincipal_.get() != nullptr) {
286  if (remainingEvents_ > 0)
288  ++readCount_;
289  setTimestamp(eventPrincipal_->time());
290  if ((reportFrequency_ > 0) && !(readCount_ % reportFrequency_)) {
292  }
293  }
294  return std::move(eventPrincipal_);
295  }
void issueReports(EventID const &eventID)
issue an event report
virtual std::unique_ptr< EventPrincipal > readEvent_()=0
void setTimestamp(Timestamp const &theTime)
To set the current time, as seen by the input source.
std::unique_ptr< EventPrincipal > art::DecrepitRelicInputSourceImplementation::readEvent ( EventID const &  )
overridevirtual

Read a specific event.

Reimplemented from art::InputSource.

Definition at line 298 of file DecrepitRelicInputSourceImplementation.cc.

References art::errors::LogicError.

299  {
301  << "DecrepitRelicInputSourceImplementation::readEvent()\n"
302  << "Random access is not implemented for this type of Input Source\n"
303  << "Contact a Framework Developer\n";
304  }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
virtual std::unique_ptr<EventPrincipal> art::DecrepitRelicInputSourceImplementation::readEvent_ ( )
privatepure virtual

Implemented in art::RootInput, and art::EmptyEvent.

Referenced by limitReached(), nextItemType_(), and readEvent().

std::unique_ptr< FileBlock > art::DecrepitRelicInputSourceImplementation::readFile ( )
overridevirtual
std::unique_ptr< FileBlock > art::DecrepitRelicInputSourceImplementation::readFile_ ( )
privatevirtual

Reimplemented in art::RootInput.

Definition at line 235 of file DecrepitRelicInputSourceImplementation.cc.

Referenced by limitReached(), and readFile().

236  {
237  return std::make_unique<FileBlock>();
238  }
std::unique_ptr< RunPrincipal > art::DecrepitRelicInputSourceImplementation::readRun ( )
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().

242  {
243  // Note: For the moment, we do not support saving and restoring the state of
244  // the random number generator if random numbers are generated during
245  // processing of runs (e.g. beginRun(), endRun())
246  assert(doneReadAhead_);
247  assert(state_ == input::IsRun);
248  assert(!limitReached());
249  doneReadAhead_ = false;
251  return std::move(runPrincipal_);
252  }
virtual std::unique_ptr<RunPrincipal> art::DecrepitRelicInputSourceImplementation::readRun_ ( )
privatepure virtual

Implemented in art::RootInput, and art::EmptyEvent.

Referenced by limitReached(), and nextItemType().

std::unique_ptr< SubRunPrincipal > art::DecrepitRelicInputSourceImplementation::readSubRun ( cet::exempt_ptr< RunPrincipal const >  rp)
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().

257  {
258  // Note: For the moment, we do not support saving and restoring the state of
259  // the random number generator if random numbers are generated during
260  // processing of subRuns (e.g. beginSubRun(), endSubRun())
261  assert(doneReadAhead_);
262  assert(state_ == input::IsSubRun);
263  assert(!limitReached());
264  doneReadAhead_ = false;
266  assert(subRunPrincipal_->run() == rp->run());
267  subRunPrincipal_->setRunPrincipal(rp);
269  return std::move(subRunPrincipal_);
270  }
virtual std::unique_ptr<SubRunPrincipal> art::DecrepitRelicInputSourceImplementation::readSubRun_ ( )
privatepure virtual

Implemented in art::RootInput, and art::EmptyEvent.

Referenced by limitReached(), nextItemType(), and nextItemType_().

int art::DecrepitRelicInputSourceImplementation::remainingEvents ( ) const
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_.

int art::DecrepitRelicInputSourceImplementation::remainingSubRuns ( ) const
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_.

void art::DecrepitRelicInputSourceImplementation::reset ( void  )
inlineprotected
void art::DecrepitRelicInputSourceImplementation::resetEventPrincipal ( )
inlineprotected

Definition at line 267 of file DecrepitRelicInputSourceImplementation.h.

References eventPrincipal_.

268  {
269  eventPrincipal_.reset();
270  }
void art::DecrepitRelicInputSourceImplementation::resetRunPrincipal ( )
inlineprotected

Definition at line 257 of file DecrepitRelicInputSourceImplementation.h.

References runPrincipal_.

Referenced by art::EmptyEvent::getNextItemType(), and art::EmptyEvent::rewind_().

258  {
259  runPrincipal_.reset();
260  }
void art::DecrepitRelicInputSourceImplementation::resetSubRunPrincipal ( )
inlineprotected

Definition at line 262 of file DecrepitRelicInputSourceImplementation.h.

References subRunPrincipal_.

Referenced by art::EmptyEvent::getNextItemType(), and art::EmptyEvent::rewind_().

263  {
264  subRunPrincipal_.reset();
265  }
void art::DecrepitRelicInputSourceImplementation::rewind ( )
inlineoverridevirtual
void art::DecrepitRelicInputSourceImplementation::rewind_ ( )
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().

335  {
337  << "DecrepitRelicInputSourceImplementation::rewind()\n"
338  << "Rewind is not implemented for this type of Input Source\n"
339  << "Contact a Framework Developer\n";
340  }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::unique_ptr<RunPrincipal> art::DecrepitRelicInputSourceImplementation::runPrincipal ( )
inlineprotected

Definition at line 234 of file DecrepitRelicInputSourceImplementation.h.

References cachedRunPrincipal_, and runPrincipal_.

Referenced by art::RootInput::readRun().

235  {
237  return std::move(runPrincipal_);
238  }
cet::exempt_ptr<RunPrincipal> art::DecrepitRelicInputSourceImplementation::runPrincipalExemptPtr ( )
inlineprotected
virtual std::unique_ptr<RangeSetHandler> art::InputSource::runRangeSetHandler ( )
pure virtualinherited
void art::DecrepitRelicInputSourceImplementation::setEventPrincipal ( std::unique_ptr< EventPrincipal > &&  ep)
protected

Definition at line 105 of file DecrepitRelicInputSourceImplementation.cc.

References cachedSubRunPrincipal_, and eventPrincipal_.

Referenced by eventPrincipal(), and art::RootInput::nextItemType().

107  {
108  assert(cachedSubRunPrincipal_);
109  eventPrincipal_ = std::move(ep);
110  eventPrincipal_->setSubRunPrincipal(cachedSubRunPrincipal_);
111  }
void art::DecrepitRelicInputSourceImplementation::setRunPrincipal ( std::unique_ptr< RunPrincipal > &&  rp)
protected

Definition at line 89 of file DecrepitRelicInputSourceImplementation.cc.

References runPrincipal_.

Referenced by eventPrincipal(), and art::RootInput::nextItemType().

91  {
92  runPrincipal_ = std::move(rp);
93  }
void art::DecrepitRelicInputSourceImplementation::setSubRunPrincipal ( std::unique_ptr< SubRunPrincipal > &&  srp)
protected

Definition at line 96 of file DecrepitRelicInputSourceImplementation.cc.

References cachedRunPrincipal_, and subRunPrincipal_.

Referenced by eventPrincipal(), and art::RootInput::nextItemType().

98  {
99  assert(cachedRunPrincipal_);
100  subRunPrincipal_ = std::move(srp);
101  subRunPrincipal_->setRunPrincipal(cachedRunPrincipal_);
102  }
void art::DecrepitRelicInputSourceImplementation::setTimestamp ( Timestamp const &  theTime)
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_().

void art::DecrepitRelicInputSourceImplementation::skip ( int  )
privatevirtual

Reimplemented in art::EmptyEvent.

Definition at line 325 of file DecrepitRelicInputSourceImplementation.cc.

References art::errors::LogicError.

Referenced by closeFile_(), and skipEvents().

326  {
328  << "DecrepitRelicInputSourceImplementation::skip()\n"
329  << "Random access is not implemented for this type of Input Source\n"
330  << "Contact a Framework Developer\n";
331  }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
void art::DecrepitRelicInputSourceImplementation::skipEvents ( int  offset)
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().

308  {
309  this->skip(offset);
310  }
input::ItemType art::DecrepitRelicInputSourceImplementation::state ( ) const
inlineprotected

Definition at line 211 of file DecrepitRelicInputSourceImplementation.h.

References state_.

Referenced by art::RootInput::AccessState::state().

bool art::DecrepitRelicInputSourceImplementation::subRunLimitReached ( ) const
inlineprivate
std::unique_ptr<SubRunPrincipal> art::DecrepitRelicInputSourceImplementation::subRunPrincipal ( )
inlineprotected

Definition at line 241 of file DecrepitRelicInputSourceImplementation.h.

References cachedSubRunPrincipal_, and subRunPrincipal_.

Referenced by art::RootInput::readSubRun().

242  {
244  return std::move(subRunPrincipal_);
245  }
cet::exempt_ptr<SubRunPrincipal> art::DecrepitRelicInputSourceImplementation::subRunPrincipalExemptPtr ( )
inlineprotected

Definition at line 228 of file DecrepitRelicInputSourceImplementation.h.

References cachedSubRunPrincipal_.

229  {
230  return cachedSubRunPrincipal_;
231  }
virtual std::unique_ptr<RangeSetHandler> art::InputSource::subRunRangeSetHandler ( )
pure virtualinherited
Timestamp const& art::DecrepitRelicInputSourceImplementation::timestamp ( ) const
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().

Member Data Documentation

cet::exempt_ptr<RunPrincipal> art::DecrepitRelicInputSourceImplementation::cachedRunPrincipal_ {nullptr}
private
cet::exempt_ptr<SubRunPrincipal> art::DecrepitRelicInputSourceImplementation::cachedSubRunPrincipal_ {nullptr}
private
bool art::DecrepitRelicInputSourceImplementation::doneReadAhead_ {false}
private
std::unique_ptr<EventPrincipal> art::DecrepitRelicInputSourceImplementation::eventPrincipal_ {nullptr}
private
int art::DecrepitRelicInputSourceImplementation::maxEvents_
private
int art::DecrepitRelicInputSourceImplementation::maxSubRuns_
private
int art::DecrepitRelicInputSourceImplementation::readCount_ {}
private

Definition at line 315 of file DecrepitRelicInputSourceImplementation.h.

Referenced by issueReports(), and readEvent().

int art::DecrepitRelicInputSourceImplementation::remainingEvents_ {maxEvents_}
private
int art::DecrepitRelicInputSourceImplementation::remainingSubRuns_ {maxSubRuns_}
private
int const art::DecrepitRelicInputSourceImplementation::reportFrequency_
private
std::unique_ptr<RunPrincipal> art::DecrepitRelicInputSourceImplementation::runPrincipal_ {nullptr}
private
std::unique_ptr<SubRunPrincipal> art::DecrepitRelicInputSourceImplementation::subRunPrincipal_ {nullptr}
private
Timestamp art::DecrepitRelicInputSourceImplementation::time_ {Timestamp::invalidTimestamp()}
private

Definition at line 317 of file DecrepitRelicInputSourceImplementation.h.

Referenced by setTimestamp(), and timestamp().


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