All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
sim::MCWireCollection Class Reference

#include <MCWireCollection.h>

Inheritance diagram for sim::MCWireCollection:

Public Member Functions

 MCWireCollection (const unsigned int ch=sim::kINVALID_UINT)
 Default ctor. More...
 
void Reset ()
 
unsigned int Channel () const
 Getter for channel number. More...
 
bool operator< (const MCWireCollection &rhs) const
 For sorting. More...
 
void push_back (const MCWire &wire)
 wrapper for push_back More...
 

Private Attributes

unsigned int fChannel
 

Additional Inherited Members

- Public Attributes inherited from std::vector< T >
elements
 STL member. More...
 

Detailed Description

Definition at line 10 of file MCWireCollection.h.

Constructor & Destructor Documentation

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

Default ctor.

Definition at line 15 of file MCWireCollection.h.

16  {
17  Reset();
18  fChannel = ch;
19  }

Member Function Documentation

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

Getter for channel number.

Definition at line 35 of file MCWireCollection.h.

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

For sorting.

Definition at line 38 of file MCWireCollection.h.

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

wrapper for push_back

Definition at line 41 of file MCWireCollection.h.

42  {
43 
44  bool sort = (!empty() && wire < (*rbegin()));
45 
46  std::vector<sim::MCWire>::push_back(wire);
47 
48  if(sort) std::sort(begin(),end());
49 
50  }
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
auto begin(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:573
bool empty(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:555
void sim::MCWireCollection::Reset ( )
inline

Definition at line 21 of file MCWireCollection.h.

22  {
23  std::vector<sim::MCWire>::clear();
25  }
const unsigned int kINVALID_UINT
Definition: MCLimits.h:14

Member Data Documentation

unsigned int sim::MCWireCollection::fChannel
private

Definition at line 29 of file MCWireCollection.h.


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