26 std::ifstream inFile(fullname, std::ios::in);
29 while (std::getline(inFile, line)) {
30 std::stringstream linestream(line);
47 chanInfo.
valid =
true;
56 std::cout <<
"TPCChannelMapSP: duplicate electronics channel found. detid, crate, slot, stream, streamchan: " <<
57 chanInfo.
detid <<
" " <<
58 chanInfo.
crate <<
" " <<
59 chanInfo.
slot <<
" " <<
62 throw std::range_error(
"Duplicate Electronics ID");
67 std::cout <<
"TPCChannelMapSP: duplicate offline channel found: " <<
69 throw std::range_error(
"Duplicate Offline TPC Channel ID");
81 unsigned int streamchan)
const
92 badInfo.
valid =
false;
100 unsigned int offlineChannel)
const
105 badInfo.
valid =
false;
115 unsigned int streamch
118 size_t hashval = (((size_t)
detid & 0x3f)<<34);
119 hashval ^=((crate & 0x3ff)<<24);
120 hashval ^=((slot & 0xf)<<20);
121 hashval ^=((stream & 0xff)<<12);
122 hashval ^=(streamch & 0xfff);
size_t make_hash(unsigned int detid, unsigned int crate, unsigned int slot, unsigned int stream, unsigned int streamch) const
TPCChanInfo_t GetChanInfoFromOfflChan(unsigned int offlchan) const
std::unordered_map< unsigned int, TPCChanInfo_t > OfflToChanInfo
void ReadMapFromFile(std::string &fullname)
unsigned int fSubstituteCrate
std::unordered_map< size_t, TPCChanInfo_t > DetToChanInfo
struct dune::TPCChannelMapSP::TPCChanInfo TPCChanInfo_t
void check_offline_channel(unsigned int offlineChannel) const
TPCChanInfo_t GetChanInfoFromElectronicsIDs(unsigned int detid, unsigned int crate, unsigned int slot, unsigned int stream, unsigned int streamchan) const
unsigned int chan_in_plane