23{
25
26 std::ifstream inFile(fullname, std::ios::in);
27 std::string line;
28
29 while (std::getline(inFile, line)) {
30 std::stringstream linestream(line);
31
33 linestream >>
34 chanInfo.offlchan >>
35 chanInfo.detid >>
36 chanInfo.detelement >>
37 chanInfo.crate >>
38 chanInfo.slot >>
39 chanInfo.stream >>
40 chanInfo.streamchan >>
41 chanInfo.plane >>
42 chanInfo.chan_in_plane >>
43 chanInfo.femb >>
44 chanInfo.asic >>
45 chanInfo.asicchan;
46
47 chanInfo.valid = true;
49
50
51
53
54 auto hashval =
make_hash(chanInfo.detid,chanInfo.crate,chanInfo.slot,chanInfo.stream,chanInfo.streamchan);
56 std::cout << "TPCChannelMapSP: duplicate electronics channel found. detid, crate, slot, stream, streamchan: " <<
57 chanInfo.detid << " " <<
58 chanInfo.crate << " " <<
59 chanInfo.slot << " " <<
60 chanInfo.stream << " " <<
61 chanInfo.streamchan << std::endl;
62 throw std::range_error("Duplicate Electronics ID");
63 }
65
67 std::cout << "TPCChannelMapSP: duplicate offline channel found: " <<
68 chanInfo.offlchan << std::endl;
69 throw std::range_error("Duplicate Offline TPC Channel ID");
70 }
72 }
73 inFile.close();
74}
void check_offline_channel(unsigned int offlineChannel) const