26 #include "boost/lexical_cast.hpp"
89 boost::shared_ptr<L1GtTriggerMenu> pL1GtTriggerMenuEmpty =
94 const unsigned int numberConditionChips = 2;
95 init(numberConditionChips);
106 return pL1GtTriggerMenuEmpty;
117 return pL1GtTriggerMenuEmpty;
123 return pL1GtTriggerMenuEmpty;
129 return pL1GtTriggerMenuEmpty;
136 return pL1GtTriggerMenuEmpty;
142 return pL1GtTriggerMenuEmpty;
156 boost::shared_ptr<L1GtTriggerMenu> pL1GtTriggerMenu = boost::shared_ptr<L1GtTriggerMenu>(
182 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
183 <<
"\nThe following L1GtTriggerMenu record was read from OMDS: \n"
186 std::ostringstream myCoutStream;
188 pL1GtTriggerMenu->print(myCoutStream, verbosity);
189 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n" << std::endl;
192 pL1GtTriggerMenu->print(myCoutStream, verbosity);
193 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << myCoutStream.str() <<
"\n" << std::endl;
197 return pL1GtTriggerMenu;
208 gtSchema,
"L1T_MENU_GENERAL_VIEW");
211 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
212 <<
"\n List of columns in L1T_MENU_GENERAL_VIEW:\n" << std::endl;
213 for (std::vector<std::string>::const_iterator
iter = columns.begin();
iter != columns.end();
iter++) {
214 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
217 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
221 columns, gtSchema,
"L1T_MENU_GENERAL_VIEW",
227 <<
"Problem to get content of L1T_MENU_GENERAL_VIEW for L1GtTriggerMenu implementation key: "
234 for (std::vector<std::string>::const_iterator constIt = columns.begin(); constIt
235 != columns.end(); ++constIt) {
237 if ( ( *constIt ) ==
"MENU_IMPLEMENTATION") {
240 }
else if ( ( *constIt ) ==
"INTERFACE") {
243 }
else if ( ( *constIt ) ==
"SCALES_KEY") {
246 }
else if ( ( *constIt ) ==
"ALGO_IMPL_TAG") {
259 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
260 <<
"\n L1 trigger menu implementation read from querying view not identical"
261 <<
"\n with menu key:"
263 <<
"\n from key: " << objectKey
264 <<
"\n Menu implementation name set from key."
282 gtSchema,
"L1T_MENU_ALGO_VIEW");
285 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n List of columns in L1T_MENU_ALGO_VIEW:\n"
287 for (std::vector<std::string>::const_iterator
iter = columnsMenuAlgo.begin();
iter != columnsMenuAlgo.end();
iter++) {
288 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
291 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
295 columnsMenuAlgo, gtSchema,
"L1T_MENU_ALGO_VIEW",
"L1T_MENU_ALGO_VIEW.MENU_IMPLEMENTATION",
303 <<
"Warning: Content of L1T_MENU_ALGO_VIEW for L1GtTriggerMenu implementation key: "
304 <<
"\n " << objectKey <<
"\nis empty!"
305 <<
"\nNo physics algorithms are found for this menu.";
310 int resultsMenuAlgoRows = resultsMenuAlgo.
numberRows();
312 for (
int iRow = 0; iRow < resultsMenuAlgoRows; ++iRow) {
314 for (std::vector<std::string>::const_iterator constIt = columnsMenuAlgo.begin(); constIt
315 != columnsMenuAlgo.end(); ++constIt) {
317 if ( ( *constIt ) ==
"ALGO_INDEX") {
320 }
else if ( ( *constIt ) ==
"NAME") {
323 }
else if ( ( *constIt ) ==
"ALIAS") {
326 }
else if ( ( *constIt ) ==
"LOGICEXPR") {
336 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
337 <<
"Row " << iRow <<
": index = " << menuAlgo.
bitNumberSh <<
" algName = " << menuAlgo.
algName
347 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
348 <<
"\n Number of rows read from L1T_MENU_ALGO_VIEW: " << resultsMenuAlgoRows
367 gtSchema,
"L1T_MENU_ALGO_COND_VIEW");
370 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
371 <<
"\n List of columns in L1T_MENU_ALGO_COND_VIEW:\n" << std::endl;
372 for (std::vector<std::string>::const_iterator
iter = columnsMenuAlgoCond.begin();
iter
373 != columnsMenuAlgoCond.end();
iter++) {
374 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
377 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
381 columnsMenuAlgoCond, gtSchema,
"L1T_MENU_ALGO_COND_VIEW",
388 <<
"Warning: Content of L1T_MENU_ALGO_COND_VIEW for L1GtTriggerMenu implementation key: "
389 <<
"\n " << objectKey <<
"\nis empty!"
390 <<
"\nNo list of condition associated to each algorithm are found for this menu.";
396 int resultsMenuAlgoCondRows = resultsMenuAlgoCond.
numberRows();
398 for (
int iRow = 0; iRow < resultsMenuAlgoCondRows; ++iRow) {
400 for (std::vector<std::string>::const_iterator constIt = columnsMenuAlgoCond.begin(); constIt
401 != columnsMenuAlgoCond.end(); ++constIt) {
403 if ( ( *constIt ) ==
"ALGO_INDEX") {
407 }
else if ( ( *constIt ) ==
"COND_INDEX") {
411 }
else if ( ( *constIt ) ==
"COND_FK") {
421 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"Row " << iRow <<
": ALGO_INDEX = "
423 <<
" COND_FK = " << menuAlgoCond.
condFK << std::endl;
430 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
431 <<
"\n Number of rows read from L1T_MENU_ALGO_COND_VIEW: "
432 << resultsMenuAlgoCondRows << std::endl;
448 gtSchema,
"L1T_MENU_COND_VIEW");
451 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
452 <<
"\n List of columns in L1T_MENU_COND_VIEW:\n" << std::endl;
453 for (std::vector<std::string>::const_iterator
iter = columnsMenuCond.begin();
iter
454 != columnsMenuCond.end();
iter++) {
455 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
458 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
462 columnsMenuCond, gtSchema,
"L1T_MENU_COND_VIEW",
469 <<
"Warning: Content of L1T_MENU_COND_VIEW for L1GtTriggerMenu implementation key: "
470 <<
"\n " << objectKey <<
"\nis empty!"
471 <<
"\nNo conditions associated to menu are found for this menu.";
477 int resultsMenuCondRows = resultsMenuCond.
numberRows();
479 for (
int iRow = 0; iRow < resultsMenuCondRows; ++iRow) {
481 for (std::vector<std::string>::const_iterator constIt = columnsMenuCond.begin(); constIt
482 != columnsMenuCond.end(); ++constIt) {
484 if ( ( *constIt ) ==
"COND") {
487 }
else if ( ( *constIt ) ==
"COND_CATEGORY") {
490 }
else if ( ( *constIt ) ==
"COND_TYPE") {
493 }
else if ( ( *constIt ) ==
"GT_OBJECT_1") {
496 }
else if ( ( *constIt ) ==
"GT_OBJECT_2") {
499 }
else if ( ( *constIt ) ==
"COND_GEQ") {
505 }
else if ( ( *constIt ) ==
"COUNT_INDEX") {
508 }
else if ( ( *constIt ) ==
"COUNT_THRESHOLD") {
511 }
else if ( ( *constIt ) ==
"CHARGE_CORRELATION") {
515 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_1_FK") {
519 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_2_FK") {
523 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_3_FK") {
527 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_4_FK") {
531 }
else if ( ( *constIt ) ==
"DELTA_ETA_RANGE") {
534 }
else if ( ( *constIt ) ==
"DELTA_PHI_RANGE") {
544 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
545 <<
" COND " << menuCond.
cond
547 <<
" COND_TYPE " << menuCond.
condType
550 <<
" COND_GEQ " << menuCond.
condGEq <<
"\n"
567 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
568 <<
"\n Number of rows read from L1T_MENU_COND_VIEW: " << resultsMenuCondRows
587 gtSchema,
"L1T_MENU_OP_VIEW");
590 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n List of columns in L1T_MENU_OP_VIEW:\n"
592 for (std::vector<std::string>::const_iterator
iter = columnsMenuOp.begin();
iter
593 != columnsMenuOp.end();
iter++) {
594 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
597 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
601 columnsMenuOp, gtSchema,
"L1T_MENU_OP_VIEW",
"L1T_MENU_OP_VIEW.MENU_IMPLEMENTATION",
608 <<
"Warning: Content of L1T_MENU_OP_VIEW for L1GtTriggerMenu implementation key: "
609 <<
"\n " << objectKey <<
"\nis empty!"
610 <<
"\nNo object parameters associated to menu are found for this menu.";
615 int resultsMenuOpRows = resultsMenuOp.
numberRows();
617 for (
int iRow = 0; iRow < resultsMenuOpRows; ++iRow) {
619 for (std::vector<std::string>::const_iterator constIt = columnsMenuOp.begin(); constIt
620 != columnsMenuOp.end(); ++constIt) {
622 if ( ( *constIt ) ==
"ID") {
625 }
else if ( ( *constIt ) ==
"PT_HIGH_THRESHOLD") {
629 }
else if ( ( *constIt ) ==
"PT_LOW_THRESHOLD") {
633 }
else if ( ( *constIt ) ==
"ENABLE_MIP") {
636 }
else if ( ( *constIt ) ==
"ENABLE_ISO") {
639 }
else if ( ( *constIt ) ==
"REQUEST_ISO") {
642 }
else if ( ( *constIt ) ==
"ENERGY_OVERFLOW") {
646 }
else if ( ( *constIt ) ==
"ET_THRESHOLD") {
649 }
else if ( ( *constIt ) ==
"ETA_RANGE") {
652 }
else if ( ( *constIt ) ==
"PHI_RANGE") {
655 }
else if ( ( *constIt ) ==
"PHI_LOW") {
658 }
else if ( ( *constIt ) ==
"PHI_HIGH") {
661 }
else if ( ( *constIt ) ==
"QUALITY_RANGE") {
664 }
else if ( ( *constIt ) ==
"CHARGE") {
674 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
675 <<
" ID " << menuObjectParameters.
opId
678 <<
" ENABLE_MIP " << menuObjectParameters.
enableMip
679 <<
" ENABLE_ISO " << menuObjectParameters.
enableIso
680 <<
" REQUEST_ISO " << menuObjectParameters.
requestIso
682 <<
" ET_THRESHOLD " << menuObjectParameters.
etThreshold
683 <<
" ETA_RANGE " << menuObjectParameters.
etaRange
684 <<
" PHI_RANGE " << menuObjectParameters.
phiRange
685 <<
" PHI_LOW " << menuObjectParameters.
phiLow
686 <<
" PHI_HIGH " << menuObjectParameters.
phiHigh
687 <<
" QUALITY_RANGE " << menuObjectParameters.
qualityRange
688 <<
" CHARGE " << menuObjectParameters.
charge
695 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
696 <<
"\n Number of rows read from L1T_MENU_OP_VIEW: " << resultsMenuOpRows
712 const std::vector<std::string>& columnsMenuTechTrig =
716 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
717 <<
"\n List of columns in L1T_MENU_TECHTRIG_VIEW:\n"
719 for (std::vector<std::string>::const_iterator
iter =
720 columnsMenuTechTrig.begin();
iter != columnsMenuTechTrig.end();
iter++) {
721 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << (*iter) << std::endl;
724 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
729 "L1T_MENU_TECHTRIG_VIEW",
730 "L1T_MENU_TECHTRIG_VIEW.MENU_IMPLEMENTATION",
737 <<
"Warning: Content of L1T_MENU_TECHTRIG_VIEW for L1GtTriggerMenu implementation key: "
738 <<
"\n " << objectKey <<
"\nis empty!"
739 <<
"\nNo technical triggers are found for this menu.";
744 int resultsMenuTechTrigRows = resultsMenuTechTrig.
numberRows();
746 for (
int iRow = 0; iRow < resultsMenuTechTrigRows; ++iRow) {
748 for (std::vector<std::string>::const_iterator constIt =
749 columnsMenuTechTrig.begin(); constIt
750 != columnsMenuTechTrig.end(); ++constIt) {
752 if ((*constIt) ==
"TECHTRIG_INDEX") {
756 }
else if ((*constIt) ==
"NAME") {
767 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"Row " << iRow
768 <<
": index = " << menuTechTrig.
bitNumberSh <<
" techName = "
769 << menuTechTrig.
techName << std::endl;
776 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
777 <<
"\n Number of rows read from L1T_MENU_TECHTRIG_VIEW: "
778 << resultsMenuTechTrigRows << std::endl;
789 const short bitNr)
const {
791 std::map<int, std::string> mapIndexName;
793 for (std::vector<TableMenuAlgoCond>::const_iterator constIt =
m_tableMenuAlgoCond.begin(); constIt
796 if (bitNr == (*constIt).bitNumberSh) {
797 mapIndexName[
static_cast<int>((*constIt).condIndexF)] = (*constIt).condFK;
804 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Bit number : " << bitNr << std::endl;
806 for (std::map<int, std::string>::const_iterator constIt = mapIndexName.begin(); constIt
807 != mapIndexName.end(); ++constIt) {
809 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
" Condition index -> name: "
810 << ( ( *constIt ).first ) <<
" " << ( ( *constIt ).second ) << std::endl;
823 const std::string& expressionIndices,
const std::map<int, std::string>& mapCondIndexName)
const {
831 return expressionNames;
839 const unsigned numberConditionChips = 2;
840 const unsigned pinsOnConditionChip = 96;
841 std::vector<int> orderConditionChip;
842 orderConditionChip.push_back(2);
843 orderConditionChip.push_back(1);
845 int posChip = (
static_cast<unsigned> (bitNumberSh) / pinsOnConditionChip ) + 1;
846 for (
unsigned int iChip = 0; iChip < numberConditionChips; ++iChip) {
847 if (posChip == orderConditionChip[iChip]) {
848 return static_cast<int>(iChip);
866 for (std::vector<TableMenuAlgo>::const_iterator constIt =
m_tableMenuAlgo.begin(); constIt
869 bitNumber =
static_cast<int> ((*constIt).bitNumberSh);
871 const std::map<int, std::string>& condIndexName =
condIndexNameMap((*constIt).bitNumberSh);
875 L1GtAlgorithm alg((*constIt).algName, logicalExpression, bitNumber);
879 int algChipNr =
chipNumber((*constIt).bitNumberSh);
898 for (std::vector<TableMenuTechTrig>::const_iterator constIt =
901 bitNumber =
static_cast<int> ((*constIt).bitNumberSh);
905 L1GtAlgorithm techTrig((*constIt).techName, logicalExpression, bitNumber);
921 if (strCategory ==
"CondMuon") {
923 }
else if (strCategory ==
"CondCalo") {
925 }
else if (strCategory ==
"CondEnergySum") {
927 }
else if (strCategory ==
"CondJetCounts") {
929 }
else if (strCategory ==
"CondCorrelation") {
931 }
else if (strCategory ==
"CondCastor") {
933 }
else if (strCategory ==
"CondHfBitCounts") {
935 }
else if (strCategory ==
"CondHfRingEtSums") {
937 }
else if (strCategory ==
"CondBptx") {
939 }
else if (strCategory ==
"CondExternal") {
941 }
else if (strCategory ==
"CondNull") {
945 <<
"\n Warning: string " << strCategory
946 <<
" not defined. Returning CondNull.\n" << std::endl;
957 if (strType ==
"1s") {
959 }
else if (strType ==
"2s") {
961 }
else if (strType ==
"2wsc") {
963 }
else if (strType ==
"2cor") {
965 }
else if (strType ==
"3s") {
967 }
else if (strType ==
"4s") {
969 }
else if (strType ==
"ETM") {
971 }
else if (strType ==
"ETT") {
973 }
else if (strType ==
"HTT") {
975 }
else if (strType ==
"HTM") {
977 }
else if (strType ==
"JetCounts") {
979 }
else if (strType ==
"Castor") {
981 }
else if (strType ==
"HfBitCounts") {
983 }
else if (strType ==
"HfRingEtSums") {
985 }
else if (strType ==
"Bptx") {
987 }
else if (strType ==
"TypeExternal") {
991 <<
"\n Warning: string " << strType
992 <<
" not associated to any L1GtConditionType. Returning TypeNull.\n"
1004 if (strObject ==
"Mu") {
1006 }
else if (strObject ==
"NoIsoEG") {
1008 }
else if (strObject ==
"IsoEG") {
1010 }
else if (strObject ==
"CenJet") {
1012 }
else if (strObject ==
"ForJet") {
1014 }
else if (strObject ==
"TauJet") {
1016 }
else if (strObject ==
"ETM") {
1018 }
else if (strObject ==
"ETT") {
1020 }
else if (strObject ==
"HTT") {
1022 }
else if (strObject ==
"HTM") {
1024 }
else if (strObject ==
"JetCounts") {
1026 }
else if (strObject ==
"HfBitCounts") {
1028 }
else if (strObject ==
"HfRingEtSums") {
1030 }
else if (strObject ==
"TechTrig") {
1032 }
else if (strObject ==
"Castor") {
1034 }
else if (strObject ==
"BPTX") {
1036 }
else if (strObject ==
"GtExternal") {
1040 <<
"\n Warning: string " << strObject
1041 <<
" not associated to any L1GtObject. Returning Mu (no Null type).\n"
1054 unsigned int lenHexStr = hexStr.length();
1056 if (lenHexStr < 3) {
1057 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Warning: string " << hexStr
1058 <<
" has length less than 3." <<
"\n Not possible to split it in two 64-bit words."
1059 <<
"\n Return two zero strings." << std::endl;
1060 hex0WordStr =
"0x0";
1061 hex1WordStr =
"0x0";
1066 unsigned int lenHex = lenHexStr - 2;
1067 unsigned int len0Word = lenHex > 16 ? 16 : lenHex;
1068 unsigned int len1Word = lenHex - len0Word;
1070 unsigned int pos0Word = lenHexStr - len0Word;
1071 hex0WordStr =
"0x" + hexStr.substr(pos0Word, len0Word);
1074 unsigned int pos1Word = pos0Word - len1Word;
1075 hex1WordStr =
"0x" + hexStr.substr(pos1Word, len1Word);
1077 hex1WordStr =
"0x0";
1084 std::list<int> chipList;
1087 for (std::vector<TableMenuAlgoCond>::const_iterator constIt =
m_tableMenuAlgoCond.begin(); constIt
1090 if (condFK == ( *constIt ).condFK) {
1091 int chipNr =
chipNumber( ( *constIt ).bitNumberSh);
1092 chipList.push_back(chipNr);
1104 for (std::vector<TableMenuObjectParameters>::const_iterator constIt =
1107 if (opFK == ( *constIt ).opId) {
1108 objPar.
ptHighThreshold =
static_cast<unsigned int> ( ( *constIt ).ptHighThreshold);
1109 objPar.
ptLowThreshold =
static_cast<unsigned int> ( ( *constIt ).ptLowThreshold);
1110 objPar.
enableMip =
static_cast<bool> ( ( *constIt ).enableMip);
1111 objPar.
enableIso =
static_cast<bool> ( ( *constIt ).enableIso);
1112 objPar.
requestIso =
static_cast<bool> ( ( *constIt ).requestIso);
1113 objPar.
etaRange = lexical_cast_from_hex<unsigned long long>( ( *constIt ).etaRange);
1114 objPar.
phiHigh =
static_cast<unsigned int> ( ( *constIt ).phiHigh);
1115 objPar.
phiLow =
static_cast<unsigned int> ( ( *constIt ).phiLow);
1116 objPar.
qualityRange = lexical_cast_from_hex<unsigned int>( ( *constIt ).qualityRange);
1134 std::vector<L1GtObject> objType(nrObj,
Mu);
1140 std::vector<L1GtMuonTemplate::ObjectParameter> objParameter(nrObj);
1142 for (
int iObj = 0; iObj < nrObj; ++iObj) {
1145 }
else if (iObj == 1) {
1147 }
else if (iObj == 2) {
1149 }
else if (iObj == 3) {
1152 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
1153 <<
"\n Warning: number of objects requested " << nrObj
1154 <<
" not available in DB." <<
"\n Maximum 4 object parameters implemented. \n"
1161 if (muonCond.
wsc()) {
1162 corrParameter.
deltaEtaRange = lexical_cast_from_hex<unsigned long long> (
1169 corrParameter.
deltaPhiRange0Word = lexical_cast_from_hex<unsigned long long> (word0);
1170 corrParameter.
deltaPhiRange1Word = lexical_cast_from_hex<unsigned long long> (word1);
1185 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1193 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1194 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1196 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << muonCond <<
"\n" << std::endl;
1206 for (std::vector<TableMenuObjectParameters>::const_iterator constIt =
1209 if (opFK == ( *constIt ).opId) {
1210 objPar.
etThreshold =
static_cast<unsigned int> ( ( *constIt ).etThreshold);
1211 objPar.
etaRange = lexical_cast_from_hex<unsigned int> ( ( *constIt ).etaRange);
1212 objPar.
phiRange = lexical_cast_from_hex<unsigned int> ( ( *constIt ).phiRange);
1230 std::vector<L1GtObject> objType(nrObj, obj);
1236 std::vector<L1GtCaloTemplate::ObjectParameter> objParameter(nrObj);
1238 for (
int iObj = 0; iObj < nrObj; ++iObj) {
1241 }
else if (iObj == 1) {
1243 }
else if (iObj == 2) {
1245 }
else if (iObj == 3) {
1248 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
1249 <<
"\n Warning: number of objects requested " << nrObj
1250 <<
" not available in DB." <<
"\n Maximum 4 object parameters implemented. \n"
1256 if (caloCond.
wsc()) {
1257 corrParameter.
deltaEtaRange = lexical_cast_from_hex<unsigned long long> (
1260 corrParameter.
deltaPhiRange = lexical_cast_from_hex<unsigned long long> (
1275 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1283 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1284 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1286 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << caloCond <<
"\n" << std::endl;
1297 for (std::vector<TableMenuObjectParameters>::const_iterator constIt =
1300 if (opFK == ( *constIt ).opId) {
1301 objPar.
etThreshold =
static_cast<unsigned int> ( ( *constIt ).etThreshold);
1302 objPar.
energyOverflow =
static_cast<bool> ( ( *constIt ).energyOverflow);
1309 objPar.
phiRange0Word = lexical_cast_from_hex<unsigned long long> (word0);
1310 objPar.
phiRange1Word = lexical_cast_from_hex<unsigned long long> (word1);
1312 }
else if (obj ==
HTM) {
1313 objPar.
phiRange0Word = lexical_cast_from_hex<unsigned long long> (word0);
1332 std::vector<L1GtObject> objType(nrObj, obj);
1338 std::vector<L1GtEnergySumTemplate::ObjectParameter> objParameter(nrObj);
1351 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1359 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1360 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1362 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << esumCond <<
"\n" << std::endl;
1378 std::vector<L1GtObject> objType(nrObj, obj);
1385 std::vector<L1GtJetCountsTemplate::ObjectParameter> objParameter(nrObj);
1386 objParameter.at(0).countIndex =
static_cast<unsigned int>(condDB.
countIndex);
1387 objParameter.at(0).countThreshold =
static_cast<unsigned int>(condDB.
countThreshold);
1388 objParameter.at(0).countOverflow =
false ;
1400 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1408 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1409 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1411 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << jcCond <<
"\n" << std::endl;
1426 std::vector<L1GtObject> objType(nrObj, obj);
1433 std::vector<L1GtHfBitCountsTemplate::ObjectParameter> objParameter(nrObj);
1434 objParameter.at(0).countIndex =
static_cast<unsigned int>(condDB.
countIndex);
1435 objParameter.at(0).countThreshold =
static_cast<unsigned int>(condDB.
countThreshold);
1447 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1455 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1456 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1458 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << countsCond <<
"\n" << std::endl;
1473 std::vector<L1GtObject> objType(nrObj, obj);
1480 std::vector<L1GtHfRingEtSumsTemplate::ObjectParameter> objParameter(nrObj);
1481 objParameter.at(0).etSumIndex =
static_cast<unsigned int>(condDB.
countIndex);
1482 objParameter.at(0).etSumThreshold =
static_cast<unsigned int>(condDB.
countThreshold);
1494 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1502 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1503 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1505 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << esumCond <<
"\n" << std::endl;
1521 std::vector<L1GtObject> objType(nrObj, obj);
1537 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1545 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1546 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1548 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << castorCond <<
"\n" << std::endl;
1564 std::vector<L1GtObject> objType(nrObj, obj);
1582 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1590 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1591 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1593 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << bptxCond <<
"\n" << std::endl;
1609 std::vector<L1GtObject> objType(nrObj, obj);
1627 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1635 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1636 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1638 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << externalCond <<
"\n" << std::endl;
1651 const int nrObj = 2;
1653 std::vector<L1GtObject> objType(nrObj);
1671 std::vector<L1GtConditionCategory> subcondCategory(nrObj);
1672 std::vector<int> subcondIndex(nrObj);
1674 bool wrongSubcondition =
false;
1676 for (
int iObj = 0; iObj < nrObj; ++iObj) {
1686 std::vector<L1GtMuonTemplate::ObjectParameter> objParameter(1);
1692 }
else if (iObj == 1) {
1708 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1709 != chipList.end(); ++itChip) {
1720 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition "
1721 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n "
1724 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1740 std::vector<L1GtCaloTemplate::ObjectParameter> objParameter(1);
1746 }
else if (iObj == 1) {
1759 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1760 != chipList.end(); ++itChip) {
1771 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition "
1772 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n "
1775 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1787 std::vector<L1GtEnergySumTemplate::ObjectParameter> objParameter(1);
1793 }
else if (iObj == 1) {
1811 <<
"\n Warning: wrong L1GtConditionType "
1812 << gtObj << std::endl;
1824 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1825 != chipList.end(); ++itChip) {
1836 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition "
1837 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n "
1840 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1854 wrongSubcondition =
true;
1856 <<
"\n Warning: correlation condition "
1858 <<
" with invalid sub-condition object type " << gtObj
1859 <<
"\n Condition ignored!" << std::endl;
1862 wrongSubcondition =
true;
1864 <<
"\n Warning: correlation condition "
1866 <<
" with invalid sub-condition object type " << gtObj
1867 <<
"\n Condition ignored!" << std::endl;
1877 if (wrongSubcondition) {
1879 <<
"\n Warning: wrong sub-condition for correlation condition "
1881 <<
"\n Condition not inserted in menu. \n A sub-condition may be left in the menu"
1906 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1914 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1915 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1917 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << correlationCond <<
"\n" << std::endl;
1929 for (std::vector<TableMenuCond>::const_iterator constIt =
m_tableMenuCond.begin(); constIt
1934 switch (conCategory) {
std::string logicalExpression() const
return the logical expression
const int nrObjects() const
get number of trigger objects
bool fillVariable(const std::string &columnName, T &outputVariable) const
unsigned int ptHighThreshold
void setCond1Category(const L1GtConditionCategory &)
typedef for correlation parameters
const QueryResults singleAttribute(const T &data) const
void setAlgoAlias(const std::string &algoAliasValue)
unsigned long long etaRange
unsigned long long deltaPhiRange
unsigned int deltaPhiMaxbits
void setConditionParameter(const std::vector< ObjectParameter > &)
set functions
std::vector< std::string > columnNamesView(const std::string &schemaName, const std::string &viewName) const
void setCond0Index(const int &)
unsigned long long deltaEtaRange
void setCondGEq(const bool &cGEq)
unsigned int deltaPhiMaxbits
unsigned int deltaPhiMaxbits
void setAlgoChipNumber(const int algoChipNumberValue)
std::string deltaEtaRange
void convertIntToNameLogicalExpression(const std::map< int, std::string > &intToNameMap)
void setCond0Category(const L1GtConditionCategory &)
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
void setObjectType(const std::vector< L1GtObject > &objType)
void setCorrelationParameter(const CorrelationParameter &corrParameter)
bool fillVariableFromRow(const std::string &columnName, int rowNumber, T &outputVariable) const
unsigned long long deltaPhiRange0Word
L1GtConditionCategory
condition categories
typedef for a single object template
typedef for correlation parameters
unsigned int chargeCorrelation
l1t::OMDSReader m_omdsReader
unsigned long long phiRange0Word
void setCond1Index(const int &)
unsigned int qualityRange
unsigned int ptLowThreshold
void setConditionParameter(const std::vector< ObjectParameter > &)
set functions
std::string deltaPhiRange
unsigned long long deltaEtaRange
void setCondChipNr(const int &cChipNr)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
void setConditionParameter(const std::vector< ObjectParameter > &)
set functions
void setCondType(const L1GtConditionType &cType)
unsigned long long phiRange1Word
volatile std::atomic< bool > shutdown_flag false
unsigned long long deltaPhiRange1Word
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
tuple size
Write out results.
void setConditionParameter(const std::vector< ObjectParameter > &)
set functions
const QueryResults basicQueryView(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &viewName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="") const
typedef for a single object template