Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
art::Source< T > Class Template Reference

#include <Source.h>

Inheritance diagram for art::Source< T >:
art::InputSource

Public Types

using Parameters = typename detail::maybe_has_Parameters< T >::Parameters
 
- Public Types inherited from art::InputSource
enum  ProcessingMode { Runs, RunsAndSubRuns, RunsSubRunsAndEvents }
 

Public Member Functions

template<typename U = Parameters>
 Source (std::enable_if_t< std::is_same_v< U, fhicl::ParameterSet >, fhicl::ParameterSet > const &p, InputSourceDescription &d)
 
template<typename U = Parameters>
 Source (std::enable_if_t<!std::is_same_v< U, fhicl::ParameterSet >, U > const &p, InputSourceDescription &d)
 
 Source (Source< T > const &)=delete
 
 Source (Source< T > &&)=delete
 
Source< T > & operator= (Source< T > const &)=delete
 
Source< T > & operator= (Source< T > &&)=delete
 
- Public Member Functions inherited from art::InputSource
virtual ~InputSource () noexcept
 
 InputSource (ModuleDescription const &)
 
 InputSource (InputSource const &)=delete
 
 InputSource (InputSource &&)=delete
 
InputSourceoperator= (InputSource const &)=delete
 
InputSourceoperator= (InputSource &&)=delete
 
virtual void doBeginJob ()
 
virtual void doEndJob ()
 
virtual void skipEvents (int n)
 
virtual void rewind ()
 
ModuleDescription const & moduleDescription () const
 
ProcessConfiguration const & processConfiguration () const
 

Private Member Functions

input::ItemType nextItemType () override
 
std::unique_ptr< FileBlockreadFile () override
 
void closeFile () override
 
std::unique_ptr< RunPrincipalreadRun () override
 
std::unique_ptr< SubRunPrincipalreadSubRun (cet::exempt_ptr< RunPrincipal const > rp) override
 
std::unique_ptr< EventPrincipalreadEvent (cet::exempt_ptr< SubRunPrincipal const > srp) override
 
std::unique_ptr< RangeSetHandlerrunRangeSetHandler () override
 
std::unique_ptr< RangeSetHandlersubRunRangeSetHandler () override
 
void finishProductRegistration_ (InputSourceDescription &d)
 
bool readNext_ ()
 
void checkForNextFile_ ()
 
void readNextAndRequireRun_ ()
 
void readNextAndRefuseEvent_ ()
 
void throwIfInsane_ (bool result, RunPrincipal *newR, SubRunPrincipal *newSR, EventPrincipal *newE) const
 

Static Private Member Functions

static void throwDataCorruption_ (const char *msg)
 

Private Attributes

ProductRegistryHelper h_ {product_creation_mode::reconstitutes}
 
UpdateOutputCallbacksoutputCallbacks_
 
ProductTables presentProducts_ {ProductTables::invalid()}
 
SourceHelper sourceHelper_
 
detail_
 
input::ItemType state_ {input::IsInvalid}
 
detail::FileNamesHandler< Source_wantFileServices< T >::value > fh_
 
std::string currentFileName_ {}
 
std::unique_ptr< RunPrincipalnewRP_ {}
 
std::unique_ptr< SubRunPrincipalnewSRP_ {}
 
std::unique_ptr< EventPrincipalnewE_ {}
 
cet::exempt_ptr< RunPrincipalcachedRP_ {nullptr}
 
cet::exempt_ptr< SubRunPrincipalcachedSRP_ {nullptr}
 
bool pendingSubRun_ {false}
 
bool pendingEvent_ {false}
 
bool subRunIsNew_ {false}
 
SubRunNumber_t remainingSubRuns_ {1}
 
bool haveSRLimit_ {false}
 
EventNumber_t remainingEvents_ {1}
 
bool haveEventLimit_ {false}
 

Detailed Description

template<typename T>
class art::Source< T >

Definition at line 118 of file Source.h.

Member Typedef Documentation

template<typename T >
using art::Source< T >::Parameters = typename detail::maybe_has_Parameters<T>::Parameters

