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
136 f.event_filter_info(ef);
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;
159 int nsds =
f.children(m_sds, 64);
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 uint32_t* dataptr = NULL;
194 rob.rod_data(dataptr);
195
196
197 uint32_t source_id_number = rob.rod_source_id();
198
199 source_id_number <<= 8;
200 source_id_number >>= 24;
201
202
203 if ((rob.rod_detev_type() & 0x2) != 0) {
204 if ( source_id_number == 165 ) {
206 }
207 continue;
208 }
209
210
211 switch(source_id_number) {
212 case 161:
214 break;
215 case 163:
217 break;
218 case 162:
220 break;
221 case 167:
223 break;
224 case 164:
226 break;
227 case 165:
228
229
230
231
233 break;
234 case 166:
236 break;
237 case 124:
239 break;
240 case 241:
242 break;
243 default:
244
245 break;
246 }
247 }
248 }
251 if ( m_reader->
stat()&4 ) {
252 std::cerr << std::endl << "reading ifstream error !!!" << std::endl;
253 exit(1);
254 }
255 delete m_re;
256 m_re = NULL;
257 }
259 std::cerr << std::endl <<
"Uncaught eformat issue: " << ex.
what() << std::endl;
260 }
262 std::cerr << std::endl <<
"Uncaught ERS issue: " << ex.
what() << std::endl;
263 }
264 catch (std::exception& ex) {
265 std::cerr << std::endl << "Uncaught std exception: " << ex.what() << std::endl;
266 }
267 catch (...) {
268 std::cerr << std::endl << "Uncaught unknown exception" << std::endl;
269 }
270#endif
271
272 return m_re;
273}
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.
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")