28 #include <boost/cstdint.hpp>
40 #include "L1Trigger/L1TGlobal/src/L1TMenuEditor/L1TriggerMenu.hxx"
45 m_triggerMenuName(
"NULL"), m_triggerMenuImplementation(
"NULL"), m_scaleDbKey(
"NULL")
64 const unsigned int& numberConditionChipsValue) {
66 m_numberConditionChips = numberConditionChipsValue;
73 m_pinsOnConditionChip = pinsOnConditionChipValue;
80 const std::vector<int>& orderConditionChipValue) {
82 m_orderConditionChip = orderConditionChipValue;
88 const unsigned int& numberPhysTriggersValue) {
90 m_numberPhysTriggers = numberPhysTriggersValue;
96 const unsigned int& numberTechTriggersValue) {
98 m_numberTechTriggers = numberTechTriggersValue;
105 m_numberL1JetCounts = numberL1JetCountsValue;
112 m_conditionMap = condMap;
117 m_triggerMenuInterface = menuInterface;
121 m_triggerMenuName = menuName;
125 m_triggerMenuImplementation = menuImplementation;
130 m_scaleDbKey = scaleKey;
135 const std::vector<std::vector<MuonTemplate> >& vecMuonTempl) {
137 m_vecMuonTemplate = vecMuonTempl;
141 const std::vector<std::vector<CaloTemplate> >& vecCaloTempl) {
143 m_vecCaloTemplate = vecCaloTempl;
147 const std::vector<std::vector<L1GtEnergySumTemplate> >& vecEnergySumTempl) {
149 m_vecEnergySumTemplate = vecEnergySumTempl;
153 const std::vector<std::vector<L1GtJetCountsTemplate> >& vecJetCountsTempl) {
155 m_vecJetCountsTemplate = vecJetCountsTempl;
159 const std::vector<std::vector<L1GtCastorTemplate> >& vecCastorTempl) {
161 m_vecCastorTemplate = vecCastorTempl;
165 const std::vector<std::vector<L1GtHfBitCountsTemplate> >& vecHfBitCountsTempl) {
167 m_vecHfBitCountsTemplate = vecHfBitCountsTempl;
171 const std::vector<std::vector<L1GtHfRingEtSumsTemplate> >& vecHfRingEtSumsTempl) {
173 m_vecHfRingEtSumsTemplate = vecHfRingEtSumsTempl;
177 const std::vector<std::vector<L1GtBptxTemplate> >& vecBptxTempl) {
179 m_vecBptxTemplate = vecBptxTempl;
183 const std::vector<std::vector<L1GtExternalTemplate> >& vecExternalTempl) {
185 m_vecExternalTemplate = vecExternalTempl;
189 const std::vector<std::vector<CorrelationTemplate> >& vecCorrelationTempl) {
191 m_vecCorrelationTemplate = vecCorrelationTempl;
197 const std::vector<std::vector<MuonTemplate> >& corMuonTempl) {
199 m_corMuonTemplate = corMuonTempl;
203 const std::vector<std::vector<CaloTemplate> >& corCaloTempl) {
205 m_corCaloTemplate = corCaloTempl;
209 const std::vector<std::vector<L1GtEnergySumTemplate> >& corEnergySumTempl) {
211 m_corEnergySumTemplate = corEnergySumTempl;
219 m_algorithmMap = algoMap;
224 m_algorithmAliasMap = algoMap;
229 m_technicalTriggerMap = ttMap;
239 XERCES_CPP_NAMESPACE_USE
243 m_conditionMap.resize(m_numberConditionChips);
245 m_vecMuonTemplate.resize(m_numberConditionChips);
246 m_vecCaloTemplate.resize(m_numberConditionChips);
247 m_vecEnergySumTemplate.resize(m_numberConditionChips);
248 m_vecJetCountsTemplate.resize(m_numberConditionChips);
249 m_vecCastorTemplate.resize(m_numberConditionChips);
250 m_vecHfBitCountsTemplate.resize(m_numberConditionChips);
251 m_vecHfRingEtSumsTemplate.resize(m_numberConditionChips);
252 m_vecBptxTemplate.resize(m_numberConditionChips);
253 m_vecExternalTemplate.resize(m_numberConditionChips);
255 m_vecCorrelationTemplate.resize(m_numberConditionChips);
256 m_corMuonTemplate.resize(m_numberConditionChips);
257 m_corCaloTemplate.resize(m_numberConditionChips);
258 m_corEnergySumTemplate.resize(m_numberConditionChips);
264 m_triggerMenuName = defXmlFile;
265 size_t xmlPos = m_triggerMenuName.find_last_of(
"/");
266 m_triggerMenuName.erase(m_triggerMenuName.begin(), m_triggerMenuName.begin()
269 xmlPos = m_triggerMenuName.find_last_of(
".");
270 m_triggerMenuName.erase(m_triggerMenuName.begin() + xmlPos, m_triggerMenuName.end());
275 std::auto_ptr<l1t::L1TriggerMenu> tm(l1t::l1TriggerMenu(defXmlFile));
277 LogTrace(
"TriggerMenuXmlParser") <<
"\nOpening XML-File: \n " << defXmlFile << std::endl;
279 l1t::ConditionList conditions = tm->conditions();
294 m_triggerMenuInterfaceDate = val;
300 m_triggerMenuInterfaceAuthor = val;
306 m_triggerMenuInterfaceDescription = val;
313 m_triggerMenuDate = val;
319 m_triggerMenuAuthor = val;
325 m_triggerMenuDescription = val;
331 m_algorithmImplementation = val;
350 XERCES_CPP_NAMESPACE_USE
354 XMLPlatformUtils::Initialize();
356 catch (
const XMLException& toCatch) {
357 char*
message = XMLString::transcode(toCatch.getMessage());
360 <<
"Error during Xerces-c initialization! :"
361 << message << std::endl;
367 XercesDOMParser*
parser =
new XercesDOMParser();
368 parser->setValidationScheme(XercesDOMParser::Val_Always);
369 parser->setDoNamespaces(
false);
371 if (m_xmlErrHandler == 0) {
372 m_xmlErrHandler = (ErrorHandler*)
new HandlerBase();
377 parser->setErrorHandler(m_xmlErrHandler);
381 parser->parse(xmlFile.c_str());
383 catch(
const XMLException &toCatch) {
384 char*
message = XMLString::transcode(toCatch.getMessage());
387 <<
"Exception while parsing XML: \n"
388 << message << std::endl;
392 delete m_xmlErrHandler;
396 catch (
const DOMException &toCatch) {
397 char *
message = XMLString::transcode(toCatch.msg);
400 <<
"DOM-Exception while parsing XML: \n"
401 << message << std::endl;
405 delete m_xmlErrHandler;
412 <<
"Unexpected Exception while parsing XML!"
416 delete m_xmlErrHandler;
426 XERCES_CPP_NAMESPACE::DOMNode* startChild,
const std::string& tagName,
bool beginOnly,
429 XERCES_CPP_NAMESPACE_USE
433 DOMNode *n1 = startChild;
438 if ( !tagName.empty() ) {
439 nodeName = XMLString::transcode(n1->getNodeName());
443 while (XMLString::compareIString(nodeName, tagName.c_str())) {
446 n1 = n1->getNextSibling();
451 nodeName = XMLString::transcode(n1->getNodeName());
456 while (XMLString::compareNIString(nodeName, tagName.c_str(), tagName.length())) {
458 n1 = n1->getNextSibling();
463 nodeName = XMLString::transcode(n1->getNodeName());
465 if (n1 != 0 && rest != 0) {
466 *rest =
std::string(nodeName).substr(tagName.length(), strlen(nodeName) - tagName.length());
471 while (n1->getNodeType() != DOMNode::ELEMENT_NODE) {
472 n1 = n1->getNextSibling();
478 if (n1 != 0 && rest != 0) {
479 nodeName = XMLString::transcode(n1->getNodeName());
502 XERCES_CPP_NAMESPACE_USE
507 DOMNamedNodeMap*
attributes = node->getAttributes();
508 if (attributes == 0) {
513 XMLCh* attrName = XMLString::transcode(name.c_str());
514 DOMNode* attribNode = attributes->getNamedItem(attrName);
517 if (attribNode == 0) {
521 char* retCstr = XMLString::transcode(attribNode->getNodeValue());
538 XERCES_CPP_NAMESPACE_USE
547 const XMLCh* retXmlCh = n1->getTextContent();
552 char* retCstr = XMLString::transcode(retXmlCh);
553 XMLString::trim(retCstr);
575 static const std::string valid_hex_start(
"0123456789ABCDEFabcdef");
578 static const std::string valid_hex_end(
"0123456789ABCDEFabcdef");
583 unsigned int hexStart = tempStr.find_first_of(valid_hex_start);
584 unsigned int hexEnd = tempStr.find_first_not_of(valid_hex_end, hexStart);
586 if (hexStart == hexEnd) {
588 LogDebug(
"TriggerMenuXmlParser") <<
"No hex value found in: " << tempStr << std::endl;
593 tempStr = tempStr.substr(hexStart, hexEnd - hexStart);
595 if (tempStr.empty() ) {
597 LogDebug(
"TriggerMenuXmlParser") <<
"Empty value in " << __PRETTY_FUNCTION__
606 if (tempStr.length() > 16) {
607 tempStrL = tempStr.substr(tempStr.length()-16, 16);
608 tempStrH = tempStr.substr(0, tempStr.length()-16);
616 char* endPtr = (
char*) tempStrL.c_str();
621 LogDebug(
"TriggerMenuXmlParser") <<
"Unable to convert " << tempStr <<
" to hex."
628 endPtr = (
char*) tempStrH.c_str();
633 LogDebug(
"TriggerMenuXmlParser") <<
"Unable to convert " << tempStr <<
" to hex."
660 LogDebug(
"TriggerMenuXmlParser") <<
"node == 0 in " << __PRETTY_FUNCTION__ << std::endl;
668 if ( !hexString2UInt128(tempStr, tempUIntL, tempUIntH) ) {
684 if ( !hexString2UInt128(tempStr, tempUIntL, tempUIntH) ) {
711 if ( !getXMLHexTextValue128Old(node, tempUInt, dummyH) ) {
716 edm::LogError(
"TriggerMenuXmlParser") <<
"Too large hex-value!" << std::endl;
731 if ( !getXMLHexTextValue128( childName, tempUInt, dummyH) ) {
736 edm::LogError(
"TriggerMenuXmlParser") <<
"Too large hex-value!" << std::endl;
758 XERCES_CPP_NAMESPACE_USE
767 if ( !hexString2UInt128(maxString, maxBitsL, maxBitsH) ) {
782 while (maxBitsL != 0) {
784 if ( (maxBitsL & 1) == 0) {
787 <<
" Confused by not continous set bits for max value " << maxString
797 if ( (maxBitsH != 0) && (counter != 64)) {
800 <<
" Confused by not continous set bits for max value " << maxString
806 while (maxBitsH != 0) {
808 if ( (maxBitsH & 1) == 0) {
811 <<
" Confused by not continous set bits for max value " << maxString
839 const std::string& childName,
unsigned int num, std::vector<boost::uint64_t>& dst) {
841 XERCES_CPP_NAMESPACE_USE
846 <<
"node == 0 in " << __PRETTY_FUNCTION__
852 DOMNode* n1 = findXMLChild(node->getFirstChild(), childName);
857 LogDebug(
"TriggerMenuXmlParser") <<
"Child of condition not found ( " << childName
872 n1 = findXMLChild(n1->getFirstChild(), m_xmlTagValue);
873 for (
unsigned int i = 0;
i <
num;
i++) {
876 LogDebug(
"TriggerMenuXmlParser") <<
"Not enough values in condition child ( "
877 << childName <<
")" << std::endl;
882 if ( !getXMLHexTextValueOld(n1, dst[
i]) ) {
884 edm::LogError(
"TriggerMenuXmlParser") <<
"Error converting condition child ( "
885 << childName <<
") value." << std::endl;
890 n1 = findXMLChild(n1->getNextSibling(), m_xmlTagValue);
905 XERCES_CPP_NAMESPACE_USE
911 if (m_xmlErrHandler != 0) {
912 delete m_xmlErrHandler;
916 XMLPlatformUtils::Terminate();
935 XERCES_CPP_NAMESPACE_USE
937 DOMDocument*
doc = parser->getDocument();
938 DOMNode* n1 = doc->getFirstChild();
942 edm::LogError(
"TriggerMenuXmlParser") <<
"Error: Found no XML child" << std::endl;
948 n1 = findXMLChild(n1, m_xmlTagVme);
951 edm::LogError(
"TriggerMenuXmlParser") <<
"Error: No vme tag found." << std::endl;
955 n1 = n1->getFirstChild();
957 unsigned int chipCounter = 0;
959 while (chipCounter < m_numberConditionChips) {
961 n1 = findXMLChild(n1, m_xmlTagChip,
true);
972 n1 = n1->getNextSibling();
988 for (std::vector<ConditionMap>::iterator itCondOnChip = m_conditionMap.begin(); itCondOnChip
989 != m_conditionMap.end(); itCondOnChip++) {
993 itCondOnChip->clear();
998 m_algorithmMap.clear();
1011 if ((m_conditionMap[chipNr]).
count(cName) != 0) {
1012 LogTrace(
"TriggerMenuXmlParser") <<
" Condition " << cName
1013 <<
" already exists - not inserted!" << std::endl;
1017 (m_conditionMap[chipNr])[cName] = &cond;
1036 if (m_algorithmMap.count(algName) != 0) {
1037 LogTrace(
"TriggerMenuXmlParser") <<
" Algorithm \"" << algName
1038 <<
"\"already exists in the algorithm map- not inserted!" << std::endl;
1042 if (m_algorithmAliasMap.count(algAlias) != 0) {
1043 LogTrace(
"TriggerMenuXmlParser") <<
" Algorithm alias \"" << algAlias
1044 <<
"\"already exists in the algorithm alias map- not inserted!" << std::endl;
1050 if ((bitNumber < 0) || (bitNumber >= static_cast<int>(m_numberPhysTriggers))) {
1051 LogTrace(
"TriggerMenuXmlParser") <<
" Bit number " << bitNumber
1052 <<
" outside allowed range [0, " << m_numberPhysTriggers
1053 <<
") - algorithm not inserted!" << std::endl;
1058 if (m_algorithmMap.size() >= m_numberPhysTriggers) {
1059 LogTrace(
"TriggerMenuXmlParser") <<
" More than maximum allowed "
1060 << m_numberPhysTriggers <<
" algorithms in the algorithm map - not inserted!"
1066 int chipNr = alg.
algoChipNumber(static_cast<int>(m_numberConditionChips),
1067 static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
1069 if ((chipNr < 0) || (chipNr > static_cast<int>(m_numberConditionChips))) {
1070 LogTrace(
"TriggerMenuXmlParser") <<
" Chip number " << chipNr
1071 <<
" outside allowed range [0, " << m_numberConditionChips
1072 <<
") - algorithm not inserted!" << std::endl;
1077 int outputPin = alg.
algoOutputPin(static_cast<int>(m_numberConditionChips),
1078 static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
1080 if ((outputPin < 0) || (outputPin > static_cast<int>(m_pinsOnConditionChip))) {
1081 LogTrace(
"TriggerMenuXmlParser") <<
" Output pin " << outputPin
1082 <<
" outside allowed range [0, " << m_pinsOnConditionChip
1083 <<
"] - algorithm not inserted!" << std::endl;
1088 for (
CItAlgo itAlgo = m_algorithmMap.begin(); itAlgo != m_algorithmMap.end(); itAlgo++) {
1090 int iPin = (itAlgo->second).algoOutputPin( static_cast<int>(m_numberConditionChips),
1091 static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
1093 int iChip = (itAlgo->second).algoChipNumber(static_cast<int>(m_numberConditionChips),
1094 static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
1096 if ( (outputPin == iPin) && (chipNr == iChip)) {
1097 LogTrace(
"TriggerMenuXmlParser") <<
" Output pin " << outputPin
1098 <<
" is the same as for algorithm " << iName
1099 <<
"\n from the same chip number " << chipNr <<
" - algorithm not inserted!"
1107 m_algorithmMap[algName] = alg;
1108 m_algorithmAliasMap[algAlias] = alg;
1127 if (m_technicalTriggerMap.count(algName) != 0) {
1128 LogTrace(
"TriggerMenuXmlParser") <<
" Technical trigger \""
1130 <<
"\"already exists in the technical trigger map- not inserted!"
1138 || (bitNumber >= static_cast<int>(m_numberTechTriggers))) {
1139 LogTrace(
"TriggerMenuXmlParser") <<
" Bit number "
1140 << bitNumber <<
" outside allowed range [0, "
1141 << m_numberTechTriggers
1142 <<
") - technical trigger not inserted!" << std::endl;
1147 for (
CItAlgo itAlgo = m_technicalTriggerMap.begin(); itAlgo
1148 != m_technicalTriggerMap.end(); itAlgo++) {
1150 int iBitNumber = (itAlgo->second).algoBitNumber();
1153 if ((iBitNumber == bitNumber)) {
1154 LogTrace(
"TriggerMenuXmlParser") <<
" Bit number "
1155 << iBitNumber <<
" is the same as for technical trigger "
1156 << iName <<
" - technical trigger not inserted!"
1164 if (m_technicalTriggerMap.size() >= m_numberTechTriggers) {
1166 <<
" More than maximum allowed " << m_numberTechTriggers
1167 <<
" technical triggers in the technical trigger map - not inserted!"
1173 m_technicalTriggerMap[algName] = alg;
1189 if (type == m_xmlConditionAttrType1s) {
1193 if (type == m_xmlConditionAttrType2s) {
1197 if (type == m_xmlConditionAttrType3s) {
1201 if (type == m_xmlConditionAttrType4s) {
1205 if (type == m_xmlConditionAttrType2wsc) {
1209 if (type == m_xmlConditionAttrType2cor) {
1227 if (type == m_xmlConditionAttrType1s) {
1231 if (type == m_xmlConditionAttrType2s) {
1235 if (type == m_xmlConditionAttrType3s) {
1239 if (type == m_xmlConditionAttrType4s) {
1243 if (type == m_xmlConditionAttrType2wsc) {
1247 if (type == m_xmlConditionAttrType2cor) {
1264 if (getXMLAttribute(node, m_xmlAttrMode) != m_xmlAttrModeBit) {
1266 edm::LogError(
"TriggerMenuXmlParser") <<
"Invalid mode for single bit" << std::endl;
1272 if (tmpStr ==
"0") {
1275 else if (tmpStr ==
"1") {
1279 edm::LogError(
"TriggerMenuXmlParser") <<
"Bad bit value (" << tmpStr <<
")"
1297 XERCES_CPP_NAMESPACE_USE
1302 <<
"node == 0 in " << __PRETTY_FUNCTION__
1309 DOMNode* n1 = node->getFirstChild();
1310 n1 = findXMLChild(n1, nodeName);
1313 n1 = findXMLChild(n1->getFirstChild(), m_xmlTagGEq);
1316 LogDebug(
"TriggerMenuXmlParser") <<
"No \"greater or equal\" tag found"
1322 return getBitFromNode(n1);
1345 unsigned int num, std::vector<bool>& mipDst, std::vector<bool>& isoEnDst,
1346 std::vector<bool>& isoReqDst) {
1348 XERCES_CPP_NAMESPACE_USE
1355 DOMNode* n1 = findXMLChild(node->getFirstChild(), m_xmlTagPtLowThreshold);
1362 n1 = findXMLChild(n1->getFirstChild(), m_xmlTagValue);
1364 for (
unsigned int i = 0;
i <
num;
i++) {
1372 DOMNode* bitnode = findXMLChild(n1->getFirstChild(), m_xmlTagEnableMip);
1377 int tmpint = getBitFromNode(bitnode);
1382 mipDst[
i] = (tmpint != 0);
1390 bitnode = findXMLChild(n1->getFirstChild(), m_xmlTagEnableIso);
1395 tmpint = getBitFromNode(bitnode);
1400 isoEnDst[
i] = (tmpint != 0);
1407 bitnode = findXMLChild(n1->getFirstChild(), m_xmlTagRequestIso);
1412 tmpint = getBitFromNode(bitnode);
1417 isoReqDst[
i] = (tmpint != 0);
1424 n1 = findXMLChild(n1->getNextSibling(), m_xmlTagValue);
1432 std::stringstream
ss;
1437 std::stringstream
ss;
1438 ss << std::setfill(
'0');
1439 ss << std::setw(4) << date.year() <<
"-" << std::setw(2) << date.month() <<
"-" << std::setw(2) << date.day() <<
"T";
1440 ss << std::setw(2) << date.hours() <<
":" << std::setw(2) << date.minutes() <<
":" << std::setw(2) << date.seconds();
1445 std::stringstream
ss;
1466 unsigned int chipNr,
const bool corrFlag) {
1468 XERCES_CPP_NAMESPACE_USE
1476 if( particle==
"mu" ) particle =
"muon";
1478 if( type==
"double_wsc" ) type =
"2_wsc";
1479 else if( type==
"single" ) type =
"1_s";
1480 else if( type==
"double" ) type =
"2_s";
1481 else if( type==
"triple" ) type =
"3";
1482 else if( type==
"quad" ) type =
"4";
1485 <<
"\n ****************************************** "
1487 <<
"\n condition = " << condition
1488 <<
"\n particle = " << particle
1489 <<
"\n type = " << type
1490 <<
"\n name = " << name
1493 if (particle != m_xmlConditionAttrObjectMu) {
1494 edm::LogError(
"TriggerMenuXmlParser") <<
"Wrong particle for muon-condition ("
1495 << particle <<
")" << std::endl;
1500 std::string str_etComparison = l1t2string( condMu.comparison_operator() );
1502 int nrObj = getNumFromType(type);
1504 edm::LogError(
"TriggerMenuXmlParser") <<
"Unknown type for calo-condition (" << type
1505 <<
")" <<
"\nCan not determine number of trigger objects. " << std::endl;
1510 int intGEq = ( str_etComparison==
"ge" ) ? 1 : 0;
1512 edm::LogError(
"TriggerMenuXmlParser") <<
"Error getting \"greater or equal\" flag"
1517 bool gEq = (intGEq != 0);
1522 std::vector<MuonTemplate::ObjectParameter> objParameter(nrObj);
1526 std::vector<boost::uint64_t> tmpValues((nrObj > 2) ? nrObj : 2);
1527 tmpValues.reserve( nrObj );
1529 if(
int(condMu.objectRequirements().objectRequirement().size())!=nrObj ){
1530 edm::LogError(
"TriggerMenuXmlParser") <<
" condMu objects: nrObj = " << nrObj
1531 <<
"condMu.objectRequirements().objectRequirement().size() = "
1532 << condMu.objectRequirements().objectRequirement().size()
1538 std::string str_chargeCorrelation = l1t2string( condMu.requestedChargeCorr() );
1540 unsigned int chargeCorrelation = 0;
1541 if( str_chargeCorrelation==
"ig" ) chargeCorrelation = 1;
1542 else if( str_chargeCorrelation==
"ls" ) chargeCorrelation = 2;
1543 else if( str_chargeCorrelation==
"os" ) chargeCorrelation = 4;
1552 for( l1t::MuonObjectRequirementList::objectRequirement_const_iterator objPar = condMu.objectRequirements().objectRequirement().begin();
1553 objPar != condMu.objectRequirements().objectRequirement().end(); ++objPar ){
1556 str_condMu = l1t2string( objPar->ptThreshold() );
1557 if( !getXMLHexTextValue(str_condMu, dst) )
return false;
1561 objParameter[cnt].ptHighThreshold = objPar->ptThreshold();
1562 objParameter[cnt].ptLowThreshold = objPar->ptThreshold();
1567 str_condMu =
"7f7f";
1569 if( !getXMLHexTextValue(str_condMu, dst) )
return false;
1570 if( cnt<nrObj ) objParameter[cnt].etaRange = dst;
1573 str_condMu =
"3ffff";
1574 if( !getXMLHexTextValue(str_condMu, dst) )
return false;
1576 getXMLHexTextValue(
"8f", dst);
1577 objParameter[cnt].phiHigh = dst;
1578 objParameter[cnt].phiLow = dst;
1580 objParameter[cnt].enableMip =
false;
1581 objParameter[cnt].enableIso =
false;
1582 objParameter[cnt].requestIso =
false;
1584 std::string str_charge = l1t2string( objPar->requestedCharge() );
1586 if( str_charge==
"ign" ) charge = -1;
1587 else if( str_charge==
"pos" ) charge = 0;
1588 else if( str_charge==
"neg" ) charge = 1;
1590 objParameter[cnt].charge = charge;
1594 for( l1t::MuonQualityLUT::quality_const_iterator iQualFlag = objPar->qualityLut().quality().begin();
1595 iQualFlag != objPar->qualityLut().quality().end(); ++iQualFlag ){
1597 bool flag = (*iQualFlag);
1599 qualityLUT |= (flag << cntQual);
1602 <<
"\n quality flag " << cntQual <<
" = " << flag
1603 <<
"\n qualityLUT = " << qualityLUT
1609 objParameter[cnt].qualityLUT = qualityLUT;
1613 int isolationLUT = 0;
1614 for( l1t::MuonIsolationLUT::isolation_const_iterator iIsoFlag = objPar->isolationLut().isolation().begin();
1615 iIsoFlag != objPar->isolationLut().isolation().end(); ++iIsoFlag ){
1617 bool flag = (*iIsoFlag);
1619 isolationLUT |= (flag << cntIso);
1622 <<
"\n isolation flag " << cntIso <<
" = " << flag
1623 <<
"\n isolationLUT = " << isolationLUT
1629 objParameter[cnt].isolationLUT = isolationLUT;
1633 unsigned int etaWindowLower=-1, etaWindowUpper=-1, etaWindowVetoLower=-1, etaWindowVetoUpper=-1;
1635 for( l1t::MuonObjectRequirement::etaWindow_const_iterator etaWindow =objPar->etaWindow().begin();
1636 etaWindow != objPar->etaWindow().end(); ++etaWindow ){
1639 <<
"\n etaWindow lower = " << etaWindow->lower()
1640 <<
"\n etaWindow upper = " << etaWindow->upper()
1642 if( cntEta==0 ){ etaWindowLower = etaWindow->lower(); etaWindowUpper = etaWindow->upper(); }
1643 else if( cntEta==1 ){ etaWindowVetoLower = etaWindow->lower(); etaWindowVetoUpper = etaWindow->upper(); }
1648 unsigned int phiWindowLower=-1, phiWindowUpper=-1, phiWindowVetoLower=-1, phiWindowVetoUpper=-1;
1649 for( l1t::MuonObjectRequirement::phiWindow_const_iterator phiWindow =objPar->phiWindow().begin();
1650 phiWindow != objPar->phiWindow().end(); ++phiWindow ){
1653 <<
"\n phiWindow begin = " << phiWindow->lower()
1654 <<
"\n phiWindow end = " << phiWindow->upper()
1657 if( cntPhi==0 ){ phiWindowLower = phiWindow->lower(); phiWindowUpper = phiWindow->upper(); }
1658 else if( cntPhi==1 ){ phiWindowVetoLower = phiWindow->lower(); phiWindowVetoUpper = phiWindow->upper(); }
1662 objParameter[cnt].etaWindowLower = etaWindowLower;
1663 objParameter[cnt].etaWindowUpper = etaWindowUpper;
1664 objParameter[cnt].etaWindowVetoLower = etaWindowVetoLower;
1665 objParameter[cnt].etaWindowVetoUpper = etaWindowVetoUpper;
1667 objParameter[cnt].phiWindowLower = phiWindowLower;
1668 objParameter[cnt].phiWindowUpper = phiWindowUpper;
1669 objParameter[cnt].phiWindowVetoLower = phiWindowVetoLower;
1670 objParameter[cnt].phiWindowVetoUpper = phiWindowVetoUpper;
1675 <<
"\n Muon PT high threshold (hex) for muon object " << cnt <<
" = "
1676 << std::hex << objParameter[cnt].ptHighThreshold <<
std::dec
1677 <<
"\n etaWindow (hex) for muon object " << cnt <<
" = "
1678 << std::hex << objParameter[cnt].etaRange <<
std::dec
1681 <<
"\n etaWindow Lower / Upper for muon object " << cnt <<
" = "
1682 << objParameter[cnt].etaWindowLower <<
" / " << objParameter[cnt].etaWindowUpper
1683 <<
"\n etaWindowVeto Lower / Upper for muon object " << cnt <<
" = "
1684 << objParameter[cnt].etaWindowVetoLower <<
" / " << objParameter[cnt].etaWindowVetoUpper
1685 <<
"\n phiWindow Lower / Upper for muon object " << cnt <<
" = "
1686 << objParameter[cnt].phiWindowLower <<
" / " << objParameter[cnt].phiWindowUpper
1687 <<
"\n phiWindowVeto Lower / Upper for muon object " << cnt <<
" = "
1688 << objParameter[cnt].phiWindowVetoLower <<
" / " << objParameter[cnt].phiWindowVetoUpper
1697 bool wscVal = (type == m_xmlConditionAttrType2wsc );
1701 xsd::cxx::tree::optional<l1t::DeltaRequirement> condRanges = condMu.deltaRequirement();
1703 <<
"\t condRanges->deltaEtaRange().lower() = " << condRanges->deltaEtaRange().lower()
1704 <<
"\n\t condRanges->deltaEtaRange().upper() = " << condRanges->deltaEtaRange().upper()
1705 <<
"\n\t condRanges->deltaPhiRange().lower() = " << condRanges->deltaPhiRange().lower()
1706 <<
"\n\t condRanges->deltaPhiRange().upper() = " << condRanges->deltaPhiRange().upper()
1720 str_condMu =
"0003";
1721 if ( !hexString2UInt128(str_condMu, tempUIntL, tempUIntH) ) {
1724 if( tempUIntH != 0 ){
1725 edm::LogError(
"TriggerMenuXmlParser") <<
"Too large hex-value!" << std::endl;
1732 if ( !hexString2UInt128(str_condMu, tempUIntL, tempUIntH) ) {
1735 if( tempUIntH != 0 ){
1736 edm::LogError(
"TriggerMenuXmlParser") <<
"Too large hex-value!" << std::endl;
1746 unsigned int maxbits = 0;
1748 if ( !countConditionChildMaxBits(maxString, maxbits) ) {
1754 <<
" deltaPhiMaxbits (dec) = " << maxbits
1768 <<
"Type for muon condition id l1t::TypeNull - it means not defined in the XML file."
1769 <<
"\nNumber of trigger objects is set to zero. " << std::endl;
1774 std::vector<L1GtObject> objType(nrObj,
Mu);
1778 int relativeBx = l1t2int( condMu.relativeBx() );
1785 muonCond.setCondType(cType);
1786 muonCond.setObjectType(objType);
1787 muonCond.setCondGEq(gEq);
1788 muonCond.setCondChipNr(chipNr);
1789 muonCond.setCondRelativeBx(relativeBx);
1791 muonCond.setConditionParameter(objParameter, corrParameter);
1794 std::ostringstream myCoutStream;
1795 muonCond.print(myCoutStream);
1796 LogTrace(
"TriggerMenuXmlParser") << myCoutStream.str() <<
"\n" << std::endl;
1800 if ( !insertConditionIntoMap(muonCond, chipNr)) {
1802 <<
" Error: duplicate condition (" << name <<
")"
1808 (m_corMuonTemplate[chipNr]).push_back(muonCond);
1811 (m_vecMuonTemplate[chipNr]).push_back(muonCond);
1818 <<
"\n intGEq = " << intGEq
1819 <<
" nrObj = " << nrObj
1820 <<
"\n ****************************************** "
1839 unsigned int chipNr,
const bool corrFlag) {
1841 XERCES_CPP_NAMESPACE_USE
1846 std::string particle = l1t2string( condCalo.objectType() );
1851 <<
"\n ****************************************** "
1852 <<
"\n DARRENS TEST OUTPUT (in parseCalo) "
1853 <<
"\n condition = " << condition
1854 <<
"\n particle = " << particle
1855 <<
"\n type = " << type
1856 <<
"\n name = " << name
1863 if (particle == m_xmlConditionAttrObjectNoIsoEG) {
1866 else if (particle == m_xmlConditionAttrObjectIsoEG) {
1867 caloObjType =
IsoEG;
1869 else if (particle == m_xmlConditionAttrObjectCenJet) {
1872 else if (particle == m_xmlConditionAttrObjectTauJet) {
1875 else if (particle == m_xmlConditionAttrObjectForJet) {
1879 edm::LogError(
"TriggerMenuXmlParser") <<
"Wrong particle for calo-condition ("
1880 << particle <<
")" << std::endl;
1884 if( type==
"double_wsc" ) type =
"2_wsc";
1885 else if( type==
"single" ) type =
"1_s";
1886 else if( type==
"double" ) type =
"2_s";
1887 else if( type==
"triple" ) type =
"3";
1888 else if( type==
"quad" ) type =
"4";
1891 std::string str_etComparison = l1t2string( condCalo.comparison_operator() );
1893 int nrObj = getNumFromType(type);
1895 edm::LogError(
"TriggerMenuXmlParser") <<
"Unknown type for calo-condition (" << type
1896 <<
")" <<
"\nCan not determine number of trigger objects. " << std::endl;
1901 int intGEq = ( str_etComparison==
"ge" ) ? 1 : 0;
1903 edm::LogError(
"TriggerMenuXmlParser") <<
"Error getting \"greater or equal\" flag"
1908 bool gEq = (intGEq != 0);
1913 std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1917 std::vector<boost::uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1918 tmpValues.reserve( nrObj );
1920 if(
int(condCalo.objectRequirements().objectRequirement().size())!=nrObj ){
1921 edm::LogError(
"TriggerMenuXmlParser") <<
" condCalo objects: nrObj = " << nrObj
1922 <<
"condCalo.objectRequirements().objectRequirement().size() = "
1923 << condCalo.objectRequirements().objectRequirement().size()
1933 for( l1t::CalorimeterObjectRequirements::objectRequirement_const_iterator objPar = condCalo.objectRequirements().objectRequirement().begin();
1934 objPar != condCalo.objectRequirements().objectRequirement().end(); ++objPar ){
1937 str_condCalo = l1t2string( objPar->etThreshold() );
1938 if( !getXMLHexTextValue(str_condCalo, dst) )
return false;
1941 if( cnt<nrObj ) objParameter[cnt].etThreshold = objPar->etThreshold();
1945 str_condCalo =
"7f7f";
1947 if( !getXMLHexTextValue(str_condCalo, dst) )
return false;
1948 if( cnt<nrObj ) objParameter[cnt].etaRange = dst;
1951 str_condCalo =
"3ffff";
1952 if( !getXMLHexTextValue(str_condCalo, dst) )
return false;
1953 if( cnt<nrObj ) objParameter[cnt].phiRange = dst;
1958 unsigned int etaWindowLower=-1, etaWindowUpper=-1, etaWindowVetoLower=-1, etaWindowVetoUpper=-1;
1960 for( l1t::CalorimeterObjectRequirement::etaWindow_const_iterator etaWindow =objPar->etaWindow().begin();
1961 etaWindow != objPar->etaWindow().end(); ++etaWindow ){
1964 <<
"\n etaWindow lower = " << etaWindow->lower()
1965 <<
"\n etaWindow upper = " << etaWindow->upper()
1967 if( cntEta==0 ){ etaWindowLower = etaWindow->lower(); etaWindowUpper = etaWindow->upper(); }
1968 else if( cntEta==1 ){ etaWindowVetoLower = etaWindow->lower(); etaWindowVetoUpper = etaWindow->upper(); }
1973 unsigned int phiWindowLower=-1, phiWindowUpper=-1, phiWindowVetoLower=-1, phiWindowVetoUpper=-1;
1974 for( l1t::CalorimeterObjectRequirement::phiWindow_const_iterator phiWindow =objPar->phiWindow().begin();
1975 phiWindow != objPar->phiWindow().end(); ++phiWindow ){
1978 <<
"\n phiWindow begin = " << phiWindow->lower()
1979 <<
"\n phiWindow end = " << phiWindow->upper()
1982 if( cntPhi==0 ){ phiWindowLower = phiWindow->lower(); phiWindowUpper = phiWindow->upper(); }
1983 else if( cntPhi==1 ){ phiWindowVetoLower = phiWindow->lower(); phiWindowVetoUpper = phiWindow->upper(); }
1987 objParameter[cnt].etaWindowLower = etaWindowLower;
1988 objParameter[cnt].etaWindowUpper = etaWindowUpper;
1989 objParameter[cnt].etaWindowVetoLower = etaWindowVetoLower;
1990 objParameter[cnt].etaWindowVetoUpper = etaWindowVetoUpper;
1992 objParameter[cnt].phiWindowLower = phiWindowLower;
1993 objParameter[cnt].phiWindowUpper = phiWindowUpper;
1994 objParameter[cnt].phiWindowVetoLower = phiWindowVetoLower;
1995 objParameter[cnt].phiWindowVetoUpper = phiWindowVetoUpper;
2000 <<
"\n Calo ET high threshold (hex) for calo object " << cnt <<
" = "
2001 << std::hex << objParameter[cnt].etThreshold <<
std::dec
2002 <<
"\n etaWindow (hex) for calo object " << cnt <<
" = "
2003 << std::hex << objParameter[cnt].etaRange <<
std::dec
2004 <<
"\n phiRange (hex) for calo object " << cnt <<
" = "
2005 << std::hex << objParameter[cnt].phiRange <<
std::dec
2006 <<
"\n etaWindow Lower / Upper for calo object " << cnt <<
" = "
2007 << objParameter[cnt].etaWindowLower <<
" / " << objParameter[cnt].etaWindowUpper
2008 <<
"\n etaWindowVeto Lower / Upper for calo object " << cnt <<
" = "
2009 << objParameter[cnt].etaWindowVetoLower <<
" / " << objParameter[cnt].etaWindowVetoUpper
2010 <<
"\n phiWindow Lower / Upper for calo object " << cnt <<
" = "
2011 << objParameter[cnt].phiWindowLower <<
" / " << objParameter[cnt].phiWindowUpper
2012 <<
"\n phiWindowVeto Lower / Upper for calo object " << cnt <<
" = "
2013 << objParameter[cnt].phiWindowVetoLower <<
" / " << objParameter[cnt].phiWindowVetoUpper
2022 bool wscVal = (type == m_xmlConditionAttrType2wsc );
2026 xsd::cxx::tree::optional<l1t::DeltaRequirement> condRanges = condCalo.deltaRequirement();
2028 <<
"\t condRanges->deltaEtaRange().lower() = " << condRanges->deltaEtaRange().lower()
2029 <<
"\n\t condRanges->deltaEtaRange().upper() = " << condRanges->deltaEtaRange().upper()
2030 <<
"\n\t condRanges->deltaPhiRange().lower() = " << condRanges->deltaPhiRange().lower()
2031 <<
"\n\t condRanges->deltaPhiRange().upper() = " << condRanges->deltaPhiRange().upper()
2045 str_condCalo =
"0003";
2046 if ( !hexString2UInt128(str_condCalo, tempUIntL, tempUIntH) ) {
2049 if( tempUIntH != 0 ){
2050 edm::LogError(
"TriggerMenuXmlParser") <<
"Too large hex-value!" << std::endl;
2056 str_condCalo =
"003";
2057 if ( !hexString2UInt128(str_condCalo, tempUIntL, tempUIntH) ) {
2060 if( tempUIntH != 0 ){
2061 edm::LogError(
"TriggerMenuXmlParser") <<
"Too large hex-value!" << std::endl;
2071 unsigned int maxbits = 0;
2073 if ( !countConditionChildMaxBits(maxString, maxbits) ) {
2079 <<
" deltaPhiMaxbits (dec) = " << maxbits
2089 <<
" Condition type (enum value) = " << cType
2094 <<
"Type for calo condition id l1t::TypeNull - it means not defined in the XML file."
2095 <<
"\nNumber of trigger objects is set to zero. " << std::endl;
2100 std::vector<L1GtObject> objType(nrObj, caloObjType);
2103 int relativeBx = l1t2int( condCalo.relativeBx() );
2108 caloCond.setCondType(cType);
2109 caloCond.setObjectType(objType);
2110 caloCond.setCondGEq(gEq);
2111 caloCond.setCondChipNr(chipNr);
2112 caloCond.setCondRelativeBx(relativeBx);
2114 caloCond.setConditionParameter(objParameter, corrParameter);
2118 std::ostringstream myCoutStream;
2119 caloCond.print(myCoutStream);
2120 LogTrace(
"TriggerMenuXmlParser") << myCoutStream.str() <<
"\n" << std::endl;
2125 if ( !insertConditionIntoMap(caloCond, chipNr)) {
2128 <<
" Error: duplicate condition (" << name <<
")"
2136 (m_corCaloTemplate[chipNr]).push_back(caloCond);
2139 (m_vecCaloTemplate[chipNr]).push_back(caloCond);
2145 <<
"\n intGEq = " << intGEq
2146 <<
" nrObj = " << nrObj
2147 <<
"\n ****************************************** "
2168 unsigned int chipNr,
const bool corrFlag) {
2170 XERCES_CPP_NAMESPACE_USE
2379 XERCES_CPP_NAMESPACE_USE
2553 XERCES_CPP_NAMESPACE_USE
2629 XERCES_CPP_NAMESPACE_USE
2762 XERCES_CPP_NAMESPACE_USE
2894 XERCES_CPP_NAMESPACE_USE
2963 XERCES_CPP_NAMESPACE_USE
3031 unsigned int chipNr) {
3033 XERCES_CPP_NAMESPACE_USE
3039 if ( !insertConditionIntoMap(correlationCond, chipNr)) {
3042 <<
" Error: duplicate correlation condition (" << name <<
")"
3367 XERCES_CPP_NAMESPACE_USE
3545 m_triggerMenuInterface = l1t2string( meta.name() );
3546 m_triggerMenuInterfaceDate =
"2013-010-24T15:33:24";
3547 m_triggerMenuInterfaceAuthor =
"Darren Puigh";
3548 m_triggerMenuInterfaceDescription = l1t2string( meta.comment() );
3552 m_triggerMenuDescription = l1t2string( meta.comment() );
3553 m_scaleDbKey = l1t2string( meta.scale_set() );
3557 for( l1t::RevisionList::revision_const_iterator revision = meta.revisions().revision().begin();
3558 revision != meta.revisions().revision().end(); ++revision ){
3561 <<
"\t Revision " << cnt
3562 <<
"\t\t author = " << l1t2string( revision->author() )
3563 <<
"\t\t datetime = " << l1tDateTime2string( revision->datetime() )
3567 m_triggerMenuDate = l1tDateTime2string( revision->datetime() );
3568 m_triggerMenuAuthor = l1t2string( revision->author() );
3575 <<
"\n Parsed values from XML file DRULES"
3576 <<
"\nL1 MenuInterface: " << m_triggerMenuInterface
3577 <<
"\nL1 MenuInterface - Creation date: " << m_triggerMenuInterfaceDate
3578 <<
"\nL1 MenuInterface - Creation author: " << m_triggerMenuInterfaceAuthor
3579 <<
"\nL1 MenuInterface - Description: " << m_triggerMenuInterfaceDescription
3581 <<
"\nAlgorithm implementation tag: " << m_algorithmImplementation
3583 <<
"\nL1 Menu - Creation date: " << m_triggerMenuDate
3584 <<
"\nL1 Menu - Creation author: " << m_triggerMenuAuthor
3585 <<
"\nL1 Menu - Description: " << m_triggerMenuDescription
3593 std::string menuName = m_triggerMenuInterface +
"/" + m_scaleDbKey +
"/" + m_algorithmImplementation;
3595 if (menuName != m_triggerMenuName) {
3597 LogDebug(
"TriggerMenuXmlParser") <<
"\n Warning: Inconsistent L1 menu name:"
3598 <<
"\n from XML file name: " << m_triggerMenuName
3599 <<
"\n from XML tag: " << menuName << std::endl;
3601 if (m_triggerMenuInterface !=
"") {
3602 if (m_scaleDbKey ==
"NULL") {
3603 m_triggerMenuName = m_triggerMenuInterface;
3605 m_triggerMenuName = menuName;
3608 LogTrace(
"TriggerMenuXmlParser") <<
"\n L1 menu name set to value from XML tag!"
3609 <<
"\n L1 Menu name: " << m_triggerMenuName << std::endl;
3612 LogTrace(
"TriggerMenuXmlParser") <<
"\n L1 menu name set to file name!"
3613 <<
"\n L1 Menu name: " << m_triggerMenuName << std::endl;
3636 XERCES_CPP_NAMESPACE_USE
3639 std::string condition = getXMLAttribute(node, m_xmlConditionAttrCondition);
3640 std::string particle = getXMLAttribute(node, m_xmlConditionAttrObject);
3644 <<
"\n ****************************************** "
3645 <<
"\n workCondition "
3646 <<
"\n condition = " << condition
3647 <<
"\n particle = " << particle
3648 <<
"\n type = " << type
3649 <<
"\n name = " << name
3652 if (condition.empty() || particle.empty() || type.empty() ) {
3654 edm::LogError(
"TriggerMenuXmlParser") <<
"Missing attributes for condition " << name
3722 XERCES_CPP_NAMESPACE_USE
3724 LogTrace(
"TriggerMenuXmlParser") <<
"\nParsing conditions" << std::endl;
3727 LogDebug(
"l1t|Global") <<
" ====> condCalorimeter" << std::endl;
3728 for (l1t::ConditionList::condCalorimeter_const_iterator condCalo = conditions.condCalorimeter().begin();
3729 condCalo != conditions.condCalorimeter().end(); ++condCalo ){
3732 << condCalo->name() <<
" {"
3733 <<
" comment: " << condCalo->comment()
3734 <<
" locked: " << condCalo->locked()
3738 l1t::CalorimeterCondition condition = (*condCalo);
3740 parseCalo( condition, chipNr );
3743 LogDebug(
"l1t|Global") <<
" ====> condMuon " << std::endl;
3744 for (l1t::ConditionList::condMuon_const_iterator condMu = conditions.condMuon().begin();
3745 condMu != conditions.condMuon().end(); ++condMu ){
3748 << condMu->name() <<
" {"
3749 <<
" comment: " << condMu->comment()
3750 <<
" locked: " << condMu->locked()
3754 l1t::MuonCondition condition = (*condMu);
3756 parseMuon( condition, chipNr );
3775 unsigned int chipNr) {
3777 XERCES_CPP_NAMESPACE_USE
3788 std::string algAlias = l1t2string( algorithm.name() );
3789 std::string algName = l1t2string( algorithm.name() );
3791 if (algAlias ==
"") {
3794 <<
"\n No alias defined for algorithm. Alias set to algorithm name."
3795 <<
"\n Algorithm name: " << algName <<
"\n Algorithm alias: " << algAlias
3799 LogDebug(
"l1t|Global") <<
"\n Alias defined for algorithm."
3800 <<
"\n Algorithm name: " << algName <<
"\n Algorithm alias: " << algAlias
3805 std::string logExpression = l1t2string( algorithm.logical_expression() );
3808 <<
" Logical expression: " << logExpression
3809 <<
" Chip number: " << chipNr
3813 std::string pinString = l1t2string( algorithm.index() );
3816 std::istringstream opStream(pinString);
3818 if ((opStream >> outputPin).
fail()) {
3820 <<
" Unable to convert pin string " << pinString
3821 <<
" to int for algorithm : " << algName
3829 LogDebug(
"l1t|Global") <<
" Output pin: " << outputPin
3835 int bitNumber = outputPin;
3838 LogDebug(
"l1t|Global") <<
" Bit number: " << bitNumber
3848 std::ostringstream myCoutStream;
3849 alg.
print(myCoutStream);
3850 LogTrace(
"TriggerMenuXmlParser") << myCoutStream.str() <<
"\n" << std::endl;
3855 if ( !insertAlgorithmIntoMap(alg)) {
3879 XERCES_CPP_NAMESPACE_USE
3881 LogTrace(
"TriggerMenuXmlParser") <<
"\nParsing algorithms" << std::endl;
3884 LogDebug(
"l1t|Global") <<
" ====> algorithms " << std::endl;
3885 for( l1t::AlgorithmList::algorithm_const_iterator
i = algorithms.algorithm().begin();
3886 i != algorithms.algorithm().end(); ++
i ){
3890 << algorithm.name() <<
" {"
3891 <<
" index: " << algorithm.index()
3892 <<
" equation: " << algorithm.logical_expression()
3893 <<
" comment: " << algorithm.comment()
3894 <<
" locked: " << algorithm.locked()
3899 workAlgorithm( algorithm, chipNr );
3919 XERCES_CPP_NAMESPACE_USE
3923 <<
" Node is 0 in " << __PRETTY_FUNCTION__
3924 <<
" can not parse the technical trigger " << algName
3930 std::string logExpression = getXMLTextValue(node);
3937 DOMNode* pinNode = findXMLChild(node->getFirstChild(), m_xmlTagOutput);
3941 pinNode = node->getFirstChild();
3942 if ( (pinNode = findXMLChild(pinNode, m_xmlTagOutputPin) ) != 0) {
3943 pinString = getXMLAttribute(pinNode, m_xmlAttrNr);
3946 std::istringstream opStream(pinString);
3948 if ((opStream >> outputPin).
fail()) {
3950 <<
" Unable to convert pin string " << pinString
3951 <<
" to int for technical trigger : " << algName
3961 <<
" Warning: No pin number found for technical trigger: "
3962 << algName << std::endl;
3968 int bitNumber = outputPin;
3981 std::ostringstream myCoutStream;
3982 alg.
print(myCoutStream);
3983 LogTrace(
"TriggerMenuXmlParser") << myCoutStream.str() <<
"\n" << std::endl;
3988 if ( !insertTechTriggerIntoMap(alg)) {
4008 XERCES_CPP_NAMESPACE_USE
4012 DOMNode*
doc = parser->getDocument();
4013 DOMNode*
node = doc->getFirstChild();
4015 DOMNode* algNode = node->getFirstChild();
4018 <<
" Error: No child found for " << m_xmlTagDef << std::endl;
4022 algNode = findXMLChild(algNode, m_xmlTagTechTriggers);
4025 << m_xmlTagTechTriggers <<
"> child found."
4031 DOMNode* algNameNode = algNode->getFirstChild();
4033 algNameNode = findXMLChild(algNameNode,
"",
true, &algNameNodeName);
4035 while (algNameNode != 0) {
4040 if ( !workTechTrigger(algNameNode, algNameNodeName)) {
4044 algNameNode = findXMLChild(algNameNode->getNextSibling(),
"",
true,
4064 XERCES_CPP_NAMESPACE_USE
4070 l1t::Meta meta = tm->meta();
4071 l1t::ConditionList conditions = tm->conditions();
4072 l1t::AlgorithmList algorithms = tm->algorithms();
4074 if ( !parseId( meta ) ) {
4079 if ( !parseConditions( conditions ) ) {
4084 if ( !parseAlgorithms( algorithms ) ) {
unsigned int deltaPhiMaxbits
unsigned int deltaEtaRangeLower
void setAlgoAlias(const std::string &algoAliasValue)
virtual void print(std::ostream &myCout) const
print condition
unsigned long long deltaEtaRange
const std::string algoName() const
get / set algorithm name
unsigned long long deltaPhiRange
unsigned int deltaPhiRangeLower
std::string const & algoAlias() const
get / set algorithm alias
void setAlgoChipNumber(const int algoChipNumberValue)
unsigned long long deltaPhiRange
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
unsigned int deltaEtaRangeUpper
unsigned int deltaPhiRangeLower
const int algoOutputPin(const int numberConditionChips, const int pinsOnConditionChip, const std::vector< int > &orderConditionChip) const
get the output pin on the condition chip for the algorithm
int algoBitNumber() const
get / set algorithm bit number
unsigned int deltaPhiRangeUpper
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
unsigned int deltaPhiMaxbits
unsigned int deltaPhiRangeUpper
const std::string & condName() const
get / set condition name
unsigned long long uint64_t
bool xmlFile(const std::string fParam)
typedef for correlation parameters
unsigned long long deltaEtaRange
char data[epos_bytes_allocation]
const int algoChipNumber() const
get / set algorithm bit number
static std::atomic< unsigned int > counter
unsigned int chargeCorrelation
unsigned int deltaEtaRangeLower
unsigned int deltaEtaRangeUpper