LArSoft  v09_93_00
Liquid Argon Software toolkit - https://larsoft.org/
MCWireCollection.cxx
Go to the documentation of this file.
2 
3 #include <algorithm>
4 
5 sim::MCWireCollection::MCWireCollection(unsigned int const ch) : fChannel{ch} {}
6 
8 {
9  *this = MCWireCollection();
10 }
11 
13 {
14  bool sort = !empty() && wire < *rbegin();
15 
16  std::vector<sim::MCWire>::push_back(wire);
17  if (sort) std::sort(begin(), end());
18 }
void push_back(MCWire const &wire)
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:77
MCWireCollection(unsigned int const ch=sim::kINVALID_UINT)
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:69
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:109