Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
art::EmptyEvent Class Referencefinal
Inheritance diagram for art::EmptyEvent:
art::DecrepitRelicInputSourceImplementation art::InputSource

Classes

struct  Config
 

Public Types

using Parameters = fhicl::WrappedTable< Config, Config::KeysToIgnore >
 
enum  ProcessingMode { Runs, RunsAndSubRuns, RunsSubRunsAndEvents }
 

Public Member Functions

 EmptyEvent (Parameters const &config, InputSourceDescription &desc)
 
 EmptyEvent (EmptyEvent const &)=delete
 
 EmptyEvent (EmptyEvent &&)=delete
 
EmptyEventoperator= (EmptyEvent const &)=delete
 
EmptyEventoperator= (EmptyEvent &&)=delete
 
virtual void finish ()
 
virtual input::ItemType nextItemType () override
 
virtual void closeFile () override
 
std::unique_ptr< FileBlockreadFile () override
 Read next file. More...
 
virtual std::unique_ptr< RunPrincipalreadRun () override
 
virtual std::unique_ptr< SubRunPrincipalreadSubRun (cet::exempt_ptr< RunPrincipal const >) override
 
virtual std::unique_ptr< EventPrincipalreadEvent (cet::exempt_ptr< SubRunPrincipal const >) override
 
virtual void doBeginJob () override
 
virtual void doEndJob () override
 
virtual void skipEvents (int offset) override
 
virtual void rewind () override
 
ProcessingMode processingMode () const
 
int maxEvents () const
 
int remainingEvents () const
 
int maxSubRuns () const
 
int remainingSubRuns () const
 
void repeat_ ()
 
void issueReports (EventID const &eventID)
 
ModuleDescription const & moduleDescription () const
 
ProcessConfiguration const & processConfiguration () const
 

Protected Member Functions

input::ItemType state () const
 
void setState (input::ItemType)
 
void reset ()
 

Private Member Functions

unique_ptr< RangeSetHandlerrunRangeSetHandler () override
 
unique_ptr< RangeSetHandlersubRunRangeSetHandler () override
 
input::ItemType getNextItemType () override
 
unique_ptr< RunPrincipalreadRun_ () override
 
unique_ptr< SubRunPrincipalreadSubRun_ (cet::exempt_ptr< RunPrincipal const >) override
 
unique_ptr< EventPrincipalreadEvent_ () override
 
unique_ptr< EmptyEventTimestampPluginmakePlugin_ (OptionalDelegatedParameter const &maybeConfig)
 
void beginJob () override
 
void endJob () override
 
void skip (int offset) override
 
void rewind_ () override
 

Private Attributes

unsigned const numberEventsInRun_
 
unsigned const numberEventsInSubRun_
 
steady_clock::time_point const beginTime_ {steady_clock::now()}
 
std::chrono::seconds const maxTime_
 
std::chrono::microseconds const eventCreationDelay_
 
unsigned numberEventsInThisRun_ {}
 
unsigned numberEventsInThisSubRun_ {}
 
EventID origEventID_ {}
 
EventID eventID_ {}
 
bool firstTime_ {true}
 
bool newFile_ {true}
 
bool newRun_ {true}
 
bool newSubRun_ {true}
 
bool const resetEventOnSubRun_
 
cet::BasicPluginFactory pluginFactory_ {}
 
unique_ptr< EmptyEventTimestampPluginplugin_
 

Detailed Description

Definition at line 44 of file EmptyEvent_source.cc.

Member Typedef Documentation

Definition at line 97 of file EmptyEvent_source.cc.

Member Enumeration Documentation

Enumerator
Runs 
RunsAndSubRuns 
RunsSubRunsAndEvents 

Definition at line 67 of file InputSource.h.

Constructor & Destructor Documentation

art::EmptyEvent::EmptyEvent ( Parameters const &  config,
InputSourceDescription desc 
)

Definition at line 141 of file EmptyEvent_source.cc.

