37 event.getByToken(tfToken, muons);
42 for (
int i = muons->getFirstBX();
i <= muons->getLastBX(); ++
i, ++bxCtr) {
43 for (
auto mu = muons->begin(
i);
mu != muons->end(
i); ++
mu) {
49 payloadMap[
mu->link()*2].push_back(lsw);
50 payloadMap[
mu->link()*2].push_back(msw);
56 for (
const auto &link : links) {
57 if (payloadMap.count(link*2) == 0) {
58 payloadMap[link*2].push_back(0);
61 if (payloadMap[link*2].
size() == bxCtr * 6) {
62 payloadMap[link*2].push_back(0);
68 for (
auto &kv : payloadMap) {
69 while (kv.second.size() % 6 != 0) {
70 kv.second.push_back(0);
76 for (
auto &kv : payloadMap) {
77 blocks.push_back(
Block(kv.first, kv.second));
std::map< unsigned int, std::vector< uint32_t > > PayloadMap
static void generatePackedDataWords(const RegionalMuonCand &, uint32_t &, uint32_t &)
std::vector< Block > Blocks
#define DEFINE_L1T_PACKER(type)
virtual Blocks pack(const edm::Event &, const PackerTokens *) override
void packTF(const edm::Event &, const edm::EDGetTokenT< RegionalMuonCandBxCollection > &, Blocks &, const std::vector< unsigned int > &)