Definition at line 202 of file Source.h.

Constructor & Destructor Documentation

template<typename T >
template<typename U >
art::Source< T >::Source ( std::enable_if_t< std::is_same_v< U, fhicl::ParameterSet >, fhicl::ParameterSet > const &  p,
InputSourceDescription d 
)
explicit

Definition at line 298 of file Source.h.

301  : InputSource{d.moduleDescription}
302  , outputCallbacks_{d.productRegistry}
303  , sourceHelper_{d.moduleDescription}
305  , fh_{p.template get<std::vector<std::string>>("fileNames", {})}
306  {
307  int64_t const maxSubRuns_par = p.template get<int64_t>("maxSubRuns", -1);
308  if (maxSubRuns_par > -1) {
309  remainingSubRuns_ = maxSubRuns_par;
310  haveSRLimit_ = true;
311  }
312  int64_t const maxEvents_par = p.template get<int64_t>("maxEvents", -1);
313  if (maxEvents_par > -1) {
314  remainingEvents_ = maxEvents_par;
315  }
317  }
InputSource(ModuleDescription const &)
Definition: InputSource.cc:8
EventNumber_t remainingEvents_
Definition: Source.h:292
SourceHelper sourceHelper_
Definition: Source.h:272
p
Definition: test.py:223
void finishProductRegistration_(InputSourceDescription &d)
Definition: Source.h:709
ProductRegistryHelper h_
Definition: Source.h:267
detail::FileNamesHandler< Source_wantFileServices< T >::value > fh_
Definition: Source.h:275
SubRunNumber_t remainingSubRuns_
Definition: Source.h:290
UpdateOutputCallbacks & outputCallbacks_
Definition: Source.h:268
bool haveSRLimit_
Definition: Source.h:291
template<typename T >
template<typename U >
art::Source< T >::Source ( std::enable_if_t<!std::is_same_v< U, fhicl::ParameterSet >, U > const &  p,
InputSourceDescription d 
)
explicit

Definition at line 321 of file Source.h.

324  : InputSource{d.moduleDescription}
325  , outputCallbacks_{d.productRegistry}
326  , sourceHelper_{d.moduleDescription}
327  , detail_{p().userConfig, h_, sourceHelper_}
328  , fh_{p().sourceConfig().fileNames()}
329  {
330  if (int64_t const maxSubRuns_par = p().sourceConfig().maxSubRuns();
331  maxSubRuns_par > -1) {
332  remainingSubRuns_ = maxSubRuns_par;
333  haveSRLimit_ = true;
334  }
335  if (int64_t const maxEvents_par = p().sourceConfig().maxEvents();
336  maxEvents_par > -1) {
337  remainingEvents_ = maxEvents_par;
338  }
340  }
InputSource(ModuleDescription const &)
Definition: InputSource.cc:8
EventNumber_t remainingEvents_
Definition: Source.h:292
SourceHelper sourceHelper_
Definition: Source.h:272
p
Definition: test.py:223
void finishProductRegistration_(InputSourceDescription &d)
Definition: Source.h:709
ProductRegistryHelper h_
Definition: Source.h:267
detail::FileNamesHandler< Source_wantFileServices< T >::value > fh_
Definition: Source.h:275
SubRunNumber_t remainingSubRuns_
Definition: Source.h:290
UpdateOutputCallbacks & outputCallbacks_
Definition: Source.h:268
bool haveSRLimit_
Definition: Source.h:291
template<typename T >
art::Source< T >::Source ( Source< T > const &  )
delete
template<typename T >
art::Source< T >::Source ( Source< T > &&  )
delete

Member Function Documentation

template<typename T >
void art::Source< T >::checkForNextFile_ ( )
private

Definition at line 508 of file Source.h.

