Public Member Functions | Public Attributes | List of all members
channel_wire_collector_t Struct Reference

Public Member Functions

void operator() (IWire::pointer iwire)
 
SimpleChannel * operator() (int chid)
 

Public Attributes

std::unordered_map< int, SimpleChannel * > chid2sch
 

Detailed Description

Definition at line 79 of file AnodePlane.cxx.

Member Function Documentation

void channel_wire_collector_t::operator() ( IWire::pointer  iwire)
inline

Definition at line 88 of file AnodePlane.cxx.

88  {
89  const int chid = iwire->channel();
90  SimpleChannel* sc = nullptr;
91  auto it = chid2sch.find(chid);
92  if (it == chid2sch.end()) {
93  sc = new SimpleChannel(chid);
94  chid2sch[chid] = sc;
95  }
96  else {
97  sc = it->second;
98  }
99  sc->add(iwire);
100  }
std::unordered_map< int, SimpleChannel * > chid2sch
Definition: AnodePlane.cxx:85
SimpleChannel* channel_wire_collector_t::operator() ( int  chid)
inline

Definition at line 102 of file AnodePlane.cxx.

102  {
103  return chid2sch[chid];
104  }
std::unordered_map< int, SimpleChannel * > chid2sch
Definition: AnodePlane.cxx:85

Member Data Documentation

std::unordered_map<int, SimpleChannel*> channel_wire_collector_t::chid2sch

Definition at line 85 of file AnodePlane.cxx.


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