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

#include "MCWireCollection.h"

Inheritance diagram for sim::MCWireCollection:

Public Member Functions

 MCWireCollection (unsigned int const ch=sim::kINVALID_UINT)
 
unsigned int Channel () const
 
bool operator< (MCWireCollection const &rhs) const
 
void Reset ()
 
void push_back (MCWire const &wire)
 

Public Attributes

elements
 STL member. More...
 

Private Attributes

unsigned int fChannel
 

Detailed Description

Definition at line 9 of file MCWireCollection.h.

Constructor & Destructor Documentation

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

Definition at line 5 of file MCWireCollection.cxx.

Referenced by Reset().

5 : fChannel{ch} {}

Member Function Documentation

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

Definition at line 13 of file MCWireCollection.h.

References fChannel.

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

Definition at line 14 of file MCWireCollection.h.

References fChannel, push_back(), and Reset().

14 { return fChannel < rhs.fChannel; }
void sim::MCWireCollection::push_back ( MCWire const &  wire)

Definition at line 12 of file MCWireCollection.cxx.

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

Referenced by operator<().

13 {
14  bool sort = !empty() && wire < *rbegin();
15 
16  std::vector<sim::MCWire>::push_back(wire);
17  if (sort) std::sort(begin(), end());
18 }
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:77
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::MCWireCollection::Reset ( )

Definition at line 7 of file MCWireCollection.cxx.

References MCWireCollection().

Referenced by operator<().

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

Member Data Documentation

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

STL member.

unsigned int sim::MCWireCollection::fChannel
private

Definition at line 20 of file MCWireCollection.h.

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


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