LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ProcessingLimits.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_ProcessingLimits_h
2 #define art_Framework_Core_ProcessingLimits_h
3 
6 #include "fhiclcpp/types/Atom.h"
7 
8 #include <functional>
9 
10 namespace art {
12  public:
13  struct Config {
14  static constexpr char const*
16  {
17  return "RunsSubRunsAndEvents";
18  }
23  defaultMode()};
24  };
25 
26  ProcessingLimits(Config const& config,
27  std::function<input::ItemType()> nextItemType);
28 
31 
32  // Accessor for remaining number of events to be read.
33  // -1 is used for unlimited.
34  int remainingEvents() const noexcept;
35 
36  // Accessor for remaining number of subruns to be read.
37  // -1 is used for unlimited.
38  int remainingSubRuns() const noexcept;
39 
40  void update(EventID const& id);
41  void update(SubRunID const& id);
42 
43  private:
44  bool allowed_(input::ItemType) const noexcept;
45 
52  std::function<input::ItemType()> nextItemType_;
53  };
54 }
55 
56 #endif /* art_Framework_Core_ProcessingLimits_h */
57 
58 // Local Variables:
59 // mode: c++
60 // End:
InputSource::ProcessingMode processingMode_
fhicl::Atom< int > reportFrequency
static constexpr char const * defaultMode()
input::ItemType nextItemType()
fhicl::Atom< std::string > processingMode
ProcessingLimits(Config const &config, std::function< input::ItemType()> nextItemType)
bool allowed_(input::ItemType) const noexcept
std::function< input::ItemType()> nextItemType_
int remainingSubRuns() const noexcept
Definition: MVAAlg.h:12
int remainingEvents() const noexcept
void update(EventID const &id)