33{
34 uint32_t REId, TEId, TEData, TEOverflow, TETorQ;
35 uint32_t n1buf = tof.
nBuf();
36 uint32_t n2buf = etf.
nBuf();
37 uint32_t nbuf = n1buf + n2buf;
38
40 typedef std::multimap<uint32_t, TofDigi*>::iterator my_iter;
41 std::multimap<uint32_t, TofDigi*> mapIdData;
42 my_iter it;
43
44 for (uint32_t i = 0; i < nbuf; ++i) {
45 bool isTof = (i < n1buf);
47 uint32_t ii = isTof ? i : (i-n1buf);
48 uint32_t* buf = rBH(ii);
49 uint32_t bufSize = rBH.
bufSize(ii);
50 for (uint32_t j = 0; j < bufSize; ++j) {
51 if ( isTof ) {
52 m_builder.
unPack(buf[j], REId, TEData, TEOverflow, TETorQ);
53 TEId = m_builder.
getTEID( REId);
54 }
55 else {
56 this->unPackETF(buf[j], TEId, TEData, TEOverflow, TETorQ);
57 }
58
59 if ( TEId == 0xFFFFFFFF ) {
60 uint32_t data_unit = buf[j];
61 if ( (data_unit >> 25) == 0x7F ) {
64 des->push_back(tofDigi);
65 }
66 continue;
67 }
68
69 uint32_t
count = mapIdData.count(TEId);
70
71 if (count == 0) {
72 if (TETorQ) {
75 }
76 else {
79 }
80 mapIdData.insert(make_pair(TEId, tofDigi));
81 }
82 else {
83 pair<my_iter, my_iter> range = mapIdData.equal_range(TEId);
84 it = range.first;
85 tofDigi = it->second;
86 if (TETorQ) {
90 while ((++it) != range.second) {
91 tofDigi = it->second;
93 }
94 }
95 else {
97 while (it != range.second) {
98 tofDigi = (it++)->second;
100 }
103 mapIdData.insert(make_pair(TEId, tofDigi));
104 }
105 }
106 else {
110 while ((++it) != range.second) {
111 tofDigi = it->second;
113 }
114 }
115 else {
117 while (it != range.second) {
118 tofDigi = (it++)->second;
120 }
123 mapIdData.insert(make_pair(TEId, tofDigi));
124 }
125 }
126 }
127 }
128 }
129
130 my_iter end = mapIdData.end();
131 for (it = mapIdData.begin(); it != end; ++it) {
132 TEId = it->first;
133 tofDigi = it->second;
134 if ( (TEId&0xFFFF7FFF) != 0x20000060 ) {
135 des->push_back(tofDigi);
136 }
137
138 else {
139 if (des2 != 0) {
140 des2->push_back(
new LumiDigi(tofDigi));
141 }
142 delete tofDigi;
143 }
144 }
145
146 return StatusCode::SUCCESS;
147}
uint32_t bufSize(int i) const
void setChargeChannel(const unsigned int chargeChannel)
unsigned int getChargeChannel() const
void setTimeChannel(const unsigned int timeChannel)
unsigned int getTimeChannel() const
virtual uint32_t getTEID(uint32_t reid)
virtual void unPack(uint32_t reDigi, uint32_t &REId, uint32_t &TEData, uint32_t &overFlow, uint32_t &TorQ)
unsigned int getOverflow()
void setOverflow(const unsigned int overflow)