Description: A class implimentating a look up table
Implementation: Internally stores data in vector filled with 32 bit ints address and output is masked to specifed number of bits vector only allocates as necessary, eg we may have a 32 bit address but we obviously dont want to allocate a 4gb vector
Error handling: currently waiting guidance on how to deal with this Exceptions are currently forbiden, emulator fails should not impact on the rest of the software chain. As such, everything silently fails gracefully
- Author
- : Sam Harper - RAL, Jim Brooke - Bristol
Definition at line 29 of file LUT.h.
int l1t::LUT::read |
( |
std::istream & |
stream | ) |
|
Definition at line 35 of file LUT.cc.
References addressMask_, data_, dataMask_, DUP_ENTRIES, mps_splice::entry, spr::find(), geometryCSVtoXML::line, bookConverter::max, MAX_ADDRESS_OUTOFRANGE, MISS_ENTRIES, NO_ENTRIES, readHeader_(), AlCaHLTBitMon_QueryRunRegistry::string, SUCCESS, and create_public_lumi_plots::transform.
Referenced by edmIntegrityCheck.PublishToFileSystem::get(), l1t::Setting::getLUT(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::goto(), LUT(), l1t::MicroGMTLUT::MicroGMTLUT(), XMLConfigReader::readLUT(), and Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::setFilterBranches().
40 if(readHeaderCode!=
SUCCESS)
return readHeaderCode;
42 std::vector<std::pair<unsigned int,int> > entries;
46 while(std::getline(stream,line)){
47 line.erase(
std::find( line.begin(), line.end(),
'#' ), line.end() );
48 std::istringstream lineStream(line);
49 std::pair<unsigned int,int>
entry;
50 while(lineStream >> entry.first >> entry.second ){
53 entries.push_back(entry);
54 if(entry.first>maxAddress || maxAddress==
addressMask_) maxAddress=entry.first;
67 if(entries.front().first!=0 ||
68 std::adjacent_find(entries.begin(),entries.end(),
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
unsigned int addressMask_
int readHeader_(std::istream &)