108 MsgStream log(
msgSvc(), name());
112 StatusCode sc = m_HltStoreSvc->
get(
"EFResult", efResult);
113 if ( sc.isFailure() ) {
114 log << MSG::ERROR <<
" Could not find EFResult" << endreq;
119 log << MSG::ERROR <<
" Unvalid efResult(AnswerIndex==-1)" << endreq;
120 return StatusCode::FAILURE;
123 std::string answer = efResult->
getAnswer();
125 log << MSG::INFO <<
"this event is " << answer << endreq;
127 if (answer ==
"Accepted") {
129 sc = m_HltStoreSvc->
get(
"EventType", evtType);
130 if ( sc.isFailure() ) {
131 log << MSG::ERROR <<
" Could not find EventType" << endreq;
135 log << MSG::ERROR <<
" Unvalid evtType(AnswerIndex==-1)" << endreq;
136 return StatusCode::FAILURE;
138 std::string typeStr = evtType->
getAnswer();
139 log << MSG::INFO <<
" ==> it's marked as " << typeStr << endreq;
142 if(typeStr==
"Junk") m_evttype=0;
143 else if(typeStr==
"GJunk") m_evttype=1;
144 else if(typeStr==
"Beamgas") m_evttype=2;
145 else if(typeStr==
"GBeamgas") m_evttype=3;
146 else if(typeStr==
"Cosmic") m_evttype=4;
147 else if(typeStr==
"GCosmic") m_evttype=5;
148 else if(typeStr==
"EBhabha") m_evttype=6;
149 else if(typeStr==
"GEBhabha") m_evttype=7;
150 else if(typeStr==
"BBhabha") m_evttype=8;
151 else if(typeStr==
"GBBhabha") m_evttype=9;
152 else if(typeStr==
"Dimuon") m_evttype=10;
153 else if(typeStr==
"GDimuon") m_evttype=11;
154 else if(typeStr==
"Diphoton") m_evttype=12;
155 else if(typeStr==
"GDiphoton") m_evttype=13;
156 else if(typeStr==
"Hadron") m_evttype=14;
157 else if(typeStr==
"GHadron") m_evttype=15;
158 else if(typeStr==
"Twophoton") m_evttype=16;
159 else if(typeStr==
"GTwophoton") m_evttype=17;
160 else if(typeStr==
"RandomTrg") m_evttype=31;
161 else if(typeStr==
"Error") m_evttype=30;
162 else if(typeStr==
"Other") m_evttype=29;
165 log << MSG::DEBUG <<
"get event type info: " << m_evttype << endreq;
167 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),
"/Event/EventHeader");
169 log << MSG::FATAL <<
"Could not find Event Header" << endreq;
170 return (StatusCode::FAILURE);
172 m_nevt= eventHeader->eventNumber();
173 log << MSG::INFO <<
"EventNo: " << m_nevt <<endl;
174 if(m_evttype==1||m_evttype==3||m_evttype==5) m_notpass.push_back(eventHeader->eventNumber());
186 float nmdc,ntof,nemc,nmuc,nshower,ntrk,nsec;
187 float etot,ebar,eend,ebal,acop,emax1,emax2,dtof1,dphi1,dtof2,dphi2,acol,mbal,pmax1,pmax2;
191 sc = m_HltStoreSvc->
get(
"nmdc", pcri);
192 if ( sc.isFailure() ) nmdc=-9;
194 sc = m_HltStoreSvc->
get(
"nmuc", pcri);
195 if ( sc.isFailure() ) nmuc=-9;
197 sc = m_HltStoreSvc->
get(
"ntof", pcri);
198 if ( sc.isFailure() ) ntof=-9;
200 sc = m_HltStoreSvc->
get(
"nemc", pcri);
201 if ( sc.isFailure() ) nemc=-9;
204 sc = m_HltStoreSvc->
get(
"nshw", pcri);
205 if ( sc.isFailure() ) nshower=-9;
207 sc = m_HltStoreSvc->
get(
"ntrk", pcri);
208 if ( sc.isFailure() ) ntrk=-9;
210 sc = m_HltStoreSvc->
get(
"etot", pcri);
211 if ( sc.isFailure() )
etot=-9;
213 sc = m_HltStoreSvc->
get(
"ebar", pcri);
214 if ( sc.isFailure() ) ebar=-9;
216 sc = m_HltStoreSvc->
get(
"eend", pcri);
217 if ( sc.isFailure() ) eend=-9;
219 sc = m_HltStoreSvc->
get(
"ebal", pcri);
220 if ( sc.isFailure() ) ebal=-9;
222 sc = m_HltStoreSvc->
get(
"acop", pcri);
223 if ( sc.isFailure() ) acop=-9;
225 sc = m_HltStoreSvc->
get(
"emax1", pcri);
226 if ( sc.isFailure() ) emax1=-9;
228 sc = m_HltStoreSvc->
get(
"emax2", pcri);
229 if ( sc.isFailure() ) emax2=-9;
231 sc = m_HltStoreSvc->
get(
"dtof1", pcri);
232 if ( sc.isFailure() ) dtof1=-999;
234 sc = m_HltStoreSvc->
get(
"dphi1", pcri);
235 if ( sc.isFailure() ) dphi1=-9;
237 sc = m_HltStoreSvc->
get(
"dtof2", pcri);
238 if ( sc.isFailure() ) dtof2=-999;
240 sc = m_HltStoreSvc->
get(
"dphi2", pcri);
241 if ( sc.isFailure() ) dphi2=-9;
243 sc = m_HltStoreSvc->
get(
"acol", pcri);
244 if ( sc.isFailure() ) acol=-9;
246 sc = m_HltStoreSvc->
get(
"pmax1", pcri);
247 if ( sc.isFailure() ) pmax1=-9;
249 sc = m_HltStoreSvc->
get(
"pmax2", pcri);
250 if ( sc.isFailure() ) pmax2=-9;
252 sc = m_HltStoreSvc->
get(
"nsec", pcri);
253 if ( sc.isFailure() ) nsec=-9;
255 sc = m_HltStoreSvc->
get(
"mbal", pcri);
256 if ( sc.isFailure() ) mbal=-9;
262 m_nshower=long(nshower);
281 std::vector<uint32_t> efVec=efResult->
getEFVec();
303 log<< MSG::INFO<<efVec<<endreq;
304 log<< MSG::INFO<<acol<<
" "<<
etot<<endreq;
306 StatusCode status = m_tuple->write();
307 if (!status.isSuccess()) {
308 log << MSG::ERROR <<
"Can't fill ntuple!" << endreq;
314 return StatusCode::SUCCESS;