122 {
123
124
125#ifndef OnlineMode
126
128
129 try {
131 const uint32_t* ef = 0;
132 do {
135 std::cerr << "Found invalid event (traceback):" << std::endl;
136 std::exit(1);
137 }
138
139
140
141
142
143
144
145 f.event_filter_info(ef);
146 if ( !ef ) {
147
148 exit(1);
149 }
150 else {
151
152
153 if ( ! m_keepRdm && ((*ef)>>31) != 0 ) {
154 continue;
155 }
156 }
157 break;
158 } while (true);
159
164
165
166 uint32_t hv_status = 0;
167 int nrobs = 0;
168 int nsds =
f.children(m_sds, 64);
169 for ( int sdi = 0; sdi < nsds; ++sdi ) {
171
172 if ( sd.nspecific() != 0 ) {
173 const uint32_t* specific_header;
174 sd.specific_header(specific_header);
175 uint32_t source_id_number = sd.source_id();
176 source_id_number <<= 8;
177 source_id_number >>= 24;
178 switch( source_id_number ) {
179 case 161:
180 hv_status |= ((8 | ((*specific_header)&0x7)) << 8);
181 break;
182 case 162:
183 hv_status |= ((8 | ((*specific_header)&0x7)) << 4);
184 break;
185 case 164:
186 hv_status |= (8 | ((*specific_header)&0x7));
187 break;
188 default:
189 break;
190 }
191 }
192
194 }
195
197
198
199 for (int robi = 0; robi < nrobs; robi++) {
201
202 uint32_t* dataptr =
NULL;
203 rob.rod_data(dataptr);
204
205
206 uint32_t source_id_number = rob.rod_source_id();
207
208 source_id_number <<= 8;
209 source_id_number >>= 24;
210
211
212 if ((rob.rod_detev_type() & 0x2) != 0) {
213 if ( source_id_number == 165 ) {
215 }
216 continue;
217 }
218
219
220 switch(source_id_number) {
221 case 161:
223 break;
224 case 163:
226 break;
227 case 162:
229 break;
230 case 167:
232 break;
233 case 164:
235 break;
236 case 165:
237
238
239
240
242 break;
243 case 166:
245 break;
246 case 124:
248 break;
249 case 241:
251 break;
252 default:
253
254 break;
255 }
256 }
257 }
260 if ( m_reader->
stat()&4 ) {
261 std::cerr << std::endl << "reading ifstream error !!!" << std::endl;
262 exit(1);
263 }
264 delete m_re;
266 }
268 std::cerr << std::endl <<
"Uncaught eformat issue: " << ex.
what() << std::endl;
269 }
271 std::cerr << std::endl <<
"Uncaught ERS issue: " << ex.
what() << std::endl;
272 }
273 catch (std::exception& ex) {
274 std::cerr << std::endl << "Uncaught std exception: " << ex.what() << std::endl;
275 }
276 catch (...) {
277 std::cerr << std::endl << "Uncaught unknown exception" << std::endl;
278 }
279#endif
280
281 return m_re;
282}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
virtual const uint32_t * nextEvent()=0
virtual uint32_t stat()=0
void addReTofDigi(uint32_t *digi, uint32_t size)
void setFlag1(uint32_t flag1)
void setRunNo(uint32_t run_no)
void addReEtsDigi(uint32_t *digi, uint32_t size)
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 addReEtfDigi(uint32_t *digi, uint32_t size)
void addReEmcDigi(uint32_t *digi, uint32_t size)
void addReHltRaw(uint32_t *digi, uint32_t size)
const char * what() const
Human description message.