SimpleChannel.cxx
Go to the documentation of this file.
2 
3 using namespace WireCell;
4 
5 SimpleChannel::SimpleChannel(int ident, int index, const IWire::vector& wires)
6  : m_ident(ident), m_index(index), m_wires(wires.begin(), wires.end())
7 {
8  std::sort(m_wires.begin(), m_wires.end(), IWireCompareSegment());
9 }
10 
12 {
13 }
14 
16 {
17  return m_ident;
18 }
20 {
21  return m_index;
22 }
24 {
25  return m_wires;
26 }
27 
28 
29 // Personal interface for creator
30 //
32 {
33  m_wires.push_back(wire);
34  std::sort(m_wires.begin(), m_wires.end(), IWireCompareSegment());
35 }
37 {
38  m_index=ind;
39 }
40 
std::shared_ptr< const IWire > pointer
Definition: IData.h:19
void add(const IWire::pointer &wire)
virtual const IWire::vector & wires() const
Wire segments ordered in increasing distance from channel input.
std::vector< pointer > vector
Definition: IData.h:21
virtual int index() const
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:72
SimpleChannel(int ident=-1, int index=-1, const IWire::vector &wires=IWire::vector())
Definition: Main.h:22
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:67
virtual int ident() const