LArSoft  v09_93_00
Liquid Argon Software toolkit - https://larsoft.org/
MCWireCollection.h
Go to the documentation of this file.
1 #ifndef MCWIRECOLLECTION_H
2 #define MCWIRECOLLECTION_H
3 
4 // C++ includes
6 
7 namespace sim {
8 
9  class MCWireCollection : public std::vector<sim::MCWire> {
10  public:
11  MCWireCollection(unsigned int const ch = sim::kINVALID_UINT);
12 
13  unsigned int Channel() const { return fChannel; }
14  bool operator<(MCWireCollection const& rhs) const { return fChannel < rhs.fChannel; }
15 
16  void Reset();
17  void push_back(MCWire const& wire);
18 
19  private:
20  unsigned int fChannel;
21  };
22 }
23 
24 // Define a pointer comparison
25 namespace std {
26  template <>
28  public:
29  bool operator()(sim::MCWireCollection const* lhs, sim::MCWireCollection const* rhs) const
30  {
31  return *lhs < *rhs;
32  }
33  };
34 }
35 
36 #endif
STL namespace.
void push_back(MCWire const &wire)
unsigned int Channel() const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
MCWireCollection(unsigned int const ch=sim::kINVALID_UINT)
Monte Carlo Simulation.
bool operator<(MCWireCollection const &rhs) const
bool operator()(sim::MCWireCollection const *lhs, sim::MCWireCollection const *rhs) const
const unsigned int kINVALID_UINT
Definition: MCLimits.h:14