509  {
510  state_ = input::IsStop; // Default -- may change below.
513  detail::do_call_hasMoreData<T>,
514  detail::do_not_call_hasMoreData<T>>
515  generatorHasMoreData;
516  if (generatorHasMoreData(detail_)) {
518  }
519  } else {
520  currentFileName_ = fh_.next();
521  if (!currentFileName_.empty()) {
523  }
524  }
525  }
input::ItemType state_
Definition: Source.h:274
static constexpr bool value
Definition: SourceTraits.h:58
detail::FileNamesHandler< Source_wantFileServices< T >::value > fh_
Definition: Source.h:275
std::string currentFileName_
Definition: Source.h:276
template<typename T >
void art::Source< T >::closeFile ( )
overrideprivatevirtual

Implements art::InputSource.

Definition at line 656 of file Source.h.

657  {
658  detail_.closeCurrentFile();
659  // Cached pointers are no longer valid since the PrincipalCache is
660  // cleared after file close.
661  cachedRP_ = nullptr;
662  cachedSRP_ = nullptr;
663  }
cet::exempt_ptr< SubRunPrincipal > cachedSRP_
Definition: Source.h:285
cet::exempt_ptr< RunPrincipal > cachedRP_
Definition: Source.h:284
template<typename T >
void art::Source< T >::finishProductRegistration_ ( InputSourceDescription d)
private

Definition at line 709 of file Source.h.

710  {
711  // These _xERROR_ strings should never appear in branch names; they
712  // are here as tracers to help identify any failures in coding.
713  ProductDescriptions descriptions;
715  descriptions,
716  ModuleDescription{fhicl::ParameterSet{}.id(), // Dummy
717  "_NAMEERROR_",
718  "_LABELERROR_",
720  d.moduleDescription.processConfiguration(),
721  true /*isEmulated*/});
722  presentProducts_ = ProductTables{descriptions};
725  }
void setPresentProducts(cet::exempt_ptr< ProductTables const > presentProducts)
Definition: SourceHelper.cc:85
std::vector< BranchDescription > ProductDescriptions
void registerProducts(ProductDescriptions &productsToRegister, ModuleDescription const &md)
SourceHelper sourceHelper_
Definition: Source.h:272
constexpr exempt_ptr< E > make_exempt_ptr(E *) noexcept
ProductTables presentProducts_
Definition: Source.h:269
void invoke(ProductTables const &)
ParameterSetID id() const
ProductRegistryHelper h_
Definition: Source.h:267
UpdateOutputCallbacks & outputCallbacks_
Definition: Source.h:268
template<typename T >
input::ItemType art::Source< T >::nextItemType ( )
overrideprivatevirtual

Implements art::InputSource.

Definition at line 529 of file Source.h.

530  {
531  if (remainingEvents_ == 0) {
533  }
534  switch (state_) {
535  case input::IsInvalid:
537  state_ = input::IsFile; // Once.
538  } else {
540  }
541  break;
542  case input::IsFile:
544  break;
545  case input::IsRun:
548  pendingSubRun_ = false;
549  } else if (pendingEvent_)
551  << "Input file '" << currentFileName_ << "' contains an Event "
552  << newE_->eventID() << " that belongs to no SubRun\n";
553  else {
555  }
556  break;
557  case input::IsSubRun:
558  if (pendingEvent_) {
560  pendingEvent_ = false;
561  } else {
563  }
564  break;
565  case input::IsEvent:
566  if (!readNext_()) {
568  }
569  break;
570  case input::IsStop:
571  break;
572  }
573  if ((state_ == input::IsRun || state_ == input::IsSubRun) &&
574  remainingSubRuns_ == 0) {
576  }
577  if (state_ == input::IsStop) {
578  // FIXME: upon the advent of a catalog system which can do something
579  // intelligent with the difference between whole-file success,
580  // partial-file success, partial-file failure and whole-file failure
581  // (such as file-open failure), we will need to communicate that
582  // difference here. The file disposition options as they are now
583  // (and the mapping to any concrete implementation we are are aware
584  // of currently) are not sufficient to the task, so we deliberately
585  // do not distinguish here between partial-file and whole-file
586  // success in particular.
587  fh_.finish();
588  }
589  return state_;
590  }
void checkForNextFile_()
Definition: Source.h:508
bool readNext_()
Definition: Source.h:461
bool pendingSubRun_
Definition: Source.h:287
EventNumber_t remainingEvents_
Definition: Source.h:292
void readNextAndRequireRun_()
Definition: Source.h:594
input::ItemType state_
Definition: Source.h:274
cet::exempt_ptr< SubRunPrincipal > cachedSRP_
Definition: Source.h:285
bool pendingEvent_
Definition: Source.h:288
static constexpr bool value
Definition: SourceTraits.h:58
std::unique_ptr< EventPrincipal > newE_
Definition: Source.h:280
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
detail::FileNamesHandler< Source_wantFileServices< T >::value > fh_
Definition: Source.h:275
SubRunNumber_t remainingSubRuns_
Definition: Source.h:290
void readNextAndRefuseEvent_()
Definition: Source.h:614
std::string currentFileName_
Definition: Source.h:276
template<typename T >
Source<T>& art::Source< T >::operator= ( Source< T > const &  )
delete
template<typename T >
Source<T>& art::Source< T >::operator= ( Source< T > &&  )
delete
template<typename T >
std::unique_ptr< EventPrincipal > art::Source< T >::readEvent ( cet::exempt_ptr< SubRunPrincipal const >  srp)
overrideprivatevirtual

