CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
omtf::CscPacker Class Reference

#include <OmtfCscPacker.h>

Public Member Functions

void init ()
 
void pack (const CSCCorrelatedLCTDigiCollection *prod, FedAmcRawsMap &raws)
 

Private Attributes

MapCscDet2EleIndex theCsc2Omtf
 

Detailed Description

Definition at line 14 of file OmtfCscPacker.h.

Member Function Documentation

void omtf::CscPacker::init ( void  )

Definition at line 8 of file OmtfCscPacker.cc.

References omtf::mapCscDet2EleIndex(), and theCsc2Omtf.

Referenced by omtf::OmtfPacker::beginRun().

9 {
11 }
MapCscDet2EleIndex mapCscDet2EleIndex()
MapCscDet2EleIndex theCsc2Omtf
Definition: OmtfCscPacker.h:22
void omtf::CscPacker::pack ( const CSCCorrelatedLCTDigiCollection prod,
FedAmcRawsMap raws 
)

Definition at line 13 of file OmtfCscPacker.cc.

References omtf::CscDataWord64::bxNum_, CSCDetId::chamber(), CSCDetId::chamberId(), omtf::CscDataWord64::clctPattern_, omtf::CscDataWord64::cscID_, data, omtf::CscDataWord64::halfStrip_, omtf::CscDataWord64::hitNum_, omtf::CscDataWord64::keyWG_, omtf::CscDataWord64::linkNum_, LogTrace, omtf::CscDataWord64::lr_, parseEventContent::prod, omtf::CscDataWord64::quality_, omtf::CscDataWord64::rawData, CSCDetId::station(), omtf::CscDataWord64::station_, theCsc2Omtf, and omtf::CscDataWord64::vp_.

Referenced by pyrootRender.interactiveRender::draw(), and omtf::OmtfPacker::produce().

14 {
15  const CSCCorrelatedLCTDigiCollection & cscDigis = *prod;
16  for (const auto & chDigis : cscDigis) {
17  CSCDetId chamberId = CSCDetId(chDigis.first).chamberId();
18  for (auto digi = chDigis.second.first; digi != chDigis.second.second; digi++) {
19  CscDataWord64 data;
20  data.hitNum_ = digi->getTrknmb();
21  data.vp_ = digi->isValid();
22  data.bxNum_ = digi->getBX()-3;
23  data.halfStrip_ = digi->getStrip();
24  data.clctPattern_ = digi->getPattern();
25  data.keyWG_ = digi->getKeyWG();
26  data.lr_ = digi->getBend();
27  data.quality_ = digi->getQuality();
28  auto im = theCsc2Omtf.find(chamberId);
29  if (im != theCsc2Omtf.end()) {
30  std::vector<EleIndex> links = {im->second.first, im->second.second};
31  for (const auto & link : links) {
32  unsigned int fed = link.fed();
33  if (fed == 0) continue;
34  data.station_ = chamberId.station()-1;
35  data.linkNum_ = link.link();
36  data.cscID_ = chamberId.chamber()-(link.amc()-1)*6;
37  unsigned int amc = link.amc()*2-1;
38  raws[std::make_pair(fed,amc)].push_back(data.rawData);
39  LogTrace("") <<"ADDED RAW: fed: "<< fed <<" amc: "<<amc <<" CSC DATA: " << data<< std::endl;
40  }
41  }
42  }
43  }
44 
45 }
int chamber() const
Definition: CSCDetId.h:68
MapCscDet2EleIndex theCsc2Omtf
Definition: OmtfCscPacker.h:22
CSCDetId chamberId() const
Definition: CSCDetId.h:53
#define LogTrace(id)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int station() const
Definition: CSCDetId.h:86
Definition: AMCSpec.h:8

Member Data Documentation

MapCscDet2EleIndex omtf::CscPacker::theCsc2Omtf
private

Definition at line 22 of file OmtfCscPacker.h.

Referenced by init(), and pack().