12 for (
const auto & chDigi : *dtphDigisBMTF.
getContainer() ) {
13 if (
std::abs(chDigi.whNum()) != 2)
continue;
14 if (chDigi.stNum() ==4)
continue;
18 data.
st_q_ = chDigi.code();
19 int bxNumber = chDigi.bxNum();
20 data.
bxNum_ = (3+bxNumber);
21 data.
st_ = chDigi.stNum()-1;
23 int bxCnt = (chDigi.BxCnt() >= 0 && chDigi.BxCnt() <=3) ? chDigi.BxCnt() : 0;
27 data.
fiber_ = chDigi.Ts2Tag();
30 unsigned int fed = (chDigi.whNum()==-2)? 1380: 1381;
31 if (chDigi.scNum()%2 !=0) {
35 amc = chDigi.scNum()+1;
37 amc2 = (chDigi.scNum()+11)%12;
39 LogTrace(
"")<<
" fed: "<< fed <<
" amc: "<<amc<<
" DT PH DATA: " << data << std::endl;
40 raws[std::make_pair(fed,amc)].push_back(data.
rawData);
43 LogTrace(
"")<<
" fed: "<< fed <<
" amc: "<<amc2<<
" DT PH DATA: " << data << std::endl;
44 raws[std::make_pair(fed,amc2)].push_back(data.
rawData);
51 for (
const auto & chDigi : *dtthDigisBMTF.
getContainer() ) {
52 if (
std::abs(chDigi.whNum()) != 2)
continue;
53 if (chDigi.stNum() ==4)
continue;
55 int bxNumber = chDigi.bxNum();
56 data.
bxNum_ = (3+bxNumber);
57 data.
st_ = chDigi.stNum()-1;
61 unsigned int fed = (chDigi.whNum()==-2)? 1380: 1381;
62 if (chDigi.scNum()%2 !=0) {
66 amc = chDigi.scNum()+1;
68 amc2 = (chDigi.scNum()+11)%12;
71 unsigned int etaQ = 0;
72 for (
unsigned int ipos=0; ipos <7; ipos++) {
73 if (chDigi.position(ipos) >1 )
edm::LogError(
"OmtfDtPacker")<<
"DT TH position to ETA, PROBLEM !!!!";
74 if (chDigi.position(ipos)==1) eta |= (1 <<ipos);
75 if (chDigi.quality(ipos)==1) etaQ |= (1 <<ipos);
79 bool foundDigi =
false;
80 for (
auto & raw : raws) {
81 if (raw.first.first != fed)
continue;
82 unsigned int amcPh = raw.first.second;
83 if (amc != amcPh && amc2 != amcPh)
continue;
84 auto & words = raw.second;
85 for (
auto & word : words) {
89 if (dataRaw.
st_ != data.
st_)
continue;
91 || ( amcPh == amc2 && 2==dataRaw.
sector_ ) ) {
96 LogTrace(
"")<<
"AP fed: "<< fed <<
" amc: "<<amc<<
" DT TH DATA: " << dataRaw << std::endl;
101 LogTrace(
"")<<
"NFD fed: "<< fed <<
" amc: "<<amc<<
" DT TH DATA: " << data<< std::endl;
102 raws[std::make_pair(fed,amc)].push_back(data.
rawData);
105 LogTrace(
"")<<
"NFD fed: "<< fed <<
" amc2: "<<amc2<<
" DT TH DATA: " << data<< std::endl;
106 raws[std::make_pair(fed,amc2)].push_back(data.
rawData);
The_Container const * getContainer() const
std::map< std::pair< unsigned int, unsigned int >, std::vector< Word64 > > FedAmcRawsMap
Abs< T >::type abs(const T &t)
void pack(const L1MuDTChambPhContainer *phCont, const L1MuDTChambThContainer *thCont, FedAmcRawsMap &raws)
Phi_Container const * getContainer() const
char data[epos_bytes_allocation]