LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
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...
 

Public Attributes

elements
 STL member. More...
 

Private Attributes

unsigned int fChannel
 

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.

References fChannel, and Reset().

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.

References fChannel.

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

For sorting.

Definition at line 38 of file MCWireCollection.h.

References fChannel.

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.

References evd::details::begin(), and evd::details::end().

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  }
std::vector< evd::details::RawDigitInfo_t >::const_iterator begin(RawDigitCacheDataClass const &cache)
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
void sim::MCWireCollection::Reset ( )
inline

Definition at line 21 of file MCWireCollection.h.

References clear(), fChannel, and sim::kINVALID_UINT.

Referenced by MCWireCollection().

22  {
25  }
const unsigned int kINVALID_UINT
Definition: MCLimits.h:14
vec_iX clear()

Member Data Documentation

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

STL member.

unsigned int sim::MCWireCollection::fChannel
private

Definition at line 29 of file MCWireCollection.h.

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


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