Public Member Functions | Private Attributes | List of all members
WireCell::SimpleChannel Class Reference

#include <SimpleChannel.h>

Inheritance diagram for WireCell::SimpleChannel:
WireCell::IChannel WireCell::IData< IChannel >

Public Member Functions

 SimpleChannel (int ident=-1, int index=-1, const IWire::vector &wires=IWire::vector())
 
virtual ~SimpleChannel ()
 
virtual int ident () const
 
virtual int index () const
 
virtual const IWire::vectorwires () const
 Wire segments ordered in increasing distance from channel input. More...
 
void add (const IWire::pointer &wire)
 
void set_index (int ind)
 
- Public Member Functions inherited from WireCell::IChannel
virtual ~IChannel ()
 
virtual WirePlaneId planeid () const
 The ID of the plane of wire zero. This is just sugar. More...
 
- Public Member Functions inherited from WireCell::IData< IChannel >
virtual ~IData ()
 

Private Attributes

int m_ident
 
int m_index
 
IWire::vector m_wires
 

Additional Inherited Members

- Public Types inherited from WireCell::IData< IChannel >
typedef IChannel value_type
 
typedef std::shared_ptr< const IChannelpointer
 
typedef std::vector< pointervector
 
typedef std::shared_ptr< const vectorshared_vector
 

Detailed Description

Definition at line 10 of file SimpleChannel.h.

Constructor & Destructor Documentation

SimpleChannel::SimpleChannel ( int  ident = -1,
int  index = -1,
const IWire::vector wires = IWire::vector() 
)

Definition at line 5 of file SimpleChannel.cxx.

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 }
virtual const IWire::vector & wires() const
Wire segments ordered in increasing distance from channel input.
virtual int index() const
virtual int ident() const
SimpleChannel::~SimpleChannel ( )
virtual

Definition at line 11 of file SimpleChannel.cxx.

12 {
13 }

Member Function Documentation

void SimpleChannel::add ( const IWire::pointer wire)

Definition at line 31 of file SimpleChannel.cxx.

32 {
33  m_wires.push_back(wire);
34  std::sort(m_wires.begin(), m_wires.end(), IWireCompareSegment());
35 }
int SimpleChannel::ident ( ) const
virtual

Detector-dependent, globally unique channel ID number. Negative is illegal, not guaranteed consecutive over all given channels. This same number may be called simply "channel" in other contexts.

Implements WireCell::IChannel.

Definition at line 15 of file SimpleChannel.cxx.

16 {
17  return m_ident;
18 }
int SimpleChannel::index ( ) const
virtual

The channel index is the "Wire Attachment Number". The WAN counts along points of attachment of the zero' zero-segment wires for a wire plane. Note, for detectors with wrapped wires this index also wraps. It counts in the same direction as the WIP number of IWire::index but starts at zero even with wrapped wire detectors.

Implements WireCell::IChannel.

Definition at line 19 of file SimpleChannel.cxx.

20 {
21  return m_index;
22 }
void SimpleChannel::set_index ( int  ind)

Definition at line 36 of file SimpleChannel.cxx.

37 {
38  m_index=ind;
39 }
const IWire::vector & SimpleChannel::wires ( ) const
virtual

Wire segments ordered in increasing distance from channel input.

Implements WireCell::IChannel.

Definition at line 23 of file SimpleChannel.cxx.

24 {
25  return m_wires;
26 }

Member Data Documentation

int WireCell::SimpleChannel::m_ident
private

Definition at line 26 of file SimpleChannel.h.

int WireCell::SimpleChannel::m_index
private

Definition at line 26 of file SimpleChannel.h.

IWire::vector WireCell::SimpleChannel::m_wires
private

Definition at line 27 of file SimpleChannel.h.


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