All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
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...
 

Private Attributes

unsigned int fChannel
 Channel number. More...
 

Additional Inherited Members

- Public Attributes inherited from std::vector< T >
elements
 STL member. 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.

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.

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.

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.

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  }
process_name hit
Definition: cheaterreco.fcl:51
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::MCHitCollection::Reset ( )
inline

Method to reset.

Definition at line 23 of file MCHitCollection.h.

24  {
26  std::vector<sim::MCHit>::clear();
27  }
unsigned int fChannel
Channel number.
const unsigned int kINVALID_UINT
Definition: MCLimits.h:14

Member Data Documentation

unsigned int sim::MCHitCollection::fChannel
private

Channel number.

Definition at line 31 of file MCHitCollection.h.


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