113 {
114
115
116#ifndef OnlineMode
117
119
120 try {
122 const uint32_t* ef = 0;
123 do {
126 std::cerr << "Found invalid event (traceback):" << std::endl;
127 std::exit(1);
128 }
129
130
131
132
133
134
135
137 if ( !ef ) {
138
139 exit(1);
140 }
141 else {
142
143
144 if ( ! m_keepRdm && ((*ef)>>31) != 0 ) {
145 continue;
146 }
147 }
148 break;
149 } while (true);
150
155
156
157 uint32_t hv_status = 0;
158 int nrobs = 0;
160 for ( int sdi = 0; sdi < nsds; ++sdi ) {
162
163 if ( sd.nspecific() != 0 ) {
164 const uint32_t* specific_header;
165 sd.specific_header(specific_header);
166 uint32_t source_id_number = sd.source_id();
167 source_id_number <<= 8;
168 source_id_number >>= 24;
169 switch( source_id_number ) {
170 case 161:
171 hv_status |= ((8 | ((*specific_header)&0x7)) << 8);
172 break;
173 case 162:
174 hv_status |= ((8 | ((*specific_header)&0x7)) << 4);
175 break;
176 case 164:
177 hv_status |= (8 | ((*specific_header)&0x7));
178 break;
179 default:
180 break;
181 }
182 }
183
185 }
186
188
189
190 for (int robi = 0; robi < nrobs; robi++) {
192
193 if ((rob.rod_detev_type() & 0x2) != 0) continue;
194 uint32_t* dataptr = NULL;
195 rob.rod_data(dataptr);
196
197
198 uint32_t source_id_number = rob.rod_source_id();
199
200 source_id_number <<= 8;
201 source_id_number >>= 24;
202
203
204 switch(source_id_number) {
205 case 161:
207 break;
208 case 163:
210 break;
211 case 162:
213 break;
214 case 167:
216 break;
217 case 164:
219 break;
220 case 165:
221
222
223
224
226 break;
227 case 166:
229 break;
230 case 124:
232 break;
233 case 241:
235 break;
236 default:
237
238 break;
239 }
240 }
241 }
244 delete m_re;
245 m_re = NULL;
246 }
248 std::cerr << std::endl <<
"Uncaught eformat issue: " << ex.
what() << std::endl;
249 }
251 std::cerr << std::endl <<
"Uncaught ERS issue: " << ex.
what() << std::endl;
252 }
253 catch (std::exception& ex) {
254 std::cerr << std::endl << "Uncaught std exception: " << ex.what() << std::endl;
255 }
256 catch (...) {
257 std::cerr << std::endl << "Uncaught unknown exception" << std::endl;
258 }
259#endif
260
261 return m_re;
262}
virtual const uint32_t * nextEvent()=0
void addReTofDigi(uint32_t *digi, uint32_t size)
void setFlag1(uint32_t flag1)
void setRunNo(uint32_t run_no)
void addReMdcDigi(uint32_t *digi, uint32_t size)
void addReTrigGTD(uint32_t *digi, uint32_t size)
void addReMucDigi(uint32_t *digi, uint32_t size)
void addReZddDigi(uint32_t *digi, uint32_t size)
void addMcParticle(uint32_t *buf, uint32_t size)
void setTime(uint32_t time)
void setEventNo(uint32_t event_no)
void addReEmcDigi(uint32_t *digi, uint32_t size)
void addReHltRaw(uint32_t *digi, uint32_t size)
const char * what() const
Human description message.