LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
OpenRangeSetHandler.cc
Go to the documentation of this file.
2 // vim: set sw=2 expandtab :
3 
6 
7 #include <utility>
8 
9 namespace art {
10 
12 
13  // Note: RangeSet has a data member that is a vector, and the vector
14  // ctor is not noexcept, so we cannot be noexcept either!
16 
17  // Note: RangeSet has a data member that is a vector, and the vector
18  // ctor is not noexcept, so we cannot be noexcept either!
20  : ranges_{ranges}, idx_{ranges.end_idx()}
21  {}
22 
24  default;
25 
27 
28  // Note: RangeSet has a data member that is a vector, and the vector
29  // copy assignment is not noexcept, so we cannot be noexcept
30  // either!
32  OpenRangeSetHandler const&) = default;
33 
34  // Note: RangeSet has a data member that is a vector, and a vector
35  // move assignment is not noexcept, so we cannot be noexcept
36  // either!
38  OpenRangeSetHandler&& rhs) = default;
39 
42  {
43  return HandlerType::Open;
44  }
45 
46  RangeSet
48  {
50  tmp.assign_ranges(ranges_, ranges_.begin_idx(), idx_);
51  return tmp;
52  }
53 
54  void
55  OpenRangeSetHandler::do_update(EventID const& id, bool const /*lastInSubRun*/)
56  {
57  ranges_.update(id);
58  idx_ = ranges_.end_idx();
59  }
60 
61  void
63  {}
64 
65  void
67  {}
68 
69  void
71  {
72  ranges_.clear();
73  idx_ = ranges_.end_idx();
74  }
75 
78  {
79  return new OpenRangeSetHandler{*this};
80  }
81 
82 } // namespace art
TRandom r
Definition: spectrum.C:23
OpenRangeSetHandler & operator=(OpenRangeSetHandler const &)
void clear()
Definition: RangeSet.cc:384
HandlerType do_type() const override
Float_t tmp
Definition: plot.C:35
void do_maybeSplitRange() override
RunNumber_t run() const
Definition: RangeSet.cc:89
void do_update(EventID const &, bool lastInSubRun) override
std::size_t end_idx() const
Definition: RangeSet.cc:195
void update(EventID const &)
Definition: RangeSet.cc:326
RangeSetHandler * do_clone() const override
Definition: MVAAlg.h:12
RangeSet do_getSeenRanges() const override
std::size_t begin_idx() const
Definition: RangeSet.cc:189
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:120