Implements art::InputSource.

Definition at line 699 of file Source.h.

700  {
701  if (haveEventLimit_) {
703  }
704  return std::move(newE_);
705  }
EventNumber_t remainingEvents_
Definition: Source.h:292
def move(depos, offset)
Definition: depos.py:107
std::unique_ptr< EventPrincipal > newE_
Definition: Source.h:280
bool haveEventLimit_
Definition: Source.h:293
template<typename T >
std::unique_ptr< FileBlock > art::Source< T >::readFile ( )
overrideprivatevirtual

Implements art::InputSource.

Definition at line 643 of file Source.h.

644  {
645  FileBlock* newF{nullptr};
646  detail_.readFile(currentFileName_, newF);
647  if (!newF) {
649  << "detail_::readFile() failed to return a valid FileBlock object\n";
650  }
651  return std::unique_ptr<FileBlock>(newF);
652  }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::string currentFileName_
Definition: Source.h:276
template<typename T >
bool art::Source< T >::readNext_ ( )
private

Definition at line 461 of file Source.h.

462  {
463  std::unique_ptr<RunPrincipal> newR{nullptr};
464  std::unique_ptr<SubRunPrincipal> newSR{nullptr};
465  std::unique_ptr<EventPrincipal> newE{nullptr};
466  bool result{false};
467  {
468  RunPrincipal* nR{nullptr};
469  SubRunPrincipal* nSR{nullptr};
470  EventPrincipal* nE{nullptr};
471  result = detail_.readNext(cachedRP_.get(), cachedSRP_.get(), nR, nSR, nE);
472  newR.reset(nR);
473  newSR.reset(nSR);
474  newE.reset(nE);
475  throwIfInsane_(result, newR.get(), newSR.get(), newE.get());
476  }
477  if (result) {
478  subRunIsNew_ =
479  newSR && ((!cachedSRP_) || newSR->subRunID() != cachedSRP_->subRunID());
480  pendingSubRun_ = newSR.get() != nullptr;
481  pendingEvent_ = newE.get() != nullptr;
482  if (newR) {
483  newRP_ = std::move(newR);
484  }
485  if (newSR) {
486  auto rp = newRP_ ? newRP_.get() : cachedRP_.get();
487  newSR->setRunPrincipal(rp);
488  newSRP_ = std::move(newSR);
489  }
490  if (newE) {
491  auto srp = newSRP_ ? newSRP_.get() : cachedSRP_.get();
492  newE->setSubRunPrincipal(srp);
493  newE_ = std::move(newE);
494  }
495  if (newRP_) {
497  } else if (newSRP_) {
499  } else if (newE_) {
501  }
502  }
503  return result;
504  }
static QCString result
bool pendingSubRun_
Definition: Source.h:287
bool subRunIsNew_
Definition: Source.h:289
input::ItemType state_
Definition: Source.h:274
cet::exempt_ptr< SubRunPrincipal > cachedSRP_
Definition: Source.h:285
bool pendingEvent_
Definition: Source.h:288
std::unique_ptr< SubRunPrincipal > newSRP_
Definition: Source.h:279
def move(depos, offset)
Definition: depos.py:107
cet::exempt_ptr< RunPrincipal > cachedRP_
Definition: Source.h:284
std::unique_ptr< EventPrincipal > newE_
Definition: Source.h:280
void throwIfInsane_(bool result, RunPrincipal *newR, SubRunPrincipal *newSR, EventPrincipal *newE) const
Definition: Source.h:351
std::unique_ptr< RunPrincipal > newRP_
Definition: Source.h:278
template<typename T >
void art::Source< T >::readNextAndRefuseEvent_ ( )
private

