32 {
33 MsgStream log(
msgSvc(), name() );
34 log << MSG::DEBUG << "HltEventMaker: in execute()" << endmsg;
35
36
37 SmartDataPtr<Event::EventHeader> eventHeader( eventSvc(), "/Event/EventHeader" );
38 if ( !eventHeader )
39 {
40 log << MSG::FATAL << "Could not find Event Header" << endmsg;
41 return StatusCode::FAILURE;
42 }
43
44 int eventId = eventHeader->eventNumber();
45 int runId = eventHeader->runNumber();
46 log << MSG::INFO << "HltEventMaker: retrieved event: "
47 << " Event Number " << eventId << " run: " << runId << endmsg;
48
50
51 SmartDataPtr<HltRawCol> hltRawCol( eventSvc(), "/Event/Hlt/HltRawCol" );
52 if ( !hltRawCol )
53 {
54 log << MSG::DEBUG << "Could not find HltRawCol!" << endmsg;
55
56 }
57 else
58 {
59 uint32_t type = 0, alg = 0, cri = 0, ver = 0;
61 uint32_t nmdc = 0xFF, ntof = 0xFF, nemc = 0xFF, nmuc = 0xFF;
62
63 HltRawCol::iterator
iter = hltRawCol->begin();
64 for ( ;
iter != hltRawCol->end();
iter++ )
65 {
66 Identifier id = ( *iter )->identify();
67 log << MSG::VERBOSE << "EventFilter info id: " << hex << id << ": "
68 << ( *iter )->getIntChannel() << "," << dec << ( *iter )->getFloatChannel()
69 << endmsg;
77
78 uint32_t pureid = id & 0xFF;
80 {
81 uint32_t datanum = ( *iter )->getIntChannel();
83 nmdc = datanum & 0xFF;
84 ntof = ( datanum & 0xFF00 ) >> 8;
85 nemc = ( datanum & 0xFF0000 ) >> 16;
86 nmuc = ( datanum & 0xFF000000 ) >> 24;
87 log << MSG::VERBOSE << nmdc << ", " << ntof << ", " << nemc << ", " << nmuc << endmsg;
88 }
94 {
96 else aHlt->
push_con( ( *iter )->getIntChannel() );
97 }
98 }
99 log << MSG::DEBUG << "type=" << type << ", alg=" << alg << ", criteria=" << cri
100 <<
", version=" << ver <<
", energy=" <<
etot << endmsg;
101
102 m_ntot++;
103 }
104
105 StatusCode sc;
106 DataObject* aHltInfEvent;
107 eventSvc()->findObject( "/Event/Hlt/HltInf", aHltInfEvent );
108 if ( aHltInfEvent != NULL )
109 {
110 SmartDataPtr<HltInf> hltInf( eventSvc(), "/Event/Hlt/HltInf" );
111 log << MSG::DEBUG << "old type=" << hltInf->getEventType()
112 << ", alg=" << hltInf->getAlgProcess() << ", criteria=" << hltInf->getCriteriaTable()
113 << ", version=" << hltInf->getVersion() << ", energy=" << hltInf->getTotalEnergy()
114 << endmsg;
115
116 sc = eventSvc()->unregisterObject( "/Event/Hlt/HltInf" );
117 delete aHltInfEvent;
118 log << MSG::INFO << "Old HltInf has been unregistered" << endmsg;
119 if ( sc != StatusCode::SUCCESS )
120 {
121 log << MSG::FATAL << "Could not unregister HltInf" << endmsg;
122 return ( StatusCode::FAILURE );
123 }
124 }
126 if ( sc != StatusCode::SUCCESS )
127 {
128 log << MSG::FATAL << "Could not register HltInf" << endmsg;
129 return StatusCode::FAILURE;
130 }
131
132 return StatusCode::SUCCESS;
133}
void setAlgProcess(const unsigned int i)
void setCriteriaTable(const unsigned int i)
void setNumber(const unsigned int i)
void setNCON(const unsigned int i)
void setEventType(const unsigned int i)
void setTotalEnergy(const float etot)
void setVersion(const unsigned int i)
static bool is_ncon(const Identifier &id)
static bool is_tof_inf(const Identifier &id)
static bool is_version(const Identifier &id)
static bool is_con_inf(const Identifier &id)
static bool is_eventtype(const Identifier &id)
static bool is_algorithm(const Identifier &id)
static bool is_muc_inf(const Identifier &id)
static bool is_criteria(const Identifier &id)
static bool is_emc_inf(const Identifier &id)
static bool is_number(const Identifier &id)
static bool is_mdc_inf(const Identifier &id)
static bool is_energy(const Identifier &id)
virtual void push_muc(uint32_t data)
virtual void push_mdc(uint32_t data)
virtual void push_tof(uint32_t data)
virtual void push_con(uint32_t data)
virtual void push_emc(uint32_t data)
_EXTERN_ std::string HltInf