91 MsgStream log(
msgSvc(), name());
92 log << MSG::INFO <<
"in execute()" << endreq;
95 DataObject *pnode = 0;
96 sc = eventSvc()->retrieveObject(
"/Event/Hit",pnode);
98 pnode =
new DataObject;
99 sc = eventSvc()->registerObject(
"/Event/Hit",pnode);
100 if(!sc.isSuccess()) {
101 log << MSG::FATAL <<
" Could not register hit branch" <<endreq;
102 return StatusCode::FAILURE;
106 SmartIF<IDataManagerSvc> dataManSvc(eventSvc());
108 eventSvc()->findObject(
"/Event/Hit/MdcHitCol",hitCol);
110 dataManSvc->clearSubTree(
"/Event/Hit/MdcHitCol");
111 eventSvc()->unregisterObject(
"/Event/Hit/MdcHitCol");
114 sc = eventSvc()->registerObject(
"/Event/Hit/MdcHitCol",mdcHitCol);
115 if(!sc.isSuccess()) {
116 log << MSG::FATAL <<
" Could not register hit collection" <<endreq;
117 return StatusCode::FAILURE;
121 eventSvc()->findObject(
"/Event/Hit/MdcHitMap",hitMap);
123 dataManSvc->clearSubTree(
"/Event/Hit/MdcHitMap");
124 eventSvc()->unregisterObject(
"/Event/Hit/MdcHitMap");
127 sc = eventSvc()->registerObject(
"/Event/Hit/MdcHitMap",mdcHitMap);
128 if(!sc.isSuccess()) {
129 log << MSG::FATAL <<
" Could not register hit map" <<endreq;
130 return StatusCode::FAILURE;
134 uint32_t getDigiFlag = 0;
135 getDigiFlag += m_maxMdcDigi;
142 if ((
int)mdcDigiVec.size()<m_minMdcDigi){
143 log << MSG::WARNING <<
" Skip this event for MdcDigiVec.size() < "<<m_minMdcDigi << endreq;
144 return StatusCode::SUCCESS;
147 MdcDigiVec::iterator
iter = mdcDigiVec.begin();
148 for (;
iter != mdcDigiVec.end();
iter++ ) {
154#ifdef MDCPATREC_RESLAYER
155 hit->setResLayer(m_resLayer);
157 mdcHitCol->push_back(hit);
160 return StatusCode::SUCCESS;