Definition at line 614 of file Source.h.

615  {
616  if (readNext_()) {
617  if (state_ == input::IsEvent) {
619  << "Input file '" << currentFileName_
620  << "' has an Event where a Run or SubRun is expected\n";
621  }
622  } else {
624  }
625  }
void checkForNextFile_()
Definition: Source.h:508
bool readNext_()
Definition: Source.h:461
input::ItemType state_
Definition: Source.h:274
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::string currentFileName_
Definition: Source.h:276
template<typename T >
void art::Source< T >::readNextAndRequireRun_ ( )
private

Definition at line 594 of file Source.h.

595  {
596  if (readNext_()) {
597  if (state_ != input::IsRun) {
598  if (cachedRP_) {
599  state_ = input::IsRun; // Regurgitate existing cached run.
600  } else {
602  << "Input file '" << currentFileName_ << "' has a"
603  << (state_ == input::IsSubRun ? " SubRun" : "n Event")
604  << " where a Run is expected\n";
605  }
606  }
607  } else {
609  }
610  }
void checkForNextFile_()
Definition: Source.h:508
bool readNext_()
Definition: Source.h:461
input::ItemType state_
Definition: Source.h:274
cet::exempt_ptr< RunPrincipal > cachedRP_
Definition: Source.h:284
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::string currentFileName_
Definition: Source.h:276
template<typename T >
std::unique_ptr< RunPrincipal > art::Source< T >::readRun ( )
overrideprivatevirtual

Implements art::InputSource.

Definition at line 667 of file Source.h.

668  {
669  if (!newRP_)
671  << "Error in Source<T>\n"
672  << "readRun() called when no RunPrincipal exists\n"
673  << "Please report this to the art developers\n";
674  cachedRP_ = newRP_.get();
675  return std::move(newRP_);
676  }
def move(depos, offset)
Definition: depos.py:107
cet::exempt_ptr< RunPrincipal > cachedRP_
Definition: Source.h:284
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::unique_ptr< RunPrincipal > newRP_
Definition: Source.h:278
template<typename T >
std::unique_ptr< SubRunPrincipal > art::Source< T >::readSubRun ( cet::exempt_ptr< RunPrincipal const >  rp)
overrideprivatevirtual

Implements art::InputSource.

Definition at line 680 of file Source.h.

681  {
682  if (!newSRP_)
684  << "Error in Source<T>\n"
685  << "readSubRun() called when no SubRunPrincipal exists\n"
686  << "Please report this to the art developers\n";
687  if (subRunIsNew_) {
688  if (haveSRLimit_) {
690  }
691  subRunIsNew_ = false;
692  }
693  cachedSRP_ = newSRP_.get();
694  return std::move(newSRP_);
695  }
bool subRunIsNew_
Definition: Source.h:289
cet::exempt_ptr< SubRunPrincipal > cachedSRP_
Definition: Source.h:285
std::unique_ptr< SubRunPrincipal > newSRP_
Definition: Source.h:279
def move(depos, offset)
Definition: depos.py:107
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
SubRunNumber_t remainingSubRuns_
Definition: Source.h:290
bool haveSRLimit_
Definition: Source.h:291
template<typename T >
std::unique_ptr< RangeSetHandler > art::Source< T >::runRangeSetHandler ( )
overrideprivatevirtual

