34 MsgStream log(
msgSvc(),name());
35 log<<MSG::DEBUG<<
"HltEventMaker: in execute()" <<endreq;
38 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),
"/Event/EventHeader");
40 log << MSG::FATAL <<
"Could not find Event Header" << endreq;
41 return StatusCode::FAILURE;
44 int eventId = eventHeader->eventNumber() ;
45 int runId = eventHeader->runNumber();
46 log << MSG::INFO <<
"HltEventMaker: retrieved event: " <<
" Event Number "<< eventId <<
" run: " <<runId << endreq;
50 SmartDataPtr<HltRawCol> hltRawCol(eventSvc(),
"/Event/Hlt/HltRawCol");
52 log << MSG::DEBUG <<
"Could not find HltRawCol!" << endreq;
56 uint32_t type=0,alg=0,cri=0,ver=0;
58 uint32_t nmdc=0xFF,ntof=0xFF,nemc=0xFF,nmuc=0xFF;
60 HltRawCol::iterator
iter = hltRawCol->begin();
61 for (;
iter != hltRawCol->end();
iter++ ) {
63 log << MSG::VERBOSE <<
"EventFilter info id: " << hex <<
id <<
": "
64 << (*iter)->getIntChannel() <<
","<< dec << (*iter)->getFloatChannel() <<endreq;
71 uint32_t pureid=
id&0xFF;
73 uint32_t datanum=(*iter)->getIntChannel();
76 ntof=(datanum&0xFF00)>>8;
77 nemc=(datanum&0xFF0000)>>16;
78 nmuc=(datanum&0xFF000000)>>24;
79 log << MSG::VERBOSE << nmdc <<
", " << ntof <<
", " << nemc <<
", " << nmuc << endreq;
82 aHlt->
push_mdc((*iter)->getIntChannel());
85 aHlt->
push_tof((*iter)->getIntChannel());
88 aHlt->
push_emc((*iter)->getIntChannel());
91 aHlt->
push_muc((*iter)->getIntChannel());
95 else aHlt->
push_con((*iter)->getIntChannel());
98 log<<MSG::DEBUG<<
"type="<<type<<
", alg="<<alg<<
", criteria="<<cri
99 <<
", version="<<ver<<
", energy="<<
etot<<endreq;
105 DataObject *aHltInfEvent;
106 eventSvc()->findObject(
"/Event/Hlt/HltInf", aHltInfEvent);
107 if(aHltInfEvent!=NULL) {
108 SmartDataPtr<HltInf> hltInf(eventSvc(),
"/Event/Hlt/HltInf");
109 log<<MSG::DEBUG<<
"old type="<<hltInf->getEventType()<<
", alg="<<hltInf->getAlgProcess()
110 <<
", criteria="<<hltInf->getCriteriaTable()<<
", version="<<hltInf->getVersion()
111 <<
", energy="<<hltInf->getTotalEnergy()<<endreq;
113 sc = eventSvc()->unregisterObject(
"/Event/Hlt/HltInf");
115 log << MSG::INFO <<
"Old HltInf has been unregistered" << endreq;
116 if(sc!=StatusCode::SUCCESS) {
117 log << MSG::FATAL <<
"Could not unregister HltInf" << endreq;
118 return( StatusCode::FAILURE);
122 if(sc!=StatusCode::SUCCESS) {
123 log<<MSG::FATAL<<
"Could not register HltInf" <<endreq;
124 return StatusCode::FAILURE;
127 return StatusCode::SUCCESS;