11 for (
const auto& chDigi : *dtphDigisBMTF.
getContainer()) {
14 if (chDigi.stNum() == 4)
17 data.st_phi_ = chDigi.phi();
18 data.st_phib_ = chDigi.phiB();
19 data.st_q_ = chDigi.code();
20 int bxNumber = chDigi.bxNum();
21 data.bxNum_ = (3 + bxNumber);
22 data.st_ = chDigi.stNum() - 1;
24 int bxCnt = (chDigi.BxCnt() >= 0 && chDigi.BxCnt() <= 3) ? chDigi.BxCnt() : 0;
25 data.bcnt_st_ = bxCnt;
26 data.bcnt_e0_ = bxCnt;
27 data.bcnt_e1_ = bxCnt;
28 data.fiber_ = chDigi.Ts2Tag();
30 unsigned int amc2 = 0;
31 unsigned int fed = (chDigi.whNum() == -2) ? 1380 : 1381;
32 if (chDigi.scNum() % 2 != 0) {
36 amc = chDigi.scNum() + 1;
38 amc2 = (chDigi.scNum() + 11) % 12;
40 LogTrace(
"") <<
" fed: " << fed <<
" amc: " <<
amc <<
" DT PH DATA: " <<
data << std::endl;
41 raws[std::make_pair(fed,
amc)].push_back(
data.rawData);
44 LogTrace(
"") <<
" fed: " << fed <<
" amc: " << amc2 <<
" DT PH DATA: " <<
data << std::endl;
45 raws[std::make_pair(fed, amc2)].push_back(
data.rawData);
52 for (
const auto& chDigi : *dtthDigisBMTF.
getContainer()) {
55 if (chDigi.stNum() == 4)
58 int bxNumber = chDigi.bxNum();
59 data.bxNum_ = (3 + bxNumber);
60 data.st_ = chDigi.stNum() - 1;
63 unsigned int amc2 = 0;
64 unsigned int fed = (chDigi.whNum() == -2) ? 1380 : 1381;
65 if (chDigi.scNum() % 2 != 0) {
69 amc = chDigi.scNum() + 1;
71 amc2 = (chDigi.scNum() + 11) % 12;
74 unsigned int etaQ = 0;
75 for (
unsigned int ipos = 0; ipos < 7; ipos++) {
76 if (chDigi.position(ipos) > 1)
77 edm::LogError(
"OmtfDtPacker") <<
"DT TH position to ETA, PROBLEM !!!!";
78 if (chDigi.position(ipos) == 1)
80 if (chDigi.quality(ipos) == 1)
83 data.eta_qbit_ = etaQ;
85 bool foundDigi =
false;
86 for (
auto& raw : raws) {
87 if (raw.first.first != fed)
89 unsigned int amcPh = raw.first.second;
90 if (
amc != amcPh && amc2 != amcPh)
92 auto& words = raw.second;
93 for (
auto&
word : words) {
96 DtDataWord64 dataRaw(
word);
97 if (dataRaw.bxNum_ !=
data.bxNum_)
99 if (dataRaw.st_ !=
data.st_)
101 if ((amcPh ==
amc && dataRaw.sector_ ==
data.sector_) || (amcPh == amc2 && 2 == dataRaw.sector_)) {
103 dataRaw.eta_qbit_ =
data.eta_qbit_;
104 dataRaw.eta_hit_ =
data.eta_hit_;
105 word = dataRaw.rawData;
106 LogTrace(
"") <<
"AP fed: " << fed <<
" amc: " <<
amc <<
" DT TH DATA: " << dataRaw << std::endl;
111 LogTrace(
"") <<
"NFD fed: " << fed <<
" amc: " <<
amc <<
" DT TH DATA: " <<
data << std::endl;
112 raws[std::make_pair(fed,
amc)].push_back(
data.rawData);
115 LogTrace(
"") <<
"NFD fed: " << fed <<
" amc2: " << amc2 <<
" DT TH DATA: " <<
data << std::endl;
116 raws[std::make_pair(fed, amc2)].push_back(
data.rawData);
The_Container const * getContainer() const
Abs< T >::type abs(const T &t)
Phi_Container const * getContainer() const
char data[epos_bytes_allocation]