Implements art::InputSource.

Definition at line 629 of file Source.h.

630  {
631  return std::make_unique<OpenRangeSetHandler>(cachedRP_->run());
632  }
cet::exempt_ptr< RunPrincipal > cachedRP_
Definition: Source.h:284
template<typename T >
std::unique_ptr< RangeSetHandler > art::Source< T >::subRunRangeSetHandler ( )
overrideprivatevirtual

Implements art::InputSource.

Definition at line 636 of file Source.h.

637  {
638  return std::make_unique<OpenRangeSetHandler>(cachedSRP_->run());
639  }
cet::exempt_ptr< SubRunPrincipal > cachedSRP_
Definition: Source.h:285
template<typename T >
void art::Source< T >::throwDataCorruption_ ( const char *  msg)
staticprivate

Definition at line 344 of file Source.h.

345  {
347  }
void msg(const char *fmt,...)
Definition: message.cpp:107
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
template<typename T >
void art::Source< T >::throwIfInsane_ ( bool  result,
RunPrincipal newR,
SubRunPrincipal newSR,
EventPrincipal newE 
) const
private

Definition at line 351 of file Source.h.

355  {
356  std::ostringstream errMsg;
357  if (result) {
358  if (!newR && !newSR && !newE) {
360  << "readNext returned true but created no new data\n";
361  }
362  if (!cachedRP_ && !newR) {
364  << "readNext returned true but no RunPrincipal has been set, and no "
365  "cached RunPrincipal exists.\n"
366  "This can happen if a new input file has been opened and the "
367  "RunPrincipal has not been appropriately assigned.";
368  }
369  if (!cachedSRP_ && !newSR) {
371  << "readNext returned true but no SubRunPrincipal has been set, and "
372  "no cached SubRunPrincipal exists.\n"
373  "This can happen if a new input file has been opened and the "
374  "SubRunPrincipal has not been appropriately assigned.";
375  }
376  if (cachedRP_ && newR && cachedRP_.get() == newR) {
377  errMsg << "readNext returned a new Run which is the old Run for "
378  << cachedRP_->runID()
379  << ".\nIf you don't have a new run, don't return one!\n";
380  }
381  if (cachedSRP_ && newSR && cachedSRP_.get() == newSR) {
382  errMsg << "readNext returned a new SubRun which is the old SubRun for "
383  << cachedSRP_->subRunID()
384  << ".\nIf you don't have a new subRun, don't return one!\n";
385  }
386  // Either or both of the above cases could be true and we need
387  // to make both of them safe before we throw:
388  if (!errMsg.str().empty())
389  throw Exception(errors::LogicError) << errMsg.str();
390  if (cachedRP_ && cachedSRP_) {
391  if (!newR && newSR && newSR->subRunID() == cachedSRP_->subRunID())
392  throwDataCorruption_("readNext returned a 'new' SubRun "
393  "that was the same as the previous "
394  "SubRun\n");
395  if (newR && newR->runID() == cachedRP_->runID())
396  throwDataCorruption_("readNext returned a 'new' Run "
397  "that was the same as the previous "
398  "Run\n");
399  if (newR && !newSR && newE)
400  throwDataCorruption_("readNext returned a new Run and "
401  "Event without a SubRun\n");
402  if (newR && newSR && newSR->subRunID() == cachedSRP_->subRunID())
403  throwDataCorruption_("readNext returned a new Run with "
404  "a SubRun from the wrong Run\n");
405  }
406  RunID rID;
407  SubRunID srID;
408  EventID eID;
409  if (newR) {
410  rID = newR->runID();
411  if (!rID.isValid()) {
413  "readNext returned a Run with an invalid RunID.\n");
414  }
415  } else if (cachedRP_) {
416  rID = cachedRP_->runID();
417  }
418  if (newSR) {
419  srID = newSR->subRunID();
420  if (rID != srID.runID()) {
421  errMsg << "readNext returned a SubRun " << srID
422  << " which is a mismatch to " << rID << "\n";
423  throwDataCorruption_(errMsg.str().c_str());
424  }
425  if (!srID.isValid()) {
427  "readNext returned a SubRun with an invalid SubRunID.\n");
428  }
429  if (newSR->runPrincipalExemptPtr()) {
431  "readNext returned a SubRun with a non-null embedded Run.\n");
432  }
433  } else if (cachedSRP_) {
434  srID = cachedSRP_->subRunID();
435  }
436  if (newE) {
437  eID = newE->eventID();
438  if (srID != eID.subRunID()) {
439  errMsg << "readNext returned an Event " << eID
440  << " which is a mismatch to " << srID << "\n";
441  throwDataCorruption_(errMsg.str().c_str());
442  }
443  if (!eID.isValid()) {
445  "readNext returned an Event with an invalid EventID.\n");
446  }
447  if (newE->subRunPrincipalPtr()) {
449  "readNext returned an Event with a non-null embedded SubRun.\n");
450  }
451  }
452  } else {
453  if (newR || newSR || newE)
455  << "readNext returned false but created new data\n";
456  }
457  }
static QCString result
static void throwDataCorruption_(const char *msg)
Definition: Source.h:344
cet::exempt_ptr< SubRunPrincipal > cachedSRP_
Definition: Source.h:285
cet::exempt_ptr< RunPrincipal > cachedRP_
Definition: Source.h:284
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66

