13 auto bmtfToken =
static_cast<const GMTTokens*
>(toks)->getRegionalMuonCandTokenBMTF();
14 auto omtfToken =
static_cast<const GMTTokens*
>(toks)->getRegionalMuonCandTokenOMTF();
15 auto emtfToken =
static_cast<const GMTTokens*
>(toks)->getRegionalMuonCandTokenEMTF();
20 packTF(event, bmtfToken, blocks);
21 packTF(event, omtfToken, blocks);
22 packTF(event, emtfToken, blocks);
31 event.getByToken(tfToken, muons);
37 const auto nBx = muons->getLastBX() - muons->getFirstBX() + 1;
39 for (
int i = muons->getFirstBX();
i <= muons->getLastBX(); ++
i, ++bxCtr) {
40 for (
auto mu = muons->begin(
i);
mu != muons->end(
i); ++
mu) {
41 const auto linkTimes2 =
mu->link() * 2;
44 if (payloadMap.count(linkTimes2) == 0) {
45 payloadMap[linkTimes2].reserve(wordsPerBx * nBx);
49 while (payloadMap[linkTimes2].
size() < bxCtr * wordsPerBx) {
50 payloadMap[linkTimes2].push_back(0);
61 payloadMap[linkTimes2].push_back(lsw);
62 payloadMap[linkTimes2].push_back(msw);
67 for (
auto &kv : payloadMap) {
68 while (kv.second.size() < (bxCtr + 1) * wordsPerBx) {
69 kv.second.push_back(0);
75 for (
auto &kv : payloadMap) {
76 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)
Blocks pack(const edm::Event &, const PackerTokens *) override
void packTF(const edm::Event &, const edm::EDGetTokenT< RegionalMuonCandBxCollection > &, Blocks &)