References gen_hdf5record::config, art::errors::Configuration, eventCreationDelay_, eventID_, art::EventID::firstEvent(), art::RunID::firstRun(), fillBadChanDBTables::firstRun, art::SubRunID::firstSubRun(), makePlugin_(), maxTime_, art::InputSourceDescription::moduleDescription, numberEventsInRun_, numberEventsInSubRun_, origEventID_, plugin_, resetEventOnSubRun_, art::SubRunID::run(), art::RunID::run(), and art::SubRunID::subRun().

144  desc.moduleDescription}
145  , numberEventsInRun_{static_cast<uint32_t>(config().numberEventsInRun())}
146  , numberEventsInSubRun_{static_cast<uint32_t>(
147  config().numberEventsInSubRun())}
148  , maxTime_{config().maxTime()}
149  , eventCreationDelay_{config().eventCreationDelay()}
150  , resetEventOnSubRun_{config().resetEventOnSubRun()}
151  , plugin_{makePlugin_(config().timestampPlugin)}
152 {
153  // Additional configuration checking which is cumbersome to do with
154  // the FHiCL validation system.
155  auto const& pset = config.get_PSet();
156  if (pset.has_key("maxTime") &&
157  (pset.has_key("maxEvents") || pset.has_key("maxSubRuns"))) {
158  throw Exception{
160  "An error occurred while configuring the EmptyEvent source.\n"}
161  << "The 'maxTime' parameter cannot be used with the 'maxEvents' or "
162  "'maxSubRuns' parameters.\n"
163  "Type 'art --print-description EmptyEvent' for the allowed "
164  "configuration.\n";
165  }
166 
168  bool haveFirstRun = config().firstRun(firstRun);
169  SubRunNumber_t firstSubRun{};
170  bool haveFirstSubRun = config().firstSubRun(firstSubRun);
171  EventNumber_t firstEvent{};
172  bool haveFirstEvent = config().firstEvent(firstEvent);
173  RunID firstRunID = haveFirstRun ? RunID(firstRun) : RunID::firstRun();
174  SubRunID firstSubRunID = haveFirstSubRun ?
175  SubRunID(firstRunID.run(), firstSubRun) :
176  SubRunID::firstSubRun(firstRunID);
177  origEventID_ =
178  haveFirstEvent ?
179  EventID(firstSubRunID.run(), firstSubRunID.subRun(), firstEvent) :
180  EventID::firstEvent(firstSubRunID);
182 }
std::chrono::microseconds const eventCreationDelay_
static EventID firstEvent()
Definition: EventID.h:190
unique_ptr< EmptyEventTimestampPlugin > makePlugin_(OptionalDelegatedParameter const &maybeConfig)
unsigned const numberEventsInRun_
Definition: config.py:1
unsigned const numberEventsInSubRun_
std::chrono::seconds const maxTime_
DecrepitRelicInputSourceImplementation(fhicl::TableFragment< Config > const &, ModuleDescription const &)
IDNumber_t< Level::SubRun > SubRunNumber_t
Definition: IDNumber.h:119
unique_ptr< EmptyEventTimestampPlugin > plugin_
static SubRunID firstSubRun()
Definition: SubRunID.h:151
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
IDNumber_t< Level::Event > EventNumber_t
Definition: IDNumber.h:118
bool const resetEventOnSubRun_
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:120
art::EmptyEvent::EmptyEvent ( EmptyEvent const &  )
delete
art::EmptyEvent::EmptyEvent ( EmptyEvent &&  )
delete

Member Function Documentation

void art::EmptyEvent::beginJob ( )
overrideprivatevirtual

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 347 of file EmptyEvent_source.cc.

References plugin_.

348 {
349  if (plugin_) {
350  plugin_->doBeginJob();
351  }
352 }
unique_ptr< EmptyEventTimestampPlugin > plugin_
virtual void art::DecrepitRelicInputSourceImplementation::closeFile ( )
overridevirtualinherited
virtual void art::DecrepitRelicInputSourceImplementation::doBeginJob ( )
overridevirtualinherited
virtual void art::DecrepitRelicInputSourceImplementation::doEndJob ( )
overridevirtualinherited
void art::EmptyEvent::endJob ( )
overrideprivatevirtual

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 355 of file EmptyEvent_source.cc.

