99 {
100
101
102
103 MsgStream log(
msgSvc(), name());
104
105
106 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
107 if (!eventHeader) {
108 log << MSG::FATAL << "Could not find Event Header" << endreq;
109 return( StatusCode::FAILURE);
110 }
111 log << MSG::INFO << "eventNo-->" << eventHeader->eventNumber()<<endreq;
112
113
114 SmartDataPtr<MdcDigiCol> mdcDigiCol(eventSvc(),"/Event/Digi/MdcDigiCol");
115 if (!mdcDigiCol) {
116 log << MSG::FATAL << "Could not find Mdc digi!!" << endreq;
117 return( StatusCode::FAILURE);
118 }
119
120 SmartDataPtr<TofDigiCol> tofDigiCol(eventSvc(),"/Event/Digi/TofDigiCol");
121 if (!tofDigiCol) {
122 log << MSG::FATAL << "Could not find Tof digi!!" << endreq;
123 return( StatusCode::FAILURE);
124 }
125 SmartDataPtr<EmcDigiCol> emcDigiCol(eventSvc(),"/Event/Digi/EmcDigiCol");
126 if (!emcDigiCol) {
127 log << MSG::FATAL << "Could not find Emc digi!!" << endreq;
128 return( StatusCode::FAILURE);
129 }
133 }
134 }
135
136 SmartDataPtr<MucDigiCol> mucDigiCol(eventSvc(),"/Event/Digi/MucDigiCol");
137 if (!mucDigiCol) {
138 log << MSG::FATAL << "Could not find Muc digi!!" << endreq;
139 return( StatusCode::FAILURE);
140 }
141
142
143 unsigned int nhitsMdc=mdcDigiCol->size();
147 }
148 }
149 unsigned int nhitsEmc=emcDigiCol->size();
150 unsigned int nhitsMuc=mucDigiCol->size();
151 unsigned int nhitsTof=tofDigiCol->size();
152
153 double rndm=CLHEP::RandFlat::shoot();
154
155 log << MSG::INFO << " Number of hits in MDC:EMC:MUC:TOF is " << nhitsMdc
156 << ":" << nhitsEmc << ":" << nhitsMuc << ":" <<nhitsTof <<"; "
157 << "random number:" << rndm <<endreq;
158
159
160 m_nmdc->setValue(nhitsMdc);
161 m_nmuc->setValue(nhitsMuc);
162 m_ntof->setValue(nhitsTof);
163 m_nemc->setValue(nhitsEmc);
164
165 m_rndm->setValue(rndm);
166
167 m_ef->addToEFVec(nhitsMdc, 5);
168 m_ef->addToEFVec(nhitsTof, 25);
169 m_ef->addToEFVec(nhitsEmc, 30);
170 m_ef->addToEFVec(nhitsMuc, 52);
171
172 m_ef->addToEFVec(0xFFFFFFF7,37);
173
174 m_ef->setVecBit(
true, 0, 0);
175 m_ef->addToEFVec(1, 1);
176 m_ef->addToEFVec(1<<8, 1);
177 m_ef->addToEFVec(1<<16, 1);
178 m_ef->addToEFVec(1<<24, 1);
179
181
182 return StatusCode::SUCCESS;
183}
IRawDataProviderSvc * m_rawDigiSvc