CMS 3D CMS Logo

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