Go to the source code of this file.
Functions | |
void | readmemh (std::string fname, ULLONG *mem, ULLONG astart, ULLONG afinish) |
Definition at line 2 of file vpp_lib.h.
References dtNoiseDBValidation_cfg::cerr, i, and recoMuon::in.
{ std::ifstream ifs (fname.c_str() , std::ifstream::in); ULLONG val; for (ULLONG i = astart; i <= afinish; i++) { if (ifs >> std::hex >> val) { mem[i] = val; } else { std::cerr << "Cannot read file: " << fname << ", addr: " << i << std::endl; ifs.close(); return; } } ifs.close(); //std::cout << "LUT file: " << fname << " read out successfully." << std::endl; }