Segment.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file Segment.h
3 // \version $Id: Segment.cxx,v 1.6 2012-10-30 23:33:09 bckhouse Exp $
4 // \author Christopher Backhouse - bckhouse@caltech.edu
5 ////////////////////////////////////////////////////////////////////////
6 
8 
9 namespace dt
10 {
11  //......................................................................
12  bool Segment::operator==(const Segment& rhs) const
13  {
14  return (left == rhs.left &&
15  plane == rhs.plane &&
16  cellLo == rhs.cellLo && cellHi == rhs.cellHi);
17  }
18 
19  //......................................................................
21  {
22  if(dir == kUpstream) return SubSeg(zL, yL0, yL1);
23  return SubSeg(zR, yR0, yR1);
24  }
25 
26  //......................................................................
27  std::ostream& operator<<(std::ostream& os, const Segment& seg)
28  {
29  os << "Seg at " << seg. plane << " from " << seg.cellLo
30  << " to " << seg.cellHi << ". Left? " << seg.left << std::endl;
31  return os;
32  }
33 } // namespace
double yR0
Definition: Segment.h:40
bool left
Definition: Segment.h:41
std::ostream & operator<<(std::ostream &os, const Segment &seg)
Definition: Segment.cxx:27
Definition: Cand.cxx:23
bool operator==(const Segment &rhs) const
Definition: Segment.cxx:12
int cellHi
Definition: Segment.h:42
Direction
Definition: Types.h:5
double zR
Definition: Segment.h:40
Just the upstream or downstream part, just coordinates.
Definition: Segment.h:17
int plane
Definition: Segment.h:42
double yL1
Definition: Segment.h:39
double zL
Definition: Segment.h:39
int cellLo
Definition: Segment.h:42
TDirectory * dir
Definition: macro.C:5
double yL0
Definition: Segment.h:39
double yR1
Definition: Segment.h:40
Window the line must pass through from (z,y0)-(z,y1)
Definition: Segment.h:24
SubSeg GetSubSeg(Direction dir) const
Definition: Segment.cxx:20