CMS 3D CMS Logo

OmtfCscUnpacker.cc
Go to the documentation of this file.
2 
4 
7 
9 
10 
11 namespace omtf {
12 
14 {
16 }
17 
18 void CscUnpacker::unpack(unsigned int fed, unsigned int amc, const CscDataWord64 &data, CSCCorrelatedLCTDigiCollection* prod)
19 {
20  EleIndex omtfEle(fed, amc, data.linkNum());
21  std::map<EleIndex,CSCDetId>::const_iterator icsc = theOmtf2CscDet.find(omtfEle);
22  if (icsc==theOmtf2CscDet.end()) {LogTrace(" ") <<" CANNOT FIND key: " << omtfEle << std::endl; return; }
23  CSCDetId cscId = theOmtf2CscDet[omtfEle];
24  LogTrace("") <<"OMTF->CSC "<<cscId << std::endl;
25  LogTrace("") << data << std::endl;
26  if (data.linkNum() >=30) {LogTrace(" ")<<" data from overlap, skip digi "<< std::endl; return;}
27  CSCCorrelatedLCTDigi digi(data.hitNum(), //trknmb
28  data.valid(),
29  data.quality(),
30  data.wireGroup(),
31  data.halfStrip(),
32  data.clctPattern(),
33  data.bend(),
34  data.bxNum()+3) ;
35  LogTrace("") << digi << std::endl;
36  //producedCscLctDigis->insertDigi( cscId, digi);
37  prod->insertDigi( cscId, digi);
38 
39 }
40 
41 }
unsigned int quality() const
unsigned int bxNum() const
void unpack(unsigned int fed, unsigned int amc, const CscDataWord64 &raw, CSCCorrelatedLCTDigiCollection *prod)
unsigned int wireGroup() const
unsigned int valid() const
unsigned int clctPattern() const
MapEleIndex2CscDet theOmtf2CscDet
unsigned int halfStrip() const
#define LogTrace(id)
unsigned int hitNum() const
MapEleIndex2CscDet mapEleIndex2CscDet()
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
Definition: AMCSpec.h:8
unsigned int linkNum() const
unsigned int bend() const