36 uint32_t fecAddr = (reDigi&0xFFFF0000) >> 16;
37 uint32_t module = (fecAddr&0xF800) >> 5;
38 REId = (fecAddr&0x07FF) | module;
39 FecData = reDigi&0xFFFF;
40 StrSqc = strSqcVec[REId];
47 cerr <<
"MdcBuilder::pack can't get digiCol" << endl;
48 return StatusCode::FAILURE;
51 uint32_t size = 0, index;
52 uint32_t teid, reid, channel;
54 MucDigiCol::const_iterator pMucDigi = digiCol->begin();
55 for (pMucDigi; pMucDigi!= digiCol->end(); pMucDigi++) {
56 teid = (*pMucDigi)->getIntId();
57 reid =
getREID(teid&0xFFFFFFF0);
58 channel = (strSqcVec[reid] == 0) ? (0x8000>>(teid&0xF)) : (0x1<<(teid&0xF));
60 for (index = 0; index < size; index++) {
61 if ((
m_buf[index]>>16) == reid) {
62 m_buf[index] |= channel;
67 if (index == size)
m_buf[size++] = ((reid << 16) | (channel));
72 return StatusCode::SUCCESS;
78 ifstream fs(fec2idFile.c_str());
80 cerr <<
"Error: could not open file " << fec2idFile << endl;
86 int fec, part, seg, layer, firstStr, strSqc;
88 for (
int i = 0; i < 572; i++) {
89 fs >> fec >> part >> seg >> layer >> firstStr >> strSqc;
96 strSqcVec[reid] = strSqc + 1;
97 m_te2reMap.insert(TE2REMAP::value_type(teid, reid));
101 return StatusCode::SUCCESS;