LArSoft  v09_93_00
Liquid Argon Software toolkit - https://larsoft.org/
sim::MCHitCollection Class Reference

#include "MCHitCollection.h"

Inheritance diagram for sim::MCHitCollection:

Public Member Functions

 MCHitCollection (const unsigned int ch=::sim::kINVALID_UINT)
 
void Reset ()
 
void push_back (MCHit const &hit)
 
unsigned int Channel () const
 
bool operator< (MCHitCollection const &rhs) const
 

Public Attributes

elements
 STL member. More...
 

Private Attributes

unsigned int fChannel
 

Detailed Description

Definition at line 10 of file MCHitCollection.h.

Constructor & Destructor Documentation

sim::MCHitCollection::MCHitCollection ( const unsigned int  ch = ::sim::kINVALID_UINT)

Definition at line 5 of file MCHitCollection.cxx.

5 : fChannel{ch} {}

Member Function Documentation

unsigned int sim::MCHitCollection::Channel ( ) const
inline

Definition at line 17 of file MCHitCollection.h.

References fChannel.

17 { return fChannel; }
bool sim::MCHitCollection::operator< ( MCHitCollection const &  rhs) const
inline

Definition at line 18 of file MCHitCollection.h.

References fChannel.

18 { return fChannel < rhs.fChannel; }
void sim::MCHitCollection::push_back ( MCHit const &  hit)

Definition at line 12 of file MCHitCollection.cxx.

References util::begin(), util::empty(), and util::end().

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.
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
void sim::MCHitCollection::Reset ( )

Definition at line 7 of file MCHitCollection.cxx.

8 {
9  *this = MCHitCollection{};
10 }
MCHitCollection(const unsigned int ch=::sim::kINVALID_UINT)

Member Data Documentation

T std::vector< T >::elements
inherited

STL member.

unsigned int sim::MCHitCollection::fChannel
private

Definition at line 21 of file MCHitCollection.h.

Referenced by Channel(), and operator<().


The documentation for this class was generated from the following files: