![]() |
![]() |
#include <L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuXmlParser.h>
Public Member Functions | |
const std::vector< std::vector < L1GtCaloTemplate > > & | corCaloTemplate () const |
const std::vector< std::vector < L1GtEnergySumTemplate > > & | corEnergySumTemplate () const |
const std::vector< std::vector < L1GtMuonTemplate > > & | corMuonTemplate () const |
const AlgorithmMap & | gtAlgorithmMap () const |
get / set the algorithm map | |
const std::vector< ConditionMap > & | gtConditionMap () const |
get / set / build the condition maps | |
const unsigned int | gtNumberConditionChips () const |
get / set the number of condition chips in GTL | |
const unsigned int | gtNumberL1JetCounts () const |
get / set the number of L1 jet counts received by GT | |
const unsigned int | gtNumberPhysTriggers () const |
get / set the number of physics trigger algorithms | |
const unsigned int | gtNumberTechTriggers () const |
get / set the number of technical triggers | |
std::vector< int > | gtOrderConditionChip () const |
get / set the correspondence "condition chip - GTL algorithm word" in the hardware | |
const unsigned int | gtPinsOnConditionChip () const |
get / set the number of pins on the GTL condition chips | |
const AlgorithmMap & | gtTechnicalTriggerMap () const |
get / set the technical trigger map | |
const std::string & | gtTriggerMenuName () const |
get / set the trigger menu name | |
L1GtTriggerMenuXmlParser () | |
constructor empty | |
void | parseXmlFile (const std::string &defXmlFile, const std::string &vmeXmlFile) |
parse def.xml and vme.xml files | |
void | setCorCaloTemplate (const std::vector< std::vector< L1GtCaloTemplate > > &) |
void | setCorEnergySumTemplate (const std::vector< std::vector< L1GtEnergySumTemplate > > &) |
void | setCorMuonTemplate (const std::vector< std::vector< L1GtMuonTemplate > > &) |
void | setGtAlgorithmMap (const AlgorithmMap &) |
void | setGtConditionMap (const std::vector< ConditionMap > &) |
void | setGtNumberConditionChips (const unsigned int &) |
void | setGtNumberL1JetCounts (const unsigned int &) |
void | setGtNumberPhysTriggers (const unsigned int &) |
void | setGtNumberTechTriggers (const unsigned int &) |
void | setGtOrderConditionChip (const std::vector< int > &) |
void | setGtPinsOnConditionChip (const unsigned int &) |
void | setGtTechnicalTriggerMap (const AlgorithmMap &) |
void | setGtTriggerMenuName (const std::string &) |
void | setVecCaloTemplate (const std::vector< std::vector< L1GtCaloTemplate > > &) |
void | setVecCastorTemplate (const std::vector< std::vector< L1GtCastorTemplate > > &) |
void | setVecCorrelationTemplate (const std::vector< std::vector< L1GtCorrelationTemplate > > &) |
void | setVecEnergySumTemplate (const std::vector< std::vector< L1GtEnergySumTemplate > > &) |
void | setVecHfBitCountsTemplate (const std::vector< std::vector< L1GtHfBitCountsTemplate > > &) |
void | setVecHfRingEtSumsTemplate (const std::vector< std::vector< L1GtHfRingEtSumsTemplate > > &) |
void | setVecJetCountsTemplate (const std::vector< std::vector< L1GtJetCountsTemplate > > &) |
void | setVecMuonTemplate (const std::vector< std::vector< L1GtMuonTemplate > > &) |
const std::vector< std::vector < L1GtCaloTemplate > > & | vecCaloTemplate () const |
const std::vector< std::vector < L1GtCastorTemplate > > & | vecCastorTemplate () const |
const std::vector< std::vector < L1GtCorrelationTemplate > > & | vecCorrelationTemplate () const |
const std::vector< std::vector < L1GtEnergySumTemplate > > & | vecEnergySumTemplate () const |
const std::vector< std::vector < L1GtHfBitCountsTemplate > > & | vecHfBitCountsTemplate () const |
const std::vector< std::vector < L1GtHfRingEtSumsTemplate > > & | vecHfRingEtSumsTemplate () const |
const std::vector< std::vector < L1GtJetCountsTemplate > > & | vecJetCountsTemplate () const |
const std::vector< std::vector < L1GtMuonTemplate > > & | vecMuonTemplate () const |
get / set the vectors containing the conditions | |
virtual | ~L1GtTriggerMenuXmlParser () |
destructor | |
Private Member Functions | |
void | cleanupXML (XERCES_CPP_NAMESPACE::XercesDOMParser *parser) |
shutdown the xml utils and deallocate parser and error handler | |
void | clearMaps () |
clearMaps - delete all conditions and algorithms in the maps and clear the maps. | |
bool | countConditionChildMaxBits (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &childName, unsigned int &dst) |
get the number of bits in the max attribute of a condition child | |
XERCES_CPP_NAMESPACE::DOMNode * | findXMLChild (XERCES_CPP_NAMESPACE::DOMNode *startChild, const std::string &tagName, bool beginOnly=false, std::string *rest=0) |
find a named child of a xml node | |
int | getBitFromNode (XERCES_CPP_NAMESPACE::DOMNode *node) |
get bit from a bit node | |
bool | getConditionChildValues (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &childName, unsigned int num, std::vector< boost::uint64_t > &dst) |
get values from a child of a condition | |
int | getGEqFlag (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &nodeName) |
getGEqFlag - get the "greater or equal flag" from a condition | |
bool | getMuonMipIsoBits (XERCES_CPP_NAMESPACE::DOMNode *node, unsigned int num, std::vector< bool > &mipDst, std::vector< bool > &isoEnDst, std::vector< bool > &isoReqDst) |
get MIP and Isolation bits from a muon | |
int | getNumFromType (const std::string &type) |
get number of particles from condition type | |
L1GtConditionType | getTypeFromType (const std::string &type) |
get the type of the condition, as defined in enum, from the condition type as defined in the XML file | |
std::string | getXMLAttribute (const XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &name) |
get a named attribute for an xml node as string | |
bool | getXMLHexTextValue (XERCES_CPP_NAMESPACE::DOMNode *node, boost::uint64_t &dst) |
get a hexadecimal value of a xml node containing text | |
bool | getXMLHexTextValue128 (XERCES_CPP_NAMESPACE::DOMNode *node, boost::uint64_t &dstL, boost::uint64_t &dstH) |
get a hexadecimal value of a xml node containing text with up to 128 bit | |
std::string | getXMLTextValue (XERCES_CPP_NAMESPACE::DOMNode *node) |
get the text value of a xml node as string | |
bool | hexString2UInt128 (const std::string &hexString, boost::uint64_t &dstL, boost::uint64_t &dstH) |
convert a hexadecimal string with up to 128 to 2 boost::uint64_t | |
XERCES_CPP_NAMESPACE::XercesDOMParser * | initXML (const std::string &xmlFile) |
init xml system | |
bool | insertAlgorithmIntoMap (const L1GtAlgorithm &alg) |
insert an algorithm into algorithm map | |
bool | insertConditionIntoMap (L1GtCondition &cond, const int chipNr) |
insertConditionIntoMap - safe insert of condition into condition map. | |
bool | insertTechTriggerIntoMap (const L1GtAlgorithm &alg) |
insert a technical trigger into technical trigger map | |
boost::uint64_t | mirror (const boost::uint64_t oldLUT, int maxBitsLUT, int maxBitsReal) |
FIXME remove it after new L1 Trigger Menu Editor available mirrors the LUT table from GTgui format to correct bit format. | |
bool | parseAlgorithms (XERCES_CPP_NAMESPACE::XercesDOMParser *parser) |
parse all algorithms | |
bool | parseCalo (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &name, unsigned int chipNr=0, const bool corrFlag=false) |
parse a calorimeter condition | |
bool | parseCastor (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &name, unsigned int chipNr=0) |
parse a CASTOR condition | |
bool | parseConditions (XERCES_CPP_NAMESPACE::XercesDOMParser *parser) |
parse all conditions | |
bool | parseCorrelation (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &name, unsigned int chipNr=0) |
parse a correlation condition | |
bool | parseEnergySum (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &name, unsigned int chipNr=0, const bool corrFlag=false) |
parse an "energy sum" condition | |
bool | parseHfBitCounts (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &name, unsigned int chipNr=0) |
parse a HfBitCounts condition | |
bool | parseHfRingEtSums (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &name, unsigned int chipNr=0) |
parse a HfRingEtSums condition | |
bool | parseJetCounts (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &name, unsigned int chipNr=0) |
parse a "jet counts" condition | |
bool | parseMuon (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &name, unsigned int chipNr=0, const bool corrFlag=false) |
parse a muon condition | |
bool | parseTechTriggers (XERCES_CPP_NAMESPACE::XercesDOMParser *parser) |
parse all algorithms | |
bool | parseVmeXML (XERCES_CPP_NAMESPACE::XercesDOMParser *parser) |
parse the vme xml file | |
bool | workAlgorithm (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &name, unsigned int chipNr) |
parse an algorithm and insert it into algorithm map. | |
bool | workCondition (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &name, unsigned int chipNr) |
choose the parser for a particular condition | |
bool | workTechTrigger (XERCES_CPP_NAMESPACE::DOMNode *node, const std::string &name) |
parse an algorithm and insert it into algorithm map. | |
bool | workXML (XERCES_CPP_NAMESPACE::XercesDOMParser *parser) |
do all the steps for filling a trigger menu | |
Private Attributes | |
AlgorithmMap | m_algorithmMap |
map containing the physics algorithms | |
std::vector< ConditionMap > | m_conditionMap |
map containing the conditions (per condition chip) - transient | |
std::vector< std::vector < L1GtCaloTemplate > > | m_corCaloTemplate |
std::vector< std::vector < L1GtEnergySumTemplate > > | m_corEnergySumTemplate |
std::vector< std::vector < L1GtMuonTemplate > > | m_corMuonTemplate |
unsigned int | m_numberConditionChips |
hardware limits | |
unsigned int | m_numberL1JetCounts |
jet counts | |
unsigned int | m_numberPhysTriggers |
number of physics trigger algorithms | |
unsigned int | m_numberTechTriggers |
number of technical triggers | |
std::vector< int > | m_orderConditionChip |
correspondence "condition chip - GTL algorithm word" in the hardware chip 2: 0 - 95; chip 1: 96 - 128 (191) | |
unsigned int | m_pinsOnConditionChip |
number of pins on the GTL condition chips | |
AlgorithmMap | m_technicalTriggerMap |
map containing the technical triggers | |
std::string | m_triggerMenuName |
menu name | |
std::vector< std::vector < L1GtCaloTemplate > > | m_vecCaloTemplate |
std::vector< std::vector < L1GtCastorTemplate > > | m_vecCastorTemplate |
std::vector< std::vector < L1GtCorrelationTemplate > > | m_vecCorrelationTemplate |
std::vector< std::vector < L1GtEnergySumTemplate > > | m_vecEnergySumTemplate |
std::vector< std::vector < L1GtHfBitCountsTemplate > > | m_vecHfBitCountsTemplate |
std::vector< std::vector < L1GtHfRingEtSumsTemplate > > | m_vecHfRingEtSumsTemplate |
std::vector< std::vector < L1GtJetCountsTemplate > > | m_vecJetCountsTemplate |
std::vector< std::vector < L1GtMuonTemplate > > | m_vecMuonTemplate |
vectors containing the conditions explicit, due to persistency. | |
XERCES_CPP_NAMESPACE::ErrorHandler * | m_xmlErrHandler |
error handler for xml-parser |
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Definition at line 52 of file L1GtTriggerMenuXmlParser.h.
L1GtTriggerMenuXmlParser::L1GtTriggerMenuXmlParser | ( | ) |
constructor empty
Definition at line 41 of file L1GtTriggerMenuXmlParser.cc.
References m_xmlErrHandler.
00041 : L1GtXmlParserTags() 00042 { 00043 // error handler for xml-parser 00044 m_xmlErrHandler = 0; 00045 00046 }
L1GtTriggerMenuXmlParser::~L1GtTriggerMenuXmlParser | ( | ) | [virtual] |
destructor
Definition at line 49 of file L1GtTriggerMenuXmlParser.cc.
References clearMaps().
00049 { 00050 00051 clearMaps(); 00052 00053 }
void L1GtTriggerMenuXmlParser::cleanupXML | ( | XERCES_CPP_NAMESPACE::XercesDOMParser * | parser | ) | [private] |
shutdown the xml utils and deallocate parser and error handler
cleanupXML - Delete parser and error handler.
Shutdown XMLPlatformUtils.
parser | A reference to the parser to be deleted. |
Definition at line 812 of file L1GtTriggerMenuXmlParser.cc.
References m_xmlErrHandler.
Referenced by parseXmlFile().
00812 { 00813 00814 XERCES_CPP_NAMESPACE_USE 00815 00816 if (parser != 0) { 00817 delete parser; 00818 } 00819 00820 if (m_xmlErrHandler != 0) { 00821 delete m_xmlErrHandler; 00822 m_xmlErrHandler = 0; 00823 } 00824 00825 XMLPlatformUtils::Terminate(); 00826 00827 }
void L1GtTriggerMenuXmlParser::clearMaps | ( | ) | [private] |
clearMaps - delete all conditions and algorithms in the maps and clear the maps.
Definition at line 953 of file L1GtTriggerMenuXmlParser.cc.
References m_algorithmMap, and m_conditionMap.
Referenced by workXML(), and ~L1GtTriggerMenuXmlParser().
00953 { 00954 00955 // loop over condition maps (one map per condition chip) 00956 // then loop over conditions in the map 00957 for (std::vector<ConditionMap>::iterator itCondOnChip = m_conditionMap.begin(); itCondOnChip 00958 != m_conditionMap.end(); itCondOnChip++) { 00959 00960 // the conditions in the maps are deleted in L1GtTriggerMenu, not here 00961 00962 itCondOnChip->clear(); 00963 00964 } 00965 00966 // the algorithms in the maps are deleted in L1GtTriggerMenu, not here 00967 m_algorithmMap.clear(); 00968 00969 }
const std::vector<std::vector<L1GtCaloTemplate> >& L1GtTriggerMenuXmlParser::corCaloTemplate | ( | ) | const [inline] |
Definition at line 204 of file L1GtTriggerMenuXmlParser.h.
References m_corCaloTemplate.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00204 { 00205 return m_corCaloTemplate; 00206 }
const std::vector<std::vector<L1GtEnergySumTemplate> >& L1GtTriggerMenuXmlParser::corEnergySumTemplate | ( | ) | const [inline] |
Definition at line 211 of file L1GtTriggerMenuXmlParser.h.
References m_corEnergySumTemplate.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00211 { 00212 00213 return m_corEnergySumTemplate; 00214 }
const std::vector<std::vector<L1GtMuonTemplate> >& L1GtTriggerMenuXmlParser::corMuonTemplate | ( | ) | const [inline] |
Definition at line 197 of file L1GtTriggerMenuXmlParser.h.
References m_corMuonTemplate.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00197 { 00198 return m_corMuonTemplate; 00199 }
bool L1GtTriggerMenuXmlParser::countConditionChildMaxBits | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | childName, | |||
unsigned int & | dst | |||
) | [private] |
get the number of bits in the max attribute of a condition child
countConditionChildMaxBits Count the set bits in the max attribute.
Needed for the wsc-values to determine 180 degree.
node | The xml node of the condition. | |
childName | The name of the child | |
dst | The destination to write the number of bits. |
Definition at line 625 of file L1GtTriggerMenuXmlParser.cc.
References counter(), lat::endl(), findXMLChild(), getXMLAttribute(), hexString2UInt128(), LogDebug, L1GtXmlParserTags::m_xmlAttrMax, and L1GtXmlParserTags::m_xmlTagValue.
Referenced by parseCalo(), parseCorrelation(), and parseMuon().
00626 { 00627 00628 XERCES_CPP_NAMESPACE_USE 00629 00630 // should never happen... 00631 if (node == 0) { 00632 00633 LogDebug("L1GtTriggerMenuXmlParser") 00634 << "node == 0 in " << __PRETTY_FUNCTION__ << std::endl; 00635 00636 return false; 00637 } 00638 00639 DOMNode* n1 = findXMLChild(node->getFirstChild(), childName); 00640 00641 if (n1 == 0) { 00642 00643 LogDebug("L1GtTriggerMenuXmlParser") << "Child of condition not found ( " << childName 00644 << ")" << std::endl; 00645 00646 return false; 00647 } 00648 00649 DOMNode* n2 = findXMLChild(n1->getFirstChild(), m_xmlTagValue); 00650 00651 if (n2 == 0) { 00652 00653 LogDebug("L1GtTriggerMenuXmlParser") << "No value tag found for child " << childName 00654 << " in " << __PRETTY_FUNCTION__ << std::endl; 00655 00656 return false; 00657 } 00658 00659 // first try direct 00660 std::string maxString = getXMLAttribute(n1, m_xmlAttrMax); // string for the maxbits 00661 00662 if (maxString.empty() ) { 00663 maxString = getXMLAttribute(n2, m_xmlAttrMax); // try next value tag 00664 // if no max was found neither in value nor in the childName tag 00665 if (maxString.empty() ) { 00666 00667 LogDebug("L1GtTriggerMenuXmlParser") << "No Max value found for " << childName 00668 << std::endl; 00669 00670 return false; 00671 } 00672 } 00673 00674 // do the hex conversion 00675 00676 boost::uint64_t maxBitsL, maxBitsH; 00677 if ( !hexString2UInt128(maxString, maxBitsL, maxBitsH) ) { 00678 return false; 00679 } 00680 00681 // count the bits 00682 //LogTrace("L1GtTriggerMenuXmlParser") 00683 //<< std::dec 00684 //<< " words: dec: high (MSB) word = " << maxBitsH << " low word = " << maxBitsL 00685 //<< std::hex << "\n" 00686 //<< " words: hex: high (MSB) word = " << maxBitsH << " low word = " << maxBitsL 00687 //<< std::dec 00688 //<< std::endl; 00689 00690 unsigned int counter = 0; 00691 00692 while (maxBitsL != 0) { 00693 // check if bits set countinously 00694 if ( (maxBitsL & 1) == 0) { 00695 00696 edm::LogError("L1GtTriggerMenuXmlParser") 00697 << " Confused by not continous set bits for max value " << maxString 00698 << "(child=" << childName << ")" << std::endl; 00699 00700 return false; 00701 } 00702 00703 maxBitsL >>= 1; 00704 counter++; 00705 } 00706 00707 if ( (maxBitsH != 0) && (counter != 64)) { 00708 00709 edm::LogError("L1GtTriggerMenuXmlParser") 00710 << " Confused by not continous set bits for max value " << maxString << "(child=" 00711 << childName << ")" << std::endl; 00712 00713 return false; 00714 } 00715 00716 while (maxBitsH != 0) { 00717 //check if bits set countinously 00718 if ( (maxBitsH & 1) == 0) { 00719 00720 edm::LogError("L1GtTriggerMenuXmlParser") 00721 << " Confused by not continous set bits for max value " << maxString 00722 << "(child=" << childName << ")" << std::endl; 00723 00724 return false; 00725 } 00726 00727 maxBitsH >>= 1; 00728 counter++; 00729 } 00730 00731 dst = counter; 00732 return true; 00733 00734 }
XERCES_CPP_NAMESPACE::DOMNode * L1GtTriggerMenuXmlParser::findXMLChild | ( | XERCES_CPP_NAMESPACE::DOMNode * | startChild, | |
const std::string & | tagName, | |||
bool | beginOnly = false , |
|||
std::string * | rest = 0 | |||
) | [private] |
find a named child of a xml node
Definition at line 330 of file L1GtTriggerMenuXmlParser.cc.
References release(), and transcode().
Referenced by countConditionChildMaxBits(), getConditionChildValues(), getGEqFlag(), getMuonMipIsoBits(), parseAlgorithms(), parseConditions(), parseCorrelation(), parseEnergySum(), parseMuon(), parseTechTriggers(), parseVmeXML(), workAlgorithm(), and workTechTrigger().
00332 { 00333 00334 XERCES_CPP_NAMESPACE_USE 00335 00336 char* nodeName = 0; 00337 00338 DOMNode *n1 = startChild; 00339 if (n1 == 0) { 00340 return 0; 00341 } 00342 00343 if ( !tagName.empty() ) { 00344 nodeName = XMLString::transcode(n1->getNodeName()); 00345 00346 if (!beginOnly) { 00347 //match the whole tag 00348 while (XMLString::compareIString(nodeName, tagName.c_str())) { 00349 00350 XMLString::release(&nodeName); 00351 n1 = n1->getNextSibling(); 00352 if (n1 == 0) { 00353 break; 00354 } 00355 00356 nodeName = XMLString::transcode(n1->getNodeName()); 00357 } 00358 } 00359 else { 00360 // match only the beginning 00361 while (XMLString::compareNIString(nodeName, tagName.c_str(), tagName.length())) { 00362 XMLString::release(&nodeName); 00363 n1 = n1->getNextSibling(); 00364 if (n1 == 0) { 00365 break; 00366 } 00367 00368 nodeName = XMLString::transcode(n1->getNodeName()); 00369 } 00370 if (n1 != 0 && rest != 0) { 00371 *rest = std::string(nodeName).substr(tagName.length(), strlen(nodeName) - tagName.length()); 00372 } 00373 } 00374 } 00375 else { // empty string given 00376 while (n1->getNodeType() != DOMNode::ELEMENT_NODE) { 00377 n1 = n1->getNextSibling(); 00378 if (n1 == 0) { 00379 break; 00380 } 00381 00382 } 00383 if (n1 != 0 && rest != 0) { 00384 nodeName = XMLString::transcode(n1->getNodeName()); 00385 *rest = std::string(nodeName); 00386 } 00387 } 00388 00389 XMLString::release(&nodeName); 00390 00391 return n1; 00392 00393 }
int L1GtTriggerMenuXmlParser::getBitFromNode | ( | XERCES_CPP_NAMESPACE::DOMNode * | node | ) | [private] |
get bit from a bit node
getBitFromNode Get a bit from a specified bitvalue node.
node | The xml node. |
Definition at line 1223 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), getXMLAttribute(), getXMLTextValue(), L1GtXmlParserTags::m_xmlAttrMode, and L1GtXmlParserTags::m_xmlAttrModeBit.
Referenced by getGEqFlag(), getMuonMipIsoBits(), and parseEnergySum().
01223 { 01224 01225 if (getXMLAttribute(node, m_xmlAttrMode) != m_xmlAttrModeBit) { 01226 01227 edm::LogError("L1GtTriggerMenuXmlParser") << "Invalid mode for single bit" << std::endl; 01228 01229 return -1; 01230 } 01231 01232 std::string tmpStr = getXMLTextValue(node); 01233 if (tmpStr == "0") { 01234 return 0; 01235 } 01236 else if (tmpStr == "1") { 01237 return 1; 01238 } 01239 else { 01240 edm::LogError("L1GtTriggerMenuXmlParser") << "Bad bit value (" << tmpStr << ")" 01241 << std::endl; 01242 return -1; 01243 } 01244 }
bool L1GtTriggerMenuXmlParser::getConditionChildValues | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | childName, | |||
unsigned int | num, | |||
std::vector< boost::uint64_t > & | dst | |||
) | [private] |
get values from a child of a condition
getConditionChildValues - Get values from a child of a condition.
node | The xml node of the condition. | |
childName | The name of the child the values should be extracted from. | |
num | The number of values needed. | |
dst | A pointer to a vector of boost::uint64_t where the results are written. |
Definition at line 747 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), findXMLChild(), getXMLHexTextValue(), i, LogDebug, and L1GtXmlParserTags::m_xmlTagValue.
Referenced by parseCalo(), parseEnergySum(), parseHfBitCounts(), parseHfRingEtSums(), parseJetCounts(), and parseMuon().
00748 { 00749 00750 XERCES_CPP_NAMESPACE_USE 00751 00752 if (node == 0) { 00753 00754 LogDebug("L1GtTriggerMenuXmlParser") 00755 << "node == 0 in " << __PRETTY_FUNCTION__ 00756 << std::endl; 00757 00758 return false; 00759 } 00760 00761 DOMNode* n1 = findXMLChild(node->getFirstChild(), childName); 00762 00763 // if child not found 00764 if (n1 == 0) { 00765 00766 LogDebug("L1GtTriggerMenuXmlParser") << "Child of condition not found ( " << childName 00767 << ")" << std::endl; 00768 00769 return false; 00770 } 00771 00772 // no values are sucessfull 00773 if (num == 0) { 00774 return true; 00775 } 00776 00777 // 00778 dst.reserve(num); 00779 00780 // 00781 n1 = findXMLChild(n1->getFirstChild(), m_xmlTagValue); 00782 for (unsigned int i = 0; i < num; i++) { 00783 if (n1 == 0) { 00784 00785 LogDebug("L1GtTriggerMenuXmlParser") << "Not enough values in condition child ( " 00786 << childName << ")" << std::endl; 00787 00788 return false; 00789 } 00790 00791 if ( !getXMLHexTextValue(n1, dst[i]) ) { 00792 00793 edm::LogError("L1GtTriggerMenuXmlParser") << "Error converting condition child ( " 00794 << childName << ") value." << std::endl; 00795 00796 return false; 00797 } 00798 00799 n1 = findXMLChild(n1->getNextSibling(), m_xmlTagValue); // next child 00800 } 00801 00802 return true; 00803 }
int L1GtTriggerMenuXmlParser::getGEqFlag | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | nodeName | |||
) | [private] |
getGEqFlag - get the "greater or equal flag" from a condition
node | The xml node of the condition. The name of the node from which the flag is a subchild. |
Definition at line 1255 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), findXMLChild(), getBitFromNode(), LogDebug, and L1GtXmlParserTags::m_xmlTagGEq.
Referenced by parseCalo(), parseCorrelation(), parseEnergySum(), parseHfBitCounts(), parseHfRingEtSums(), parseJetCounts(), and parseMuon().
01256 { 01257 01258 XERCES_CPP_NAMESPACE_USE 01259 01260 if (node == 0) { 01261 01262 LogDebug("L1GtTriggerMenuXmlParser") 01263 << "node == 0 in " << __PRETTY_FUNCTION__ 01264 << std::endl; 01265 01266 return -1; 01267 } 01268 01269 // usually the GEq flag is a child of the first child (the first element node) 01270 DOMNode* n1 = node->getFirstChild(); 01271 n1 = findXMLChild(n1, nodeName); 01272 01273 if (n1 != 0) { 01274 n1 = findXMLChild(n1->getFirstChild(), m_xmlTagGEq); 01275 if (n1 == 0) { 01276 01277 LogDebug("L1GtTriggerMenuXmlParser") << "No \"greater or equal\" tag found" 01278 << std::endl; 01279 01280 return -1; 01281 } 01282 01283 return getBitFromNode(n1); 01284 } 01285 else { 01286 01287 return -1; 01288 01289 } 01290 01291 }
bool L1GtTriggerMenuXmlParser::getMuonMipIsoBits | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
unsigned int | num, | |||
std::vector< bool > & | mipDst, | |||
std::vector< bool > & | isoEnDst, | |||
std::vector< bool > & | isoReqDst | |||
) | [private] |
get MIP and Isolation bits from a muon
getMuonMipIsoBits - get MIP and Isolation bits from a muon.
node | The node of the condition. | |
num | The number of bits required. | |
mipDst | A pointer to the vector of the MIP bits. | |
isoEnDst | A pointer to the vector of the "enable isolation" bits. | |
isoReqDst | A pointer to the vector of the "request isolation" bits. |
Definition at line 1305 of file L1GtTriggerMenuXmlParser.cc.
References findXMLChild(), getBitFromNode(), i, L1GtXmlParserTags::m_xmlTagEnableIso, L1GtXmlParserTags::m_xmlTagEnableMip, L1GtXmlParserTags::m_xmlTagPtLowThreshold, L1GtXmlParserTags::m_xmlTagRequestIso, and L1GtXmlParserTags::m_xmlTagValue.
Referenced by parseMuon().
01307 { 01308 01309 XERCES_CPP_NAMESPACE_USE 01310 01311 if (node == 0) { 01312 return false; 01313 } 01314 01315 // find ptLowThreshold child 01316 DOMNode* n1 = findXMLChild(node->getFirstChild(), m_xmlTagPtLowThreshold); 01317 01318 if (n1 == 0) { 01319 return false; 01320 } 01321 01322 // get first value tag 01323 n1 = findXMLChild(n1->getFirstChild(), m_xmlTagValue); 01324 01325 for (unsigned int i = 0; i < num; i++) { 01326 01327 if (n1 == 0) { 01328 return false; 01329 } 01330 01331 // MIP bit 01332 01333 DOMNode* bitnode = findXMLChild(n1->getFirstChild(), m_xmlTagEnableMip); 01334 if (bitnode == 0) { 01335 return true; 01336 } 01337 01338 int tmpint = getBitFromNode(bitnode); 01339 if (tmpint < 0) { 01340 return false; 01341 } 01342 01343 mipDst[i] = (tmpint != 0); 01344 01345 //LogTrace("L1GtTriggerMenuXmlParser") 01346 //<< " MIP bit value for muon " << i << " = " << mipDst[i] 01347 //<< std::endl; 01348 01349 01350 // enable iso bit 01351 bitnode = findXMLChild(n1->getFirstChild(), m_xmlTagEnableIso); 01352 if (bitnode == 0) { 01353 return true; 01354 } 01355 01356 tmpint = getBitFromNode(bitnode); 01357 if (tmpint < 0) { 01358 return false; 01359 } 01360 01361 isoEnDst[i] = (tmpint != 0); 01362 01363 //LogTrace("L1GtTriggerMenuXmlParser") 01364 //<< " Enabled iso bit value for muon " << i << " = " << isoEnDst[i] 01365 //<< std::endl; 01366 01367 // request iso bit 01368 bitnode = findXMLChild(n1->getFirstChild(), m_xmlTagRequestIso); 01369 if (bitnode == 0) { 01370 return true; 01371 } 01372 01373 tmpint = getBitFromNode(bitnode); 01374 if (tmpint < 0) { 01375 return false; 01376 } 01377 01378 isoReqDst[i] = (tmpint != 0); 01379 01380 //LogTrace("L1GtTriggerMenuXmlParser") 01381 //<< " Request iso bit value for muon " << i << " = " << isoReqDst[i] 01382 //<< std::endl; 01383 01384 // 01385 n1 = findXMLChild(n1->getNextSibling(), m_xmlTagValue); // next value 01386 } 01387 01388 return true; 01389 }
int L1GtTriggerMenuXmlParser::getNumFromType | ( | const std::string & | type | ) | [private] |
get number of particles from condition type
getNumFromType - get the number of particles from a specified type name (for calorimeter objects and muons)
type | The name of the type |
Definition at line 1186 of file L1GtTriggerMenuXmlParser.cc.
References L1GtXmlParserTags::m_xmlConditionAttrType1s, L1GtXmlParserTags::m_xmlConditionAttrType2cor, L1GtXmlParserTags::m_xmlConditionAttrType2s, L1GtXmlParserTags::m_xmlConditionAttrType2wsc, L1GtXmlParserTags::m_xmlConditionAttrType3s, and L1GtXmlParserTags::m_xmlConditionAttrType4s.
Referenced by parseCalo(), and parseMuon().
01186 { 01187 01188 if (type == m_xmlConditionAttrType1s) { 01189 return 1; 01190 } 01191 01192 if (type == m_xmlConditionAttrType2s) { 01193 return 2; 01194 } 01195 01196 if (type == m_xmlConditionAttrType3s) { 01197 return 3; 01198 } 01199 01200 if (type == m_xmlConditionAttrType4s) { 01201 return 4; 01202 } 01203 01204 if (type == m_xmlConditionAttrType2wsc) { 01205 return 2; 01206 } 01207 01208 if (type == m_xmlConditionAttrType2cor) { 01209 return 2; 01210 } 01211 01212 return -1; 01213 }
L1GtConditionType L1GtTriggerMenuXmlParser::getTypeFromType | ( | const std::string & | type | ) | [private] |
get the type of the condition, as defined in enum, from the condition type as defined in the XML file
Definition at line 1148 of file L1GtTriggerMenuXmlParser.cc.
References L1GtXmlParserTags::m_xmlConditionAttrType1s, L1GtXmlParserTags::m_xmlConditionAttrType2cor, L1GtXmlParserTags::m_xmlConditionAttrType2s, L1GtXmlParserTags::m_xmlConditionAttrType2wsc, L1GtXmlParserTags::m_xmlConditionAttrType3s, L1GtXmlParserTags::m_xmlConditionAttrType4s, Type1s, Type2cor, Type2s, Type2wsc, Type3s, Type4s, and TypeNull.
Referenced by parseCalo(), and parseMuon().
01148 { 01149 01150 if (type == m_xmlConditionAttrType1s) { 01151 return Type1s; 01152 } 01153 01154 if (type == m_xmlConditionAttrType2s) { 01155 return Type2s; 01156 } 01157 01158 if (type == m_xmlConditionAttrType3s) { 01159 return Type3s; 01160 } 01161 01162 if (type == m_xmlConditionAttrType4s) { 01163 return Type4s; 01164 } 01165 01166 if (type == m_xmlConditionAttrType2wsc) { 01167 return Type2wsc; 01168 } 01169 01170 if (type == m_xmlConditionAttrType2cor) { 01171 return Type2cor; 01172 } 01173 01174 return TypeNull; 01175 }
std::string L1GtTriggerMenuXmlParser::getXMLAttribute | ( | const XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | name | |||
) | [private] |
get a named attribute for an xml node as string
getXMLAttribute - get a named attribute from a node
node | The node to get the attribute from | |
name | The name of the attribut to get |
Definition at line 404 of file L1GtTriggerMenuXmlParser.cc.
References asciidump::attributes, release(), and transcode().
Referenced by countConditionChildMaxBits(), getBitFromNode(), parseCalo(), parseCastor(), parseCorrelation(), parseEnergySum(), parseHfBitCounts(), parseHfRingEtSums(), parseJetCounts(), parseMuon(), workAlgorithm(), workCondition(), and workTechTrigger().
00405 { 00406 00407 XERCES_CPP_NAMESPACE_USE 00408 00409 std::string ret; 00410 00411 // get attributes list 00412 DOMNamedNodeMap* attributes = node->getAttributes(); 00413 if (attributes == 0) { 00414 return ret; 00415 } 00416 00417 // get attribute node 00418 XMLCh* attrName = XMLString::transcode(name.c_str()); 00419 DOMNode* attribNode = attributes->getNamedItem(attrName); 00420 00421 XMLString::release(&attrName); 00422 if (attribNode == 0) { 00423 return ret; 00424 } 00425 00426 char* retCstr = XMLString::transcode(attribNode->getNodeValue()); 00427 ret = retCstr; 00428 XMLString::release(&retCstr); 00429 00430 return ret; 00431 }
bool L1GtTriggerMenuXmlParser::getXMLHexTextValue | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
boost::uint64_t & | dst | |||
) | [private] |
get a hexadecimal value of a xml node containing text
getXMLHexTextValue Get the integer representation of a xml text child representing a hex value
node | The xml node to get the value from. | |
dst | The destination the value is written to. |
Definition at line 594 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), and getXMLHexTextValue128().
Referenced by getConditionChildValues(), and parseMuon().
00595 { 00596 00597 boost::uint64_t dummyH; // dummy for eventual higher 64bit 00598 boost::uint64_t tempUInt; // temporary unsigned integer 00599 00600 if ( !getXMLHexTextValue128(node, tempUInt, dummyH) ) { 00601 return false; 00602 } 00603 00604 if (dummyH != 0) { 00605 edm::LogError("L1GtTriggerMenuXmlParser") << "Too large hex-value!" << std::endl; 00606 return false; 00607 } 00608 00609 dst = tempUInt; 00610 00611 return true; 00612 }
bool L1GtTriggerMenuXmlParser::getXMLHexTextValue128 | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
boost::uint64_t & | dstL, | |||
boost::uint64_t & | dstH | |||
) | [private] |
get a hexadecimal value of a xml node containing text with up to 128 bit
getXMLHexTextValue128 Get the integer representation of a xml-node containing a hexadecimal value.
The value may contain up to 128 bits.
node - The reference to the node to get the value from. dstL - The destination for the lower 64bit dstH - The destination for the higher 64bit
Definition at line 560 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), getXMLTextValue(), hexString2UInt128(), and LogDebug.
Referenced by getXMLHexTextValue(), parseEnergySum(), and parseMuon().
00561 { 00562 00563 if (node == 0) { 00564 00565 LogDebug("L1GtTriggerMenuXmlParser") << "node == 0 in " << __PRETTY_FUNCTION__ << std::endl; 00566 00567 return false; 00568 } 00569 00570 boost::uint64_t tempUIntH, tempUIntL; 00571 00572 std::string tempStr = getXMLTextValue(node); 00573 if ( !hexString2UInt128(tempStr, tempUIntL, tempUIntH) ) { 00574 return false; 00575 } 00576 00577 dstL = tempUIntL; 00578 dstH = tempUIntH; 00579 00580 return true; 00581 }
std::string L1GtTriggerMenuXmlParser::getXMLTextValue | ( | XERCES_CPP_NAMESPACE::DOMNode * | node | ) | [private] |
get the text value of a xml node as string
getXMLTextValue - get the textvalue from a specified node
node | The reference to the node. |
Definition at line 441 of file L1GtTriggerMenuXmlParser.cc.
References release(), and transcode().
Referenced by getBitFromNode(), getXMLHexTextValue128(), parseCorrelation(), workAlgorithm(), and workTechTrigger().
00441 { 00442 00443 XERCES_CPP_NAMESPACE_USE 00444 00445 std::string ret; 00446 00447 DOMNode* n1 = node; 00448 if (n1 == 0) { 00449 return ret; 00450 } 00451 00452 const XMLCh* retXmlCh = n1->getTextContent(); 00453 if (retXmlCh == 0) { 00454 return ret; 00455 } 00456 00457 char* retCstr = XMLString::transcode(retXmlCh); 00458 XMLString::trim(retCstr); // trim spaces 00459 00460 ret = retCstr; 00461 XMLString::release(&retCstr); 00462 00463 return ret; 00464 }
const AlgorithmMap& L1GtTriggerMenuXmlParser::gtAlgorithmMap | ( | ) | const [inline] |
get / set the algorithm map
Definition at line 220 of file L1GtTriggerMenuXmlParser.h.
References m_algorithmMap.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00220 { 00221 return m_algorithmMap; 00222 }
const std::vector<ConditionMap>& L1GtTriggerMenuXmlParser::gtConditionMap | ( | ) | const [inline] |
get / set / build the condition maps
Definition at line 112 of file L1GtTriggerMenuXmlParser.h.
References m_conditionMap.
00112 { 00113 return m_conditionMap; 00114 }
const unsigned int L1GtTriggerMenuXmlParser::gtNumberConditionChips | ( | ) | const [inline] |
get / set the number of condition chips in GTL
Definition at line 67 of file L1GtTriggerMenuXmlParser.h.
References m_numberConditionChips.
00067 { 00068 return m_numberConditionChips; 00069 }
const unsigned int L1GtTriggerMenuXmlParser::gtNumberL1JetCounts | ( | ) | const [inline] |
get / set the number of L1 jet counts received by GT
Definition at line 103 of file L1GtTriggerMenuXmlParser.h.
References m_numberL1JetCounts.
00103 { 00104 return m_numberL1JetCounts; 00105 }
const unsigned int L1GtTriggerMenuXmlParser::gtNumberPhysTriggers | ( | ) | const [inline] |
get / set the number of physics trigger algorithms
Definition at line 89 of file L1GtTriggerMenuXmlParser.h.
References m_numberPhysTriggers.
00089 { 00090 return m_numberPhysTriggers; 00091 }
const unsigned int L1GtTriggerMenuXmlParser::gtNumberTechTriggers | ( | ) | const [inline] |
get / set the number of technical triggers
Definition at line 96 of file L1GtTriggerMenuXmlParser.h.
References m_numberTechTriggers.
00096 { 00097 return m_numberTechTriggers; 00098 }
std::vector<int> L1GtTriggerMenuXmlParser::gtOrderConditionChip | ( | ) | const [inline] |
get / set the correspondence "condition chip - GTL algorithm word" in the hardware
Definition at line 82 of file L1GtTriggerMenuXmlParser.h.
References m_orderConditionChip.
00082 { 00083 return m_orderConditionChip; 00084 }
const unsigned int L1GtTriggerMenuXmlParser::gtPinsOnConditionChip | ( | ) | const [inline] |
get / set the number of pins on the GTL condition chips
Definition at line 74 of file L1GtTriggerMenuXmlParser.h.
References m_pinsOnConditionChip.
00074 { 00075 return m_pinsOnConditionChip; 00076 }
const AlgorithmMap& L1GtTriggerMenuXmlParser::gtTechnicalTriggerMap | ( | ) | const [inline] |
get / set the technical trigger map
Definition at line 227 of file L1GtTriggerMenuXmlParser.h.
References m_technicalTriggerMap.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00227 { 00228 return m_technicalTriggerMap; 00229 }
const std::string& L1GtTriggerMenuXmlParser::gtTriggerMenuName | ( | ) | const [inline] |
get / set the trigger menu name
Definition at line 119 of file L1GtTriggerMenuXmlParser.h.
References m_triggerMenuName.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00119 { 00120 return m_triggerMenuName; 00121 }
bool L1GtTriggerMenuXmlParser::hexString2UInt128 | ( | const std::string & | hexString, | |
boost::uint64_t & | dstL, | |||
boost::uint64_t & | dstH | |||
) | [private] |
convert a hexadecimal string with up to 128 to 2 boost::uint64_t
hexString2UInt128 converts an up to 128 bit hexadecimal string to two boost::uint64_t
hex | The string to be converted. | |
dstL | The target for the lower 64 bit. | |
dstH | The target for the upper 64 bit. |
Definition at line 476 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), and LogDebug.
Referenced by countConditionChildMaxBits(), and getXMLHexTextValue128().
00477 { 00478 00479 // string to determine start of hex value, do not ignore leading zeros 00480 static const std::string valid_hex_start("0123456789ABCDEFabcdef"); 00481 00482 // string to determine end of hex value 00483 static const std::string valid_hex_end("0123456789ABCDEFabcdef"); 00484 00485 std::string tempStr = hexString; 00486 00487 // start / end position of the hex value in the string 00488 unsigned int hexStart = tempStr.find_first_of(valid_hex_start); 00489 unsigned int hexEnd = tempStr.find_first_not_of(valid_hex_end, hexStart); 00490 00491 if (hexStart == hexEnd) { 00492 00493 LogDebug("L1GtTriggerMenuXmlParser") << "No hex value found in: " << tempStr << std::endl; 00494 00495 return false; 00496 } 00497 00498 tempStr = tempStr.substr(hexStart, hexEnd - hexStart); 00499 00500 if (tempStr.empty() ) { 00501 00502 LogDebug("L1GtTriggerMenuXmlParser") << "Empty value in " << __PRETTY_FUNCTION__ 00503 << std::endl; 00504 00505 return false; 00506 } 00507 00508 // split the string 00509 std::string tempStrH, tempStrL; 00510 00511 if (tempStr.length() > 16) { // more than 64 bit 00512 tempStrL = tempStr.substr(tempStr.length()-16, 16); 00513 tempStrH = tempStr.substr(0, tempStr.length()-16); 00514 } 00515 else { 00516 tempStrL = tempStr; 00517 tempStrH = "0"; 00518 } 00519 00520 // convert lower 64bit 00521 char* endPtr = (char*) tempStrL.c_str(); 00522 boost::uint64_t tempUIntL = strtoull(tempStrL.c_str(), &endPtr, 16); 00523 00524 if (*endPtr != 0) { 00525 00526 LogDebug("L1GtTriggerMenuXmlParser") << "Unable to convert " << tempStr << " to hex." 00527 << std::endl; 00528 00529 return false; 00530 } 00531 00532 // convert higher64 bit 00533 endPtr = (char*) tempStrH.c_str(); 00534 boost::uint64_t tempUIntH = strtoull(tempStrH.c_str(), &endPtr, 16); 00535 00536 if (*endPtr != 0) { 00537 00538 LogDebug("L1GtTriggerMenuXmlParser") << "Unable to convert " << tempStr << " to hex." 00539 << std::endl; 00540 00541 return false; 00542 } 00543 00544 dstL = tempUIntL; 00545 dstH = tempUIntH; 00546 00547 return true; 00548 }
XERCES_CPP_NAMESPACE::XercesDOMParser * L1GtTriggerMenuXmlParser::initXML | ( | const std::string & | xmlFile | ) | [private] |
init xml system
initXML - Initialize XML-utilities and try to create a parser for the specified file.
xmlFile | Filename of the XML-File |
Definition at line 253 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), m_xmlErrHandler, indexGen::parser, release(), and transcode().
Referenced by parseXmlFile().
00253 { 00254 00255 XERCES_CPP_NAMESPACE_USE 00256 00257 // try to initialize 00258 try { 00259 XMLPlatformUtils::Initialize(); 00260 } 00261 catch (const XMLException& toCatch) { 00262 char* message = XMLString::transcode(toCatch.getMessage()); 00263 00264 edm::LogError("L1GtTriggerMenuXmlParser") 00265 << "Error during Xerces-c initialization! :" 00266 << message << std::endl; 00267 00268 XMLString::release(&message); 00269 return 0; 00270 } 00271 00272 XercesDOMParser* parser = new XercesDOMParser(); 00273 parser->setValidationScheme(XercesDOMParser::Val_Always); 00274 parser->setDoNamespaces(false); // we got no dtd 00275 00276 if (m_xmlErrHandler == 0) { // redundant check 00277 m_xmlErrHandler = (ErrorHandler*) new HandlerBase(); 00278 } 00279 else { 00280 // TODO ASSERTION 00281 } 00282 parser->setErrorHandler(m_xmlErrHandler); 00283 00284 // try to parse the file 00285 try { 00286 parser->parse(xmlFile.c_str()); 00287 } 00288 catch(const XMLException &toCatch) { 00289 char* message = XMLString::transcode(toCatch.getMessage()); 00290 00291 edm::LogError("L1GtTriggerMenuXmlParser") 00292 << "Exception while parsing XML: \n" 00293 << message << std::endl; 00294 00295 XMLString::release(&message); 00296 delete parser; 00297 delete m_xmlErrHandler; 00298 m_xmlErrHandler = 0; 00299 return 0; 00300 } 00301 catch (const DOMException &toCatch) { 00302 char *message = XMLString::transcode(toCatch.msg); 00303 00304 edm::LogError("L1GtTriggerMenuXmlParser") 00305 << "DOM-Exception while parsing XML: \n" 00306 << message << std::endl; 00307 00308 XMLString::release(&message); 00309 delete parser; 00310 delete m_xmlErrHandler; 00311 m_xmlErrHandler = 0; 00312 return 0; 00313 } 00314 catch (...) { 00315 00316 edm::LogError("L1GtTriggerMenuXmlParser") 00317 << "Unexpected Exception while parsing XML!" 00318 << std::endl; 00319 00320 delete parser; 00321 delete m_xmlErrHandler; 00322 m_xmlErrHandler = 0; 00323 return 0; 00324 } 00325 00326 return parser; 00327 }
bool L1GtTriggerMenuXmlParser::insertAlgorithmIntoMap | ( | const L1GtAlgorithm & | alg | ) | [private] |
insert an algorithm into algorithm map
Definition at line 997 of file L1GtTriggerMenuXmlParser.cc.
References L1GtAlgorithm::algoBitNumber(), L1GtAlgorithm::algoChipNumber(), L1GtAlgorithm::algoName(), L1GtAlgorithm::algoOutputPin(), lat::endl(), LogTrace, m_algorithmMap, m_numberConditionChips, m_numberPhysTriggers, m_orderConditionChip, and m_pinsOnConditionChip.
Referenced by workAlgorithm().
00997 { 00998 00999 std::string algName = alg.algoName(); 01000 //LogTrace("L1GtTriggerMenuXmlParser") 01001 //<< " Trying to insert algorithm \"" << algName << "\" in the algorithm map." ; 01002 01003 // no algorithm name has to appear twice! 01004 if (m_algorithmMap.count(algName) != 0) { 01005 LogTrace("L1GtTriggerMenuXmlParser") << " Algorithm \"" << algName 01006 << "\"already exists in the algorithm map- not inserted!" << std::endl; 01007 return false; 01008 } 01009 01010 // bit number less than zero or greater than maximum number of algorithms 01011 int bitNumber = alg.algoBitNumber(); 01012 if ((bitNumber < 0) || (bitNumber >= static_cast<int>(m_numberPhysTriggers))) { 01013 LogTrace("L1GtTriggerMenuXmlParser") << " Bit number " << bitNumber 01014 << " outside allowed range [0, " << m_numberPhysTriggers 01015 << ") - algorithm not inserted!" << std::endl; 01016 return false; 01017 } 01018 01019 // maximum number of algorithms 01020 if (m_algorithmMap.size() >= m_numberPhysTriggers) { 01021 LogTrace("L1GtTriggerMenuXmlParser") << " More than maximum allowed " 01022 << m_numberPhysTriggers << " algorithms in the algorithm map - not inserted!" 01023 << std::endl; 01024 return false; 01025 } 01026 01027 // chip number outside allowed values 01028 int chipNr = alg.algoChipNumber(static_cast<int>(m_numberConditionChips), 01029 static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip); 01030 01031 if ((chipNr < 0) || (chipNr > static_cast<int>(m_numberConditionChips))) { 01032 LogTrace("L1GtTriggerMenuXmlParser") << " Chip number " << chipNr 01033 << " outside allowed range [0, " << m_numberConditionChips 01034 << ") - algorithm not inserted!" << std::endl; 01035 return false; 01036 } 01037 01038 // output pin outside allowed values 01039 int outputPin = alg.algoOutputPin(static_cast<int>(m_numberConditionChips), 01040 static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip); 01041 01042 if ((outputPin < 0) || (outputPin > static_cast<int>(m_pinsOnConditionChip))) { 01043 LogTrace("L1GtTriggerMenuXmlParser") << " Output pin " << outputPin 01044 << " outside allowed range [0, " << m_pinsOnConditionChip 01045 << "] - algorithm not inserted!" << std::endl; 01046 return false; 01047 } 01048 01049 // no two algorithms on the same chip can have the same output pin 01050 for (CItAlgo itAlgo = m_algorithmMap.begin(); itAlgo != m_algorithmMap.end(); itAlgo++) { 01051 01052 int iPin = (itAlgo->second).algoOutputPin( static_cast<int>(m_numberConditionChips), 01053 static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip); 01054 std::string iName = itAlgo->first; 01055 int iChip = (itAlgo->second).algoChipNumber(static_cast<int>(m_numberConditionChips), 01056 static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip); 01057 01058 if ( (outputPin == iPin) && (chipNr == iChip)) { 01059 LogTrace("L1GtTriggerMenuXmlParser") << " Output pin " << outputPin 01060 << " is the same as for algorithm " << iName 01061 << "\n from the same chip number " << chipNr << " - algorithm not inserted!" 01062 << std::endl; 01063 return false; 01064 } 01065 01066 } 01067 01068 // insert algorithm 01069 m_algorithmMap[algName] = alg; 01070 01071 //LogTrace("L1GtTriggerMenuXmlParser") 01072 //<< " OK - algorithm inserted!" 01073 //<< std::endl; 01074 01075 return true; 01076 01077 }
bool L1GtTriggerMenuXmlParser::insertConditionIntoMap | ( | L1GtCondition & | cond, | |
const int | chipNr | |||
) | [private] |
insertConditionIntoMap - safe insert of condition into condition map.
if the condition name already exists, do not insert it and return false
Definition at line 973 of file L1GtTriggerMenuXmlParser.cc.
References L1GtCondition::condName(), count, lat::endl(), LogTrace, and m_conditionMap.
Referenced by parseCalo(), parseCastor(), parseCorrelation(), parseEnergySum(), parseHfBitCounts(), parseHfRingEtSums(), parseJetCounts(), and parseMuon().
00973 { 00974 00975 std::string cName = cond.condName(); 00976 //LogTrace("L1GtTriggerMenuXmlParser") 00977 //<< " Trying to insert condition \"" << cName << "\" in the condition map." ; 00978 00979 // no condition name has to appear twice! 00980 if ((m_conditionMap[chipNr]).count(cName) != 0) { 00981 LogTrace("L1GtTriggerMenuXmlParser") << " Condition " << cName 00982 << " already exists - not inserted!" << std::endl; 00983 return false; 00984 } 00985 00986 (m_conditionMap[chipNr])[cName] = &cond; 00987 //LogTrace("L1GtTriggerMenuXmlParser") 00988 //<< " OK - condition inserted!" 00989 //<< std::endl; 00990 00991 00992 return true; 00993 00994 }
bool L1GtTriggerMenuXmlParser::insertTechTriggerIntoMap | ( | const L1GtAlgorithm & | alg | ) | [private] |
insert a technical trigger into technical trigger map
Definition at line 1080 of file L1GtTriggerMenuXmlParser.cc.
References L1GtAlgorithm::algoBitNumber(), L1GtAlgorithm::algoName(), lat::endl(), LogTrace, m_numberTechTriggers, and m_technicalTriggerMap.
Referenced by workTechTrigger().
01080 { 01081 01082 std::string algName = alg.algoName(); 01083 //LogTrace("L1GtTriggerMenuXmlParser") 01084 //<< " Trying to insert technical trigger \"" << algName 01085 //<< "\" in the technical trigger map." ; 01086 01087 // no technical trigger name has to appear twice! 01088 if (m_technicalTriggerMap.count(algName) != 0) { 01089 LogTrace("L1GtTriggerMenuXmlParser") << " Technical trigger \"" 01090 << algName 01091 << "\"already exists in the technical trigger map- not inserted!" 01092 << std::endl; 01093 return false; 01094 } 01095 01096 // bit number less than zero or greater than maximum number of technical triggers 01097 int bitNumber = alg.algoBitNumber(); 01098 if ((bitNumber < 0) 01099 || (bitNumber >= static_cast<int>(m_numberTechTriggers))) { 01100 LogTrace("L1GtTriggerMenuXmlParser") << " Bit number " 01101 << bitNumber << " outside allowed range [0, " 01102 << m_numberTechTriggers 01103 << ") - technical trigger not inserted!" << std::endl; 01104 return false; 01105 } 01106 01107 // no two technical triggers can have the same bit number 01108 for (CItAlgo itAlgo = m_technicalTriggerMap.begin(); itAlgo 01109 != m_technicalTriggerMap.end(); itAlgo++) { 01110 01111 int iBitNumber = (itAlgo->second).algoBitNumber(); 01112 std::string iName = itAlgo->first; 01113 01114 if ((iBitNumber == bitNumber)) { 01115 LogTrace("L1GtTriggerMenuXmlParser") << " Bit number " 01116 << iBitNumber << " is the same as for technical trigger " 01117 << iName << " - technical trigger not inserted!" 01118 << std::endl; 01119 return false; 01120 } 01121 01122 } 01123 01124 // maximum number of technical triggers 01125 if (m_technicalTriggerMap.size() >= m_numberTechTriggers) { 01126 LogTrace("L1GtTriggerMenuXmlParser") 01127 << " More than maximum allowed " << m_numberTechTriggers 01128 << " technical triggers in the technical trigger map - not inserted!" 01129 << std::endl; 01130 return false; 01131 } 01132 01133 // insert technical trigger 01134 m_technicalTriggerMap[algName] = alg; 01135 01136 //LogTrace("L1GtTriggerMenuXmlParser") 01137 //<< " OK - technical trigger inserted!" 01138 //<< std::endl; 01139 01140 return true; 01141 01142 }
boost::uint64_t L1GtTriggerMenuXmlParser::mirror | ( | const boost::uint64_t | oldLUT, | |
int | maxBitsLUT, | |||
int | maxBitsReal | |||
) | [private] |
FIXME remove it after new L1 Trigger Menu Editor available mirrors the LUT table from GTgui format to correct bit format.
Definition at line 831 of file L1GtTriggerMenuXmlParser.cc.
References funct::abs(), lat::endl(), and LogTrace.
00833 { 00834 00835 LogTrace("L1GtTriggerMenuXmlParser") << "\n maxBitsLUT (dec) = " 00836 << maxBitsLUT << std::endl; 00837 00838 boost::uint64_t newLUT = 0ULL; 00839 int newBit = -1; 00840 00841 int firstBin = 0; 00842 int diffScale = maxBitsLUT - maxBitsReal; 00843 //int bits16 = maxBitsLUT/4; // hex size 00844 00845 if (diffScale != 0) { 00846 firstBin = 1; 00847 } 00848 00849 for (int oldBit = 0; oldBit < maxBitsLUT; ++oldBit) { 00850 00851 boost::uint64_t bitValue = (oldLUT & (1ULL << oldBit)) >> oldBit; 00852 00853 newBit = maxBitsReal/2 + firstBin - oldBit - 1; 00854 00855 if (newBit < 0) { 00856 int newVal = (maxBitsLUT/2 + std::abs(newBit) - 1 ); 00857 int endValid = maxBitsLUT/2 + maxBitsReal/2; 00858 if ((newVal < endValid)) { 00859 newBit = newVal; 00860 } 00861 else { 00862 newBit = oldBit + (maxBitsReal - maxBitsLUT)/2; 00863 00864 if (newBit >= maxBitsLUT/2) { 00865 newBit = oldBit; 00866 } 00867 } 00868 } 00869 00870 newLUT = newLUT | (bitValue << newBit); 00871 00872 //LogTrace("L1GtTriggerMenuXmlParser") << " old bit number -> new bit number: " 00873 // << oldBit 00874 // << "\t ---> " << newBit << ";\t bit value = " 00875 // << bitValue << std::endl; 00876 } 00877 00878 //LogTrace("L1GtTriggerMenuXmlParser") << "\n Converting old LUT (hex) " 00879 // << "\n GTgui.XML: " 00880 // << std::hex << std::setw(bits16) << std::setfill('0') 00881 // << oldLUT 00882 // << "\n Mirror: " 00883 // << std::hex << std::setw(bits16) << std::setfill('0') 00884 // << newLUT << std::dec 00885 // << std::endl; 00886 00887 return newLUT; 00888 }
bool L1GtTriggerMenuXmlParser::parseAlgorithms | ( | XERCES_CPP_NAMESPACE::XercesDOMParser * | parser | ) | [private] |
parse all algorithms
Definition at line 3194 of file L1GtTriggerMenuXmlParser.cc.
References doc, lat::endl(), findXMLChild(), m_numberConditionChips, L1GtXmlParserTags::m_xmlTagAlgorithms, L1GtXmlParserTags::m_xmlTagChip, L1GtXmlParserTags::m_xmlTagDef, prof2calltree::node, and workAlgorithm().
Referenced by workXML().
03194 { 03195 03196 XERCES_CPP_NAMESPACE_USE 03197 03198 //LogTrace("L1GtTriggerMenuXmlParser") << "\nParsing algorithms" << std::endl; 03199 03200 DOMNode* doc = parser->getDocument(); 03201 DOMNode* node = doc->getFirstChild(); 03202 03203 DOMNode* chipNode = node->getFirstChild(); 03204 if (chipNode == 0) { 03205 edm::LogError("L1GtTriggerMenuXmlParser") << " Error: No child found for " << m_xmlTagDef 03206 << std::endl; 03207 return false; 03208 } 03209 03210 // find first chip 03211 std::string chipName; 03212 chipNode = findXMLChild(chipNode, m_xmlTagChip, true, &chipName); 03213 if (chipNode == 0) { 03214 edm::LogError("L1GtTriggerMenuXmlParser") << " Error: Could not find <" << m_xmlTagChip 03215 << std::endl; 03216 return false; 03217 } 03218 03219 unsigned int chipNr = 0; 03220 do { 03221 03222 //LogTrace("L1GtTriggerMenuXmlParser") << std::endl; 03223 03224 std::string nodeName = m_xmlTagChip + chipName; 03225 //LogTrace("L1GtTriggerMenuXmlParser") 03226 //<< " Chip: " << nodeName << " Name: " << chipName 03227 //<< std::endl; 03228 03229 // find algorithms 03230 DOMNode* algNode = chipNode->getFirstChild(); 03231 algNode = findXMLChild(algNode, m_xmlTagAlgorithms); 03232 if (algNode == 0) { 03233 edm::LogError("L1GtTriggerMenuXmlParser") << " Error: No <" << m_xmlTagAlgorithms 03234 << "> child found in chip " << chipName << std::endl; 03235 return false; 03236 } 03237 03238 // walk through algorithms 03239 DOMNode* algNameNode = algNode->getFirstChild(); 03240 std::string algNameNodeName; 03241 algNameNode = findXMLChild(algNameNode, "", true, &algNameNodeName); 03242 03243 while (algNameNode != 0) { 03244 //LogTrace("L1GtTriggerMenuXmlParser") 03245 //<< " Found an algorithm with name: " << algNameNodeName 03246 //<< std::endl; 03247 03248 if ( !workAlgorithm(algNameNode, algNameNodeName, chipNr)) { 03249 return false; 03250 } 03251 03252 algNameNode = findXMLChild(algNameNode->getNextSibling(), "", true, &algNameNodeName); 03253 03254 } 03255 03256 // next chip 03257 chipNode = findXMLChild(chipNode->getNextSibling(), m_xmlTagChip, true, &chipName); 03258 chipNr++; 03259 03260 } while (chipNode != 0 && chipNr < m_numberConditionChips); 03261 03262 return true; 03263 }
bool L1GtTriggerMenuXmlParser::parseCalo | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | name, | |||
unsigned int | chipNr = 0 , |
|||
const bool | corrFlag = false | |||
) | [private] |
parse a calorimeter condition
parseCalo Parse a calo condition and insert an entry to the conditions map
node | The corresponding node. | |
name | The name of the condition. | |
chipNr | The number of the chip this condition is located. |
Definition at line 1683 of file L1GtTriggerMenuXmlParser.cc.
References CenJet, countConditionChildMaxBits(), L1GtCaloTemplate::CorrelationParameter::deltaEtaRange, L1GtCaloTemplate::CorrelationParameter::deltaPhiMaxbits, L1GtCaloTemplate::CorrelationParameter::deltaPhiRange, lat::endl(), ForJet, getConditionChildValues(), getGEqFlag(), getNumFromType(), getTypeFromType(), getXMLAttribute(), i, insertConditionIntoMap(), edm::isDebugEnabled(), IsoEG, LogTrace, m_corCaloTemplate, m_vecCaloTemplate, L1GtXmlParserTags::m_xmlConditionAttrCondition, L1GtXmlParserTags::m_xmlConditionAttrObject, L1GtXmlParserTags::m_xmlConditionAttrObjectCenJet, L1GtXmlParserTags::m_xmlConditionAttrObjectForJet, L1GtXmlParserTags::m_xmlConditionAttrObjectIsoEG, L1GtXmlParserTags::m_xmlConditionAttrObjectNoIsoEG, L1GtXmlParserTags::m_xmlConditionAttrObjectTauJet, L1GtXmlParserTags::m_xmlConditionAttrType, L1GtXmlParserTags::m_xmlConditionAttrType2wsc, L1GtXmlParserTags::m_xmlTagDeltaEta, L1GtXmlParserTags::m_xmlTagDeltaPhi, L1GtXmlParserTags::m_xmlTagEta, L1GtXmlParserTags::m_xmlTagEtThreshold, L1GtXmlParserTags::m_xmlTagPhi, NoIsoEG, L1GtCaloTemplate::print(), L1GtCondition::setCondChipNr(), L1GtCondition::setCondGEq(), L1GtCaloTemplate::setConditionParameter(), L1GtCondition::setCondType(), L1GtCondition::setObjectType(), TauJet, and TypeNull.
Referenced by parseCorrelation(), and workCondition().
01684 { 01685 01686 XERCES_CPP_NAMESPACE_USE 01687 01688 // get condition, particle name and type name 01689 std::string condition = getXMLAttribute(node, m_xmlConditionAttrCondition); 01690 std::string particle = getXMLAttribute(node, m_xmlConditionAttrObject); 01691 std::string type = getXMLAttribute(node, m_xmlConditionAttrType); 01692 01693 // determine object type type 01694 L1GtObject caloObjType; 01695 01696 if (particle == m_xmlConditionAttrObjectNoIsoEG) { 01697 caloObjType = NoIsoEG; 01698 } 01699 else if (particle == m_xmlConditionAttrObjectIsoEG) { 01700 caloObjType = IsoEG; 01701 } 01702 else if (particle == m_xmlConditionAttrObjectCenJet) { 01703 caloObjType = CenJet; 01704 } 01705 else if (particle == m_xmlConditionAttrObjectTauJet) { 01706 caloObjType = TauJet; 01707 } 01708 else if (particle == m_xmlConditionAttrObjectForJet) { 01709 caloObjType = ForJet; 01710 } 01711 else { 01712 edm::LogError("L1GtTriggerMenuXmlParser") << "Wrong particle for calo-condition (" 01713 << particle << ")" << std::endl; 01714 return false; 01715 } 01716 01717 int nrObj = getNumFromType(type); 01718 if (nrObj < 0) { 01719 edm::LogError("L1GtTriggerMenuXmlParser") << "Unknown type for calo-condition (" << type 01720 << ")" << "\nCan not determine number of trigger objects. " << std::endl; 01721 return false; 01722 } 01723 01724 // get greater equal flag 01725 01726 int intGEq = getGEqFlag(node, m_xmlTagEtThreshold); 01727 if (intGEq < 0) { 01728 edm::LogError("L1GtTriggerMenuXmlParser") << "Error getting \"greater or equal\" flag" 01729 << std::endl; 01730 return false; 01731 } 01732 // set the boolean value for the ge_eq mode 01733 bool gEq = (intGEq != 0); 01734 01735 // get values 01736 01737 // temporary storage of the parameters 01738 std::vector<L1GtCaloTemplate::ObjectParameter> objParameter(nrObj); 01739 L1GtCaloTemplate::CorrelationParameter corrParameter; 01740 01741 // need at least one value for deltaPhiRange 01742 std::vector<boost::uint64_t> tmpValues((nrObj > 1) ? nrObj : 1); 01743 01744 // get etThreshold values and fill into structure 01745 if ( !getConditionChildValues(node, m_xmlTagEtThreshold, nrObj, tmpValues) ) { 01746 return false; 01747 } 01748 01749 for (int i = 0; i < nrObj; i++) { 01750 objParameter[i].etThreshold = tmpValues[i]; 01751 01752 //LogTrace("L1GtTriggerMenuXmlParser") 01753 //<< " Calo ET high threshold (hex) for calo object " << i << " = " 01754 //<< std::hex << objParameter[i].etThreshold << std::dec 01755 //<< std::endl; 01756 } 01757 01758 // get etaRange and fill into structure 01759 if ( !getConditionChildValues(node, m_xmlTagEta, nrObj, tmpValues) ) { 01760 return false; 01761 } 01762 01763 01764 for (int i = 0; i < nrObj; i++) { 01765 01766 objParameter[i].etaRange = tmpValues[i]; 01767 01768 //LogTrace("L1GtTriggerMenuXmlParser") 01769 //<< " etaRange (hex) for calo object " << i << " = " 01770 //<< std::hex << objParameter[i].etaRange << std::dec 01771 //<< std::endl; 01772 } 01773 01774 // get phiRange values and fill into structure 01775 if ( !getConditionChildValues(node, m_xmlTagPhi, nrObj, tmpValues) ) { 01776 return false; 01777 } 01778 01779 for (int i = 0; i < nrObj; i++) { 01780 objParameter[i].phiRange = tmpValues[i]; 01781 01782 //LogTrace("L1GtTriggerMenuXmlParser") 01783 //<< " phiRange (hex) for calo object " << i << " = " 01784 //<< std::hex << objParameter[i].phiRange << std::dec 01785 //<< std::endl; 01786 } 01787 01788 // indicates if a correlation is used 01789 bool wscVal = (type == m_xmlConditionAttrType2wsc ); 01790 01791 if (wscVal) { 01792 // get deltaEtaRange 01793 if ( !getConditionChildValues(node, m_xmlTagDeltaEta, 1, tmpValues) ) { 01794 return false; 01795 } 01796 01797 corrParameter.deltaEtaRange = tmpValues[0]; 01798 01799 // get deltaPhiRange 01800 if ( !getConditionChildValues(node, m_xmlTagDeltaPhi, 1, tmpValues) ) { 01801 return false; 01802 } 01803 01804 corrParameter.deltaPhiRange = tmpValues[0]; 01805 01806 // get maximum number of bits for delta phi 01807 //LogTrace("L1GtTriggerMenuXmlParser") 01808 //<< " Counting deltaPhiMaxbits" 01809 //<< std::endl; 01810 01811 unsigned int maxbits; 01812 01813 if ( !countConditionChildMaxBits(node, m_xmlTagDeltaPhi, maxbits) ) { 01814 return false; 01815 } 01816 01817 corrParameter.deltaPhiMaxbits = maxbits; 01818 //LogTrace("L1GtTriggerMenuXmlParser") 01819 //<< " deltaPhiMaxbits (dec) = " << maxbits 01820 //<< std::endl; 01821 } 01822 01823 // get the type of the condition, as defined in enum, from the condition type 01824 // as defined in the XML file 01825 L1GtConditionType cType = getTypeFromType(type); 01826 //LogTrace("L1GtTriggerMenuXmlParser") 01827 //<< " Condition type (enum value) = " << cType 01828 //<< std::endl; 01829 01830 if (cType == TypeNull) { 01831 edm::LogError("L1GtTriggerMenuXmlParser") 01832 << "Type for calo condition id TypeNull - it means not defined in the XML file." 01833 << "\nNumber of trigger objects is set to zero. " << std::endl; 01834 return false; 01835 } 01836 01837 // object types - all same caloObjType 01838 std::vector<L1GtObject> objType(nrObj, caloObjType); 01839 01840 // now create a new calo condition 01841 01842 L1GtCaloTemplate caloCond(name); 01843 01844 caloCond.setCondType(cType); 01845 caloCond.setObjectType(objType); 01846 caloCond.setCondGEq(gEq); 01847 caloCond.setCondChipNr(chipNr); 01848 01849 caloCond.setConditionParameter(objParameter, corrParameter); 01850 01851 if (edm::isDebugEnabled() ) { 01852 01853 std::ostringstream myCoutStream; 01854 caloCond.print(myCoutStream); 01855 LogTrace("L1GtTriggerMenuXmlParser") << myCoutStream.str() << "\n" << std::endl; 01856 01857 } 01858 01859 // insert condition into the map 01860 if ( !insertConditionIntoMap(caloCond, chipNr)) { 01861 01862 edm::LogError("L1GtTriggerMenuXmlParser") 01863 << " Error: duplicate condition (" << name << ")" 01864 << std::endl; 01865 01866 return false; 01867 } 01868 else { 01869 01870 if (corrFlag) { 01871 (m_corCaloTemplate[chipNr]).push_back(caloCond); 01872 } 01873 else { 01874 (m_vecCaloTemplate[chipNr]).push_back(caloCond); 01875 } 01876 01877 } 01878 01879 01880 // 01881 return true; 01882 }
bool L1GtTriggerMenuXmlParser::parseCastor | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | name, | |||
unsigned int | chipNr = 0 | |||
) | [private] |
parse a CASTOR condition
parseCastor Parse a CASTOR condition and insert an entry to the conditions map
node | The corresponding node. | |
name | The name of the condition. | |
chipNr | The number of the chip this condition is located. |
Definition at line 2261 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), getXMLAttribute(), insertConditionIntoMap(), edm::isDebugEnabled(), LogTrace, m_vecCastorTemplate, L1GtXmlParserTags::m_xmlConditionAttrCondition, L1GtXmlParserTags::m_xmlConditionAttrObject, L1GtXmlParserTags::m_xmlConditionAttrObjectCastor, L1GtXmlParserTags::m_xmlConditionAttrType, L1GtCastorTemplate::print(), L1GtCondition::setCondChipNr(), L1GtCondition::setCondGEq(), L1GtCondition::setCondType(), and TypeCastor.
Referenced by workCondition().
02262 { 02263 02264 XERCES_CPP_NAMESPACE_USE 02265 02266 // get condition, particle name and type name 02267 std::string condition = getXMLAttribute(node, m_xmlConditionAttrCondition); 02268 std::string particle = getXMLAttribute(node, m_xmlConditionAttrObject); 02269 std::string type = getXMLAttribute(node, m_xmlConditionAttrType); 02270 02271 if (particle != m_xmlConditionAttrObjectCastor) { 02272 edm::LogError("L1GtTriggerMenuXmlParser") 02273 << "\nError: wrong particle for Castor condition (" 02274 << particle << ")" << std::endl; 02275 return false; 02276 } 02277 02278 // object type and condition type 02279 // object type - irrelevant for CASTOR conditions 02280 L1GtConditionType cType = TypeCastor; 02281 02282 // no objects for CASTOR conditions 02283 02284 // set the boolean value for the ge_eq mode - irrelevant for CASTOR conditions 02285 bool gEq = false; 02286 02287 // now create a new CASTOR condition 02288 02289 L1GtCastorTemplate castorCond(name); 02290 02291 castorCond.setCondType(cType); 02292 castorCond.setCondGEq(gEq); 02293 castorCond.setCondChipNr(chipNr); 02294 02295 02296 if (edm::isDebugEnabled() ) { 02297 02298 std::ostringstream myCoutStream; 02299 castorCond.print(myCoutStream); 02300 LogTrace("L1GtTriggerMenuXmlParser") << myCoutStream.str() << "\n" << std::endl; 02301 02302 } 02303 02304 // insert condition into the map 02305 if ( !insertConditionIntoMap(castorCond, chipNr)) { 02306 02307 edm::LogError("L1GtTriggerMenuXmlParser") 02308 << " Error: duplicate condition (" << name 02309 << ")" << std::endl; 02310 02311 return false; 02312 } else { 02313 02314 (m_vecCastorTemplate[chipNr]).push_back(castorCond); 02315 02316 } 02317 02318 02319 // 02320 return true; 02321 }
bool L1GtTriggerMenuXmlParser::parseConditions | ( | XERCES_CPP_NAMESPACE::XercesDOMParser * | parser | ) | [private] |
parse all conditions
parseConditions - look for conditions and call the workCondition function for each node
parser | The parser to parse the XML file with. |
Definition at line 2999 of file L1GtTriggerMenuXmlParser.cc.
References doc, lat::endl(), findXMLChild(), LogTrace, m_numberConditionChips, L1GtXmlParserTags::m_xmlTagChip, L1GtXmlParserTags::m_xmlTagConditions, L1GtXmlParserTags::m_xmlTagDef, release(), transcode(), and workCondition().
Referenced by workXML().
02999 { 03000 03001 XERCES_CPP_NAMESPACE_USE 03002 03003 LogTrace("L1GtTriggerMenuXmlParser") << "\nParsing conditions" << std::endl; 03004 03005 DOMNode* doc = parser->getDocument(); 03006 DOMNode* n1 = doc->getFirstChild(); 03007 03008 // we assume that the first child is m_xmlTagDef because it was checked in workXML 03009 03010 DOMNode* chipNode = n1->getFirstChild(); 03011 if (chipNode == 0) { 03012 03013 edm::LogError("L1GtTriggerMenuXmlParser") << "Error: No child of <" << m_xmlTagDef 03014 << "> tag found." << std::endl; 03015 03016 return false; 03017 } 03018 03019 // find chip 03020 03021 std::string chipName; // name of the actual chip 03022 chipNode = findXMLChild(chipNode, m_xmlTagChip, true, &chipName); 03023 if (chipNode == 0) { 03024 03025 edm::LogError("L1GtTriggerMenuXmlParser") << " Error: Could not find <" << m_xmlTagChip 03026 << std::endl; 03027 03028 return false; 03029 } 03030 03031 unsigned int chipNr = 0; 03032 do { 03033 03034 // find conditions 03035 DOMNode* conditionsNode = chipNode->getFirstChild(); 03036 conditionsNode = findXMLChild(conditionsNode, m_xmlTagConditions); 03037 if (conditionsNode == 0) { 03038 03039 edm::LogError("L1GtTriggerMenuXmlParser") << "Error: No <" << m_xmlTagConditions 03040 << "> child found in Chip " << chipName << std::endl; 03041 03042 return false; 03043 } 03044 03045 char* nodeName = XMLString::transcode(chipNode->getNodeName()); 03046 //LogTrace("L1GtTriggerMenuXmlParser") 03047 //<< "\n Found Chip: " << nodeName << " Name: " << chipName 03048 //<< std::endl; 03049 03050 XMLString::release(&nodeName); 03051 03052 // walk through conditions 03053 DOMNode* conditionNameNode = conditionsNode->getFirstChild(); 03054 std::string conditionNameNodeName; 03055 conditionNameNode = findXMLChild(conditionNameNode, "", true, &conditionNameNodeName); 03056 while (conditionNameNode != 0) { 03057 03058 LogTrace("L1GtTriggerMenuXmlParser") 03059 << "\n Found a condition with name: " << conditionNameNodeName 03060 << std::endl; 03061 03062 if ( !workCondition(conditionNameNode, conditionNameNodeName, chipNr) ) { 03063 return false; 03064 } 03065 conditionNameNode = findXMLChild(conditionNameNode->getNextSibling(), "", true, 03066 &conditionNameNodeName); 03067 03068 } 03069 // next chip 03070 chipNode = findXMLChild(chipNode->getNextSibling(), m_xmlTagChip, true, &chipName); 03071 chipNr++; 03072 03073 } while (chipNode != 0 && chipNr < m_numberConditionChips); 03074 03075 return true; 03076 }
bool L1GtTriggerMenuXmlParser::parseCorrelation | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | name, | |||
unsigned int | chipNr = 0 | |||
) | [private] |
parse a correlation condition
parseCorrelation Parse a correlation condition and insert an entry to the conditions map
node | The corresponding node. | |
name | The name of the condition. | |
chipNr | The number of the chip this condition is located. |
Definition at line 2601 of file L1GtTriggerMenuXmlParser.cc.
References CenJet, CondCalo, CondEnergySum, CondMuon, countConditionChildMaxBits(), L1GtCorrelationTemplate::CorrelationParameter::deltaEtaRange, L1GtCorrelationTemplate::CorrelationParameter::deltaPhiMaxbits, L1GtCorrelationTemplate::CorrelationParameter::deltaPhiRange, lat::endl(), ETM, ETT, findXMLChild(), ForJet, getGEqFlag(), getXMLAttribute(), getXMLTextValue(), HTT, insertConditionIntoMap(), edm::isDebugEnabled(), IsoEG, LogTrace, m_corCaloTemplate, m_corEnergySumTemplate, m_corMuonTemplate, m_vecCorrelationTemplate, L1GtXmlParserTags::m_xmlConditionAttrCondition, L1GtXmlParserTags::m_xmlConditionAttrConditionCalo, L1GtXmlParserTags::m_xmlConditionAttrConditionEnergySum, L1GtXmlParserTags::m_xmlConditionAttrConditionMuon, L1GtXmlParserTags::m_xmlConditionAttrObject, L1GtXmlParserTags::m_xmlConditionAttrObjectCenJet, L1GtXmlParserTags::m_xmlConditionAttrObjectETM, L1GtXmlParserTags::m_xmlConditionAttrObjectETT, L1GtXmlParserTags::m_xmlConditionAttrObjectForJet, L1GtXmlParserTags::m_xmlConditionAttrObjectHTT, L1GtXmlParserTags::m_xmlConditionAttrObjectIsoEG, L1GtXmlParserTags::m_xmlConditionAttrObjectNoIsoEG, L1GtXmlParserTags::m_xmlConditionAttrObjectTauJet, L1GtXmlParserTags::m_xmlConditionAttrType, L1GtXmlParserTags::m_xmlTagDeltaEta, L1GtXmlParserTags::m_xmlTagDeltaPhi, L1GtXmlParserTags::m_xmlTagEtThreshold, L1GtXmlParserTags::m_xmlTagPtHighThreshold, Mu, NoIsoEG, parseCalo(), parseEnergySum(), parseMuon(), size, TauJet, and Type2cor.
Referenced by workCondition().
02603 { 02604 02605 XERCES_CPP_NAMESPACE_USE 02606 02607 // create a new correlation condition 02608 L1GtCorrelationTemplate correlationCond(name); 02609 02610 // check that the condition does not exist already in the map 02611 if ( !insertConditionIntoMap(correlationCond, chipNr)) { 02612 02613 edm::LogError("L1GtTriggerMenuXmlParser") 02614 << " Error: duplicate correlation condition (" << name << ")" 02615 << std::endl; 02616 02617 return false; 02618 } 02619 02620 // get condition, particle name and type name 02621 std::string condition = getXMLAttribute(node, m_xmlConditionAttrCondition); 02622 std::string particle = getXMLAttribute(node, m_xmlConditionAttrObject); 02623 std::string type = getXMLAttribute(node, m_xmlConditionAttrType); 02624 02625 LogTrace("L1GtTriggerMenuXmlParser") << " Condition category: " 02626 << condition << ", particle: " << particle << ", type: " << type 02627 << "\n" << std::endl; 02628 02629 // condition type 02630 L1GtConditionType cType = Type2cor; 02631 02632 // two objects (for sure) 02633 const int nrObj = 2; 02634 02635 // object types and greater equal flag - filled in the loop 02636 int intGEq[nrObj] = { -1, -1 }; 02637 std::vector<L1GtObject> objType(nrObj); 02638 std::vector<L1GtConditionCategory> condCateg(nrObj); 02639 02640 // correlation flag and index in the cor*vector 02641 const bool corrFlag = true; 02642 int corrIndexVal[nrObj] = { -1, -1 }; 02643 02644 // get the subconditions 02645 02646 DOMNode* conditionsNode = node->getFirstChild(); 02647 std::string conditionNameNodeName; 02648 conditionsNode = findXMLChild(conditionsNode, "", true, 02649 &conditionNameNodeName); 02650 02651 02652 for (int iSubCond = 0; iSubCond < nrObj; ++iSubCond) { 02653 02654 // get for sub-condition: category, object name and type name and condition name 02655 condition = getXMLAttribute(conditionsNode, m_xmlConditionAttrCondition); 02656 particle = getXMLAttribute(conditionsNode, m_xmlConditionAttrObject); 02657 type = getXMLAttribute(conditionsNode, m_xmlConditionAttrType); 02658 02659 LogTrace("L1GtTriggerMenuXmlParser") << " Sub-condition category: " 02660 << condition << ", particle: " << particle << ", type: " 02661 << type << ", name: " << conditionNameNodeName << "\n" 02662 << std::endl; 02663 02664 // call the appropiate function for this condition 02665 if (condition == m_xmlConditionAttrConditionMuon) { 02666 if (!parseMuon(conditionsNode, conditionNameNodeName, chipNr, 02667 corrFlag)) { 02668 edm::LogError("L1GtTriggerMenuXmlParser") 02669 << "Error parsing sub-condition " << condition << ")" 02670 << " with name " << conditionNameNodeName << std::endl; 02671 02672 } 02673 02674 // get greater equal flag 02675 intGEq[iSubCond] = getGEqFlag(conditionsNode, 02676 m_xmlTagPtHighThreshold); 02677 if (intGEq[iSubCond] < 0) { 02678 edm::LogError("L1GtTriggerMenuXmlParser") 02679 << "Error getting \"greater or equal\" flag" 02680 << " for sub-condition " << conditionNameNodeName 02681 << " for the correlation condition " << name 02682 << std::endl; 02683 return false; 02684 } 02685 02686 // set object type and sub-condition category 02687 objType[iSubCond] = Mu; 02688 condCateg[iSubCond] = CondMuon; 02689 corrIndexVal[iSubCond] = (m_corMuonTemplate[chipNr]).size() - 1; 02690 02691 } 02692 else if (condition == m_xmlConditionAttrConditionCalo) { 02693 if (!parseCalo(conditionsNode, conditionNameNodeName, chipNr, 02694 corrFlag)) { 02695 edm::LogError("L1GtTriggerMenuXmlParser") 02696 << "Error parsing sub-condition " << condition << ")" 02697 << " with name " << conditionNameNodeName << std::endl; 02698 02699 } 02700 02701 // get greater equal flag 02702 intGEq[iSubCond] = getGEqFlag(conditionsNode, m_xmlTagEtThreshold); 02703 if (intGEq[iSubCond] < 0) { 02704 edm::LogError("L1GtTriggerMenuXmlParser") 02705 << "Error getting \"greater or equal\" flag" 02706 << " for sub-condition " << conditionNameNodeName 02707 << " for the correlation condition " << name 02708 << std::endl; 02709 return false; 02710 } 02711 02712 // set object type and sub-condition category 02713 if (particle == m_xmlConditionAttrObjectNoIsoEG) { 02714 objType[iSubCond] = NoIsoEG; 02715 } 02716 else if (particle == m_xmlConditionAttrObjectIsoEG) { 02717 objType[iSubCond] = IsoEG; 02718 } 02719 else if (particle == m_xmlConditionAttrObjectCenJet) { 02720 objType[iSubCond] = CenJet; 02721 } 02722 else if (particle == m_xmlConditionAttrObjectTauJet) { 02723 objType[iSubCond] = TauJet; 02724 } 02725 else if (particle == m_xmlConditionAttrObjectForJet) { 02726 objType[iSubCond] = ForJet; 02727 } 02728 else { 02729 edm::LogError("L1GtTriggerMenuXmlParser") 02730 << "Wrong object type " << particle 02731 << " for sub-condition " << conditionNameNodeName 02732 << " from the correlation condition " << name 02733 << std::endl; 02734 return false; 02735 } 02736 02737 condCateg[iSubCond] = CondCalo; 02738 corrIndexVal[iSubCond] = (m_corCaloTemplate[chipNr]).size() - 1; 02739 02740 } 02741 else if (condition == m_xmlConditionAttrConditionEnergySum) { 02742 if (!parseEnergySum(conditionsNode, conditionNameNodeName, chipNr, 02743 corrFlag)) { 02744 edm::LogError("L1GtTriggerMenuXmlParser") 02745 << "Error parsing sub-condition " << condition << ")" 02746 << " with name " << conditionNameNodeName << std::endl; 02747 02748 } 02749 02750 // get greater equal flag 02751 intGEq[iSubCond] = getGEqFlag(conditionsNode, m_xmlTagEtThreshold); 02752 if (intGEq[iSubCond] < 0) { 02753 edm::LogError("L1GtTriggerMenuXmlParser") 02754 << "Error getting \"greater or equal\" flag" 02755 << " for sub-condition " << conditionNameNodeName 02756 << " for the correlation condition " << name 02757 << std::endl; 02758 return false; 02759 } 02760 02761 // set object type and sub-condition category 02762 if (particle == m_xmlConditionAttrObjectETM) { 02763 objType[iSubCond] = ETM; 02764 } 02765 else if (particle == m_xmlConditionAttrObjectETT) { 02766 objType[iSubCond] = ETT; 02767 } 02768 else if (particle == m_xmlConditionAttrObjectHTT) { 02769 objType[iSubCond] = HTT; 02770 } 02771 else { 02772 edm::LogError("L1GtTriggerMenuXmlParser") 02773 << "Wrong object type " << particle 02774 << " for sub-condition " << conditionNameNodeName 02775 << " from the correlation condition " << name 02776 << std::endl; 02777 return false; 02778 } 02779 02780 condCateg[iSubCond] = CondEnergySum; 02781 corrIndexVal[iSubCond] = (m_corEnergySumTemplate[chipNr]).size() - 1; 02782 02783 } 02784 else { 02785 edm::LogError("L1GtTriggerMenuXmlParser") 02786 << "Unknown or un-adequate sub-condition (" << condition 02787 << ")" << " with name " << conditionNameNodeName 02788 << " for the correlation condition " << name << std::endl; 02789 02790 return false; 02791 } 02792 02793 conditionsNode = findXMLChild(conditionsNode->getNextSibling(), "", 02794 true, &conditionNameNodeName); 02795 02796 } 02797 02798 // get greater equal flag for the correlation condition 02799 bool gEq = true; 02800 if (intGEq[0] != intGEq[1]) { 02801 edm::LogError("L1GtTriggerMenuXmlParser") 02802 << "Inconsistent GEq flags for sub-conditions (" << condition 02803 << ")" << " with name " << conditionNameNodeName 02804 << " for the correlation condition " << name << std::endl; 02805 return false; 02806 02807 } 02808 else { 02809 gEq = (intGEq[0] != 0); 02810 02811 } 02812 02813 // correlation parameters 02814 02815 // temporary storage of the parameters 02816 L1GtCorrelationTemplate::CorrelationParameter corrParameter; 02817 std::vector<boost::uint64_t> tmpValues(nrObj); 02818 02819 // get deltaEtaRange 02820 // if ( !getConditionChildValues(node, m_xmlTagDeltaEta, 1, tmpValues) ) { 02821 // return false; 02822 // } 02823 // 02824 // corrParameter.deltaEtaRange = tmpValues[0]; 02825 02826 XERCES_CPP_NAMESPACE::DOMNode* node1 = findXMLChild(node->getFirstChild(), 02827 m_xmlTagDeltaEta); 02828 02829 std::string valString; 02830 02831 if (node1 == 0) { 02832 edm::LogError("L1GtTriggerMenuXmlParser") 02833 << " Could not get deltaEta for correlation condition " 02834 << name << ". " << std::endl; 02835 return false; 02836 } 02837 else { 02838 valString = getXMLTextValue(node1); 02839 } 02840 02841 corrParameter.deltaEtaRange = valString; 02842 02843 // // deltaPhi is larger than 64bit 02844 // if ( !getXMLHexTextValue128(findXMLChild(node->getFirstChild(), m_xmlTagDeltaPhi), 02845 // tmpValues[0], tmpValues[1])) { 02846 // edm::LogError("L1GtTriggerMenuXmlParser") 02847 // << " Could not get deltaPhi for correlation condition " << name << ". " 02848 // << std::endl; 02849 // return false; 02850 // } 02851 // 02852 // corrParameter.deltaPhiRange = tmpValues[0]; 02853 02854 node1 = findXMLChild(node->getFirstChild(), m_xmlTagDeltaPhi); 02855 02856 if (node1 == 0) { 02857 return false; 02858 edm::LogError("L1GtTriggerMenuXmlParser") 02859 << " Could not get deltaPhi for correlation condition " 02860 << name << ". " << std::endl; 02861 } 02862 else { 02863 valString = getXMLTextValue(node1); 02864 } 02865 02866 corrParameter.deltaPhiRange = valString; 02867 02868 // get maximum number of bits for delta phi 02869 //LogTrace("L1GtTriggerMenuXmlParser") 02870 //<< " Counting deltaPhiMaxbits" 02871 //<< std::endl; 02872 02873 unsigned int maxbits; 02874 02875 if ( !countConditionChildMaxBits(node, m_xmlTagDeltaPhi, maxbits) ) { 02876 return false; 02877 } 02878 02879 corrParameter.deltaPhiMaxbits = maxbits; 02880 //LogTrace("L1GtTriggerMenuXmlParser") 02881 //<< " deltaPhiMaxbits (dec) = " << maxbits 02882 //<< std::endl; 02883 02884 02885 // fill the correlation condition 02886 correlationCond.setCondType(cType); 02887 correlationCond.setObjectType(objType); 02888 correlationCond.setCondGEq(gEq); 02889 correlationCond.setCondChipNr(chipNr); 02890 02891 correlationCond.setCond0Category(condCateg[0]); 02892 correlationCond.setCond1Category(condCateg[1]); 02893 02894 correlationCond.setCond0Index(corrIndexVal[0]); 02895 correlationCond.setCond1Index(corrIndexVal[1]); 02896 02897 correlationCond.setCorrelationParameter(corrParameter); 02898 02899 if (edm::isDebugEnabled() ) { 02900 02901 std::ostringstream myCoutStream; 02902 correlationCond.print(myCoutStream); 02903 LogTrace("L1GtTriggerMenuXmlParser") << myCoutStream.str() << "\n" 02904 << std::endl; 02905 02906 } 02907 02908 // insert condition into the map 02909 // condition is not duplicate, check was done at the beginning 02910 02911 (m_vecCorrelationTemplate[chipNr]).push_back(correlationCond); 02912 02913 // 02914 return true; 02915 }
bool L1GtTriggerMenuXmlParser::parseEnergySum | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | name, | |||
unsigned int | chipNr = 0 , |
|||
const bool | corrFlag = false | |||
) | [private] |
parse an "energy sum" condition
parseEnergySum Parse an "energy sum" condition and insert an entry to the conditions map
node | The corresponding node. | |
name | The name of the condition. | |
chipNr | The number of the chip this condition is located. |
Definition at line 1895 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), ETM, ETT, findXMLChild(), getBitFromNode(), getConditionChildValues(), getGEqFlag(), getXMLAttribute(), getXMLHexTextValue128(), HTT, i, insertConditionIntoMap(), edm::isDebugEnabled(), LogTrace, m_corEnergySumTemplate, m_vecEnergySumTemplate, L1GtXmlParserTags::m_xmlConditionAttrCondition, L1GtXmlParserTags::m_xmlConditionAttrObject, L1GtXmlParserTags::m_xmlConditionAttrObjectETM, L1GtXmlParserTags::m_xmlConditionAttrObjectETT, L1GtXmlParserTags::m_xmlConditionAttrObjectHTT, L1GtXmlParserTags::m_xmlConditionAttrType, L1GtXmlParserTags::m_xmlTagEnergyOverflow, L1GtXmlParserTags::m_xmlTagEtThreshold, L1GtXmlParserTags::m_xmlTagPhi, L1GtEnergySumTemplate::print(), L1GtCondition::setCondChipNr(), L1GtCondition::setCondGEq(), L1GtEnergySumTemplate::setConditionParameter(), L1GtCondition::setCondType(), L1GtCondition::setObjectType(), TypeETM, TypeETT, and TypeHTT.
Referenced by parseCorrelation(), and workCondition().
01897 { 01898 01899 XERCES_CPP_NAMESPACE_USE 01900 01901 // get condition, particle name and type name 01902 std::string condition = getXMLAttribute(node, m_xmlConditionAttrCondition); 01903 std::string particle = getXMLAttribute(node, m_xmlConditionAttrObject); 01904 std::string type = getXMLAttribute(node, m_xmlConditionAttrType); 01905 01906 // determine object type type 01907 L1GtObject energySumObjType; 01908 L1GtConditionType cType; 01909 01910 if ((particle == m_xmlConditionAttrObjectETM) && (type == m_xmlConditionAttrObjectETM)) { 01911 01912 energySumObjType = ETM; 01913 cType = TypeETM; 01914 01915 } 01916 else if ((particle == m_xmlConditionAttrObjectETT) && (type == m_xmlConditionAttrObjectETT)) { 01917 01918 energySumObjType = ETT; 01919 cType = TypeETT; 01920 01921 } 01922 else if ((particle == m_xmlConditionAttrObjectHTT) && (type == m_xmlConditionAttrObjectHTT)) { 01923 01924 energySumObjType = HTT; 01925 cType = TypeHTT; 01926 01927 } 01928 else { 01929 edm::LogError("L1GtTriggerMenuXmlParser") 01930 << "Wrong particle or type for energy-sum condition (" << particle << ", " << type 01931 << ")" << std::endl; 01932 return false; 01933 } 01934 01935 // global object 01936 int nrObj = 1; 01937 01938 // get greater equal flag 01939 01940 int intGEq = getGEqFlag(node, m_xmlTagEtThreshold); 01941 if (intGEq < 0) { 01942 edm::LogError("L1GtTriggerMenuXmlParser") << "Error getting \"greater or equal\" flag" 01943 << std::endl; 01944 return false; 01945 } 01946 // set the boolean value for the ge_eq mode 01947 bool gEq = (intGEq != 0); 01948 01949 // get values 01950 01951 // temporary storage of the parameters 01952 std::vector<L1GtEnergySumTemplate::ObjectParameter> objParameter(nrObj); 01953 01954 // need at least two values for phi 01955 std::vector<boost::uint64_t> tmpValues((nrObj > 2) ? nrObj : 2); 01956 01957 // get etThreshold values and fill into structure 01958 if ( !getConditionChildValues(node, m_xmlTagEtThreshold, nrObj, tmpValues) ) { 01959 return false; 01960 } 01961 01962 for (int i = 0; i < nrObj; i++) { 01963 objParameter[i].etThreshold = tmpValues[i]; 01964 01965 //LogTrace("L1GtTriggerMenuXmlParser") 01966 //<< " EnergySum ET high threshold (hex) for energySum object " << i << " = " 01967 //<< std::hex << objParameter[i].etThreshold << std::dec 01968 //<< std::endl; 01969 01970 // for ETM read phi value 01971 // phi is larger than 64 bits -it needs two 64bits words 01972 if (energySumObjType == ETM) { 01973 01974 if ( !getXMLHexTextValue128(findXMLChild(node->getFirstChild(), m_xmlTagPhi), 01975 tmpValues[0], tmpValues[1])) { 01976 edm::LogError("L1GtTriggerMenuXmlParser") 01977 << " Could not get phi for ETM condition (" << name << ")" << std::endl; 01978 return false; 01979 } 01980 01981 objParameter[i].phiRange0Word = tmpValues[0]; 01982 objParameter[i].phiRange1Word = tmpValues[1]; 01983 01984 } 01985 01986 // get energyOverflow logical flag and fill into structure 01987 DOMNode* n1; 01988 if ( (n1 = findXMLChild(node->getFirstChild(), m_xmlTagEtThreshold)) == 0) { 01989 edm::LogError("L1GtTriggerMenuXmlParser") 01990 << " Could not get energyOverflow for EnergySum condition (" << name << ")" 01991 << std::endl; 01992 return false; 01993 } 01994 if ( (n1 = findXMLChild(n1->getFirstChild(), m_xmlTagEnergyOverflow)) == 0) { 01995 edm::LogError("L1GtTriggerMenuXmlParser") 01996 << " Could not get energyOverflow for EnergySum condition (" << name << ")" 01997 << std::endl; 01998 return false; 01999 } 02000 02001 int tmpInt = getBitFromNode(n1); 02002 if (tmpInt == 0) { 02003 objParameter[i].energyOverflow = false; 02004 02005 //LogTrace("L1GtTriggerMenuXmlParser") 02006 //<< " EnergySum energyOverflow logical flag (hex) = " 02007 //<< std::hex << objParameter[i].energyOverflow << std::dec 02008 //<< std::endl; 02009 } 02010 else if (tmpInt == 1) { 02011 objParameter[i].energyOverflow = true; 02012 02013 //LogTrace("L1GtTriggerMenuXmlParser") 02014 //<< " EnergySum energyOverflow logical flag (hex) = " 02015 //<< std::hex << objParameter[i].energyOverflow << std::dec 02016 //<< std::endl; 02017 } 02018 else { 02019 LogTrace("L1GtTriggerMenuXmlParser") 02020 << " EnergySum energyOverflow logical flag (hex) = " << std::hex << tmpInt 02021 << std::dec << " - wrong value! " << std::endl; 02022 return false; 02023 } 02024 02025 } 02026 02027 // object types - all same energySumObjType 02028 std::vector<L1GtObject> objType(nrObj, energySumObjType); 02029 02030 // now create a new energySum condition 02031 02032 L1GtEnergySumTemplate energySumCond(name); 02033 02034 energySumCond.setCondType(cType); 02035 energySumCond.setObjectType(objType); 02036 energySumCond.setCondGEq(gEq); 02037 energySumCond.setCondChipNr(chipNr); 02038 02039 energySumCond.setConditionParameter(objParameter); 02040 02041 if (edm::isDebugEnabled() ) { 02042 02043 std::ostringstream myCoutStream; 02044 energySumCond.print(myCoutStream); 02045 LogTrace("L1GtTriggerMenuXmlParser") << myCoutStream.str() << "\n" << std::endl; 02046 02047 } 02048 02049 // insert condition into the map 02050 if ( !insertConditionIntoMap(energySumCond, chipNr)) { 02051 02052 edm::LogError("L1GtTriggerMenuXmlParser") 02053 << " Error: duplicate condition (" << name << ")" 02054 << std::endl; 02055 02056 return false; 02057 } 02058 else { 02059 02060 if (corrFlag) { 02061 (m_corEnergySumTemplate[chipNr]).push_back(energySumCond); 02062 02063 } 02064 else { 02065 (m_vecEnergySumTemplate[chipNr]).push_back(energySumCond); 02066 } 02067 02068 } 02069 02070 02071 // 02072 return true; 02073 }
bool L1GtTriggerMenuXmlParser::parseHfBitCounts | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | name, | |||
unsigned int | chipNr = 0 | |||
) | [private] |
parse a HfBitCounts condition
parseHfBitCounts Parse a "HF bit counts" condition and insert an entry to the conditions map
node | The corresponding node. | |
name | The name of the condition. | |
chipNr | The number of the chip this condition is located. |
Definition at line 2336 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), getConditionChildValues(), getGEqFlag(), getXMLAttribute(), HfBitCounts, i, insertConditionIntoMap(), edm::isDebugEnabled(), LogDebug, LogTrace, m_vecHfBitCountsTemplate, L1GtXmlParserTags::m_xmlConditionAttrCondition, L1GtXmlParserTags::m_xmlConditionAttrObject, L1GtXmlParserTags::m_xmlConditionAttrObjectHfBitCounts, L1GtXmlParserTags::m_xmlConditionAttrType, L1GtXmlParserTags::m_xmlTagCountThreshold, L1GtHfBitCountsTemplate::print(), L1GtCondition::setCondChipNr(), L1GtCondition::setCondGEq(), L1GtHfBitCountsTemplate::setConditionParameter(), L1GtCondition::setCondType(), L1GtCondition::setObjectType(), and TypeHfBitCounts.
Referenced by workCondition().
02337 { 02338 02339 XERCES_CPP_NAMESPACE_USE 02340 02341 // get condition, particle name and type name 02342 std::string condition = getXMLAttribute(node, m_xmlConditionAttrCondition); 02343 std::string particle = getXMLAttribute(node, m_xmlConditionAttrObject); 02344 std::string type = getXMLAttribute(node, m_xmlConditionAttrType); 02345 02346 if (particle != m_xmlConditionAttrObjectHfBitCounts) { 02347 edm::LogError("L1GtTriggerMenuXmlParser") << "Wrong particle for HfBitCounts condition (" 02348 << particle << ")" << std::endl; 02349 return false; 02350 } 02351 02352 // object type and condition type 02353 L1GtObject hfBitCountsObjType = HfBitCounts; 02354 L1GtConditionType cType = TypeHfBitCounts; 02355 02356 // global object 02357 int nrObj = 1; 02358 02359 // get greater equal flag 02360 02361 int intGEq = getGEqFlag(node, m_xmlTagCountThreshold); 02362 if (intGEq < 0) { 02363 edm::LogError("L1GtTriggerMenuXmlParser") << "Error getting \"greater or equal\" flag" 02364 << std::endl; 02365 return false; 02366 } 02367 // set the boolean value for the ge_eq mode 02368 bool gEq = (intGEq != 0); 02369 02370 // get values 02371 02372 // temporary storage of the parameters 02373 std::vector<L1GtHfBitCountsTemplate::ObjectParameter> objParameter(nrObj); 02374 02375 // get countIndex value and fill into structure 02376 // they are expressed in base 10 02377 char* endPtr = const_cast<char*>(type.c_str()); 02378 long int typeInt = strtol(type.c_str(), &endPtr, 10); // base = 10 02379 unsigned int typeIntUInt = static_cast<unsigned int>(typeInt); 02380 02381 if (*endPtr != 0) { 02382 02383 LogDebug("L1GtTriggerMenuXmlParser") << "Unable to convert " << type << " to dec." 02384 << std::endl; 02385 02386 return false; 02387 } 02388 02389 // test if count index is out of range FIXME introduce m_numberL1HfBitCounts? 02390 //if ((typeIntUInt < 0) || (typeIntUInt > m_numberL1HfBitCounts)) { 02391 // LogDebug("L1GtTriggerMenuXmlParser") << "Count index " << typeIntUInt 02392 // << " outside range [0, " << m_numberL1HfBitCounts << "]" << std::endl; 02393 // 02394 // return false; 02395 //} 02396 02397 objParameter[0].countIndex = typeIntUInt; 02398 02399 // get count threshold values and fill into structure 02400 std::vector<boost::uint64_t> tmpValues(nrObj); 02401 02402 if ( !getConditionChildValues(node, m_xmlTagCountThreshold, nrObj, tmpValues) ) { 02403 return false; 02404 } 02405 02406 for (int i = 0; i < nrObj; i++) { 02407 objParameter[i].countThreshold = tmpValues[i]; 02408 02409 //LogTrace("L1GtTriggerMenuXmlParser") 02410 //<< " HfBitCounts count threshold (hex) for HfBitCounts object " << i << " = " 02411 //<< std::hex << objParameter[i].countThreshold << std::dec 02412 //<< std::endl; 02413 02414 } 02415 02416 // object types - all same objType 02417 std::vector<L1GtObject> objType(nrObj, hfBitCountsObjType); 02418 02419 // now create a new HfBitCounts condition 02420 02421 L1GtHfBitCountsTemplate hfBitCountsCond(name); 02422 02423 hfBitCountsCond.setCondType(cType); 02424 hfBitCountsCond.setObjectType(objType); 02425 hfBitCountsCond.setCondGEq(gEq); 02426 hfBitCountsCond.setCondChipNr(chipNr); 02427 02428 hfBitCountsCond.setConditionParameter(objParameter); 02429 02430 if (edm::isDebugEnabled() ) { 02431 02432 std::ostringstream myCoutStream; 02433 hfBitCountsCond.print(myCoutStream); 02434 LogTrace("L1GtTriggerMenuXmlParser") << myCoutStream.str() << "\n" << std::endl; 02435 02436 } 02437 02438 // insert condition into the map 02439 if ( !insertConditionIntoMap(hfBitCountsCond, chipNr)) { 02440 02441 edm::LogError("L1GtTriggerMenuXmlParser") << " Error: duplicate condition (" << name 02442 << ")" << std::endl; 02443 02444 return false; 02445 } else { 02446 02447 (m_vecHfBitCountsTemplate[chipNr]).push_back(hfBitCountsCond); 02448 02449 } 02450 02451 02452 // 02453 return true; 02454 }
bool L1GtTriggerMenuXmlParser::parseHfRingEtSums | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | name, | |||
unsigned int | chipNr = 0 | |||
) | [private] |
parse a HfRingEtSums condition
parseHfRingEtSums Parse a "HF Ring ET sums" condition and insert an entry to the conditions map
node | The corresponding node. | |
name | The name of the condition. | |
chipNr | The number of the chip this condition is located. |
Definition at line 2469 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), getConditionChildValues(), getGEqFlag(), getXMLAttribute(), HfRingEtSums, i, insertConditionIntoMap(), edm::isDebugEnabled(), LogDebug, LogTrace, m_vecHfRingEtSumsTemplate, L1GtXmlParserTags::m_xmlConditionAttrCondition, L1GtXmlParserTags::m_xmlConditionAttrObject, L1GtXmlParserTags::m_xmlConditionAttrObjectHfRingEtSums, L1GtXmlParserTags::m_xmlConditionAttrType, L1GtXmlParserTags::m_xmlTagEtThreshold, L1GtHfRingEtSumsTemplate::print(), L1GtCondition::setCondChipNr(), L1GtCondition::setCondGEq(), L1GtHfRingEtSumsTemplate::setConditionParameter(), L1GtCondition::setCondType(), L1GtCondition::setObjectType(), and TypeHfRingEtSums.
Referenced by workCondition().
02470 { 02471 02472 XERCES_CPP_NAMESPACE_USE 02473 02474 // get condition, particle name and type name 02475 std::string condition = getXMLAttribute(node, m_xmlConditionAttrCondition); 02476 std::string particle = getXMLAttribute(node, m_xmlConditionAttrObject); 02477 std::string type = getXMLAttribute(node, m_xmlConditionAttrType); 02478 02479 if (particle != m_xmlConditionAttrObjectHfRingEtSums) { 02480 edm::LogError("L1GtTriggerMenuXmlParser") << "Wrong particle for HfRingEtSums condition (" 02481 << particle << ")" << std::endl; 02482 return false; 02483 } 02484 02485 // object type and condition type 02486 L1GtObject hfRingEtSumsObjType = HfRingEtSums; 02487 L1GtConditionType cType = TypeHfRingEtSums; 02488 02489 // global object 02490 int nrObj = 1; 02491 02492 // get greater equal flag 02493 02494 int intGEq = getGEqFlag(node, m_xmlTagEtThreshold); 02495 if (intGEq < 0) { 02496 edm::LogError("L1GtTriggerMenuXmlParser") << "Error getting \"greater or equal\" flag" 02497 << std::endl; 02498 return false; 02499 } 02500 // set the boolean value for the ge_eq mode 02501 bool gEq = (intGEq != 0); 02502 02503 // get values 02504 02505 // temporary storage of the parameters 02506 std::vector<L1GtHfRingEtSumsTemplate::ObjectParameter> objParameter(nrObj); 02507 02508 // get etSumIndex value and fill into structure 02509 // they are expressed in base 10 02510 char* endPtr = const_cast<char*>(type.c_str()); 02511 long int typeInt = strtol(type.c_str(), &endPtr, 10); // base = 10 02512 unsigned int typeIntUInt = static_cast<unsigned int>(typeInt); 02513 02514 if (*endPtr != 0) { 02515 02516 LogDebug("L1GtTriggerMenuXmlParser") << "Unable to convert " << type << " to dec." 02517 << std::endl; 02518 02519 return false; 02520 } 02521 02522 // test if ET sum index is out of range FIXME introduce m_numberL1HfRingEtSums? 02523 //if ((typeIntUInt < 0) || (typeIntUInt > m_numberL1HfRingEtSums)) { 02524 // LogDebug("L1GtTriggerMenuXmlParser") << "Count index " << typeIntUInt 02525 // << " outside range [0, " << m_numberL1HfRingEtSums << "]" << std::endl; 02526 // 02527 // return false; 02528 //} 02529 02530 objParameter[0].etSumIndex = typeIntUInt; 02531 02532 // get ET sum threshold values and fill into structure 02533 std::vector<boost::uint64_t> tmpValues(nrObj); 02534 02535 if ( !getConditionChildValues(node, m_xmlTagEtThreshold, nrObj, tmpValues) ) { 02536 return false; 02537 } 02538 02539 for (int i = 0; i < nrObj; i++) { 02540 objParameter[i].etSumThreshold = tmpValues[i]; 02541 02542 //LogTrace("L1GtTriggerMenuXmlParser") 02543 //<< " HfRingEtSums count threshold (hex) for HfRingEtSums object " << i << " = " 02544 //<< std::hex << objParameter[i].etSumThreshold << std::dec 02545 //<< std::endl; 02546 02547 } 02548 02549 // object types - all same objType 02550 std::vector<L1GtObject> objType(nrObj, hfRingEtSumsObjType); 02551 02552 // now create a new HfRingEtSums condition 02553 02554 L1GtHfRingEtSumsTemplate hfRingEtSumsCond(name); 02555 02556 hfRingEtSumsCond.setCondType(cType); 02557 hfRingEtSumsCond.setObjectType(objType); 02558 hfRingEtSumsCond.setCondGEq(gEq); 02559 hfRingEtSumsCond.setCondChipNr(chipNr); 02560 02561 hfRingEtSumsCond.setConditionParameter(objParameter); 02562 02563 if (edm::isDebugEnabled() ) { 02564 02565 std::ostringstream myCoutStream; 02566 hfRingEtSumsCond.print(myCoutStream); 02567 LogTrace("L1GtTriggerMenuXmlParser") << myCoutStream.str() << "\n" << std::endl; 02568 02569 } 02570 02571 // insert condition into the map 02572 if ( !insertConditionIntoMap(hfRingEtSumsCond, chipNr)) { 02573 02574 edm::LogError("L1GtTriggerMenuXmlParser") << " Error: duplicate condition (" << name 02575 << ")" << std::endl; 02576 02577 return false; 02578 } else { 02579 02580 (m_vecHfRingEtSumsTemplate[chipNr]).push_back(hfRingEtSumsCond); 02581 02582 } 02583 02584 02585 // 02586 return true; 02587 }
bool L1GtTriggerMenuXmlParser::parseJetCounts | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | name, | |||
unsigned int | chipNr = 0 | |||
) | [private] |
parse a "jet counts" condition
parseJetCounts Parse a "jet counts" condition and insert an entry to the conditions map
node | The corresponding node. | |
name | The name of the condition. | |
chipNr | The number of the chip this condition is located. |
Definition at line 2087 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), getConditionChildValues(), getGEqFlag(), getXMLAttribute(), i, insertConditionIntoMap(), edm::isDebugEnabled(), JetCounts, LogDebug, LogTrace, m_numberL1JetCounts, m_vecJetCountsTemplate, L1GtXmlParserTags::m_xmlConditionAttrCondition, L1GtXmlParserTags::m_xmlConditionAttrObject, L1GtXmlParserTags::m_xmlConditionAttrObjectJetCounts, L1GtXmlParserTags::m_xmlConditionAttrType, L1GtXmlParserTags::m_xmlTagCountThreshold, L1GtJetCountsTemplate::print(), L1GtCondition::setCondChipNr(), L1GtCondition::setCondGEq(), L1GtJetCountsTemplate::setConditionParameter(), L1GtCondition::setCondType(), L1GtCondition::setObjectType(), and TypeJetCounts.
Referenced by workCondition().
02088 { 02089 02090 XERCES_CPP_NAMESPACE_USE 02091 02092 // get condition, particle name and type name 02093 std::string condition = getXMLAttribute(node, m_xmlConditionAttrCondition); 02094 std::string particle = getXMLAttribute(node, m_xmlConditionAttrObject); 02095 std::string type = getXMLAttribute(node, m_xmlConditionAttrType); 02096 02097 if (particle != m_xmlConditionAttrObjectJetCounts) { 02098 edm::LogError("L1GtTriggerMenuXmlParser") << "Wrong particle for JetCounts condition (" 02099 << particle << ")" << std::endl; 02100 return false; 02101 } 02102 02103 // object type and condition type 02104 L1GtObject jetCountsObjType = JetCounts; 02105 L1GtConditionType cType = TypeJetCounts; 02106 02107 // global object 02108 int nrObj = 1; 02109 02110 // get greater equal flag 02111 02112 int intGEq = getGEqFlag(node, m_xmlTagCountThreshold); 02113 if (intGEq < 0) { 02114 edm::LogError("L1GtTriggerMenuXmlParser") << "Error getting \"greater or equal\" flag" 02115 << std::endl; 02116 return false; 02117 } 02118 // set the boolean value for the ge_eq mode 02119 bool gEq = (intGEq != 0); 02120 02121 // get values 02122 02123 // temporary storage of the parameters 02124 std::vector<L1GtJetCountsTemplate::ObjectParameter> objParameter(nrObj); 02125 02126 // get countIndex value and fill into structure 02127 // they are expressed in base 10 (values: 0 - m_numberL1JetCounts) 02128 char* endPtr = const_cast<char*>(type.c_str()); 02129 long int typeInt = strtol(type.c_str(), &endPtr, 10); // base = 10 02130 unsigned int typeIntUInt = static_cast<unsigned int>(typeInt); 02131 02132 if (*endPtr != 0) { 02133 02134 LogDebug("L1GtTriggerMenuXmlParser") << "Unable to convert " << type << " to dec." 02135 << std::endl; 02136 02137 return false; 02138 } 02139 02140 // test if count index is out of range 02141 if ((typeIntUInt < 0) || (typeIntUInt > m_numberL1JetCounts)) { 02142 LogDebug("L1GtTriggerMenuXmlParser") << "Count index " << typeIntUInt 02143 << " outside range [0, " << m_numberL1JetCounts << "]" << std::endl; 02144 02145 return false; 02146 } 02147 02148 objParameter[0].countIndex = typeIntUInt; 02149 02150 // get count threshold values and fill into structure 02151 std::vector<boost::uint64_t> tmpValues(nrObj); 02152 02153 if ( !getConditionChildValues(node, m_xmlTagCountThreshold, nrObj, tmpValues) ) { 02154 return false; 02155 } 02156 02157 for (int i = 0; i < nrObj; i++) { 02158 objParameter[i].countThreshold = tmpValues[i]; 02159 02160 //LogTrace("L1GtTriggerMenuXmlParser") 02161 //<< " JetCounts count threshold (hex) for JetCounts object " << i << " = " 02162 //<< std::hex << objParameter[i].countThreshold << std::dec 02163 //<< std::endl; 02164 02165 // TODO FIXME un-comment when tag available in XML file 02166 02167 // // get countOverflow logical flag and fill into structure 02168 // DOMNode* n1; 02169 // if ( (n1 = findXMLChild(node->getFirstChild(), m_xmlTagCountThreshold)) == 0) { 02170 // edm::LogError("L1GtTriggerMenuXmlParser") 02171 // << " Could not get countOverflow for JetCounts condition (" 02172 // << name << ")" 02173 // << std::endl; 02174 // return false; 02175 // } 02176 // if ( (n1 = findXMLChild(n1->getFirstChild(), m_xmlTagCountThreshold)) == 0) { 02177 // edm::LogError("L1GtTriggerMenuXmlParser") 02178 // << " Could not get countOverflow for JetCounts condition (" 02179 // << name << ")" 02180 // << std::endl; 02181 // return false; 02182 // } 02183 // 02184 // int tmpInt = getBitFromNode(n1); 02185 // if (tmpInt == 0) { 02186 // objParameter[i].countOverflow = false; 02187 // 02188 // LogTrace("L1GtTriggerMenuXmlParser") 02189 // << " JetCounts countOverflow logical flag (hex) = " 02190 // << std::hex << objParameter[i].countOverflow << std::dec 02191 // << std::endl; 02192 // } else if (tmpInt == 1) { 02193 // objParameter[i].countOverflow = true; 02194 // 02195 // LogTrace("L1GtTriggerMenuXmlParser") 02196 // << " JetCounts countOverflow logical flag (hex) = " 02197 // << std::hex << objParameter[i].countOverflow << std::dec 02198 // << std::endl; 02199 // } else { 02200 // LogTrace("L1GtTriggerMenuXmlParser") 02201 // << " JetCounts countOverflow logical flag (hex) = " 02202 // << std::hex << tmpInt << std::dec << " - wrong value! " 02203 // << std::endl; 02204 // return false; 02205 // } 02206 02207 } 02208 02209 // object types - all same objType 02210 std::vector<L1GtObject> objType(nrObj, jetCountsObjType); 02211 02212 // now create a new JetCounts condition 02213 02214 L1GtJetCountsTemplate jetCountsCond(name); 02215 02216 jetCountsCond.setCondType(cType); 02217 jetCountsCond.setObjectType(objType); 02218 jetCountsCond.setCondGEq(gEq); 02219 jetCountsCond.setCondChipNr(chipNr); 02220 02221 jetCountsCond.setConditionParameter(objParameter); 02222 02223 if (edm::isDebugEnabled() ) { 02224 02225 std::ostringstream myCoutStream; 02226 jetCountsCond.print(myCoutStream); 02227 LogTrace("L1GtTriggerMenuXmlParser") << myCoutStream.str() << "\n" << std::endl; 02228 02229 } 02230 02231 // insert condition into the map 02232 if ( !insertConditionIntoMap(jetCountsCond, chipNr)) { 02233 02234 edm::LogError("L1GtTriggerMenuXmlParser") << " Error: duplicate condition (" << name 02235 << ")" << std::endl; 02236 02237 return false; 02238 } else { 02239 02240 (m_vecJetCountsTemplate[chipNr]).push_back(jetCountsCond); 02241 02242 } 02243 02244 02245 // 02246 return true; 02247 }
bool L1GtTriggerMenuXmlParser::parseMuon | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | name, | |||
unsigned int | chipNr = 0 , |
|||
const bool | corrFlag = false | |||
) | [private] |
parse a muon condition
parseMuon Parse a muon condition and insert an entry to the conditions map
node | The corresponding node. | |
name | The name of the condition. | |
chipNr | The number of the chip this condition is located. |
Definition at line 1402 of file L1GtTriggerMenuXmlParser.cc.
References L1GtMuonTemplate::CorrelationParameter::chargeCorrelation, countConditionChildMaxBits(), L1GtMuonTemplate::CorrelationParameter::deltaEtaRange, L1GtMuonTemplate::CorrelationParameter::deltaPhiMaxbits, L1GtMuonTemplate::CorrelationParameter::deltaPhiRange0Word, L1GtMuonTemplate::CorrelationParameter::deltaPhiRange1Word, lat::endl(), findXMLChild(), getConditionChildValues(), getGEqFlag(), getMuonMipIsoBits(), getNumFromType(), getTypeFromType(), getXMLAttribute(), getXMLHexTextValue(), getXMLHexTextValue128(), i, insertConditionIntoMap(), edm::isDebugEnabled(), LogDebug, LogTrace, m_corMuonTemplate, m_vecMuonTemplate, L1GtXmlParserTags::m_xmlConditionAttrCondition, L1GtXmlParserTags::m_xmlConditionAttrObject, L1GtXmlParserTags::m_xmlConditionAttrObjectMu, L1GtXmlParserTags::m_xmlConditionAttrType, L1GtXmlParserTags::m_xmlConditionAttrType2wsc, L1GtXmlParserTags::m_xmlTagChargeCorrelation, L1GtXmlParserTags::m_xmlTagDeltaEta, L1GtXmlParserTags::m_xmlTagDeltaPhi, L1GtXmlParserTags::m_xmlTagEta, L1GtXmlParserTags::m_xmlTagPhiHigh, L1GtXmlParserTags::m_xmlTagPhiLow, L1GtXmlParserTags::m_xmlTagPtHighThreshold, L1GtXmlParserTags::m_xmlTagPtLowThreshold, L1GtXmlParserTags::m_xmlTagQuality, Mu, L1GtMuonTemplate::print(), L1GtCondition::setCondChipNr(), L1GtCondition::setCondGEq(), L1GtMuonTemplate::setConditionParameter(), L1GtCondition::setCondType(), L1GtCondition::setObjectType(), and TypeNull.
Referenced by parseCorrelation(), and workCondition().
01403 { 01404 01405 XERCES_CPP_NAMESPACE_USE 01406 01407 // get condition, particle name (must be muon) and type name 01408 std::string condition = getXMLAttribute(node, m_xmlConditionAttrCondition); 01409 std::string particle = getXMLAttribute(node, m_xmlConditionAttrObject); 01410 std::string type = getXMLAttribute(node, m_xmlConditionAttrType); 01411 01412 if (particle != m_xmlConditionAttrObjectMu) { 01413 edm::LogError("L1GtTriggerMenuXmlParser") << "Wrong particle for muon-condition (" 01414 << particle << ")" << std::endl; 01415 return false; 01416 } 01417 01418 int nrObj = getNumFromType(type); 01419 if (nrObj < 0) { 01420 edm::LogError("L1GtTriggerMenuXmlParser") << "Unknown type for muon-condition (" << type 01421 << ")" << "\nCan not determine number of trigger objects. " << std::endl; 01422 return false; 01423 } 01424 01425 // get greater equal flag 01426 01427 int intGEq = getGEqFlag(node, m_xmlTagPtHighThreshold); 01428 if (intGEq < 0) { 01429 edm::LogError("L1GtTriggerMenuXmlParser") << "Error getting \"greater or equal\" flag" 01430 << std::endl; 01431 return false; 01432 } 01433 // set the boolean value for the ge_eq mode 01434 bool gEq = (intGEq != 0); 01435 01436 // get values 01437 01438 // temporary storage of the parameters 01439 std::vector<L1GtMuonTemplate::ObjectParameter> objParameter(nrObj); 01440 L1GtMuonTemplate::CorrelationParameter corrParameter; 01441 01442 // need at least two values for deltaPhi 01443 std::vector<boost::uint64_t> tmpValues((nrObj > 2) ? nrObj : 2); 01444 01445 // get ptHighThreshold values and fill into structure 01446 if ( !getConditionChildValues(node, m_xmlTagPtHighThreshold, nrObj, tmpValues) ) { 01447 return false; 01448 } 01449 01450 for (int i = 0; i < nrObj; i++) { 01451 objParameter[i].ptHighThreshold = tmpValues[i]; 01452 01453 //LogTrace("L1GtTriggerMenuXmlParser") 01454 //<< " Muon pT high threshold (hex) for muon " << i << " = " 01455 //<< std::hex << objParameter[i].ptHighThreshold << std::dec 01456 //<< std::endl; 01457 } 01458 01459 // get ptLowThreshold values and fill into structure 01460 if ( !getConditionChildValues(node, m_xmlTagPtLowThreshold, nrObj, tmpValues) ) { 01461 return false; 01462 } 01463 01464 for (int i = 0; i < nrObj; i++) { 01465 //LogTrace("L1GtTriggerMenuXmlParser") 01466 //<< " Muon pT low threshold word (hex) for muon " << i << " = " 01467 //<< std::hex << tmpValues[i] << std::dec 01468 //<< std::endl; 01469 01470 // TODO FIXME stupid format in def.xml... 01471 // one takes mip bit also, therefore one divide by 16 01472 tmpValues[i] = (tmpValues[i])/16; 01473 01474 objParameter[i].ptLowThreshold = tmpValues[i]; 01475 01476 //LogTrace("L1GtTriggerMenuXmlParser") 01477 //<< " Muon pT low threshold (hex) for muon " << i << " = " 01478 //<< std::hex << objParameter[i].ptLowThreshold << std::dec 01479 //<< std::endl; 01480 } 01481 01482 // get qualityRange and fill into structure 01483 if ( !getConditionChildValues(node, m_xmlTagQuality, nrObj, tmpValues) ) { 01484 return false; 01485 } 01486 01487 for (int i = 0; i < nrObj; i++) { 01488 objParameter[i].qualityRange = tmpValues[i]; 01489 01490 //LogTrace("L1GtTriggerMenuXmlParser") 01491 //<< " qualityRange mask (hex) for muon " << i << " = " 01492 //<< std::hex << objParameter[i].qualityRange << std::dec 01493 //<< std::endl; 01494 } 01495 01496 // get etaRange and fill into structure 01497 if ( !getConditionChildValues(node, m_xmlTagEta, nrObj, tmpValues) ) { 01498 return false; 01499 } 01500 01501 for (int i = 0; i < nrObj; i++) { 01502 01503 objParameter[i].etaRange = tmpValues[i]; 01504 01505 //LogTrace("L1GtTriggerMenuXmlParser") 01506 //<< " etaRange (hex) for muon " << i << " = " 01507 //<< std::hex << objParameter[i].etaRange << std::dec 01508 //<< std::endl; 01509 } 01510 01511 // get phiHigh values and fill into structure 01512 if ( !getConditionChildValues(node, m_xmlTagPhiHigh, nrObj, tmpValues) ) { 01513 return false; 01514 } 01515 01516 for (int i = 0; i < nrObj; i++) { 01517 objParameter[i].phiHigh = tmpValues[i]; 01518 01519 //LogTrace("L1GtTriggerMenuXmlParser") 01520 //<< " phiHigh (hex) for muon " << i << " = " 01521 //<< std::hex << objParameter[i].phiHigh << std::dec 01522 //<< std::endl; 01523 } 01524 01525 // get phiLow values and fill into structure 01526 if ( !getConditionChildValues(node, m_xmlTagPhiLow, nrObj, tmpValues) ) { 01527 return false; 01528 } 01529 01530 for (int i = 0; i < nrObj; i++) { 01531 objParameter[i].phiLow = tmpValues[i]; 01532 01533 //LogTrace("L1GtTriggerMenuXmlParser") 01534 //<< " phiLow (hex) for muon " << i << " = " 01535 //<< std::hex << objParameter[i].phiLow << std::dec 01536 //<< std::endl; 01537 } 01538 01539 // get charge correlation and fill into structure 01540 if ( !getXMLHexTextValue(findXMLChild(node->getFirstChild(), m_xmlTagChargeCorrelation), 01541 tmpValues[0]) ) { 01542 01543 LogDebug("L1GtTriggerMenuXmlParser") 01544 << " Error getting charge correlation from muon condition (" << name << ")" 01545 << std::endl; 01546 return false; 01547 } 01548 01549 corrParameter.chargeCorrelation = tmpValues[0]; 01550 01551 //LogTrace("L1GtTriggerMenuXmlParser") 01552 //<< " charge correlation" << " = " 01553 //<< std::hex << corrParameter.chargeCorrelation << std::dec 01554 //<< std::endl; 01555 01556 // get mip and iso bits and fill into structure 01557 01558 std::vector<bool> tmpMip(nrObj); 01559 std::vector<bool> tmpEnableIso(nrObj); 01560 std::vector<bool> tmpRequestIso(nrObj); 01561 01562 if ( !getMuonMipIsoBits(node, nrObj, tmpMip, tmpEnableIso, tmpRequestIso) ) { 01563 edm::LogError("L1GtTriggerMenuXmlParser") 01564 << " Could not get mip and iso bits from muon condition (" << name << ")" 01565 << std::endl; 01566 return false; 01567 } 01568 01569 for (int i = 0; i < nrObj; i++) { 01570 objParameter[i].enableMip = tmpMip[i]; 01571 objParameter[i].enableIso = tmpEnableIso[i]; 01572 objParameter[i].requestIso = tmpRequestIso[i]; 01573 } 01574 01575 // indicates if a correlation is used 01576 bool wscVal = (type == m_xmlConditionAttrType2wsc ); 01577 01578 if (wscVal) { 01579 // get deltaEtaRange 01580 if ( !getConditionChildValues(node, m_xmlTagDeltaEta, 1, tmpValues) ) { 01581 return false; 01582 } 01583 01584 corrParameter.deltaEtaRange = tmpValues[0]; 01585 01586 // deltaPhi is larger than 64bit 01587 if ( !getXMLHexTextValue128(findXMLChild(node->getFirstChild(), m_xmlTagDeltaPhi), 01588 tmpValues[0], tmpValues[1])) { 01589 edm::LogError("L1GtTriggerMenuXmlParser") 01590 << " Could not get deltaPhi for muon condition with wsc (" << name << ")" 01591 << std::endl; 01592 return false; 01593 } 01594 01595 corrParameter.deltaPhiRange0Word = tmpValues[0]; 01596 corrParameter.deltaPhiRange1Word = tmpValues[1]; 01597 01598 // get maximum number of bits for delta phi 01599 //LogTrace("L1GtTriggerMenuXmlParser") 01600 //<< " Counting deltaPhiMaxbits" 01601 //<< std::endl; 01602 01603 unsigned int maxbits; 01604 01605 if ( !countConditionChildMaxBits(node, m_xmlTagDeltaPhi, maxbits) ) { 01606 return false; 01607 } 01608 01609 corrParameter.deltaPhiMaxbits = maxbits; 01610 //LogTrace("L1GtTriggerMenuXmlParser") 01611 //<< " deltaPhiMaxbits (dec) = " << maxbits 01612 //<< std::endl; 01613 } 01614 01615 // get the type of the condition, as defined in enum, from the condition type 01616 // as defined in the XML file 01617 L1GtConditionType cType = getTypeFromType(type); 01618 //LogTrace("L1GtTriggerMenuXmlParser") 01619 //<< " Condition type (enum value) = " << cType 01620 //<< std::endl; 01621 01622 if (cType == TypeNull) { 01623 edm::LogError("L1GtTriggerMenuXmlParser") 01624 << "Type for muon condition id TypeNull - it means not defined in the XML file." 01625 << "\nNumber of trigger objects is set to zero. " << std::endl; 01626 return false; 01627 } 01628 01629 // object types - all muons 01630 std::vector<L1GtObject> objType(nrObj, Mu); 01631 01632 // now create a new CondMuonition 01633 01634 L1GtMuonTemplate muonCond(name); 01635 01636 muonCond.setCondType(cType); 01637 muonCond.setObjectType(objType); 01638 muonCond.setCondGEq(gEq); 01639 muonCond.setCondChipNr(chipNr); 01640 01641 muonCond.setConditionParameter(objParameter, corrParameter); 01642 01643 if (edm::isDebugEnabled() ) { 01644 std::ostringstream myCoutStream; 01645 muonCond.print(myCoutStream); 01646 LogTrace("L1GtTriggerMenuXmlParser") << myCoutStream.str() << "\n" << std::endl; 01647 } 01648 01649 // insert condition into the map and into muon template vector 01650 if ( !insertConditionIntoMap(muonCond, chipNr)) { 01651 01652 edm::LogError("L1GtTriggerMenuXmlParser") 01653 << " Error: duplicate condition (" << name << ")" 01654 << std::endl; 01655 return false; 01656 } 01657 else { 01658 if (corrFlag) { 01659 (m_corMuonTemplate[chipNr]).push_back(muonCond); 01660 01661 } 01662 else { 01663 (m_vecMuonTemplate[chipNr]).push_back(muonCond); 01664 } 01665 01666 } 01667 01668 // 01669 return true; 01670 }
bool L1GtTriggerMenuXmlParser::parseTechTriggers | ( | XERCES_CPP_NAMESPACE::XercesDOMParser * | parser | ) | [private] |
parse all algorithms
Definition at line 3363 of file L1GtTriggerMenuXmlParser.cc.
References doc, lat::endl(), findXMLChild(), L1GtXmlParserTags::m_xmlTagDef, L1GtXmlParserTags::m_xmlTagTechTriggers, prof2calltree::node, and workTechTrigger().
Referenced by workXML().
03363 { 03364 03365 XERCES_CPP_NAMESPACE_USE 03366 03367 //LogTrace("L1GtTriggerMenuXmlParser") << "\nParsing technical triggers" << std::endl; 03368 03369 DOMNode* doc = parser->getDocument(); 03370 DOMNode* node = doc->getFirstChild(); 03371 03372 DOMNode* algNode = node->getFirstChild(); 03373 if (algNode == 0) { 03374 edm::LogError("L1GtTriggerMenuXmlParser") 03375 << " Error: No child found for " << m_xmlTagDef << std::endl; 03376 return false; 03377 } 03378 03379 algNode = findXMLChild(algNode, m_xmlTagTechTriggers); 03380 if (algNode == 0) { 03381 edm::LogError("L1GtTriggerMenuXmlParser") << " Error: No <" 03382 << m_xmlTagTechTriggers << "> child found." 03383 << std::endl; 03384 return false; 03385 } 03386 03387 // walk through technical triggers 03388 DOMNode* algNameNode = algNode->getFirstChild(); 03389 std::string algNameNodeName; 03390 algNameNode = findXMLChild(algNameNode, "", true, &algNameNodeName); 03391 03392 while (algNameNode != 0) { 03393 //LogTrace("L1GtTriggerMenuXmlParser") 03394 //<< " Found an technical trigger with name: " << algNameNodeName 03395 //<< std::endl; 03396 03397 if ( !workTechTrigger(algNameNode, algNameNodeName)) { 03398 return false; 03399 } 03400 03401 algNameNode = findXMLChild(algNameNode->getNextSibling(), "", true, 03402 &algNameNodeName); 03403 03404 } 03405 03406 return true; 03407 }
bool L1GtTriggerMenuXmlParser::parseVmeXML | ( | XERCES_CPP_NAMESPACE::XercesDOMParser * | parser | ) | [private] |
parse the vme xml file
parseVmeXML parse a xml file
parser | The parser to use for parsing the file. |
Definition at line 902 of file L1GtTriggerMenuXmlParser.cc.
References doc, lat::endl(), findXMLChild(), m_numberConditionChips, L1GtXmlParserTags::m_xmlTagChip, and L1GtXmlParserTags::m_xmlTagVme.
00902 { 00903 00904 XERCES_CPP_NAMESPACE_USE 00905 00906 DOMDocument* doc = parser->getDocument(); 00907 DOMNode* n1 = doc->getFirstChild(); 00908 00909 if (n1 == 0) { 00910 00911 edm::LogError("L1GtTriggerMenuXmlParser") << "Error: Found no XML child" << std::endl; 00912 00913 return false; 00914 } 00915 00916 // find "vme"-tag 00917 n1 = findXMLChild(n1, m_xmlTagVme); 00918 if (n1 == 0) { 00919 00920 edm::LogError("L1GtTriggerMenuXmlParser") << "Error: No vme tag found." << std::endl; 00921 return false; 00922 } 00923 00924 n1 = n1->getFirstChild(); 00925 00926 unsigned int chipCounter = 0; // count chips 00927 00928 while (chipCounter < m_numberConditionChips) { 00929 00930 n1 = findXMLChild(n1, m_xmlTagChip, true); 00931 if (n1 == 0) { 00932 // just break if no more chips found 00933 break; 00934 } 00935 00936 // node for a particle 00937 //DOMNode* particleNode = n1->getFirstChild(); // FIXME un-comment 00938 00939 // FIXME parse vme.xml, modify the menu 00940 00941 n1 = n1->getNextSibling(); 00942 chipCounter++; 00943 } // end while chipCounter 00944 00945 return true; 00946 00947 }
void L1GtTriggerMenuXmlParser::parseXmlFile | ( | const std::string & | defXmlFile, | |
const std::string & | vmeXmlFile | |||
) |
parse def.xml and vme.xml files
Definition at line 199 of file L1GtTriggerMenuXmlParser.cc.
References cleanupXML(), lat::endl(), initXML(), LogTrace, m_conditionMap, m_corCaloTemplate, m_corEnergySumTemplate, m_corMuonTemplate, m_numberConditionChips, m_triggerMenuName, m_vecCaloTemplate, m_vecCastorTemplate, m_vecCorrelationTemplate, m_vecEnergySumTemplate, m_vecHfBitCountsTemplate, m_vecHfRingEtSumsTemplate, m_vecJetCountsTemplate, m_vecMuonTemplate, m_xmlErrHandler, indexGen::parser, and workXML().
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00200 { 00201 00202 XERCES_CPP_NAMESPACE_USE 00203 00204 // resize the vector of condition maps 00205 // the number of condition chips should be correctly set before calling parseXmlFile 00206 m_conditionMap.resize(m_numberConditionChips); 00207 00208 m_vecMuonTemplate.resize(m_numberConditionChips); 00209 m_vecCaloTemplate.resize(m_numberConditionChips); 00210 m_vecEnergySumTemplate.resize(m_numberConditionChips); 00211 m_vecJetCountsTemplate.resize(m_numberConditionChips); 00212 m_vecCastorTemplate.resize(m_numberConditionChips); 00213 m_vecHfBitCountsTemplate.resize(m_numberConditionChips); 00214 m_vecHfRingEtSumsTemplate.resize(m_numberConditionChips); 00215 00216 m_vecCorrelationTemplate.resize(m_numberConditionChips); 00217 m_corMuonTemplate.resize(m_numberConditionChips); 00218 m_corCaloTemplate.resize(m_numberConditionChips); 00219 m_corEnergySumTemplate.resize(m_numberConditionChips); 00220 00221 // set the name of the trigger menu: defXmlFile, stripped of absolute path and .xml 00222 std::string::iterator itString; 00223 m_triggerMenuName = defXmlFile; 00224 size_t xmlPos = m_triggerMenuName.find_last_of("/"); 00225 m_triggerMenuName.erase(m_triggerMenuName.begin(), m_triggerMenuName.begin()+ xmlPos+1); 00226 00227 xmlPos = m_triggerMenuName.find_last_of("."); 00228 m_triggerMenuName.erase(m_triggerMenuName.begin()+ xmlPos, m_triggerMenuName.end()); 00229 00230 // error handler for xml-parser 00231 m_xmlErrHandler = 0; 00232 00233 XercesDOMParser* parser; 00234 00235 LogTrace("L1GtTriggerMenuXmlParser") << "\nOpening XML-File: \n " << defXmlFile << std::endl; 00236 00237 if ((parser = initXML(defXmlFile)) != 0) { 00238 workXML(parser); 00239 } 00240 cleanupXML(parser); 00241 00242 }
void L1GtTriggerMenuXmlParser::setCorCaloTemplate | ( | const std::vector< std::vector< L1GtCaloTemplate > > & | corCaloTempl | ) |
Definition at line 170 of file L1GtTriggerMenuXmlParser.cc.
References m_corCaloTemplate.
00171 { 00172 00173 m_corCaloTemplate = corCaloTempl; 00174 }
void L1GtTriggerMenuXmlParser::setCorEnergySumTemplate | ( | const std::vector< std::vector< L1GtEnergySumTemplate > > & | corEnergySumTempl | ) |
Definition at line 176 of file L1GtTriggerMenuXmlParser.cc.
References m_corEnergySumTemplate.
00177 { 00178 00179 m_corEnergySumTemplate = corEnergySumTempl; 00180 }
void L1GtTriggerMenuXmlParser::setCorMuonTemplate | ( | const std::vector< std::vector< L1GtMuonTemplate > > & | corMuonTempl | ) |
Definition at line 164 of file L1GtTriggerMenuXmlParser.cc.
References m_corMuonTemplate.
00165 { 00166 00167 m_corMuonTemplate = corMuonTempl; 00168 }
void L1GtTriggerMenuXmlParser::setGtAlgorithmMap | ( | const AlgorithmMap & | algoMap | ) |
Definition at line 186 of file L1GtTriggerMenuXmlParser.cc.
References m_algorithmMap.
00186 { 00187 m_algorithmMap = algoMap; 00188 }
void L1GtTriggerMenuXmlParser::setGtConditionMap | ( | const std::vector< ConditionMap > & | condMap | ) |
Definition at line 104 of file L1GtTriggerMenuXmlParser.cc.
References m_conditionMap.
00104 { 00105 m_conditionMap = condMap; 00106 }
void L1GtTriggerMenuXmlParser::setGtNumberConditionChips | ( | const unsigned int & | numberConditionChipsValue | ) |
Definition at line 56 of file L1GtTriggerMenuXmlParser.cc.
References m_numberConditionChips.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00057 { 00058 00059 m_numberConditionChips = numberConditionChipsValue; 00060 00061 }
void L1GtTriggerMenuXmlParser::setGtNumberL1JetCounts | ( | const unsigned int & | numberL1JetCountsValue | ) |
Definition at line 96 of file L1GtTriggerMenuXmlParser.cc.
References m_numberL1JetCounts.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00096 { 00097 00098 m_numberL1JetCounts = numberL1JetCountsValue; 00099 00100 }
void L1GtTriggerMenuXmlParser::setGtNumberPhysTriggers | ( | const unsigned int & | numberPhysTriggersValue | ) |
Definition at line 80 of file L1GtTriggerMenuXmlParser.cc.
References m_numberPhysTriggers.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00081 { 00082 00083 m_numberPhysTriggers = numberPhysTriggersValue; 00084 00085 }
void L1GtTriggerMenuXmlParser::setGtNumberTechTriggers | ( | const unsigned int & | numberTechTriggersValue | ) |
Definition at line 88 of file L1GtTriggerMenuXmlParser.cc.
References m_numberTechTriggers.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00089 { 00090 00091 m_numberTechTriggers = numberTechTriggersValue; 00092 00093 }
void L1GtTriggerMenuXmlParser::setGtOrderConditionChip | ( | const std::vector< int > & | orderConditionChipValue | ) |
Definition at line 72 of file L1GtTriggerMenuXmlParser.cc.
References m_orderConditionChip.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00073 { 00074 00075 m_orderConditionChip = orderConditionChipValue; 00076 00077 }
void L1GtTriggerMenuXmlParser::setGtPinsOnConditionChip | ( | const unsigned int & | pinsOnConditionChipValue | ) |
Definition at line 64 of file L1GtTriggerMenuXmlParser.cc.
References m_pinsOnConditionChip.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00064 { 00065 00066 m_pinsOnConditionChip = pinsOnConditionChipValue; 00067 00068 }
void L1GtTriggerMenuXmlParser::setGtTechnicalTriggerMap | ( | const AlgorithmMap & | ttMap | ) |
Definition at line 191 of file L1GtTriggerMenuXmlParser.cc.
References m_technicalTriggerMap.
00191 { 00192 m_technicalTriggerMap = ttMap; 00193 }
void L1GtTriggerMenuXmlParser::setGtTriggerMenuName | ( | const std::string & | menuName | ) |
Definition at line 109 of file L1GtTriggerMenuXmlParser.cc.
References m_triggerMenuName.
00109 { 00110 m_triggerMenuName = menuName; 00111 }
void L1GtTriggerMenuXmlParser::setVecCaloTemplate | ( | const std::vector< std::vector< L1GtCaloTemplate > > & | vecCaloTempl | ) |
Definition at line 120 of file L1GtTriggerMenuXmlParser.cc.
References m_vecCaloTemplate.
00121 { 00122 00123 m_vecCaloTemplate = vecCaloTempl; 00124 }
void L1GtTriggerMenuXmlParser::setVecCastorTemplate | ( | const std::vector< std::vector< L1GtCastorTemplate > > & | vecCastorTempl | ) |
Definition at line 138 of file L1GtTriggerMenuXmlParser.cc.
References m_vecCastorTemplate.
00139 { 00140 00141 m_vecCastorTemplate = vecCastorTempl; 00142 }
void L1GtTriggerMenuXmlParser::setVecCorrelationTemplate | ( | const std::vector< std::vector< L1GtCorrelationTemplate > > & | vecCorrelationTempl | ) |
Definition at line 156 of file L1GtTriggerMenuXmlParser.cc.
References m_vecCorrelationTemplate.
00157 { 00158 00159 m_vecCorrelationTemplate = vecCorrelationTempl; 00160 }
void L1GtTriggerMenuXmlParser::setVecEnergySumTemplate | ( | const std::vector< std::vector< L1GtEnergySumTemplate > > & | vecEnergySumTempl | ) |
Definition at line 126 of file L1GtTriggerMenuXmlParser.cc.
References m_vecEnergySumTemplate.
00127 { 00128 00129 m_vecEnergySumTemplate = vecEnergySumTempl; 00130 }
void L1GtTriggerMenuXmlParser::setVecHfBitCountsTemplate | ( | const std::vector< std::vector< L1GtHfBitCountsTemplate > > & | vecHfBitCountsTempl | ) |
Definition at line 144 of file L1GtTriggerMenuXmlParser.cc.
References m_vecHfBitCountsTemplate.
00145 { 00146 00147 m_vecHfBitCountsTemplate = vecHfBitCountsTempl; 00148 }
void L1GtTriggerMenuXmlParser::setVecHfRingEtSumsTemplate | ( | const std::vector< std::vector< L1GtHfRingEtSumsTemplate > > & | vecHfRingEtSumsTempl | ) |
Definition at line 150 of file L1GtTriggerMenuXmlParser.cc.
References m_vecHfRingEtSumsTemplate.
00151 { 00152 00153 m_vecHfRingEtSumsTemplate = vecHfRingEtSumsTempl; 00154 }
void L1GtTriggerMenuXmlParser::setVecJetCountsTemplate | ( | const std::vector< std::vector< L1GtJetCountsTemplate > > & | vecJetCountsTempl | ) |
Definition at line 132 of file L1GtTriggerMenuXmlParser.cc.
References m_vecJetCountsTemplate.
00133 { 00134 00135 m_vecJetCountsTemplate = vecJetCountsTempl; 00136 }
void L1GtTriggerMenuXmlParser::setVecMuonTemplate | ( | const std::vector< std::vector< L1GtMuonTemplate > > & | vecMuonTempl | ) |
Definition at line 114 of file L1GtTriggerMenuXmlParser.cc.
References m_vecMuonTemplate.
00115 { 00116 00117 m_vecMuonTemplate = vecMuonTempl; 00118 }
const std::vector<std::vector<L1GtCaloTemplate> >& L1GtTriggerMenuXmlParser::vecCaloTemplate | ( | ) | const [inline] |
Definition at line 133 of file L1GtTriggerMenuXmlParser.h.
References m_vecCaloTemplate.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00133 { 00134 return m_vecCaloTemplate; 00135 }
const std::vector<std::vector<L1GtCastorTemplate> >& L1GtTriggerMenuXmlParser::vecCastorTemplate | ( | ) | const [inline] |
Definition at line 158 of file L1GtTriggerMenuXmlParser.h.
References m_vecCastorTemplate.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00158 { 00159 00160 return m_vecCastorTemplate; 00161 }
const std::vector<std::vector<L1GtCorrelationTemplate> >& L1GtTriggerMenuXmlParser::vecCorrelationTemplate | ( | ) | const [inline] |
Definition at line 187 of file L1GtTriggerMenuXmlParser.h.
References m_vecCorrelationTemplate.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00187 { 00188 00189 return m_vecCorrelationTemplate; 00190 }
const std::vector<std::vector<L1GtEnergySumTemplate> >& L1GtTriggerMenuXmlParser::vecEnergySumTemplate | ( | ) | const [inline] |
Definition at line 140 of file L1GtTriggerMenuXmlParser.h.
References m_vecEnergySumTemplate.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00140 { 00141 00142 return m_vecEnergySumTemplate; 00143 }
const std::vector<std::vector<L1GtHfBitCountsTemplate> >& L1GtTriggerMenuXmlParser::vecHfBitCountsTemplate | ( | ) | const [inline] |
Definition at line 168 of file L1GtTriggerMenuXmlParser.h.
References m_vecHfBitCountsTemplate.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00168 { 00169 00170 return m_vecHfBitCountsTemplate; 00171 }
const std::vector<std::vector<L1GtHfRingEtSumsTemplate> >& L1GtTriggerMenuXmlParser::vecHfRingEtSumsTemplate | ( | ) | const [inline] |
Definition at line 178 of file L1GtTriggerMenuXmlParser.h.
References m_vecHfRingEtSumsTemplate.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00178 { 00179 00180 return m_vecHfRingEtSumsTemplate; 00181 }
const std::vector<std::vector<L1GtJetCountsTemplate> >& L1GtTriggerMenuXmlParser::vecJetCountsTemplate | ( | ) | const [inline] |
Definition at line 149 of file L1GtTriggerMenuXmlParser.h.
References m_vecJetCountsTemplate.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00149 { 00150 00151 return m_vecJetCountsTemplate; 00152 }
const std::vector<std::vector<L1GtMuonTemplate> >& L1GtTriggerMenuXmlParser::vecMuonTemplate | ( | ) | const [inline] |
get / set the vectors containing the conditions
Definition at line 126 of file L1GtTriggerMenuXmlParser.h.
References m_vecMuonTemplate.
Referenced by L1GtTriggerMenuXmlProducer::produceGtTriggerMenu().
00126 { 00127 return m_vecMuonTemplate; 00128 }
bool L1GtTriggerMenuXmlParser::workAlgorithm | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | algName, | |||
unsigned int | chipNr | |||
) | [private] |
parse an algorithm and insert it into algorithm map.
workAlgorithm - parse the algorithm and insert it into algorithm map.
node | The corresponding node to the algorithm. | |
name | The name of the algorithm. | |
chipNr | The number of the chip the conditions for that algorithm are located on. |
Definition at line 3089 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), cmsPerfPublish::fail(), findXMLChild(), getXMLAttribute(), getXMLTextValue(), insertAlgorithmIntoMap(), edm::isDebugEnabled(), LogDebug, LogTrace, m_orderConditionChip, m_pinsOnConditionChip, L1GtXmlParserTags::m_xmlAttrNr, L1GtXmlParserTags::m_xmlAttrPin, L1GtXmlParserTags::m_xmlAttrPinA, L1GtXmlParserTags::m_xmlTagOutput, and L1GtXmlParserTags::m_xmlTagOutputPin.
Referenced by parseAlgorithms().
03090 { 03091 03092 XERCES_CPP_NAMESPACE_USE 03093 03094 if (node == 0) { 03095 LogDebug("L1GtTriggerMenuXmlParser") 03096 << " Node is 0 in " << __PRETTY_FUNCTION__ 03097 << " can not parse the algorithm " << algName 03098 << std::endl; 03099 return false; 03100 } 03101 03102 // get the logical expression from the node 03103 std::string logExpression = getXMLTextValue(node); 03104 03105 //LogTrace("L1GtTriggerMenuXmlParser") 03106 //<< " Logical expression: " << logExpression 03107 //<< std::endl; 03108 03109 //LogTrace("L1GtTriggerMenuXmlParser") 03110 //<< " Chip number: " << chipNr 03111 //<< std::endl; 03112 03113 // determine output pin 03114 DOMNode* pinNode = findXMLChild(node->getFirstChild(), m_xmlTagOutput); 03115 std::string pinString; 03116 int outputPin = 0; 03117 03118 pinNode = node->getFirstChild(); 03119 while ( (pinNode = findXMLChild(pinNode, m_xmlTagOutputPin) ) != 0) { 03120 pinString = getXMLAttribute(pinNode, m_xmlAttrPin); // we look for the "a" pin 03121 if (pinString == m_xmlAttrPinA) { 03122 // found pin a 03123 pinString = getXMLAttribute(pinNode, m_xmlAttrNr); 03124 03125 // convert pinString to integer 03126 std::istringstream opStream(pinString); 03127 03128 if ((opStream >> outputPin).fail()) { 03129 LogDebug("L1GtTriggerMenuXmlParser") << " Unable to convert pin string " 03130 << pinString << " to int for algorithm : " << algName << std::endl; 03131 03132 return false; 03133 } 03134 03135 //LogTrace("L1GtTriggerMenuXmlParser") 03136 //<< " Output pin: " << outputPin 03137 //<< std::endl; 03138 03139 break; 03140 } 03141 pinNode = pinNode->getNextSibling(); 03142 } 03143 03144 if (pinNode == 0) { 03145 LogTrace("L1GtTriggerMenuXmlParser") << " Warning: No pin number found for algorithm: " 03146 << algName << std::endl; 03147 03148 return false; 03149 } 03150 03151 // compute the bit number from chip number, output pin and order of the chips 03152 // pin numbering start with 1, bit numbers with 0 03153 int bitNumber = outputPin + (m_orderConditionChip[chipNr] -1)*m_pinsOnConditionChip -1; 03154 03155 //LogTrace("L1GtTriggerMenuXmlParser") 03156 //<< " Bit number: " << bitNumber 03157 //<< std::endl; 03158 03159 // create a new algorithm and insert it into algorithm map 03160 L1GtAlgorithm alg(algName, logExpression, bitNumber); 03161 alg.setAlgoChipNumber(static_cast<int>(chipNr)); 03162 03163 if (edm::isDebugEnabled() ) { 03164 03165 std::ostringstream myCoutStream; 03166 alg.print(myCoutStream); 03167 LogTrace("L1GtTriggerMenuXmlParser") << myCoutStream.str() << "\n" << std::endl; 03168 03169 } 03170 03171 // insert algorithm into the map 03172 if ( !insertAlgorithmIntoMap(alg)) { 03173 03174 return false; 03175 } 03176 03177 return true; 03178 03179 }
bool L1GtTriggerMenuXmlParser::workCondition | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | name, | |||
unsigned int | chipNr | |||
) | [private] |
choose the parser for a particular condition
workCondition - call the apropiate function to parse this condition.
node | The corresponding node to the condition. | |
name | The name of the condition. | |
chipNr | The number of the chip the condition is located on. |
Definition at line 2929 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), getXMLAttribute(), L1GtXmlParserTags::m_xmlConditionAttrCondition, L1GtXmlParserTags::m_xmlConditionAttrConditionCalo, L1GtXmlParserTags::m_xmlConditionAttrConditionCastor, L1GtXmlParserTags::m_xmlConditionAttrConditionCorrelation, L1GtXmlParserTags::m_xmlConditionAttrConditionEnergySum, L1GtXmlParserTags::m_xmlConditionAttrConditionHfBitCounts, L1GtXmlParserTags::m_xmlConditionAttrConditionHfRingEtSums, L1GtXmlParserTags::m_xmlConditionAttrConditionJetCounts, L1GtXmlParserTags::m_xmlConditionAttrConditionMuon, L1GtXmlParserTags::m_xmlConditionAttrObject, L1GtXmlParserTags::m_xmlConditionAttrType, parseCalo(), parseCastor(), parseCorrelation(), parseEnergySum(), parseHfBitCounts(), parseHfRingEtSums(), parseJetCounts(), and parseMuon().
Referenced by parseConditions().
02930 { 02931 02932 XERCES_CPP_NAMESPACE_USE 02933 02934 // get condition, particle name and type name 02935 std::string condition = getXMLAttribute(node, m_xmlConditionAttrCondition); 02936 std::string particle = getXMLAttribute(node, m_xmlConditionAttrObject); 02937 std::string type = getXMLAttribute(node, m_xmlConditionAttrType); 02938 02939 if (condition.empty() || particle.empty() || type.empty() ) { 02940 02941 edm::LogError("L1GtTriggerMenuXmlParser") << "Missing attributes for condition " << name 02942 << std::endl; 02943 02944 return false; 02945 } 02946 02947 //LogTrace("L1GtTriggerMenuXmlParser") 02948 //<< " condition: " << condition << ", particle: " << particle 02949 //<< ", type: " << type << std::endl; 02950 02951 // call the appropiate function for this condition 02952 02953 if (condition == m_xmlConditionAttrConditionMuon) { 02954 return parseMuon(node, name, chipNr); 02955 } 02956 else if (condition == m_xmlConditionAttrConditionCalo) { 02957 return parseCalo(node, name, chipNr); 02958 } 02959 else if (condition == m_xmlConditionAttrConditionEnergySum) { 02960 return parseEnergySum(node, name, chipNr); 02961 } 02962 else if (condition == m_xmlConditionAttrConditionJetCounts) { 02963 return parseJetCounts(node, name, chipNr); 02964 } 02965 else if (condition == m_xmlConditionAttrConditionCastor) { 02966 return parseCastor(node, name, chipNr); 02967 } 02968 else if (condition == m_xmlConditionAttrConditionHfBitCounts) { 02969 return parseHfBitCounts(node, name, chipNr); 02970 } 02971 else if (condition == m_xmlConditionAttrConditionHfRingEtSums) { 02972 return parseHfRingEtSums(node, name, chipNr); 02973 } 02974 else if (condition == m_xmlConditionAttrConditionCorrelation) { 02975 return parseCorrelation(node, name, chipNr); 02976 } 02977 else { 02978 edm::LogError("L1GtTriggerMenuXmlParser") 02979 << "\n Error: unknown condition (" << condition << ")" 02980 << std::endl; 02981 02982 return false; 02983 } 02984 02985 return true; 02986 02987 }
bool L1GtTriggerMenuXmlParser::workTechTrigger | ( | XERCES_CPP_NAMESPACE::DOMNode * | node, | |
const std::string & | algName | |||
) | [private] |
parse an algorithm and insert it into algorithm map.
workTechTrigger - parse the technical trigger and insert it into technical trigger map.
node | The corresponding node to the technical trigger. | |
name | The name of the technical trigger. |
Definition at line 3275 of file L1GtTriggerMenuXmlParser.cc.
References lat::endl(), cmsPerfPublish::fail(), findXMLChild(), getXMLAttribute(), getXMLTextValue(), insertTechTriggerIntoMap(), edm::isDebugEnabled(), LogDebug, LogTrace, L1GtXmlParserTags::m_xmlAttrNr, L1GtXmlParserTags::m_xmlTagOutput, L1GtXmlParserTags::m_xmlTagOutputPin, and L1GtAlgorithm::print().
Referenced by parseTechTriggers().
03276 { 03277 03278 XERCES_CPP_NAMESPACE_USE 03279 03280 if (node == 0) { 03281 LogDebug("L1GtTriggerMenuXmlParser") 03282 << " Node is 0 in " << __PRETTY_FUNCTION__ 03283 << " can not parse the technical trigger " << algName 03284 << std::endl; 03285 return false; 03286 } 03287 03288 // get the logical expression from the node 03289 std::string logExpression = getXMLTextValue(node); 03290 03291 //LogTrace("L1GtTriggerMenuXmlParser") 03292 //<< " Logical expression: " << logExpression 03293 //<< std::endl; 03294 03295 // determine bit number (use output pin tag) 03296 DOMNode* pinNode = findXMLChild(node->getFirstChild(), m_xmlTagOutput); 03297 std::string pinString; 03298 int outputPin = 0; 03299 03300 pinNode = node->getFirstChild(); 03301 if ( (pinNode = findXMLChild(pinNode, m_xmlTagOutputPin) ) != 0) { 03302 pinString = getXMLAttribute(pinNode, m_xmlAttrNr); 03303 03304 // convert pinString to integer 03305 std::istringstream opStream(pinString); 03306 03307 if ((opStream >> outputPin).fail()) { 03308 LogDebug("L1GtTriggerMenuXmlParser") 03309 << " Unable to convert pin string " << pinString 03310 << " to int for technical trigger : " << algName 03311 << std::endl; 03312 03313 return false; 03314 } 03315 03316 } 03317 03318 if (pinNode == 0) { 03319 LogTrace("L1GtTriggerMenuXmlParser") 03320 << " Warning: No pin number found for technical trigger: " 03321 << algName << std::endl; 03322 03323 return false; 03324 } 03325 03326 // set the bit number 03327 int bitNumber = outputPin; 03328 03329 //LogTrace("L1GtTriggerMenuXmlParser") 03330 //<< " Bit number: " << bitNumber 03331 //<< std::endl; 03332 03333 // create a new technical trigger and insert it into technical trigger map 03334 L1GtAlgorithm alg(algName, logExpression, bitNumber); 03335 03336 if (edm::isDebugEnabled() ) { 03337 03338 std::ostringstream myCoutStream; 03339 alg.print(myCoutStream); 03340 LogTrace("L1GtTriggerMenuXmlParser") << myCoutStream.str() << "\n" << std::endl; 03341 03342 } 03343 03344 // insert technical trigger into the map 03345 if ( !insertTechTriggerIntoMap(alg)) { 03346 03347 return false; 03348 } 03349 03350 return true; 03351 03352 }
bool L1GtTriggerMenuXmlParser::workXML | ( | XERCES_CPP_NAMESPACE::XercesDOMParser * | parser | ) | [private] |
do all the steps for filling a trigger menu
workXML parse the XML-File
parser | The parser to use for parsing the XML-File |
Definition at line 3418 of file L1GtTriggerMenuXmlParser.cc.
References clearMaps(), doc, lat::endl(), LogTrace, L1GtXmlParserTags::m_xmlTagDef, parseAlgorithms(), parseConditions(), parseTechTriggers(), release(), and transcode().
Referenced by parseXmlFile().
03418 { 03419 03420 XERCES_CPP_NAMESPACE_USE 03421 03422 DOMDocument* doc = parser->getDocument(); 03423 DOMNode* n1 = doc->getFirstChild(); 03424 03425 if (n1 == 0) { 03426 03427 edm::LogError("L1GtTriggerMenuXmlParser") << "Error: Found no XML child" << std::endl; 03428 03429 return false; 03430 } 03431 03432 char* nodeName = XMLString::transcode(n1->getNodeName()); 03433 03434 if (XMLString::compareIString(nodeName, m_xmlTagDef.c_str())) { 03435 03436 edm::LogError("L1GtTriggerMenuXmlParser") << "Error: First XML child is not \" " 03437 << m_xmlTagDef << "\" " << std::endl; 03438 03439 return false; 03440 } 03441 03442 LogTrace("L1GtTriggerMenuXmlParser") 03443 << "\nFirst node name is: " << nodeName 03444 << std::endl; 03445 XMLString::release(&nodeName); 03446 03447 // clear possible old maps 03448 clearMaps(); 03449 03450 if ( !parseConditions(parser) ) { 03451 clearMaps(); 03452 return false; 03453 } 03454 03455 if ( !parseAlgorithms(parser) ) { 03456 clearMaps(); 03457 return false; 03458 } 03459 03460 if ( !parseTechTriggers(parser) ) { 03461 clearMaps(); 03462 return false; 03463 } 03464 03465 return true; 03466 03467 }
map containing the physics algorithms
Definition at line 443 of file L1GtTriggerMenuXmlParser.h.
Referenced by clearMaps(), gtAlgorithmMap(), insertAlgorithmIntoMap(), and setGtAlgorithmMap().
std::vector<ConditionMap> L1GtTriggerMenuXmlParser::m_conditionMap [private] |
map containing the conditions (per condition chip) - transient
Definition at line 420 of file L1GtTriggerMenuXmlParser.h.
Referenced by clearMaps(), gtConditionMap(), insertConditionIntoMap(), parseXmlFile(), and setGtConditionMap().
std::vector<std::vector<L1GtCaloTemplate> > L1GtTriggerMenuXmlParser::m_corCaloTemplate [private] |
Definition at line 439 of file L1GtTriggerMenuXmlParser.h.
Referenced by corCaloTemplate(), parseCalo(), parseCorrelation(), parseXmlFile(), and setCorCaloTemplate().
std::vector<std::vector<L1GtEnergySumTemplate> > L1GtTriggerMenuXmlParser::m_corEnergySumTemplate [private] |
Definition at line 440 of file L1GtTriggerMenuXmlParser.h.
Referenced by corEnergySumTemplate(), parseCorrelation(), parseEnergySum(), parseXmlFile(), and setCorEnergySumTemplate().
std::vector<std::vector<L1GtMuonTemplate> > L1GtTriggerMenuXmlParser::m_corMuonTemplate [private] |
Definition at line 438 of file L1GtTriggerMenuXmlParser.h.
Referenced by corMuonTemplate(), parseCorrelation(), parseMuon(), parseXmlFile(), and setCorMuonTemplate().
unsigned int L1GtTriggerMenuXmlParser::m_numberConditionChips [private] |
hardware limits
number of condition chips
Definition at line 399 of file L1GtTriggerMenuXmlParser.h.
Referenced by gtNumberConditionChips(), insertAlgorithmIntoMap(), parseAlgorithms(), parseConditions(), parseVmeXML(), parseXmlFile(), and setGtNumberConditionChips().
unsigned int L1GtTriggerMenuXmlParser::m_numberL1JetCounts [private] |
jet counts
Definition at line 415 of file L1GtTriggerMenuXmlParser.h.
Referenced by gtNumberL1JetCounts(), parseJetCounts(), and setGtNumberL1JetCounts().
unsigned int L1GtTriggerMenuXmlParser::m_numberPhysTriggers [private] |
number of physics trigger algorithms
Definition at line 409 of file L1GtTriggerMenuXmlParser.h.
Referenced by gtNumberPhysTriggers(), insertAlgorithmIntoMap(), and setGtNumberPhysTriggers().
unsigned int L1GtTriggerMenuXmlParser::m_numberTechTriggers [private] |
number of technical triggers
Definition at line 412 of file L1GtTriggerMenuXmlParser.h.
Referenced by gtNumberTechTriggers(), insertTechTriggerIntoMap(), and setGtNumberTechTriggers().
std::vector<int> L1GtTriggerMenuXmlParser::m_orderConditionChip [private] |
correspondence "condition chip - GTL algorithm word" in the hardware chip 2: 0 - 95; chip 1: 96 - 128 (191)
Definition at line 406 of file L1GtTriggerMenuXmlParser.h.
Referenced by gtOrderConditionChip(), insertAlgorithmIntoMap(), setGtOrderConditionChip(), and workAlgorithm().
unsigned int L1GtTriggerMenuXmlParser::m_pinsOnConditionChip [private] |
number of pins on the GTL condition chips
Definition at line 402 of file L1GtTriggerMenuXmlParser.h.
Referenced by gtPinsOnConditionChip(), insertAlgorithmIntoMap(), setGtPinsOnConditionChip(), and workAlgorithm().
map containing the technical triggers
Definition at line 446 of file L1GtTriggerMenuXmlParser.h.
Referenced by gtTechnicalTriggerMap(), insertTechTriggerIntoMap(), and setGtTechnicalTriggerMap().
std::string L1GtTriggerMenuXmlParser::m_triggerMenuName [private] |
menu name
Definition at line 425 of file L1GtTriggerMenuXmlParser.h.
Referenced by gtTriggerMenuName(), parseXmlFile(), and setGtTriggerMenuName().
std::vector<std::vector<L1GtCaloTemplate> > L1GtTriggerMenuXmlParser::m_vecCaloTemplate [private] |
Definition at line 430 of file L1GtTriggerMenuXmlParser.h.
Referenced by parseCalo(), parseXmlFile(), setVecCaloTemplate(), and vecCaloTemplate().
std::vector<std::vector<L1GtCastorTemplate> > L1GtTriggerMenuXmlParser::m_vecCastorTemplate [private] |
Definition at line 433 of file L1GtTriggerMenuXmlParser.h.
Referenced by parseCastor(), parseXmlFile(), setVecCastorTemplate(), and vecCastorTemplate().
std::vector<std::vector<L1GtCorrelationTemplate> > L1GtTriggerMenuXmlParser::m_vecCorrelationTemplate [private] |
Definition at line 437 of file L1GtTriggerMenuXmlParser.h.
Referenced by parseCorrelation(), parseXmlFile(), setVecCorrelationTemplate(), and vecCorrelationTemplate().
std::vector<std::vector<L1GtEnergySumTemplate> > L1GtTriggerMenuXmlParser::m_vecEnergySumTemplate [private] |
Definition at line 431 of file L1GtTriggerMenuXmlParser.h.
Referenced by parseEnergySum(), parseXmlFile(), setVecEnergySumTemplate(), and vecEnergySumTemplate().
std::vector<std::vector<L1GtHfBitCountsTemplate> > L1GtTriggerMenuXmlParser::m_vecHfBitCountsTemplate [private] |
Definition at line 434 of file L1GtTriggerMenuXmlParser.h.
Referenced by parseHfBitCounts(), parseXmlFile(), setVecHfBitCountsTemplate(), and vecHfBitCountsTemplate().
std::vector<std::vector<L1GtHfRingEtSumsTemplate> > L1GtTriggerMenuXmlParser::m_vecHfRingEtSumsTemplate [private] |
Definition at line 435 of file L1GtTriggerMenuXmlParser.h.
Referenced by parseHfRingEtSums(), parseXmlFile(), setVecHfRingEtSumsTemplate(), and vecHfRingEtSumsTemplate().
std::vector<std::vector<L1GtJetCountsTemplate> > L1GtTriggerMenuXmlParser::m_vecJetCountsTemplate [private] |
Definition at line 432 of file L1GtTriggerMenuXmlParser.h.
Referenced by parseJetCounts(), parseXmlFile(), setVecJetCountsTemplate(), and vecJetCountsTemplate().
std::vector<std::vector<L1GtMuonTemplate> > L1GtTriggerMenuXmlParser::m_vecMuonTemplate [private] |
vectors containing the conditions explicit, due to persistency.
..
Definition at line 429 of file L1GtTriggerMenuXmlParser.h.
Referenced by parseMuon(), parseXmlFile(), setVecMuonTemplate(), and vecMuonTemplate().
XERCES_CPP_NAMESPACE::ErrorHandler* L1GtTriggerMenuXmlParser::m_xmlErrHandler [private] |
error handler for xml-parser
Definition at line 394 of file L1GtTriggerMenuXmlParser.h.
Referenced by cleanupXML(), initXML(), L1GtTriggerMenuXmlParser(), and parseXmlFile().