23 event.getByToken(static_cast<const CaloTokens*>(toks)->getCaloRegionToken(), caloregion);
26 event.getByToken(static_cast<const CaloTokens*>(toks)->getCaloEmCandToken(), caloemcand);
28 std::vector<uint32_t>
load[36];
30 for (
int i = 0;
i <= 0; ++
i) {
33 for (
auto j = caloregion->begin();
j != caloregion->end(); ++
j, ++
n) {
34 int et = (int)
j->et();
35 int overFlow = (int)
j->overFlow();
36 int fineGrain = (int)
j->fineGrain();
37 int mip = (int)
j->mip();
38 bool tauveto =
j->tauVeto();
41 int rctCrate = (int)
j->rctCrate();
42 int rctCard = (int)
j->rctCard();
43 int rctRegion = (int)
j->rctRegionIndex();
44 bool isHf = (bool)
j->isHf();
47 converter[rctCrate].
SetRCEt(et, rctCard, rctRegion);
48 converter[rctCrate].
SetRCOf(overFlow, rctCard, rctRegion);
49 converter[rctCrate].
SetRCTau(tauveto, rctCard, rctRegion);
50 converter[rctCrate].
SetRCHad(mip, rctCard, rctRegion);
51 LogDebug(
"L1T") <<
"CRATE" << rctCrate <<
"region=" << rctRegion <<
", card=" << rctCard <<
", rgnEt=" << et
52 <<
", overflow=" << overFlow <<
", tauveto=" << tauveto <<
", hadveto=" << mip << std::endl;
55 converter[rctCrate].
SetHFEt(et, rctRegion);
56 converter[rctCrate].
SetHFFg(fineGrain, rctRegion);
57 LogDebug(
"L1T") <<
"CRATE" << rctCrate <<
"region=" << rctRegion <<
", rgnEt=" << et << std::endl;
62 for (
auto j = caloemcand->begin();
j != caloemcand->end(); ++
j, ++
m) {
63 int rank = (int)
j->rank();
64 int index = (int)
j->index();
65 int rctCrate = (int)
j->rctCrate();
66 bool isolated = (bool)
j->isolated();
67 int rctCard = (int)
j->rctCard();
68 int rctRegion = (int)
j->rctRegion();
71 converter[rctCrate].
SetIEEt(rank, index);
72 converter[rctCrate].
SetIEReg(rctRegion, index);
73 converter[rctCrate].
SetIECard(rctCard, index);
74 LogDebug(
"L1T") <<
"CRATE" << rctCrate <<
"ISO em rank=" << rank <<
", region=" << rctRegion
75 <<
", card=" << rctCard << std::endl;
77 converter[rctCrate].
SetNEEt(rank, index);
78 converter[rctCrate].
SetNEReg(rctRegion, index);
79 converter[rctCrate].
SetNECard(rctCard, index);
80 LogDebug(
"L1T") <<
"CRATE" << rctCrate <<
"NON ISO em rank=" << rank <<
", region=" << rctRegion
81 <<
", card=" << rctCard << std::endl;
85 for (
int in = 0;
in < 18;
in++) {
87 for (
int d = 0;
d < 6;
d++) {
88 load[2 *
in].push_back((uint32_t)converter[
in].Get32bitWordLinkEven(
d));
89 load[2 *
in + 1].push_back((uint32_t)converter[
in].Get32bitWordLinkOdd(
d));
98 for (
int i = 0;
i < 36; ++
i) {
99 unsigned int mycrateRCT = (int)(
i / 2);
106 database.
GetLinkMP7(mycrateRCT, myRCTeven, linkMP7);
107 res.push_back(
Block(2 * linkMP7, load[
i], 0));
108 res.push_back(
Block(2 * linkMP7, load[i], 1));
void SetNEReg(int value, int cand)
void GetLinkMP7(unsigned int RCTcrate, bool RCTeven, int &linkMP7)
void SetNEEt(int value, int cand)
void SetRCOf(int value, int card, int region)
void SetHFEt(int value, int region)
void SetIEReg(int value, int cand)
void SetRCTau(int value, int card, int region)
void SetNECard(int value, int cand)
std::vector< Block > Blocks
void SetRCEt(int value, int card, int region)
void SetHFFg(int value, int region)
void SetIECard(int value, int cand)
void SetRCHad(int value, int card, int region)
void SetIEEt(int value, int cand)
#define DEFINE_L1T_PACKER(type)
Blocks pack(const edm::Event &, const PackerTokens *) override