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