13 event.getByToken(static_cast<const CaloTokens*>(toks)->getCaloSpareHFBitCountsToken(), calosparesHFBitCounts);
16 event.getByToken(static_cast<const CaloTokens*>(toks)->getCaloSpareHFRingSumsToken(), calosparesHFRingSums);
18 std::vector<uint32_t>
load;
20 for (
int i = calosparesHFBitCounts->getFirstBX();
i <= calosparesHFBitCounts->getLastBX(); ++
i) {
26 for (
auto j = calosparesHFBitCounts->begin(
i); j != calosparesHFBitCounts->end(
i) && n < 2; ++j, ++
n) {
27 hfbitcount=
std::min(j->hwPt(),0xFFF);
32 for (
auto j = calosparesHFRingSums->begin(
i); j != calosparesHFRingSums->end(
i) && n < 2; ++j, ++
n) {
36 uint16_t
object[2]={0,0};
38 object[0]=hfbitcount|((hfringsum & 0x7) << 12);
39 object[1]=((hfringsum>>3) & 0x1FF) |(0x1)<<10 | (0
x1)<<12 | (0x1)<<14;
41 uint32_t word0=(
object[0] & 0xFFFF);
42 uint32_t word1=(
object[1] & 0xFFFF);
45 word1 |= ((
i == 0) << 15);
47 load.push_back(word0);
48 load.push_back(word1);
51 return {
Block(97, load)};
Blocks pack(const edm::Event &, const PackerTokens *) override
std::vector< Block > Blocks
#define DEFINE_L1T_PACKER(type)