151 DOMElement* currRelBx =
m_doc->createElement(
X(
"bxData"));
152 currRelBx->setAttribute(
X(
"num"),
X(
IntToString(bx).c_str()));
166 for (
int tcNum = 0; tcNum <= 11; ++tcNum ) {
168 DOMElement* tcgs = 0;
169 for (
int tbNum = 0; tbNum <= 10; ++tbNum ) {
171 DOMElement* tbgs = 0;
172 for (
int PAC = 0; PAC <= 4; ++PAC ) {
176 std::vector< RPCMuonExtraStruct >::iterator it =
m_muons.begin();
178 int muSegment = it->_mu.getLogSegment();
187 (
int(it->_level) == 0 && tbNum == muTBno && muTC == tcNum && PAC == muPACChipNo)
188 || (
int(it->_level) == 1 && tbNum == muTBno && muTC == tcNum )
189 || (
int(it->_level) == 2 && muTC == tcNum )
203 tc =
m_doc->createElement(
X(
"tc"));
204 currRelBx->appendChild(tc);
207 tcgs =
m_doc->createElement(
X(
"tcgs"));
208 tc->appendChild(tcgs);
211 if (tb==0 &&
int(it->_level) <= 1) {
212 tb =
m_doc->createElement(
X(
"tb"));
216 tbgs =
m_doc->createElement(
X(
"tbgs"));
217 tb->appendChild(tbgs);
220 if (pac == 0 &&
int(it->_level) == 0) {
221 pac =
m_doc->createElement(
X(
"pac"));
222 tb->appendChild(pac);
223 pac->setAttribute(
X(
"num"),
X(
IntToString(muPACChipNo).c_str()));
226 DOMElement*
mu =
m_doc->createElement(
X(
"mu"));
227 mu->setAttribute(
X(
"pt"),
X(
IntToString(
int(it->_mu.getPtCode() ) ).c_str()));
228 mu->setAttribute(
X(
"qual"),
X(
IntToString(
int(it->_mu.getQuality() ) ).c_str()));
229 mu->setAttribute(
X(
"sign"),
X(
IntToString(
int(it->_mu.getSign() ) ).c_str()));
231 if (
int(it->_level) == 0 ) {
232 mu->setAttribute(
X(
"num"),
X(
IntToString( muSegment ).c_str()));
233 pac->appendChild(mu);
235 mu->setAttribute(
X(
"num"),
X(
IntToString(
int(it->_index) ).c_str()));
236 mu->setAttribute(
X(
"phi"),
X(
IntToString(
int(it->_mu.getPhiAddr() ) ).c_str()));
237 mu->setAttribute(
X(
"eta"),
X(
IntToString(
int(it->_mu.getEtaAddr() ) ).c_str()));
238 mu->setAttribute(
X(
"gbD"),
X(
IntToString(
int(it->_mu.getGBData() ) ).c_str()));
239 if (
int(it->_level) == 1 ) {
240 tbgs->appendChild(mu);
241 }
else if (
int(it->_level) == 2 ) {
242 tcgs->appendChild(mu);
244 throw cms::Exception(
"RPCMuonsGrabber") <<
"xx Unexpected level" << std::endl;
261 for (
int half =0; half <= 1; ++half){
262 for (
int be =0; be <= 1; ++be){
264 std::vector< RPCMuonExtraStruct >::iterator it =
m_muons.begin();
267 if ( (
int(it->_level) !=
level) ||
int(it->_hsHalf)!=half ||
int(it->_region)!=be ) {
274 hs =
m_doc->createElement(
X(
"hs"));
276 }
else if (
level ==4 ) {
277 hs =
m_doc->createElement(
X(
"fs"));
279 throw cms::Exception(
"RPCMuonsGrabber") <<
"Problem writing out muons - lvl " <<
level << std::endl;
282 currRelBx->appendChild(hs);
285 DOMElement* mu =
m_doc->createElement(
X(
"mu"));
287 mu->setAttribute(
X(
"num"),
X(
IntToString(
int(it->_index) ).c_str()));
288 mu->setAttribute(
X(
"pt"),
X(
IntToString(
int(it->_mu.getPtCode() ) ).c_str()));
289 mu->setAttribute(
X(
"qual"),
X(
IntToString(
int(it->_mu.getQuality() ) ).c_str()));
290 mu->setAttribute(
X(
"sign"),
X(
IntToString(
int(it->_mu.getSign() ) ).c_str()));
291 mu->setAttribute(
X(
"phi"),
X(
IntToString(
int(it->_mu.getPhiAddr() ) ).c_str()));
292 mu->setAttribute(
X(
"eta"),
X(
IntToString(
int(it->_mu.getEtaAddr() ) ).c_str()));
293 mu->setAttribute(
X(
"gbD"),
X(
IntToString(
int(it->_mu.getGBData() ) ).c_str()));
307 throw cms::Exception(
"RPCMuonsGrabber") <<
" There are still some muons in muons vec" << std::endl;
std::string IntToString(int i)
virtual int getTowerNumOnTb(const RPCConst::l1RpcConeCrdnts &coneCrdnts)
RPCBasicTrigConfig * m_trigConfig
XERCES_CPP_NAMESPACE::DOMDocument * m_doc
std::vector< RPCMuonExtraStruct > m_muons
XERCES_CPP_NAMESPACE::DOMElement * m_currEvent
virtual int getTBNum(const RPCConst::l1RpcConeCrdnts &coneCrdnts)
Returns the index of TB (in TC) that should run given LogCone.
virtual int getTCNum(const RPCConst::l1RpcConeCrdnts &coneCrdnts)
Returns the index of TC that should run given LogCone.