69 {
70
71 MsgStream log(
msgSvc(), name());
72 log << MSG::INFO << "in execute()" << endreq;
73
75
76 log << MSG::DEBUG << "this event refused by event filter: "
78
79
80 }
81 else {
82
83 log << MSG::DEBUG << "this event accepteded by event filter: "
85
86
87 }
88 SmartDataPtr<HltInf> hlt(eventSvc(),"/Event/Hlt/HltInf");
89 bool dstFlag=false;
90 if(!hlt) {
91 log << MSG::WARNING << "Could not find Event HltInf (try DstHltInf now)" << endreq;
92 SmartDataPtr<DstHltInf> hltDst(eventSvc(),"/Event/Hlt/DstHltInf");
93 if(!hltDst){
94 log << MSG::FATAL << "Could not find Event DstHltInf too ( please re-generate data)" << endreq;
95 return( StatusCode::FAILURE);
96 }
97 else{
98 hlt=hltDst;
99 dstFlag=true;
100 }
101 }
102
103 uint32_t type = hlt->getEventType();
104 for(int i=0;i<32;i++) {
105 if((1<<i)&type) m_type=i;
106 }
107 m_alg = hlt->getAlgProcess();
108 m_endEE = hlt->getCriteriaTable();
109 m_version = hlt->getVersion();
110 m_etot = hlt->getTotalEnergy();
111 m_nmdc0 = hlt->getNMDC();
112 m_ntof0 = hlt->getNTOF();
113 m_nemc0 = hlt->getNEMC();
114 m_nmuc0 = hlt->getNMUC();
115 m_ncon0 = hlt->getNCON();
116 m_nmdc = 0;
117 m_ntof = 0;
118 m_nemc = 0;
119 m_nmuc = 0;
120 m_ncon = 0;
121 if(!dstFlag) {
122 vector<uint32_t>::iterator it;
123
124 vector<uint32_t> mdcData= hlt->getDataVec(
HltID::MDC);
125 it = mdcData.begin();
126 for(;it!=mdcData.end();it++,m_nmdc++){
127 if(m_nmdc>1) m_mdcData[m_nmdc]= *((float*) &(*it));
128 else m_mdcData[m_nmdc]= *it;
129 }
130
131 vector<uint32_t> tofData= hlt->getDataVec(
HltID::TOF);
132 it = tofData.begin();
133 for(;it!=tofData.end();it++,m_ntof++){
134 if(m_ntof>0) m_tofData[m_ntof]= *((float*) &(*it));
135 else m_tofData[m_ntof]= *it;
136 }
137
138 vector<uint32_t> emcData= hlt->getDataVec(
HltID::EMC);
139 it = emcData.begin();
140 for(;it!=emcData.end();it++,m_nemc++){
141 if(!(m_nemc==0||m_nemc==7||m_nemc==8)) m_emcData[m_nemc]= *((float*) &(*it));
142 else m_emcData[m_nemc]= *it;
143 }
144
145 vector<uint32_t> mucData= hlt->getDataVec(
HltID::MUC);
146 it = mucData.begin();
147 for(;it!=mucData.end();it++,m_nmuc++){
148 if(m_nmuc>1) m_mucData[m_nmuc]= *((float*) &(*it));
149 else m_mucData[m_nmuc]= *it;
150 }
151
152 vector<uint32_t> conData= hlt->getDataVec(
HltID::CON);
153 it = conData.begin();
154 for(;it!=conData.end();it++,m_ncon++){
155 m_conData[m_ncon]= *it;
156 }
157 }
158
159 m_tuple->write();
160
161 return StatusCode::SUCCESS ;
162}
static const std::string & getName()