11 auto bmtfToken =
static_cast<const GMTTokens*
>(toks)->getRegionalMuonCandTokenBMTF();
12 auto omtfToken =
static_cast<const GMTTokens*
>(toks)->getRegionalMuonCandTokenOMTF();
13 auto emtfToken =
static_cast<const GMTTokens*
>(toks)->getRegionalMuonCandTokenEMTF();
18 packTF(event, bmtfToken, blocks);
19 packTF(event, omtfToken, blocks);
20 packTF(event, emtfToken, blocks);
29 event.getByToken(tfToken, muons);
31 constexpr
unsigned wordsPerBx = 6;
35 const auto nBx = muons->getLastBX() - muons->getFirstBX() + 1;
37 for (
int i = muons->getFirstBX();
i <= muons->getLastBX(); ++
i, ++bxCtr) {
38 for (
auto mu = muons->begin(
i);
mu != muons->end(
i); ++
mu) {
39 const auto linkTimes2 =
mu->link() * 2;
42 if (payloadMap.count(linkTimes2) == 0) {
43 payloadMap[linkTimes2].reserve(wordsPerBx * nBx);
47 while (payloadMap[linkTimes2].
size() < bxCtr * wordsPerBx) {
48 payloadMap[linkTimes2].push_back(0);
59 payloadMap[linkTimes2].push_back(lsw);
60 payloadMap[linkTimes2].push_back(msw);
65 for (
auto& kv : payloadMap) {
66 while (kv.second.size() < (bxCtr + 1) * wordsPerBx) {
67 kv.second.push_back(0);
73 for (
auto& kv : payloadMap) {
74 blocks.push_back(
Block(kv.first, kv.second));
std::map< unsigned int, std::vector< uint32_t > > PayloadMap
bool useEmtfDisplacementInfo_
static void generatePackedDataWords(const RegionalMuonCand &mu, uint32_t &raw_data_00_31, uint32_t &raw_data_32_63, bool isKbmtf, bool useEmtfDisplacementInfo)
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 &)
tuple size
Write out results.