References plugin_.

356 {
357  if (plugin_) {
358  plugin_->doEndJob();
359  }
360 }
unique_ptr< EmptyEventTimestampPlugin > plugin_
virtual void art::DecrepitRelicInputSourceImplementation::finish ( )
inlinevirtualinherited

Definition at line 106 of file DecrepitRelicInputSourceImplementation.h.

References art::DecrepitRelicInputSourceImplementation::beginJob(), art::DecrepitRelicInputSourceImplementation::closeFile(), art::DecrepitRelicInputSourceImplementation::closeFile_(), art::DecrepitRelicInputSourceImplementation::doBeginJob(), art::DecrepitRelicInputSourceImplementation::doEndJob(), art::DecrepitRelicInputSourceImplementation::endJob(), eventID, art::DecrepitRelicInputSourceImplementation::getNextItemType(), art::DecrepitRelicInputSourceImplementation::issueReports(), art::DecrepitRelicInputSourceImplementation::Config::maxEvents, art::DecrepitRelicInputSourceImplementation::Config::maxSubRuns, art::DecrepitRelicInputSourceImplementation::nextItemType(), PandAna.reco_validation.add_data::offset, art::DecrepitRelicInputSourceImplementation::Config::processingMode, art::DecrepitRelicInputSourceImplementation::readEvent(), art::DecrepitRelicInputSourceImplementation::readEvent_(), art::DecrepitRelicInputSourceImplementation::readFile(), art::DecrepitRelicInputSourceImplementation::readFile_(), art::DecrepitRelicInputSourceImplementation::readRun(), art::DecrepitRelicInputSourceImplementation::readRun_(), art::DecrepitRelicInputSourceImplementation::readSubRun(), art::DecrepitRelicInputSourceImplementation::readSubRun_(), art::DecrepitRelicInputSourceImplementation::remainingEvents(), art::DecrepitRelicInputSourceImplementation::remainingSubRuns(), art::DecrepitRelicInputSourceImplementation::repeat_(), art::DecrepitRelicInputSourceImplementation::reset(), art::DecrepitRelicInputSourceImplementation::rewind(), art::DecrepitRelicInputSourceImplementation::rewind_(), art::DecrepitRelicInputSourceImplementation::setState(), art::DecrepitRelicInputSourceImplementation::skip(), art::DecrepitRelicInputSourceImplementation::skipEvents(), and art::DecrepitRelicInputSourceImplementation::state().

107  {}
art::input::ItemType art::EmptyEvent::getNextItemType ( )
overrideprivatevirtual

Implements art::DecrepitRelicInputSourceImplementation.

Definition at line 185 of file EmptyEvent_source.cc.

References beginTime_, art::EventID::event(), eventCreationDelay_, eventID_, firstTime_, art::input::IsEvent, art::input::IsFile, art::input::IsRun, art::input::IsStop, art::input::IsSubRun, art::SubRunID::isValid(), art::RunID::isValid(), art::EventID::isValid(), maxTime_, Munits::ms, newFile_, newRun_, newSubRun_, art::EventID::next(), art::EventID::nextRun(), art::EventID::nextSubRun(), recentWatchdog::now, numberEventsInRun_, numberEventsInSubRun_, numberEventsInThisRun_, numberEventsInThisSubRun_, origEventID_, resetEventOnSubRun_, art::EventID::run(), art::EventID::runID(), art::EventID::subRun(), and art::EventID::subRunID().

