CMS 3D CMS Logo

OmtfDtUnpacker.cc
Go to the documentation of this file.
2 
4 
6 
7 namespace omtf {
8 
9  void DtUnpacker::unpack(unsigned int fed,
10  unsigned int amc,
11  const DtDataWord64 &data,
12  std::vector<L1MuDTChambPhDigi> &phi_Container,
13  std::vector<L1MuDTChambThDigi> &the_Container) {
14  LogTrace("") << "HERE OMTF->DT " << std::endl;
15  LogTrace("") << data << std::endl;
16  if (data.sector() == 0) {
17  LogTrace("") << "...data skipped, since from oberlaping chambers." << std::endl;
18  return; // skip signal from chamber fiber exchange
19  }
20  int bx = data.bxNum() - 3;
21  int whNum = (fed == 1380) ? -2 : 2;
22  int sector = (amc - 1) * 2 + data.sector();
23  if (sector == 12)
24  sector = 0;
25  int station = data.station() + 1;
26  LogTrace("") << "DT_AMC# " << amc << " RAW_SECTOR: " << data.sector() << " DT_SECTOR: " << sector << std::endl;
27  phi_Container.push_back(L1MuDTChambPhDigi(bx,
28  whNum,
29  sector,
30  station,
31  data.phi(),
32  data.phiB(),
33  data.quality(),
34  data.fiber(), // utag/Ts2Tag
35  data.bcnt_st())); //ucnt/BxCnt
36  int pos[7];
37  int posQual[7];
38  for (unsigned int i = 0; i < 7; i++) {
39  pos[i] = (data.eta() >> i & 1);
40  posQual[i] = (data.etaQuality() >> i & 1);
41  }
42  if (data.eta())
43  LogTrace("") << "HERE DATA DT ETA";
44  if (data.eta())
45  the_Container.push_back(L1MuDTChambThDigi(bx, whNum, sector, station, pos, posQual));
46  }
47 
48 } // namespace omtf
#define LogTrace(id)
void unpack(unsigned int fed, unsigned int amc, const DtDataWord64 &raw, std::vector< L1MuDTChambPhDigi > &phi_Container, std::vector< L1MuDTChambThDigi > &the_Container)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
Definition: AMCSpec.h:8