36 {
38 Gaudi::svcLocator()->service(
"MessageSvc",
msgSvc);
39 MsgStream log(
msgSvc,
"MdcAliEvent");
40 log << MSG::INFO << "MdcAliEvent::setRecEvent" << endreq;
41
42 IDataProviderSvc* eventSvc =
NULL;
43 Gaudi::svcLocator()->service("EventDataSvc", eventSvc);
44
45
46 SmartDataPtr<RecEsTimeCol> aevtimeCol(eventSvc,"/Event/Recon/RecEsTimeCol");
47 if( ! aevtimeCol || (aevtimeCol->size()==0) ){
48 m_tes = -9999.0;
49 m_esFlag = -1;
50 }else{
51 RecEsTimeCol::iterator iter_evt = aevtimeCol->begin();
52 for(; iter_evt!=aevtimeCol->end(); iter_evt++){
53 m_tes = (*iter_evt)->getTest();
54 m_esFlag = (*iter_evt)->getStat();
55 }
56 }
57
58 m_esCutFg = false;
59 bool flagTes = false;
60 for(
int iEs=0; iEs<m_param.
nEsFlag; iEs++){
61 if(m_esFlag == m_param.
esFlag[iEs]){
62 flagTes = true;
63 break;
64 }
65 }
66 if( flagTes && (m_tes > m_param.
tesMin) && (m_tes < m_param.
tesMax) ) m_esCutFg =
true;
67
68 SmartDataPtr<RecMdcTrackCol> newtrkCol(eventSvc, "/Event/Recon/RecMdcTrackCol");
69 if(!newtrkCol){
70 log << MSG::ERROR << "Could not find RecMdcTrackCol" << endreq;
71 return ( StatusCode::FAILURE );
72 }
73
74 int i = 0;
76 RecMdcTrackCol::iterator it_trk = newtrkCol->begin();
77 for(; it_trk != newtrkCol->end(); it_trk++){
79 rectrk -> setRecTrk(it_trk);
80 m_rectrk.push_back(rectrk);
81
82 i++;
83 }
84
85 return StatusCode::SUCCESS;
86}