186 {
187  // Trigger framework stop if max allowed time is exceeded.
188  // N.B. Since the begin time corresponds to source construction and
189  // not the actual event loop, there will be minor differences wrt
190  // the time reported for executing a given job.
192  return input::IsStop;
193  }
194  // First check for sanity because skip(offset) can be abused and so can the
195  // ctor.
196  if (!eventID_.runID().isValid()) {
197  return input::IsStop;
198  }
199  if (!eventID_.subRunID().isValid()) {
200  return input::IsStop;
201  }
202  if (!eventID_.isValid()) {
203  return input::IsStop;
204  }
205  if (newFile_) {
206  newFile_ = false;
207  return input::IsFile;
208  }
209  if (newRun_) {
210  newRun_ = false;
211  if (eventCreationDelay_ > 0ms) {
212  std::this_thread::sleep_for(eventCreationDelay_);
213  }
214  return input::IsRun;
215  }
216  if (newSubRun_) {
217  newSubRun_ = false;
218  if (eventCreationDelay_ > 0ms) {
219  std::this_thread::sleep_for(eventCreationDelay_);
220  }
221  return input::IsSubRun;
222  }
223  if ((numberEventsInRun_ > 0) &&
225  // Time to switch runs.
226  newRun_ = false;
227  newSubRun_ = true;
230  eventID_ = EventID(
232  firstTime_ = true;
233  if (eventCreationDelay_ > 0ms) {
234  std::this_thread::sleep_for(eventCreationDelay_);
235  }
236  return input::IsRun;
237  }
238  if ((numberEventsInSubRun_ > 0) &&
240  // Time to switch subruns.
241  newRun_ = false;
242  newSubRun_ = false;
244  if (resetEventOnSubRun_) {
246  } else {
248  }
249  firstTime_ = true;
250  if (eventCreationDelay_ > 0ms) {
251  std::this_thread::sleep_for(eventCreationDelay_);
252  }
253  return input::IsSubRun;
254  }
255  // same run and subrun
256  if (!firstTime_) {
257  eventID_ = eventID_.next();
258  if (!eventID_.runID().isValid()) {
259  return input::IsStop;
260  }
261  }
262  firstTime_ = false;
265  if (eventCreationDelay_ > 0ms) {
266  std::this_thread::sleep_for(eventCreationDelay_);
267  }
268  return input::IsEvent;
269 }
static constexpr Double_t ms
Definition: Munits.h:192
std::chrono::microseconds const eventCreationDelay_
RunID const & runID() const
Definition: EventID.h:92
unsigned numberEventsInThisRun_
bool isValid() const
Definition: EventID.h:122
unsigned const numberEventsInRun_
EventID nextSubRun(EventNumber_t first=IDNumber< Level::Event >::first()) const
Definition: EventID.h:147
RunNumber_t run() const
Definition: EventID.h:98
bool isValid() const
Definition: SubRunID.h:95
EventID nextRun() const
Definition: EventID.h:153
steady_clock::time_point const beginTime_
unsigned const numberEventsInSubRun_
std::chrono::seconds const maxTime_
SubRunID const & subRunID() const
Definition: EventID.h:104
EventID next() const
Definition: EventID.h:134
EventNumber_t event() const
Definition: EventID.h:116
SubRunNumber_t subRun() const
Definition: EventID.h:110
bool isValid() const
Definition: RunID.h:70
bool const resetEventOnSubRun_
unsigned numberEventsInThisSubRun_
void art::DecrepitRelicInputSourceImplementation::issueReports ( EventID const &  eventID)
inherited
std::unique_ptr< art::EmptyEventTimestampPlugin > art::EmptyEvent::makePlugin_ ( OptionalDelegatedParameter const &  maybeConfig)
private

Definition at line 363 of file EmptyEvent_source.cc.

References art::errors::Configuration, e, fhicl::ParameterSet::get(), fhicl::OptionalDelegatedParameter::get_if_present(), cet::BasicPluginFactory::makePlugin(), pluginFactory_, cet::BasicPluginFactory::pluginType(), fillBadChanDBTables::result, and string.

Referenced by EmptyEvent().

