1 #ifndef L1Trigger_L1TCommon_l1t_ConvertToLUT 2 #define L1Trigger_L1TCommon_l1t_ConvertToLUT 11 unsigned int addrWidth = (32 - __builtin_clz(uint32_t(
v.size() - 1)));
12 std::stringstream oss;
13 oss <<
"#<header> V1 " << addrWidth <<
" 31 </header> " << std::endl;
14 for (
unsigned int i = 0;
i <
v.size();
i++)
15 oss <<
i <<
" " <<
v[
i] << std::endl;
18 for (
unsigned int i =
v.size();
i < (size_t)(1 << addrWidth);
i++)
19 oss <<
i <<
" " << padding << std::endl;
28 return convertToLUT(std::vector<uint64_t>(
v.begin(),
v.end()), padding);
31 return convertToLUT(std::vector<uint64_t>(
v.begin(),
v.end()), padding);
34 return convertToLUT(std::vector<uint64_t>(
v.begin(),
v.end()), padding);
37 return convertToLUT(std::vector<uint64_t>(
v.begin(),
v.end()), padding);
40 return convertToLUT(std::vector<uint64_t>(
v.begin(),
v.end()), padding);
43 return convertToLUT(std::vector<uint64_t>(
v.begin(),
v.end()), padding);
46 return convertToLUT(std::vector<uint64_t>(
v.begin(),
v.end()), padding);
49 return convertToLUT(std::vector<uint64_t>(
v.begin(),
v.end()), padding);
int read(std::istream &stream)
l1t::LUT convertToLUT(const std::vector< uint64_t > &v, int padding=-1) noexcept