LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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)
 Default ctor. More...
 
void Reset ()
 Method to reset. More...
 
unsigned int Channel () const
 Getter for channel number. More...
 
bool operator< (const MCHitCollection &rhs) const
 For sorting. More...
 
void push_back (const MCHit &hit)
 wrapper for push_back More...
 

Public Attributes

elements
 STL member. More...
 

Private Attributes

unsigned int fChannel
 Channel number. More...
 

Detailed Description

Definition at line 11 of file MCHitCollection.h.

Constructor & Destructor Documentation

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

Default ctor.

Definition at line 16 of file MCHitCollection.h.

References fChannel, and Reset().

17  {
18  Reset();
19  fChannel = ch;
20  }
void Reset()
Method to reset.
unsigned int fChannel
Channel number.

Member Function Documentation

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

Getter for channel number.

Definition at line 37 of file MCHitCollection.h.

References fChannel.

37 { return fChannel; }
unsigned int fChannel
Channel number.
bool sim::MCHitCollection::operator< ( const MCHitCollection rhs) const
inline

For sorting.

Definition at line 40 of file MCHitCollection.h.

References fChannel.

40 { return fChannel < rhs.fChannel; }
unsigned int fChannel
Channel number.
void sim::MCHitCollection::push_back ( const MCHit hit)
inline

wrapper for push_back

Definition at line 43 of file MCHitCollection.h.

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

44  {
45 
46  bool sort = (!empty() && hit < (*rbegin()));
47 
48  std::vector<sim::MCHit>::push_back(hit);
49 
50  if(sort) std::sort(begin(),end());
51 
52  }
std::vector< evd::details::RawDigitInfo_t >::const_iterator begin(RawDigitCacheDataClass const &cache)
Detector simulation of raw signals on wires.
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
void sim::MCHitCollection::Reset ( )
inline

Method to reset.

Definition at line 23 of file MCHitCollection.h.

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

Referenced by MCHitCollection().

24  {
27  }
unsigned int fChannel
Channel number.
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::MCHitCollection::fChannel
private

Channel number.

Definition at line 31 of file MCHitCollection.h.

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


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