Source.h
Go to the documentation of this file.
1 #ifndef art_Framework_IO_Sources_Source_h
2 #define art_Framework_IO_Sources_Source_h
3 // vim: set sw=2 expandtab :
4 
5 // ======================================================================
6 //
7 // The Source class template is used to create InputSources which
8 // are capable of reading Runs, SubRuns and Events from non-standard
9 // input files. Sources instantiated from Source are *not* random
10 // access sources.
11 //
12 // The Source class template requires the use of a type T as its
13 // template parameter, satisfying the conditions outlined below. In
14 // one's XXX_module.cc class one must provide a typedef and module macro
15 // call along the lines of:
16 //
17 // namespace arttest {
18 // typedef art::Source<GeneratorTestDetail> GeneratorTest;
19 // }
20 //
21 // DEFINE_ART_INPUT_SOURCE(arttest::GeneratorTest)
22 //
23 // However, there are several "flavors" of InputSource possible using
24 // this template, and one may wish to specify them using the "type
25 // traits" found in SourceTraits.h. Type traits are simple class
26 // templates that are used to signal properties of the classes used as
27 // their template arguments. Specialization is common. There are many
28 // examples of type traits in the standard, such as std::is_const<T> or
29 // std::is_integral<T>. Any traits you wish to specialize must be
30 // defined *after* the definition of your detail class T, but *before*
31 // the typedef above which will attempt to instantiate them. See
32 // SourceTraits.h for descriptions of the different traits one might
33 // wish to apply.
34 //
35 // The type T must supply the following non-static member functions:
36 //
37 // * Construct an object of type T. The ParameterSet provided will be
38 // that constructed by the 'source' statement in the job
39 // configuration file. The ProductRegistryHelper must be used to
40 // register products to be reconstituted by this source.
41 //
42 // T(fhicl::ParameterSet const&,
43 // art::ProductRegistryHelper&,
44 // art::SourceHelper const&);
45 //
46 // * Open the file of the given name, returning a new fileblock in
47 // fb. If readFile is unable to return a valid FileBlock it should
48 // throw. Suggestions for suitable exceptions are:
49 // art::Exception(art::errors::FileOpenError) or
50 // art::Exception(art::errors::FileReadError).
51 //
52 // void readFile(std::string const& filename,
53 // art::FileBlock*& fb);
54 //
55 // * Read the next part of the current file. Return false if nothing
56 // was read; return true and set the appropriate 'out' arguments if
57 // something was read.
58 //
59 // bool readNext(art::RunPrincipal const* const inR,
60 // art::SubRunPrincipal const* const inSR,
61 // art::RunPrincipal*& outR,
62 // art::SubRunPrincipal*& outSR,
63 // art::EventPrincipal*& outE);
64 //
65 // * After readNext has returned false, the behavior differs
66 // depending on whether Source_Generator<XXX>::value is true or
67 // false. If false (the default), then readFile(...) will be called
68 // provided there is an unused string remaining in
69 // source.fileNames. If true, then the source will finish unless
70 // there exists an *optional* function:
71 //
72 // bool hasMoreData(); // or
73 //
74 // bool hasMoreData() const;
75 //
76 // which returns true.
77 //
78 // * Close the current input file.
79 //
80 // void closeCurrentFile();
81 //
82 // ======================================================================
83 
103 #include "cetlib/exempt_ptr.h"
104 #include "cetlib/metaprogramming.h"
105 #include "fhiclcpp/ParameterSet.h"
106 #include "fhiclcpp/types/Atom.h"
108 #include "fhiclcpp/types/Sequence.h"
110 
111 #include <algorithm>
112 #include <memory>
113 #include <type_traits>
114 
115 namespace art {
116 
117  template <typename T>
118  class Source;
119 
120  template <typename T>
121  class SourceTable {
122  public:
123  using value_type = T;
124 
125  auto const&
126  operator()() const
127  {
128  return fragment_();
129  }
130 
131  private:
133  };
134 
135  namespace detail {
136 
137  // Template metaprogramming.
138 
139  template <typename T, typename = void>
140  struct has_hasMoreData : std::false_type {};
141 
142  template <typename T>
144  T,
145  cet::enable_if_function_exists_t<bool (T::*)(), &T::hasMoreData>>
146  : std::true_type {};
147 
148  template <typename T>
150  T,
151  cet::enable_if_function_exists_t<bool (T::*)() const, &T::hasMoreData>>
152  : std::true_type {};
153 
154  template <typename T>
156  bool
158  {
159  return t.hasMoreData();
160  }
161  };
162 
163  template <typename T>
165  bool
167  {
168  return false;
169  }
170  };
171 
172  ////////////////////////////////////////////////////////////////////
173  // Does the detail object have a Parameters type?
174  template <typename T, typename = void>
175  struct maybe_has_Parameters : std::false_type {
177  };
178 
179  template <typename T>
180  struct maybe_has_Parameters<T, std::void_t<typename T::Parameters>>
181  : std::true_type {
182  using user_config_t = typename T::Parameters;
183  struct Config {
184  struct SourceConfig {
186  fhicl::Sequence<std::string> fileNames{fhicl::Name("fileNames"), {}};
187  fhicl::Atom<int64_t> maxSubRuns{fhicl::Name("maxSubRuns"), -1};
188  fhicl::Atom<int64_t> maxEvents{fhicl::Name("maxEvents"), -1};
189  };
192  };
194  };
195 
196  } // namespace detail
197 
198  // No-one gets to override this class.
199  template <typename T>
200  class Source final : public InputSource {
201  public:
203 
204  template <typename U = Parameters>
205  explicit Source(std::enable_if_t<std::is_same_v<U, fhicl::ParameterSet>,
206  fhicl::ParameterSet> const& p,
208 
209  template <typename U = Parameters>
210  explicit Source(
211  std::enable_if_t<!std::is_same_v<U, fhicl::ParameterSet>, U> const& p,
213 
214  Source(Source<T> const&) = delete;
215  Source(Source<T>&&) = delete;
216 
217  Source<T>& operator=(Source<T> const&) = delete;
218  Source<T>& operator=(Source<T>&&) = delete;
219 
220  private:
221  input::ItemType nextItemType() override;
222  std::unique_ptr<FileBlock> readFile() override;
223  void closeFile() override;
224 
226 
227  std::unique_ptr<RunPrincipal> readRun() override;
228  std::unique_ptr<SubRunPrincipal> readSubRun(
230 
231  std::unique_ptr<EventPrincipal> readEvent(
233 
234  std::unique_ptr<RangeSetHandler> runRangeSetHandler() override;
235  std::unique_ptr<RangeSetHandler> subRunRangeSetHandler() override;
236 
237  // Called in the constructor, to finish the process of product
238  // registration.
239  void finishProductRegistration_(InputSourceDescription& d);
240 
241  // Make detail_ try to read more stuff from its file. Cache any new
242  // run/subrun/event. Throw an exception if we detect an error in the
243  // data stream, or logic of the detail_ class. Move to the
244  // appropriate new state.
245  bool readNext_();
246 
247  // Check to see whether we have a new file to attempt to read,
248  // moving to either the IsStop or IsFile state.
249  void checkForNextFile_();
250 
251  // Call readNext_() and throw if we have not moved to the IsRun state.
252  void readNextAndRequireRun_();
253 
254  // Call readNext_() and throw if we have moved to the IsEvent state.
255  void readNextAndRefuseEvent_();
256 
257  // Test the newly read data for validity, given our current state.
258  void throwIfInsane_(bool result,
259  RunPrincipal* newR,
260  SubRunPrincipal* newSR,
261  EventPrincipal* newE) const;
262 
263  // Throw an Exception(errors::DataCorruption), with the given
264  // message text.
265  static void throwDataCorruption_(const char* msg);
266 
270 
271  // So it can be used by detail.
276  std::string currentFileName_{};
277 
278  std::unique_ptr<RunPrincipal> newRP_{};
279  std::unique_ptr<SubRunPrincipal> newSRP_{};
280  std::unique_ptr<EventPrincipal> newE_{};
281 
282  // Cached Run and SubRun Principals used for users creating new
283  // SubRun and Event Principals. These are non owning!
284  cet::exempt_ptr<RunPrincipal> cachedRP_{nullptr};
285  cet::exempt_ptr<SubRunPrincipal> cachedSRP_{nullptr};
286 
287  bool pendingSubRun_{false};
288  bool pendingEvent_{false};
289  bool subRunIsNew_{false};
290  SubRunNumber_t remainingSubRuns_{1};
291  bool haveSRLimit_{false};
292  EventNumber_t remainingEvents_{1};
293  bool haveEventLimit_{false};
294  };
295 
296  template <typename T>
297  template <typename U>
298  Source<T>::Source(std::enable_if_t<std::is_same_v<U, fhicl::ParameterSet>,
299  fhicl::ParameterSet> const& p,
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  }
318 
319  template <typename T>
320  template <typename U>
322  std::enable_if_t<!std::is_same_v<U, fhicl::ParameterSet>, U> const& p,
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  }
341 
342  template <typename T>
343  void
345  {
347  }
348 
349  template <typename T>
350  void
352  RunPrincipal* newR,
353  SubRunPrincipal* newSR,
354  EventPrincipal* newE) const
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  }
458 
459  template <typename T>
460  bool
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  }
505 
506  template <typename T>
507  void
509  {
510  state_ = input::IsStop; // Default -- may change below.
515  generatorHasMoreData;
516  if (generatorHasMoreData(detail_)) {
518  }
519  } else {
520  currentFileName_ = fh_.next();
521  if (!currentFileName_.empty()) {
523  }
524  }
525  }
526 
527  template <typename T>
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  }
591 
592  template <typename T>
593  void
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  }
611 
612  template <typename T>
613  void
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  }
626 
627  template <typename T>
628  std::unique_ptr<RangeSetHandler>
630  {
631  return std::make_unique<OpenRangeSetHandler>(cachedRP_->run());
632  }
633 
634  template <typename T>
635  std::unique_ptr<RangeSetHandler>
637  {
638  return std::make_unique<OpenRangeSetHandler>(cachedSRP_->run());
639  }
640 
641  template <typename T>
642  std::unique_ptr<FileBlock>
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  }
653 
654  template <typename T>
655  void
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  }
664 
665  template <typename T>
666  std::unique_ptr<RunPrincipal>
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  }
677 
678  template <typename T>
679  std::unique_ptr<SubRunPrincipal>
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  }
696 
697  template <typename T>
698  std::unique_ptr<EventPrincipal>
700  {
701  if (haveEventLimit_) {
703  }
704  return std::move(newE_);
705  }
706 
707  template <typename T>
708  void
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,
717  "_NAMEERROR_",
718  "_LABELERROR_",
721  true /*isEmulated*/});
722  presentProducts_ = ProductTables{descriptions};
723  sourceHelper_.setPresentProducts(cet::make_exempt_ptr(&presentProducts_));
725  }
726 
727 } // namespace art
728 
729 #endif /* art_Framework_IO_Sources_Source_h */
730 
731 // Local Variables:
732 // mode: c++
733 // End:
bool isValid() const
Definition: EventID.h:122
static fhicl::Name plugin_type()
SubRunID const & subRunID() const
Definition: EventID.h:104
cet::exempt_ptr< RunPrincipal const > runPrincipalExemptPtr() const
Definition: Principal.cc:854
void checkForNextFile_()
Definition: Source.h:508
EventID const & eventID() const
Definition: Principal.cc:1064
RunID const & runID() const
Definition: Principal.cc:1052
static QCString result
void msg(const char *fmt,...)
Definition: message.cpp:107
std::string string
Definition: nybbler.cc:12
std::unique_ptr< EventPrincipal > readEvent(cet::exempt_ptr< SubRunPrincipal const > srp) override
Definition: Source.h:699
SubRunPrincipal const * subRunPrincipalPtr() const
Definition: Principal.cc:860
bool readNext_()
Definition: Source.h:461
bool pendingSubRun_
Definition: Source.h:287
virtual std::unique_ptr< EventPrincipal > readEvent(cet::exempt_ptr< SubRunPrincipal const > srp)=0
bool subRunIsNew_
Definition: Source.h:289
ChannelGroupService::Name Name
EventNumber_t remainingEvents_
Definition: Source.h:292
static void throwDataCorruption_(const char *msg)
Definition: Source.h:344
STL namespace.
std::vector< BranchDescription > ProductDescriptions
enable_if_same_t< FT, decltype(f), R > enable_if_function_exists_t
std::unique_ptr< RangeSetHandler > runRangeSetHandler() override
Definition: Source.h:629
bool isValid() const
Definition: SubRunID.h:97
Definition: config.h:291
std::unique_ptr< RangeSetHandler > subRunRangeSetHandler() override
Definition: Source.h:636
void readFile(string fileName, string &content)
Definition: test_suite.cc:16
void readNextAndRequireRun_()
Definition: Source.h:594
void closeFile() override
Definition: Source.h:656
input::ItemType state_
Definition: Source.h:274
RunID const & runID() const
Definition: SubRunID.h:79
cet::exempt_ptr< SubRunPrincipal > cachedSRP_
Definition: Source.h:285
void registerProducts(ProductDescriptions &productsToRegister, ModuleDescription const &md)
std::unique_ptr< SubRunPrincipal > readSubRun(cet::exempt_ptr< RunPrincipal const > rp) override
Definition: Source.h:680
bool pendingEvent_
Definition: Source.h:288
std::unique_ptr< SubRunPrincipal > newSRP_
Definition: Source.h:279
input::ItemType nextItemType() override
Definition: Source.h:529
def move(depos, offset)
Definition: depos.py:107
SourceHelper sourceHelper_
Definition: Source.h:272
constexpr exempt_ptr< E > make_exempt_ptr(E *) noexcept
cet::exempt_ptr< RunPrincipal > cachedRP_
Definition: Source.h:284
SubRunID subRunID() const
Definition: Principal.cc:1058
ProductTables presentProducts_
Definition: Source.h:269
IDNumber_t< Level::SubRun > SubRunNumber_t
Definition: IDNumber.h:119
p
Definition: test.py:223
Source(std::enable_if_t< std::is_same_v< U, fhicl::ParameterSet >, fhicl::ParameterSet > const &p, InputSourceDescription &d)
Definition: Source.h:298
void invoke(ProductTables const &)
std::unique_ptr< EventPrincipal > newE_
Definition: Source.h:280
void throwIfInsane_(bool result, RunPrincipal *newR, SubRunPrincipal *newSR, EventPrincipal *newE) const
Definition: Source.h:351
ProcessConfiguration const & processConfiguration() const
ParameterSetID id() const
static ProductTables invalid()
fhicl::TableFragment< T > fragment_
Definition: Source.h:132
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
void finishProductRegistration_(InputSourceDescription &d)
Definition: Source.h:709
std::unique_ptr< RunPrincipal > newRP_
Definition: Source.h:278
std::unique_ptr< FileBlock > readFile() override
Definition: Source.h:643
ProductRegistryHelper h_
Definition: Source.h:267
detail::FileNamesHandler< Source_wantFileServices< T >::value > fh_
Definition: Source.h:275
bool haveEventLimit_
Definition: Source.h:293
SubRunNumber_t remainingSubRuns_
Definition: Source.h:290
IDNumber_t< Level::Event > EventNumber_t
Definition: IDNumber.h:118
UpdateOutputCallbacks & outputCallbacks_
Definition: Source.h:268
bool isValid() const
Definition: RunID.h:70
ModuleDescription const & moduleDescription
bool haveSRLimit_
Definition: Source.h:291
auto const & operator()() const
Definition: Source.h:126
void readNextAndRefuseEvent_()
Definition: Source.h:614
std::unique_ptr< RunPrincipal > readRun() override
Definition: Source.h:667
std::string currentFileName_
Definition: Source.h:276
typename detail::maybe_has_Parameters< T >::Parameters Parameters
Definition: Source.h:202
void closeFile(HDFFileInfoPtr hdfFileInfoPtr)