Member Data Documentation

template<typename T >
cet::exempt_ptr<RunPrincipal> art::Source< T >::cachedRP_ {nullptr}
private

Definition at line 284 of file Source.h.

template<typename T >
cet::exempt_ptr<SubRunPrincipal> art::Source< T >::cachedSRP_ {nullptr}
private

Definition at line 285 of file Source.h.

template<typename T >
std::string art::Source< T >::currentFileName_ {}
private

Definition at line 276 of file Source.h.

template<typename T >
T art::Source< T >::detail_
private

Definition at line 273 of file Source.h.

template<typename T >
detail::FileNamesHandler<Source_wantFileServices<T>::value> art::Source< T >::fh_
private

Definition at line 275 of file Source.h.

Definition at line 267 of file Source.h.

template<typename T >
bool art::Source< T >::haveEventLimit_ {false}
private

Definition at line 293 of file Source.h.

template<typename T >
bool art::Source< T >::haveSRLimit_ {false}
private

Definition at line 291 of file Source.h.

template<typename T >
std::unique_ptr<EventPrincipal> art::Source< T >::newE_ {}
private

Definition at line 280 of file Source.h.

template<typename T >
std::unique_ptr<RunPrincipal> art::Source< T >::newRP_ {}
private

Definition at line 278 of file Source.h.

template<typename T >
std::unique_ptr<SubRunPrincipal> art::Source< T >::newSRP_ {}
private

Definition at line 279 of file Source.h.

template<typename T >
UpdateOutputCallbacks& art::Source< T >::outputCallbacks_
private

Definition at line 268 of file Source.h.

template<typename T >
bool art::Source< T >::pendingEvent_ {false}
private

Definition at line 288 of file Source.h.

template<typename T >
bool art::Source< T >::pendingSubRun_ {false}
private

Definition at line 287 of file Source.h.

template<typename T >
ProductTables art::Source< T >::presentProducts_ {ProductTables::invalid()}
private

Definition at line 269 of file Source.h.

template<typename T >
EventNumber_t art::Source< T >::remainingEvents_ {1}
private

Definition at line 292 of file Source.h.

template<typename T >
SubRunNumber_t art::Source< T >::remainingSubRuns_ {1}
private

Definition at line 290 of file Source.h.

template<typename T >
SourceHelper art::Source< T >::sourceHelper_
private

Definition at line 272 of file Source.h.

template<typename T >
input::ItemType art::Source< T >::state_ {input::IsInvalid}
private

Definition at line 274 of file Source.h.

template<typename T >
bool art::Source< T >::subRunIsNew_ {false}
private

Definition at line 289 of file Source.h.


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