10 event.getByToken(static_cast<const CommonTokens*>(toks)->getMuonToken(), muons);
14 for (
int bx = muons->getFirstBX();
bx <= muons->getLastBX(); ++
bx) {
20 for (
auto& kv : payloadMap) {
21 blocks.push_back(
Block(kv.first, kv.second));
28 for (
unsigned int blkId =
b1_; blkId <
b1_ + 7; blkId += 2) {
29 payloadMap[blkId].push_back(0);
32 unsigned int blkId =
b1_;
33 auto mu{muons->begin(bx)};
34 uint32_t mu1_shared_word{0};
35 uint32_t mu2_shared_word{0};
49 for (
int muCtr = 1; muCtr <= 8; ++muCtr) {
50 if (
mu != muons->end(bx)) {
52 *
mu, mu2_shared_word, mu2_lsw, mu2_msw,
fedId_,
fwId_, 2 - (muCtr % 2));
59 mu1_shared_word = mu2_shared_word;
63 payloadMap[blkId].push_back(mu1_shared_word | mu2_shared_word);
64 payloadMap[blkId].push_back(mu1_lsw);
65 payloadMap[blkId].push_back(mu1_msw);
66 payloadMap[blkId].push_back(mu2_lsw);
67 payloadMap[blkId].push_back(mu2_msw);
std::map< unsigned int, std::vector< uint32_t > > PayloadMap
void packBx(PayloadMap &payloadMap, const edm::Handle< MuonBxCollection > &muons, int bx)
Blocks pack(const edm::Event &, const PackerTokens *) override
std::vector< Block > Blocks
static void generatePackedDataWords(const Muon &mu, uint32_t &raw_data_spare, uint32_t &raw_data_00_31, uint32_t &raw_data_32_63, int fedId, int fwId, int muInBx)
#define DEFINE_L1T_PACKER(type)