364 {
365  std::unique_ptr<EmptyEventTimestampPlugin> result;
366  try {
367  ParameterSet pset;
368  if (maybeConfig.get_if_present(pset)) {
369  auto const libspec = pset.get<std::string>("plugin_type");
370  auto const pluginType = pluginFactory_.pluginType(libspec);
371  if (pluginType ==
373  result = pluginFactory_.makePlugin<decltype(result)>(libspec, pset);
374  } else {
375  throw Exception(errors::Configuration, "EmptyEvent: ")
376  << "unrecognized plugin type " << pluginType << "for plugin "
377  << libspec << ".\n";
378  }
379  }
380  }
381  catch (cet::exception& e) {
382  throw Exception(errors::Configuration, "EmptyEvent: ", e)
383  << "Exception caught while processing plugin spec.\n";
384  }
385  return result;
386 }
std::enable_if_t<!std::is_function_v< RESULT_TYPE >, RESULT_TYPE > makePlugin(std::string const &libspec, ARGS &&...args) const
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
T get(std::string const &key) const
Definition: ParameterSet.h:231
cet::BasicPluginFactory pluginFactory_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::string pluginType(std::string const &libspec) const
Float_t e
Definition: plot.C:35
enum BeamMode string
int art::DecrepitRelicInputSourceImplementation::maxEvents ( ) const
inherited
int art::DecrepitRelicInputSourceImplementation::maxSubRuns ( ) const
inherited
ModuleDescription const& art::InputSource::moduleDescription ( ) const
inherited

Referenced by readRun_(), and readSubRun_().

virtual input::ItemType art::DecrepitRelicInputSourceImplementation::nextItemType ( )
overridevirtualinherited
EmptyEvent& art::EmptyEvent::operator= ( EmptyEvent const &  )
delete
EmptyEvent& art::EmptyEvent::operator= ( EmptyEvent &&  )
delete
ProcessConfiguration const& art::InputSource::processConfiguration ( ) const
inherited

Referenced by readEvent_(), readRun_(), and readSubRun_().

ProcessingMode art::DecrepitRelicInputSourceImplementation::processingMode ( ) const
inherited

Referenced by readEvent_(), and readSubRun_().

virtual std::unique_ptr<EventPrincipal> art::DecrepitRelicInputSourceImplementation::readEvent ( cet::exempt_ptr< SubRunPrincipal const >  )
overridevirtualinherited
unique_ptr< art::EventPrincipal > art::EmptyEvent::readEvent_ ( )
overrideprivatevirtual

Implements art::DecrepitRelicInputSourceImplementation.

Definition at line 313 of file EmptyEvent_source.cc.

References art::EventAuxiliary::Any, ana::assert(), eventID_, art::Timestamp::invalidTimestamp(), numberEventsInSubRun_, numberEventsInThisSubRun_, plugin_, art::InputSource::processConfiguration(), art::DecrepitRelicInputSourceImplementation::processingMode(), fillBadChanDBTables::result, art::InputSource::RunsSubRunsAndEvents, and submit_nova_art::timestamp.

