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