#include <PtLUTReader.h>
Definition at line 8 of file PtLUTReader.h.
◆ address_t
◆ content_t
◆ table_t
◆ PtLUTReader()
PtLUTReader::PtLUTReader |
( |
| ) |
|
|
explicit |
◆ ~PtLUTReader()
PtLUTReader::~PtLUTReader |
( |
| ) |
|
◆ get_version()
◆ lookup()
◆ read()
void PtLUTReader::read |
( |
const std::string & |
lut_full_path | ) |
|
Definition at line 13 of file PtLUTReader.cc.
17 std::cout <<
"EMTF emulator: attempting to read pT LUT binary file from local area" << std::endl;
19 std::cout <<
"Non-standard operation; if it fails, now you know why" << std::endl;
20 std::cout <<
"Be sure to check that the 'scale_pt' function still matches this LUT" << std::endl;
21 std::cout <<
"Loading LUT, this might take a while..." << std::endl;
23 std::ifstream
infile(lut_full_path, std::ios::binary);
26 snprintf(what,
sizeof(what),
"Fail to open %s", lut_full_path.c_str());
27 throw std::invalid_argument(what);
33 full_word_t full_word;
34 full_word_t sub_word[4] = {0, 0, 0, 0};
36 while (
infile.read(reinterpret_cast<char*>(&full_word),
sizeof(full_word_t))) {
37 sub_word[0] = (full_word >> 0) & 0x1FF;
38 sub_word[1] = (full_word >> 9) & 0x1FF;
39 sub_word[2] = (full_word >> 32) & 0x1FF;
40 sub_word[3] = (full_word >> (32 + 9)) & 0x1FF;
42 ptlut_.push_back(sub_word[0]);
43 ptlut_.push_back(sub_word[1]);
44 ptlut_.push_back(sub_word[2]);
45 ptlut_.push_back(sub_word[3]);
51 snprintf(what,
sizeof(what),
"ptlut_.size() is %lu != %i",
ptlut_.size(),
PTLUT_SIZE);
52 throw std::invalid_argument(what);
References gather_cfg::cout, timingPdfMaker::infile, ok_, ptlut_, PTLUT_SIZE, and version_.
Referenced by PtAssignmentEngine::configure_details(), and edmIntegrityCheck.PublishToFileSystem::get().
◆ ok_
◆ ptlut_
◆ version_