25 REId = (reDigi&m_idMask) >> m_idIndex;
26 TETDC = (reDigi&m_tdcMask) >> m_tdcIndex;
27 TEADC = (reDigi&m_adcMask) >> m_adcIndex;
28 measure = (reDigi&m_measureMask) >> m_measureIndex;
36 cerr <<
"EmcBuilder::pack can't get digiCol" << endl;
37 return StatusCode::FAILURE;
41 uint32_t teid = 0, tetdc = 0, teadc = 0, reid = 0, redigi = 0, measure = 0;
43 EmcDigiCol::const_iterator pEmcDigi = digiCol->begin();
44 for (pEmcDigi; pEmcDigi!= digiCol->end(); pEmcDigi++) {
45 teid = (*pEmcDigi)->getIntId();
47 tetdc = (*pEmcDigi)->getTimeChannel();
48 teadc = (*pEmcDigi)->getChargeChannel();
49 measure = (*pEmcDigi)->getMeasure();
52 if(teadc&0x80000000)
continue;
54 redigi = ((reid<<m_idIndex)&m_idMask)|
55 ((tetdc<<m_tdcIndex)&m_tdcMask)|
56 ((teadc<<m_adcIndex)&m_adcMask)|
57 ((measure<<m_measureIndex)&m_measureMask);
58 m_buf[size++] = redigi;
63 return StatusCode::SUCCESS;
72 uint32_t nREThetaPos, nREPhiPos, nREEaWePos;
73 uint32_t nREThetaMask, nREPhiMask, nREEaWeMask;
77 f.open( initFile.c_str());
81 cerr <<
"Error: could not open file " << initFile << endl;
86 cerr <<
"Error: could not find '##EmcDigiConf' in file " << initFile << endl;
87 return StatusCode::FAILURE;
108 uint32_t TEthetaMax, TEphiMax;
109 uint32_t TEthetaMin, TEphiMin;
110 uint32_t eawe, theta, phi;
126 for(uint32_t TEtheta = TEthetaMin; TEtheta <= TEthetaMax; TEtheta++ )
152 for(uint32_t TEphi = TEphiMin; TEphi <= TEphiMax; TEphi++ )
157 uint32_t reid = ((eawe<<nREEaWePos)&nREEaWeMask)|
158 ((theta<<nREThetaPos)&nREThetaMask)|
159 ((phi<<nREPhiPos)&nREPhiMask);
167 cerr <<
"Error: REID overflow !" << reid << endl;
172 m_re2te[reid] = teid;
173 m_te2reMap.insert(TE2REMAP::value_type(teid, reid)) ;
178 return StatusCode::SUCCESS;