26 #include "boost/lexical_cast.hpp" 88 auto pL1GtTriggerMenuEmpty = std::make_unique<L1GtTriggerMenu>();
92 const unsigned int numberConditionChips = 2;
93 init(numberConditionChips);
104 return pL1GtTriggerMenuEmpty;
115 return pL1GtTriggerMenuEmpty;
121 return pL1GtTriggerMenuEmpty;
127 return pL1GtTriggerMenuEmpty;
134 return pL1GtTriggerMenuEmpty;
140 return pL1GtTriggerMenuEmpty;
154 auto pL1GtTriggerMenu = std::make_unique<L1GtTriggerMenu>(
155 menuName, numberConditionChips,
180 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
181 <<
"\nThe following L1GtTriggerMenu record was read from OMDS: \n" 184 std::ostringstream myCoutStream;
186 pL1GtTriggerMenu->print(myCoutStream, verbosity);
187 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n" << std::endl;
190 pL1GtTriggerMenu->print(myCoutStream, verbosity);
191 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << myCoutStream.str() <<
"\n" << std::endl;
195 return pL1GtTriggerMenu;
206 gtSchema,
"L1T_MENU_GENERAL_VIEW");
209 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
210 <<
"\n List of columns in L1T_MENU_GENERAL_VIEW:\n" << std::endl;
211 for (std::vector<std::string>::const_iterator iter = columns.begin(); iter != columns.end(); iter++) {
212 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
215 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
219 columns, gtSchema,
"L1T_MENU_GENERAL_VIEW",
225 <<
"Problem to get content of L1T_MENU_GENERAL_VIEW for L1GtTriggerMenu implementation key: " 232 for (std::vector<std::string>::const_iterator constIt = columns.begin(); constIt
233 != columns.end(); ++constIt) {
235 if ( ( *constIt ) ==
"MENU_IMPLEMENTATION") {
238 }
else if ( ( *constIt ) ==
"INTERFACE") {
241 }
else if ( ( *constIt ) ==
"SCALES_KEY") {
244 }
else if ( ( *constIt ) ==
"ALGO_IMPL_TAG") {
257 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
258 <<
"\n L1 trigger menu implementation read from querying view not identical" 259 <<
"\n with menu key:" 261 <<
"\n from key: " << objectKey
262 <<
"\n Menu implementation name set from key." 280 gtSchema,
"L1T_MENU_ALGO_VIEW");
283 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n List of columns in L1T_MENU_ALGO_VIEW:\n" 285 for (std::vector<std::string>::const_iterator iter = columnsMenuAlgo.begin(); iter != columnsMenuAlgo.end(); iter++) {
286 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
289 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
293 columnsMenuAlgo, gtSchema,
"L1T_MENU_ALGO_VIEW",
"L1T_MENU_ALGO_VIEW.MENU_IMPLEMENTATION",
301 <<
"Warning: Content of L1T_MENU_ALGO_VIEW for L1GtTriggerMenu implementation key: " 302 <<
"\n " << objectKey <<
"\nis empty!" 303 <<
"\nNo physics algorithms are found for this menu.";
308 int resultsMenuAlgoRows = resultsMenuAlgo.
numberRows();
310 for (
int iRow = 0; iRow < resultsMenuAlgoRows; ++iRow) {
312 for (std::vector<std::string>::const_iterator constIt = columnsMenuAlgo.begin(); constIt
313 != columnsMenuAlgo.end(); ++constIt) {
315 if ( ( *constIt ) ==
"ALGO_INDEX") {
318 }
else if ( ( *constIt ) ==
"NAME") {
321 }
else if ( ( *constIt ) ==
"ALIAS") {
324 }
else if ( ( *constIt ) ==
"LOGICEXPR") {
334 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
335 <<
"Row " << iRow <<
": index = " << menuAlgo.
bitNumberSh <<
" algName = " << menuAlgo.
algName 345 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
346 <<
"\n Number of rows read from L1T_MENU_ALGO_VIEW: " << resultsMenuAlgoRows
365 gtSchema,
"L1T_MENU_ALGO_COND_VIEW");
368 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
369 <<
"\n List of columns in L1T_MENU_ALGO_COND_VIEW:\n" << std::endl;
370 for (std::vector<std::string>::const_iterator iter = columnsMenuAlgoCond.begin(); iter
371 != columnsMenuAlgoCond.end(); iter++) {
372 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
375 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
379 columnsMenuAlgoCond, gtSchema,
"L1T_MENU_ALGO_COND_VIEW",
386 <<
"Warning: Content of L1T_MENU_ALGO_COND_VIEW for L1GtTriggerMenu implementation key: " 387 <<
"\n " << objectKey <<
"\nis empty!" 388 <<
"\nNo list of condition associated to each algorithm are found for this menu.";
394 int resultsMenuAlgoCondRows = resultsMenuAlgoCond.
numberRows();
396 for (
int iRow = 0; iRow < resultsMenuAlgoCondRows; ++iRow) {
398 for (std::vector<std::string>::const_iterator constIt = columnsMenuAlgoCond.begin(); constIt
399 != columnsMenuAlgoCond.end(); ++constIt) {
401 if ( ( *constIt ) ==
"ALGO_INDEX") {
405 }
else if ( ( *constIt ) ==
"COND_INDEX") {
409 }
else if ( ( *constIt ) ==
"COND_FK") {
419 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"Row " << iRow <<
": ALGO_INDEX = " 421 <<
" COND_FK = " << menuAlgoCond.
condFK << std::endl;
428 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
429 <<
"\n Number of rows read from L1T_MENU_ALGO_COND_VIEW: " 430 << resultsMenuAlgoCondRows << std::endl;
446 gtSchema,
"L1T_MENU_COND_VIEW");
449 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
450 <<
"\n List of columns in L1T_MENU_COND_VIEW:\n" << std::endl;
451 for (std::vector<std::string>::const_iterator iter = columnsMenuCond.begin(); iter
452 != columnsMenuCond.end(); iter++) {
453 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
456 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
460 columnsMenuCond, gtSchema,
"L1T_MENU_COND_VIEW",
467 <<
"Warning: Content of L1T_MENU_COND_VIEW for L1GtTriggerMenu implementation key: " 468 <<
"\n " << objectKey <<
"\nis empty!" 469 <<
"\nNo conditions associated to menu are found for this menu.";
475 int resultsMenuCondRows = resultsMenuCond.
numberRows();
477 for (
int iRow = 0; iRow < resultsMenuCondRows; ++iRow) {
479 for (std::vector<std::string>::const_iterator constIt = columnsMenuCond.begin(); constIt
480 != columnsMenuCond.end(); ++constIt) {
482 if ( ( *constIt ) ==
"COND") {
485 }
else if ( ( *constIt ) ==
"COND_CATEGORY") {
488 }
else if ( ( *constIt ) ==
"COND_TYPE") {
491 }
else if ( ( *constIt ) ==
"GT_OBJECT_1") {
494 }
else if ( ( *constIt ) ==
"GT_OBJECT_2") {
497 }
else if ( ( *constIt ) ==
"COND_GEQ") {
503 }
else if ( ( *constIt ) ==
"COUNT_INDEX") {
506 }
else if ( ( *constIt ) ==
"COUNT_THRESHOLD") {
509 }
else if ( ( *constIt ) ==
"CHARGE_CORRELATION") {
513 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_1_FK") {
517 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_2_FK") {
521 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_3_FK") {
525 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_4_FK") {
529 }
else if ( ( *constIt ) ==
"DELTA_ETA_RANGE") {
532 }
else if ( ( *constIt ) ==
"DELTA_PHI_RANGE") {
542 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
543 <<
" COND " << menuCond.
cond 545 <<
" COND_TYPE " << menuCond.
condType 548 <<
" COND_GEQ " << menuCond.
condGEq <<
"\n" 565 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
566 <<
"\n Number of rows read from L1T_MENU_COND_VIEW: " << resultsMenuCondRows
585 gtSchema,
"L1T_MENU_OP_VIEW");
588 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n List of columns in L1T_MENU_OP_VIEW:\n" 590 for (std::vector<std::string>::const_iterator iter = columnsMenuOp.begin(); iter
591 != columnsMenuOp.end(); iter++) {
592 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
595 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
599 columnsMenuOp, gtSchema,
"L1T_MENU_OP_VIEW",
"L1T_MENU_OP_VIEW.MENU_IMPLEMENTATION",
606 <<
"Warning: Content of L1T_MENU_OP_VIEW for L1GtTriggerMenu implementation key: " 607 <<
"\n " << objectKey <<
"\nis empty!" 608 <<
"\nNo object parameters associated to menu are found for this menu.";
613 int resultsMenuOpRows = resultsMenuOp.
numberRows();
615 for (
int iRow = 0; iRow < resultsMenuOpRows; ++iRow) {
617 for (std::vector<std::string>::const_iterator constIt = columnsMenuOp.begin(); constIt
618 != columnsMenuOp.end(); ++constIt) {
620 if ( ( *constIt ) ==
"ID") {
623 }
else if ( ( *constIt ) ==
"PT_HIGH_THRESHOLD") {
627 }
else if ( ( *constIt ) ==
"PT_LOW_THRESHOLD") {
631 }
else if ( ( *constIt ) ==
"ENABLE_MIP") {
634 }
else if ( ( *constIt ) ==
"ENABLE_ISO") {
637 }
else if ( ( *constIt ) ==
"REQUEST_ISO") {
640 }
else if ( ( *constIt ) ==
"ENERGY_OVERFLOW") {
644 }
else if ( ( *constIt ) ==
"ET_THRESHOLD") {
647 }
else if ( ( *constIt ) ==
"ETA_RANGE") {
650 }
else if ( ( *constIt ) ==
"PHI_RANGE") {
653 }
else if ( ( *constIt ) ==
"PHI_LOW") {
656 }
else if ( ( *constIt ) ==
"PHI_HIGH") {
659 }
else if ( ( *constIt ) ==
"QUALITY_RANGE") {
662 }
else if ( ( *constIt ) ==
"CHARGE") {
672 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
673 <<
" ID " << menuObjectParameters.
opId 676 <<
" ENABLE_MIP " << menuObjectParameters.
enableMip 677 <<
" ENABLE_ISO " << menuObjectParameters.
enableIso 678 <<
" REQUEST_ISO " << menuObjectParameters.
requestIso 680 <<
" ET_THRESHOLD " << menuObjectParameters.
etThreshold 681 <<
" ETA_RANGE " << menuObjectParameters.
etaRange 682 <<
" PHI_RANGE " << menuObjectParameters.
phiRange 683 <<
" PHI_LOW " << menuObjectParameters.
phiLow 684 <<
" PHI_HIGH " << menuObjectParameters.
phiHigh 685 <<
" QUALITY_RANGE " << menuObjectParameters.
qualityRange 686 <<
" CHARGE " << menuObjectParameters.
charge 693 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
694 <<
"\n Number of rows read from L1T_MENU_OP_VIEW: " << resultsMenuOpRows
710 const std::vector<std::string>& columnsMenuTechTrig =
714 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
715 <<
"\n List of columns in L1T_MENU_TECHTRIG_VIEW:\n" 717 for (std::vector<std::string>::const_iterator iter =
718 columnsMenuTechTrig.begin(); iter != columnsMenuTechTrig.end(); iter++) {
719 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << (*iter) << std::endl;
722 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
727 "L1T_MENU_TECHTRIG_VIEW",
728 "L1T_MENU_TECHTRIG_VIEW.MENU_IMPLEMENTATION",
735 <<
"Warning: Content of L1T_MENU_TECHTRIG_VIEW for L1GtTriggerMenu implementation key: " 736 <<
"\n " << objectKey <<
"\nis empty!" 737 <<
"\nNo technical triggers are found for this menu.";
742 int resultsMenuTechTrigRows = resultsMenuTechTrig.
numberRows();
744 for (
int iRow = 0; iRow < resultsMenuTechTrigRows; ++iRow) {
746 for (std::vector<std::string>::const_iterator constIt =
747 columnsMenuTechTrig.begin(); constIt
748 != columnsMenuTechTrig.end(); ++constIt) {
750 if ((*constIt) ==
"TECHTRIG_INDEX") {
754 }
else if ((*constIt) ==
"NAME") {
765 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"Row " << iRow
766 <<
": index = " << menuTechTrig.
bitNumberSh <<
" techName = " 767 << menuTechTrig.
techName << std::endl;
774 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
775 <<
"\n Number of rows read from L1T_MENU_TECHTRIG_VIEW: " 776 << resultsMenuTechTrigRows << std::endl;
787 const short bitNr)
const {
789 std::map<int, std::string> mapIndexName;
791 for (std::vector<TableMenuAlgoCond>::const_iterator constIt =
m_tableMenuAlgoCond.begin(); constIt
794 if (bitNr == (*constIt).bitNumberSh) {
795 mapIndexName[
static_cast<int>((*constIt).condIndexF)] = (*constIt).condFK;
802 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Bit number : " << bitNr << std::endl;
804 for (std::map<int, std::string>::const_iterator constIt = mapIndexName.begin(); constIt
805 != mapIndexName.end(); ++constIt) {
807 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
" Condition index -> name: " 808 << ( ( *constIt ).first ) <<
" " << ( ( *constIt ).second ) << std::endl;
821 const std::string& expressionIndices,
const std::map<int, std::string>& mapCondIndexName)
const {
829 return expressionNames;
837 const unsigned numberConditionChips = 2;
838 const unsigned pinsOnConditionChip = 96;
839 std::vector<int> orderConditionChip;
840 orderConditionChip.push_back(2);
841 orderConditionChip.push_back(1);
843 int posChip = (
static_cast<unsigned> (bitNumberSh) / pinsOnConditionChip ) + 1;
844 for (
unsigned int iChip = 0; iChip < numberConditionChips; ++iChip) {
845 if (posChip == orderConditionChip[iChip]) {
846 return static_cast<int>(iChip);
864 for (std::vector<TableMenuAlgo>::const_iterator constIt =
m_tableMenuAlgo.begin(); constIt
867 bitNumber =
static_cast<int> ((*constIt).bitNumberSh);
869 const std::map<int, std::string>& condIndexName =
condIndexNameMap((*constIt).bitNumberSh);
873 L1GtAlgorithm alg((*constIt).algName, logicalExpression, bitNumber);
877 int algChipNr =
chipNumber((*constIt).bitNumberSh);
896 for (std::vector<TableMenuTechTrig>::const_iterator constIt =
899 bitNumber =
static_cast<int> ((*constIt).bitNumberSh);
903 L1GtAlgorithm techTrig((*constIt).techName, logicalExpression, bitNumber);
919 if (strCategory ==
"CondMuon") {
921 }
else if (strCategory ==
"CondCalo") {
923 }
else if (strCategory ==
"CondEnergySum") {
925 }
else if (strCategory ==
"CondJetCounts") {
927 }
else if (strCategory ==
"CondCorrelation") {
929 }
else if (strCategory ==
"CondCastor") {
931 }
else if (strCategory ==
"CondHfBitCounts") {
933 }
else if (strCategory ==
"CondHfRingEtSums") {
935 }
else if (strCategory ==
"CondBptx") {
937 }
else if (strCategory ==
"CondExternal") {
939 }
else if (strCategory ==
"CondNull") {
943 <<
"\n Warning: string " << strCategory
944 <<
" not defined. Returning CondNull.\n" << std::endl;
955 if (strType ==
"1s") {
957 }
else if (strType ==
"2s") {
959 }
else if (strType ==
"2wsc") {
961 }
else if (strType ==
"2cor") {
963 }
else if (strType ==
"3s") {
965 }
else if (strType ==
"4s") {
967 }
else if (strType ==
"ETM") {
969 }
else if (strType ==
"ETT") {
971 }
else if (strType ==
"HTT") {
973 }
else if (strType ==
"HTM") {
975 }
else if (strType ==
"JetCounts") {
977 }
else if (strType ==
"Castor") {
979 }
else if (strType ==
"HfBitCounts") {
981 }
else if (strType ==
"HfRingEtSums") {
983 }
else if (strType ==
"Bptx") {
985 }
else if (strType ==
"TypeExternal") {
989 <<
"\n Warning: string " << strType
990 <<
" not associated to any L1GtConditionType. Returning TypeNull.\n" 1002 if (strObject ==
"Mu") {
1004 }
else if (strObject ==
"NoIsoEG") {
1006 }
else if (strObject ==
"IsoEG") {
1008 }
else if (strObject ==
"CenJet") {
1010 }
else if (strObject ==
"ForJet") {
1012 }
else if (strObject ==
"TauJet") {
1014 }
else if (strObject ==
"ETM") {
1016 }
else if (strObject ==
"ETT") {
1018 }
else if (strObject ==
"HTT") {
1020 }
else if (strObject ==
"HTM") {
1022 }
else if (strObject ==
"JetCounts") {
1024 }
else if (strObject ==
"HfBitCounts") {
1026 }
else if (strObject ==
"HfRingEtSums") {
1028 }
else if (strObject ==
"TechTrig") {
1030 }
else if (strObject ==
"Castor") {
1032 }
else if (strObject ==
"BPTX") {
1034 }
else if (strObject ==
"GtExternal") {
1038 <<
"\n Warning: string " << strObject
1039 <<
" not associated to any L1GtObject. Returning Mu (no Null type).\n" 1052 unsigned int lenHexStr = hexStr.length();
1054 if (lenHexStr < 3) {
1055 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Warning: string " << hexStr
1056 <<
" has length less than 3." <<
"\n Not possible to split it in two 64-bit words." 1057 <<
"\n Return two zero strings." << std::endl;
1058 hex0WordStr =
"0x0";
1059 hex1WordStr =
"0x0";
1064 unsigned int lenHex = lenHexStr - 2;
1065 unsigned int len0Word = lenHex > 16 ? 16 : lenHex;
1066 unsigned int len1Word = lenHex - len0Word;
1068 unsigned int pos0Word = lenHexStr - len0Word;
1069 hex0WordStr =
"0x" + hexStr.substr(pos0Word, len0Word);
1072 unsigned int pos1Word = pos0Word - len1Word;
1073 hex1WordStr =
"0x" + hexStr.substr(pos1Word, len1Word);
1075 hex1WordStr =
"0x0";
1082 std::list<int> chipList;
1085 for (std::vector<TableMenuAlgoCond>::const_iterator constIt =
m_tableMenuAlgoCond.begin(); constIt
1088 if (condFK == ( *constIt ).condFK) {
1089 int chipNr =
chipNumber( ( *constIt ).bitNumberSh);
1090 chipList.push_back(chipNr);
1102 for (std::vector<TableMenuObjectParameters>::const_iterator constIt =
1105 if (opFK == ( *constIt ).opId) {
1106 objPar.
ptHighThreshold =
static_cast<unsigned int> ( ( *constIt ).ptHighThreshold);
1107 objPar.
ptLowThreshold =
static_cast<unsigned int> ( ( *constIt ).ptLowThreshold);
1108 objPar.
enableMip =
static_cast<bool> ( ( *constIt ).enableMip);
1109 objPar.
enableIso =
static_cast<bool> ( ( *constIt ).enableIso);
1110 objPar.
requestIso =
static_cast<bool> ( ( *constIt ).requestIso);
1111 objPar.
etaRange = lexical_cast_from_hex<unsigned long long>( ( *constIt ).etaRange);
1112 objPar.
phiHigh =
static_cast<unsigned int> ( ( *constIt ).phiHigh);
1113 objPar.
phiLow =
static_cast<unsigned int> ( ( *constIt ).phiLow);
1114 objPar.
qualityRange = lexical_cast_from_hex<unsigned int>( ( *constIt ).qualityRange);
1132 std::vector<L1GtObject>
objType(nrObj,
Mu);
1138 std::vector<L1GtMuonTemplate::ObjectParameter> objParameter(nrObj);
1140 for (
int iObj = 0; iObj < nrObj; ++iObj) {
1143 }
else if (iObj == 1) {
1145 }
else if (iObj == 2) {
1147 }
else if (iObj == 3) {
1150 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
1151 <<
"\n Warning: number of objects requested " << nrObj
1152 <<
" not available in DB." <<
"\n Maximum 4 object parameters implemented. \n" 1159 if (muonCond.
wsc()) {
1160 corrParameter.
deltaEtaRange = lexical_cast_from_hex<unsigned long long> (
1167 corrParameter.
deltaPhiRange0Word = lexical_cast_from_hex<unsigned long long> (word0);
1168 corrParameter.
deltaPhiRange1Word = lexical_cast_from_hex<unsigned long long> (word1);
1183 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1191 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1192 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1194 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << muonCond <<
"\n" << std::endl;
1204 for (std::vector<TableMenuObjectParameters>::const_iterator constIt =
1207 if (opFK == ( *constIt ).opId) {
1208 objPar.
etThreshold =
static_cast<unsigned int> ( ( *constIt ).etThreshold);
1209 objPar.
etaRange = lexical_cast_from_hex<unsigned int> ( ( *constIt ).etaRange);
1210 objPar.
phiRange = lexical_cast_from_hex<unsigned int> ( ( *constIt ).phiRange);
1228 std::vector<L1GtObject>
objType(nrObj, obj);
1234 std::vector<L1GtCaloTemplate::ObjectParameter> objParameter(nrObj);
1236 for (
int iObj = 0; iObj < nrObj; ++iObj) {
1239 }
else if (iObj == 1) {
1241 }
else if (iObj == 2) {
1243 }
else if (iObj == 3) {
1246 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
1247 <<
"\n Warning: number of objects requested " << nrObj
1248 <<
" not available in DB." <<
"\n Maximum 4 object parameters implemented. \n" 1254 if (caloCond.
wsc()) {
1255 corrParameter.
deltaEtaRange = lexical_cast_from_hex<unsigned long long> (
1258 corrParameter.
deltaPhiRange = lexical_cast_from_hex<unsigned long long> (
1273 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1281 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1282 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1284 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << caloCond <<
"\n" << std::endl;
1295 for (std::vector<TableMenuObjectParameters>::const_iterator constIt =
1298 if (opFK == ( *constIt ).opId) {
1299 objPar.
etThreshold =
static_cast<unsigned int> ( ( *constIt ).etThreshold);
1300 objPar.
energyOverflow =
static_cast<bool> ( ( *constIt ).energyOverflow);
1307 objPar.
phiRange0Word = lexical_cast_from_hex<unsigned long long> (word0);
1308 objPar.
phiRange1Word = lexical_cast_from_hex<unsigned long long> (word1);
1310 }
else if (obj ==
HTM) {
1311 objPar.
phiRange0Word = lexical_cast_from_hex<unsigned long long> (word0);
1330 std::vector<L1GtObject>
objType(nrObj, obj);
1336 std::vector<L1GtEnergySumTemplate::ObjectParameter> objParameter(nrObj);
1349 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1357 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1358 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1360 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << esumCond <<
"\n" << std::endl;
1376 std::vector<L1GtObject>
objType(nrObj, obj);
1383 std::vector<L1GtJetCountsTemplate::ObjectParameter> objParameter(nrObj);
1384 objParameter.at(0).countIndex =
static_cast<unsigned int>(condDB.
countIndex);
1385 objParameter.at(0).countThreshold =
static_cast<unsigned int>(condDB.
countThreshold);
1386 objParameter.at(0).countOverflow =
false ;
1398 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1406 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1407 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1409 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << jcCond <<
"\n" << std::endl;
1424 std::vector<L1GtObject>
objType(nrObj, obj);
1431 std::vector<L1GtHfBitCountsTemplate::ObjectParameter> objParameter(nrObj);
1432 objParameter.at(0).countIndex =
static_cast<unsigned int>(condDB.
countIndex);
1433 objParameter.at(0).countThreshold =
static_cast<unsigned int>(condDB.
countThreshold);
1445 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1453 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1454 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1456 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << countsCond <<
"\n" << std::endl;
1471 std::vector<L1GtObject>
objType(nrObj, obj);
1478 std::vector<L1GtHfRingEtSumsTemplate::ObjectParameter> objParameter(nrObj);
1479 objParameter.at(0).etSumIndex =
static_cast<unsigned int>(condDB.
countIndex);
1480 objParameter.at(0).etSumThreshold =
static_cast<unsigned int>(condDB.
countThreshold);
1492 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1500 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1501 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1503 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << esumCond <<
"\n" << std::endl;
1519 std::vector<L1GtObject>
objType(nrObj, obj);
1535 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1543 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1544 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1546 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << castorCond <<
"\n" << std::endl;
1562 std::vector<L1GtObject>
objType(nrObj, obj);
1580 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1588 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1589 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1591 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << bptxCond <<
"\n" << std::endl;
1607 std::vector<L1GtObject>
objType(nrObj, obj);
1625 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1633 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1634 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1636 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << externalCond <<
"\n" << std::endl;
1649 const int nrObj = 2;
1651 std::vector<L1GtObject>
objType(nrObj);
1669 std::vector<L1GtConditionCategory> subcondCategory(nrObj);
1670 std::vector<int> subcondIndex(nrObj);
1672 bool wrongSubcondition =
false;
1674 for (
int iObj = 0; iObj < nrObj; ++iObj) {
1684 std::vector<L1GtMuonTemplate::ObjectParameter> objParameter(1);
1690 }
else if (iObj == 1) {
1706 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1707 != chipList.end(); ++itChip) {
1718 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " 1719 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n " 1722 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1738 std::vector<L1GtCaloTemplate::ObjectParameter> objParameter(1);
1744 }
else if (iObj == 1) {
1757 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1758 != chipList.end(); ++itChip) {
1769 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " 1770 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n " 1773 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1785 std::vector<L1GtEnergySumTemplate::ObjectParameter> objParameter(1);
1791 }
else if (iObj == 1) {
1809 <<
"\n Warning: wrong L1GtConditionType " 1810 << gtObj << std::endl;
1822 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1823 != chipList.end(); ++itChip) {
1834 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " 1835 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n " 1838 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1852 wrongSubcondition =
true;
1854 <<
"\n Warning: correlation condition " 1856 <<
" with invalid sub-condition object type " << gtObj
1857 <<
"\n Condition ignored!" << std::endl;
1860 wrongSubcondition =
true;
1862 <<
"\n Warning: correlation condition " 1864 <<
" with invalid sub-condition object type " << gtObj
1865 <<
"\n Condition ignored!" << std::endl;
1875 if (wrongSubcondition) {
1877 <<
"\n Warning: wrong sub-condition for correlation condition " 1879 <<
"\n Condition not inserted in menu. \n A sub-condition may be left in the menu" 1904 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1912 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1913 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1915 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << correlationCond <<
"\n" << std::endl;
1927 for (std::vector<TableMenuCond>::const_iterator constIt =
m_tableMenuCond.begin(); constIt
1932 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
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
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
std::vector< std::string > columnNamesView(const std::string &schemaName, const std::string &viewName)
std::string deltaPhiRange
unsigned long long deltaEtaRange
void setCondChipNr(const int &cChipNr)
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="")
void setConditionParameter(const std::vector< ObjectParameter > &)
set functions
void setCondType(const L1GtConditionType &cType)
unsigned long long phiRange1Word
unsigned long long deltaPhiRange1Word
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
void setConditionParameter(const std::vector< ObjectParameter > &)
set functions
typedef for a single object template