314 {
315  unique_ptr<EventPrincipal> result;
317  return result;
318  }
319  auto timestamp = plugin_ ? plugin_->doEventTimestamp(eventID_) :
321  EventAuxiliary const eventAux{
323  result = make_unique<EventPrincipal>(eventAux,
325  nullptr,
326  make_unique<History>(),
327  make_unique<NoDelayedReader>(),
330  assert(result.get() != nullptr);
331  return result;
332 }
unsigned const numberEventsInSubRun_
ProcessConfiguration const & processConfiguration() const
unique_ptr< EmptyEventTimestampPlugin > plugin_
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:82
assert(nhit_max >=nhit_nbins)
unsigned numberEventsInThisSubRun_
std::unique_ptr<FileBlock> art::DecrepitRelicInputSourceImplementation::readFile ( )
overridevirtualinherited

Read next file.

Implements art::InputSource.

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

virtual std::unique_ptr<RunPrincipal> art::DecrepitRelicInputSourceImplementation::readRun ( )
overridevirtualinherited
unique_ptr< art::RunPrincipal > art::EmptyEvent::readRun_ ( )
overrideprivatevirtual

Implements art::DecrepitRelicInputSourceImplementation.

Definition at line 272 of file EmptyEvent_source.cc.

References ana::assert(), eventID_, art::Timestamp::invalidTimestamp(), mc, art::InputSource::moduleDescription(), plugin_, art::InputSource::processConfiguration(), r(), fillBadChanDBTables::result, and art::EventID::runID().

273 {
274  unique_ptr<RunPrincipal> result;
275  auto ts = plugin_ ? plugin_->doBeginRunTimestamp(eventID_.runID()) :
277  RunAuxiliary const runAux{
279  result = make_unique<RunPrincipal>(runAux, processConfiguration(), nullptr);
280  assert(result.get() != nullptr);
281  if (plugin_) {
282  ModuleContext const mc{moduleDescription()};
283  Run const r{*result, mc};
284  plugin_->doBeginRun(r);
285  }
286  return result;
287 }
RunID const & runID() const
Definition: EventID.h:92
ModuleDescription const & moduleDescription() const
ProcessConfiguration const & processConfiguration() const
unique_ptr< EmptyEventTimestampPlugin > plugin_
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:82
assert(nhit_max >=nhit_nbins)
TRandom3 r(0)
virtual std::unique_ptr<SubRunPrincipal> art::DecrepitRelicInputSourceImplementation::readSubRun ( cet::exempt_ptr< RunPrincipal const >  )
overridevirtualinherited
unique_ptr< art::SubRunPrincipal > art::EmptyEvent::readSubRun_ ( cet::exempt_ptr< RunPrincipal const >  rp)
overrideprivatevirtual

Implements art::DecrepitRelicInputSourceImplementation.

Definition at line 290 of file EmptyEvent_source.cc.

References ana::assert(), eventID_, art::Timestamp::invalidTimestamp(), mc, art::InputSource::moduleDescription(), plugin_, art::InputSource::processConfiguration(), art::DecrepitRelicInputSourceImplementation::processingMode(), fillBadChanDBTables::result, art::InputSource::Runs, sr, and art::EventID::subRunID().

291 {
292  unique_ptr<SubRunPrincipal> result;
293  if (processingMode() == Runs) {
294  return result;
295  }
296  auto ts = plugin_ ? plugin_->doBeginSubRunTimestamp(eventID_.subRunID()) :
298  SubRunAuxiliary const subRunAux{
300  result =
301  make_unique<SubRunPrincipal>(subRunAux, processConfiguration(), nullptr);
302  assert(result.get() != nullptr);
303  result->setRunPrincipal(rp);
304  if (plugin_) {
305  ModuleContext const mc{moduleDescription()};
306  SubRun const sr{*result, mc};
307  plugin_->doBeginSubRun(sr);
308  }
309  return result;
310 }
ModuleDescription const & moduleDescription() const
SubRunID const & subRunID() const
Definition: EventID.h:104
caf::StandardRecord * sr
ProcessConfiguration const & processConfiguration() const
unique_ptr< EmptyEventTimestampPlugin > plugin_
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:82
assert(nhit_max >=nhit_nbins)
int art::DecrepitRelicInputSourceImplementation::remainingEvents ( ) const
inherited
int art::DecrepitRelicInputSourceImplementation::remainingSubRuns ( ) const
inherited
void art::DecrepitRelicInputSourceImplementation::repeat_ ( )
inherited
void art::DecrepitRelicInputSourceImplementation::reset ( )
protectedinherited
virtual void art::DecrepitRelicInputSourceImplementation::rewind ( )
overridevirtualinherited
void art::EmptyEvent::rewind_ ( )
overrideprivatevirtual

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 400 of file EmptyEvent_source.cc.

References DEFINE_ART_INPUT_SOURCE, eventID_, firstTime_, newFile_, newRun_, newSubRun_, numberEventsInThisRun_, numberEventsInThisSubRun_, origEventID_, and plugin_.

401 {
402  if (plugin_) {
403  plugin_->doRewind();
404  }
405  firstTime_ = true;
406  newFile_ = true;
407  newRun_ = true;
408  newSubRun_ = true;
412 }
unsigned numberEventsInThisRun_
unique_ptr< EmptyEventTimestampPlugin > plugin_
unsigned numberEventsInThisSubRun_
unique_ptr< art::RangeSetHandler > art::EmptyEvent::runRangeSetHandler ( )
overrideprivatevirtual

Implements art::InputSource.

Definition at line 335 of file EmptyEvent_source.cc.

References eventID_, and art::EventID::run().

336 {
337  return make_unique<OpenRangeSetHandler>(eventID_.run());
338 }
RunNumber_t run() const
Definition: EventID.h:98
void art::DecrepitRelicInputSourceImplementation::setState ( input::ItemType  )
protectedinherited
void art::EmptyEvent::skip ( int  offset)
overrideprivatevirtual

Reimplemented from art::DecrepitRelicInputSourceImplementation.

Definition at line 389 of file EmptyEvent_source.cc.

References eventID_, art::EventID::next(), PandAna.reco_validation.add_data::offset, and art::EventID::previous().

390 {
391  for (; offset < 0; ++offset) {
393  }
394  for (; offset > 0; --offset) {
395  eventID_ = eventID_.next();
396  }
397 }
EventID previous() const
Definition: EventID.h:159
EventID next() const
Definition: EventID.h:134
virtual void art::DecrepitRelicInputSourceImplementation::skipEvents ( int  offset)
overridevirtualinherited
input::ItemType art::DecrepitRelicInputSourceImplementation::state ( ) const
protectedinherited
unique_ptr< art::RangeSetHandler > art::EmptyEvent::subRunRangeSetHandler ( )
overrideprivatevirtual

Implements art::InputSource.

Definition at line 341 of file EmptyEvent_source.cc.

References eventID_, and art::EventID::run().

342 {
343  return make_unique<OpenRangeSetHandler>(eventID_.run());
344 }
RunNumber_t run() const
Definition: EventID.h:98

Member Data Documentation

steady_clock::time_point const art::EmptyEvent::beginTime_ {steady_clock::now()}
private

Definition at line 123 of file EmptyEvent_source.cc.

Referenced by getNextItemType().

std::chrono::microseconds const art::EmptyEvent::eventCreationDelay_
private

Definition at line 125 of file EmptyEvent_source.cc.

Referenced by EmptyEvent(), and getNextItemType().

EventID art::EmptyEvent::eventID_ {}
private
bool art::EmptyEvent::firstTime_ {true}
private

Definition at line 130 of file EmptyEvent_source.cc.

Referenced by getNextItemType(), and rewind_().

std::chrono::seconds const art::EmptyEvent::maxTime_
private

Definition at line 124 of file EmptyEvent_source.cc.

Referenced by EmptyEvent(), and getNextItemType().

bool art::EmptyEvent::newFile_ {true}
private

Definition at line 131 of file EmptyEvent_source.cc.

Referenced by getNextItemType(), and rewind_().

bool art::EmptyEvent::newRun_ {true}
private

Definition at line 132 of file EmptyEvent_source.cc.

Referenced by getNextItemType(), and rewind_().

bool art::EmptyEvent::newSubRun_ {true}
private

Definition at line 133 of file EmptyEvent_source.cc.

Referenced by getNextItemType(), and rewind_().

unsigned const art::EmptyEvent::numberEventsInRun_
private

Definition at line 121 of file EmptyEvent_source.cc.

Referenced by EmptyEvent(), and getNextItemType().

unsigned const art::EmptyEvent::numberEventsInSubRun_
private

Definition at line 122 of file EmptyEvent_source.cc.

Referenced by EmptyEvent(), getNextItemType(), and readEvent_().

unsigned art::EmptyEvent::numberEventsInThisRun_ {}
private

Definition at line 126 of file EmptyEvent_source.cc.

Referenced by getNextItemType(), and rewind_().

unsigned art::EmptyEvent::numberEventsInThisSubRun_ {}
private

Definition at line 127 of file EmptyEvent_source.cc.

Referenced by getNextItemType(), readEvent_(), and rewind_().

EventID art::EmptyEvent::origEventID_ {}
private

Definition at line 128 of file EmptyEvent_source.cc.

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

unique_ptr<EmptyEventTimestampPlugin> art::EmptyEvent::plugin_
private
cet::BasicPluginFactory art::EmptyEvent::pluginFactory_ {}
private

Definition at line 135 of file EmptyEvent_source.cc.

Referenced by makePlugin_().

bool const art::EmptyEvent::resetEventOnSubRun_
private

Definition at line 134 of file EmptyEvent_source.cc.

Referenced by EmptyEvent(), and getNextItemType().


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