Public Member Functions | Public Attributes | List of all members
WireCell::WireSummary::WireSummaryCache Struct Reference

Public Member Functions

 WireSummaryCache (const IWire::vector &wires)
 
 ~WireSummaryCache ()
 
WirePlaneCacheplane (WirePlaneId wpid)
 
WirePlaneCacheplane (int index)
 
IWire::vector by_chan (int chan)
 

Public Attributes

IWire::vector wires
 
BoundingBox bb
 
WirePlaneCacheplane_cache [3]
 
std::map< int, IWireSegmentSetchan2wire
 

Detailed Description

Definition at line 60 of file WireSummary.cxx.

Constructor & Destructor Documentation

WireCell::WireSummary::WireSummaryCache::WireSummaryCache ( const IWire::vector wires)
inline

Definition at line 67 of file WireSummary.cxx.

68  : wires(wires)
69  {
70  for (auto wire : wires) {
71  bb(wire->ray());
72  chan2wire[wire->channel()].insert(wire);
73  }
74 
78  }
std::map< int, IWireSegmentSet > chan2wire
Definition: WireSummary.cxx:65
WireCell::WireSummary::WireSummaryCache::~WireSummaryCache ( )
inline

Definition at line 80 of file WireSummary.cxx.

80  {
81  for (int ind=0; ind<3; ++ind) {
82  delete plane_cache[ind];
83  }
84  }

Member Function Documentation

IWire::vector WireCell::WireSummary::WireSummaryCache::by_chan ( int  chan)
inline

Definition at line 94 of file WireSummary.cxx.

94  {
95  IWireSegmentSet& got = chan2wire[chan];
96  return IWire::vector(got.begin(), got.end());
97  }
std::set< IWire::pointer, IWireCompareSegment > IWireSegmentSet
Definition: IWire.h:89
struct vector vector
std::map< int, IWireSegmentSet > chan2wire
Definition: WireSummary.cxx:65
WirePlaneCache* WireCell::WireSummary::WireSummaryCache::plane ( WirePlaneId  wpid)
inline

Definition at line 86 of file WireSummary.cxx.

86  {
87  return plane(wpid.index());
88  }
WirePlaneCache * plane(WirePlaneId wpid)
Definition: WireSummary.cxx:86
int index() const
Layer as index number (0,1 or 2). -1 if unknown.
Definition: WirePlaneId.cxx:34
WirePlaneCache* WireCell::WireSummary::WireSummaryCache::plane ( int  index)
inline

Definition at line 89 of file WireSummary.cxx.

89  {
90  if (index<0 ||index>2) return 0;
91  return plane_cache[index];
92  }

Member Data Documentation

BoundingBox WireCell::WireSummary::WireSummaryCache::bb

Definition at line 62 of file WireSummary.cxx.

std::map<int,IWireSegmentSet> WireCell::WireSummary::WireSummaryCache::chan2wire

Definition at line 65 of file WireSummary.cxx.

WirePlaneCache* WireCell::WireSummary::WireSummaryCache::plane_cache[3]

Definition at line 63 of file WireSummary.cxx.

IWire::vector WireCell::WireSummary::WireSummaryCache::wires

Definition at line 61 of file WireSummary.cxx.


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