109 MsgStream log(
msgSvc(), name() );
113 StatusCode sc = m_HltStoreSvc->get(
"EFResult", efResult );
114 if ( sc.isFailure() )
116 log << MSG::ERROR <<
" Could not find EFResult" << endmsg;
122 log << MSG::ERROR <<
" Unvalid efResult(AnswerIndex==-1)" << endmsg;
123 return StatusCode::FAILURE;
126 std::string answer = efResult->
getAnswer();
128 log << MSG::INFO <<
"this event is " << answer << endmsg;
130 if ( answer ==
"Accepted" )
133 sc = m_HltStoreSvc->get(
"EventType", evtType );
134 if ( sc.isFailure() )
136 log << MSG::ERROR <<
" Could not find EventType" << endmsg;
141 log << MSG::ERROR <<
" Unvalid evtType(AnswerIndex==-1)" << endmsg;
142 return StatusCode::FAILURE;
144 std::string typeStr = evtType->
getAnswer();
145 log << MSG::INFO <<
" ==> it's marked as " << typeStr << endmsg;
148 if ( typeStr ==
"Junk" ) m_evttype = 0;
149 else if ( typeStr ==
"GJunk" ) m_evttype = 1;
150 else if ( typeStr ==
"Beamgas" ) m_evttype = 2;
151 else if ( typeStr ==
"GBeamgas" ) m_evttype = 3;
152 else if ( typeStr ==
"Cosmic" ) m_evttype = 4;
153 else if ( typeStr ==
"GCosmic" ) m_evttype = 5;
154 else if ( typeStr ==
"EBhabha" ) m_evttype = 6;
155 else if ( typeStr ==
"GEBhabha" ) m_evttype = 7;
156 else if ( typeStr ==
"BBhabha" ) m_evttype = 8;
157 else if ( typeStr ==
"GBBhabha" ) m_evttype = 9;
158 else if ( typeStr ==
"Dimuon" ) m_evttype = 10;
159 else if ( typeStr ==
"GDimuon" ) m_evttype = 11;
160 else if ( typeStr ==
"Diphoton" ) m_evttype = 12;
161 else if ( typeStr ==
"GDiphoton" ) m_evttype = 13;
162 else if ( typeStr ==
"Hadron" ) m_evttype = 14;
163 else if ( typeStr ==
"GHadron" ) m_evttype = 15;
164 else if ( typeStr ==
"Twophoton" ) m_evttype = 16;
165 else if ( typeStr ==
"GTwophoton" ) m_evttype = 17;
166 else if ( typeStr ==
"RandomTrg" ) m_evttype = 31;
167 else if ( typeStr ==
"Error" ) m_evttype = 30;
168 else if ( typeStr ==
"Other" ) m_evttype = 29;
171 log << MSG::DEBUG <<
"get event type info: " << m_evttype << endmsg;
173 SmartDataPtr<Event::EventHeader> eventHeader( eventSvc(),
"/Event/EventHeader" );
176 log << MSG::FATAL <<
"Could not find Event Header" << endmsg;
177 return ( StatusCode::FAILURE );
179 m_nevt = eventHeader->eventNumber();
180 log << MSG::INFO <<
"EventNo: " << m_nevt << endl;
181 if ( m_evttype == 1 || m_evttype == 3 || m_evttype == 5 )
182 m_notpass.push_back( eventHeader->eventNumber() );
194 float nmdc, ntof, nemc, nmuc, nshower, ntrk, nsec;
195 float etot, ebar, eend, ebal, acop, emax1, emax2, dtof1, dphi1, dtof2, dphi2, acol, mbal,
200 sc = m_HltStoreSvc->get(
"nmdc", pcri );
201 if ( sc.isFailure() ) nmdc = -9;
203 sc = m_HltStoreSvc->get(
"nmuc", pcri );
204 if ( sc.isFailure() ) nmuc = -9;
206 sc = m_HltStoreSvc->get(
"ntof", pcri );
207 if ( sc.isFailure() ) ntof = -9;
209 sc = m_HltStoreSvc->get(
"nemc", pcri );
210 if ( sc.isFailure() ) nemc = -9;
213 sc = m_HltStoreSvc->get(
"nshw", pcri );
214 if ( sc.isFailure() ) nshower = -9;
216 sc = m_HltStoreSvc->get(
"ntrk", pcri );
217 if ( sc.isFailure() ) ntrk = -9;
219 sc = m_HltStoreSvc->get(
"etot", pcri );
220 if ( sc.isFailure() )
etot = -9;
222 sc = m_HltStoreSvc->get(
"ebar", pcri );
223 if ( sc.isFailure() ) ebar = -9;
225 sc = m_HltStoreSvc->get(
"eend", pcri );
226 if ( sc.isFailure() ) eend = -9;
228 sc = m_HltStoreSvc->get(
"ebal", pcri );
229 if ( sc.isFailure() ) ebal = -9;
231 sc = m_HltStoreSvc->get(
"acop", pcri );
232 if ( sc.isFailure() ) acop = -9;
234 sc = m_HltStoreSvc->get(
"emax1", pcri );
235 if ( sc.isFailure() ) emax1 = -9;
237 sc = m_HltStoreSvc->get(
"emax2", pcri );
238 if ( sc.isFailure() ) emax2 = -9;
240 sc = m_HltStoreSvc->get(
"dtof1", pcri );
241 if ( sc.isFailure() ) dtof1 = -999;
243 sc = m_HltStoreSvc->get(
"dphi1", pcri );
244 if ( sc.isFailure() ) dphi1 = -9;
246 sc = m_HltStoreSvc->get(
"dtof2", pcri );
247 if ( sc.isFailure() ) dtof2 = -999;
249 sc = m_HltStoreSvc->get(
"dphi2", pcri );
250 if ( sc.isFailure() ) dphi2 = -9;
252 sc = m_HltStoreSvc->get(
"acol", pcri );
253 if ( sc.isFailure() ) acol = -9;
255 sc = m_HltStoreSvc->get(
"pmax1", pcri );
256 if ( sc.isFailure() ) pmax1 = -9;
258 sc = m_HltStoreSvc->get(
"pmax2", pcri );
259 if ( sc.isFailure() ) pmax2 = -9;
261 sc = m_HltStoreSvc->get(
"nsec", pcri );
262 if ( sc.isFailure() ) nsec = -9;
264 sc = m_HltStoreSvc->get(
"mbal", pcri );
265 if ( sc.isFailure() ) mbal = -9;
267 m_nmdc = long( nmdc );
268 m_ntof = long( ntof );
269 m_nemc = long( nemc );
270 m_nmuc = long( nmuc );
271 m_nshower = long( nshower );
272 m_ntrk = long( ntrk );
273 m_nsec = long( nsec );
290 std::vector<uint32_t> efVec = efResult->
getEFVec();
312 log << MSG::INFO << efVec << endmsg;
313 log << MSG::INFO << acol <<
" " <<
etot << endmsg;
316 StatusCode status = m_tuple->write();
317 if ( !status.isSuccess() ) { log << MSG::ERROR <<
"Can't fill ntuple!" << endmsg; }
322 return StatusCode::SUCCESS;