43 {
44
45 MsgStream log(
msgSvc(), name());
46 log << MSG::INFO << "in execute()" << endreq;
47
48
49
50 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
51 if (!eventHeader) {
52 log << MSG::FATAL << "Could not find Event Header" << endreq;
53 return( StatusCode::FAILURE);
54 }
55
56 int eventId = eventHeader->eventNumber() ;
57 int runId = eventHeader->runNumber();
58 log << MSG::INFO << "DstHltMaker: retrieved event: " <<" Event Number "<< eventId << " run: " <<runId << endreq;
59
60 StatusCode sc = StatusCode::SUCCESS ;
61
62
63
64
65
66
68 SmartDataPtr<HltInf> recHltInf(eventSvc(),"/Event/Hlt/HltInf");
69
70 if (!recHltInf) {
71 log << MSG::DEBUG << "Could not find HltInf" << endreq;
72
73 } else {
77 dstHltInf->
setVersion(recHltInf->getVersion());
79 dstHltInf->
setNumber(recHltInf->getNumber());
80 dstHltInf->
setNCON(recHltInf->getNCON());
81 m_ntot++;
82 }
83 DataObject *aDstHltInfEvent;
84 eventSvc()->findObject("/Event/Hlt/DstHltInf", aDstHltInfEvent);
85 if(aDstHltInfEvent!=
NULL) {
86 SmartDataPtr<DstHltInf> hltInf(eventSvc(),"/Event/Hlt/DstHltInf");
87 log<<MSG::DEBUG<<"old type="<<hltInf->getEventType()<<", alg="<<hltInf->getAlgProcess()
88 <<", criteria="<<hltInf->getCriteriaTable()<<", version="<<hltInf->getVersion()
89 <<", energy="<<hltInf->getTotalEnergy()<<endreq;
90
91 sc = eventSvc()->unregisterObject("/Event/Hlt/DstHltInf");
92 delete aDstHltInfEvent;
93 log << MSG::INFO << "Old DstHltInf has been unregistered" << endreq;
94 if(sc!=StatusCode::SUCCESS) {
95 log << MSG::FATAL << "Could not unregister DstHltInf" << endreq;
96 return( StatusCode::FAILURE);
97 }
98 }
100
101 log << MSG::DEBUG <<"Event No."<<eventId<<" = "
107
108 return sc;
109}
void setAlgProcess(const unsigned int i)
void setCriteriaTable(const unsigned int i)
float getTotalEnergy() const
uint32_t getCriteriaTable() const
void setNumber(const unsigned int i)
void setNCON(const unsigned int i)
uint32_t getVersion() const
uint32_t getEventType() const
uint32_t getAlgProcess() const
void setEventType(const unsigned int i)
void setTotalEnergy(const float etot)
void setVersion(const unsigned int i)
_EXTERN_ std::string DstHltInf