26 #include "boost/lexical_cast.hpp" 89 auto pL1GtTriggerMenuEmpty = std::make_shared<L1GtTriggerMenu>();
93 const unsigned int numberConditionChips = 2;
94 init(numberConditionChips);
105 return pL1GtTriggerMenuEmpty;
116 return pL1GtTriggerMenuEmpty;
122 return pL1GtTriggerMenuEmpty;
128 return pL1GtTriggerMenuEmpty;
135 return pL1GtTriggerMenuEmpty;
141 return pL1GtTriggerMenuEmpty;
155 auto pL1GtTriggerMenu = std::make_shared<L1GtTriggerMenu>(
156 menuName, numberConditionChips,
181 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
182 <<
"\nThe following L1GtTriggerMenu record was read from OMDS: \n" 185 std::ostringstream myCoutStream;
187 pL1GtTriggerMenu->print(myCoutStream, verbosity);
188 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n" << std::endl;
191 pL1GtTriggerMenu->print(myCoutStream, verbosity);
192 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << myCoutStream.str() <<
"\n" << std::endl;
196 return pL1GtTriggerMenu;
207 gtSchema,
"L1T_MENU_GENERAL_VIEW");
210 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
211 <<
"\n List of columns in L1T_MENU_GENERAL_VIEW:\n" << std::endl;
212 for (std::vector<std::string>::const_iterator iter = columns.begin(); iter != columns.end(); iter++) {
213 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
216 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
220 columns, gtSchema,
"L1T_MENU_GENERAL_VIEW",
226 <<
"Problem to get content of L1T_MENU_GENERAL_VIEW for L1GtTriggerMenu implementation key: " 233 for (std::vector<std::string>::const_iterator constIt = columns.begin(); constIt
234 != columns.end(); ++constIt) {
236 if ( ( *constIt ) ==
"MENU_IMPLEMENTATION") {
239 }
else if ( ( *constIt ) ==
"INTERFACE") {
242 }
else if ( ( *constIt ) ==
"SCALES_KEY") {
245 }
else if ( ( *constIt ) ==
"ALGO_IMPL_TAG") {
258 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
259 <<
"\n L1 trigger menu implementation read from querying view not identical" 260 <<
"\n with menu key:" 262 <<
"\n from key: " << objectKey
263 <<
"\n Menu implementation name set from key." 281 gtSchema,
"L1T_MENU_ALGO_VIEW");
284 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n List of columns in L1T_MENU_ALGO_VIEW:\n" 286 for (std::vector<std::string>::const_iterator iter = columnsMenuAlgo.begin(); iter != columnsMenuAlgo.end(); iter++) {
287 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
290 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
294 columnsMenuAlgo, gtSchema,
"L1T_MENU_ALGO_VIEW",
"L1T_MENU_ALGO_VIEW.MENU_IMPLEMENTATION",
302 <<
"Warning: Content of L1T_MENU_ALGO_VIEW for L1GtTriggerMenu implementation key: " 303 <<
"\n " << objectKey <<
"\nis empty!" 304 <<
"\nNo physics algorithms are found for this menu.";
309 int resultsMenuAlgoRows = resultsMenuAlgo.
numberRows();
311 for (
int iRow = 0; iRow < resultsMenuAlgoRows; ++iRow) {
313 for (std::vector<std::string>::const_iterator constIt = columnsMenuAlgo.begin(); constIt
314 != columnsMenuAlgo.end(); ++constIt) {
316 if ( ( *constIt ) ==
"ALGO_INDEX") {
319 }
else if ( ( *constIt ) ==
"NAME") {
322 }
else if ( ( *constIt ) ==
"ALIAS") {
325 }
else if ( ( *constIt ) ==
"LOGICEXPR") {
335 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
336 <<
"Row " << iRow <<
": index = " << menuAlgo.
bitNumberSh <<
" algName = " << menuAlgo.
algName 346 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
347 <<
"\n Number of rows read from L1T_MENU_ALGO_VIEW: " << resultsMenuAlgoRows
366 gtSchema,
"L1T_MENU_ALGO_COND_VIEW");
369 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
370 <<
"\n List of columns in L1T_MENU_ALGO_COND_VIEW:\n" << std::endl;
371 for (std::vector<std::string>::const_iterator iter = columnsMenuAlgoCond.begin(); iter
372 != columnsMenuAlgoCond.end(); iter++) {
373 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
376 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
380 columnsMenuAlgoCond, gtSchema,
"L1T_MENU_ALGO_COND_VIEW",
387 <<
"Warning: Content of L1T_MENU_ALGO_COND_VIEW for L1GtTriggerMenu implementation key: " 388 <<
"\n " << objectKey <<
"\nis empty!" 389 <<
"\nNo list of condition associated to each algorithm are found for this menu.";
395 int resultsMenuAlgoCondRows = resultsMenuAlgoCond.
numberRows();
397 for (
int iRow = 0; iRow < resultsMenuAlgoCondRows; ++iRow) {
399 for (std::vector<std::string>::const_iterator constIt = columnsMenuAlgoCond.begin(); constIt
400 != columnsMenuAlgoCond.end(); ++constIt) {
402 if ( ( *constIt ) ==
"ALGO_INDEX") {
406 }
else if ( ( *constIt ) ==
"COND_INDEX") {
410 }
else if ( ( *constIt ) ==
"COND_FK") {
420 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"Row " << iRow <<
": ALGO_INDEX = " 422 <<
" COND_FK = " << menuAlgoCond.
condFK << std::endl;
429 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
430 <<
"\n Number of rows read from L1T_MENU_ALGO_COND_VIEW: " 431 << resultsMenuAlgoCondRows << std::endl;
447 gtSchema,
"L1T_MENU_COND_VIEW");
450 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
451 <<
"\n List of columns in L1T_MENU_COND_VIEW:\n" << std::endl;
452 for (std::vector<std::string>::const_iterator iter = columnsMenuCond.begin(); iter
453 != columnsMenuCond.end(); iter++) {
454 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
457 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
461 columnsMenuCond, gtSchema,
"L1T_MENU_COND_VIEW",
468 <<
"Warning: Content of L1T_MENU_COND_VIEW for L1GtTriggerMenu implementation key: " 469 <<
"\n " << objectKey <<
"\nis empty!" 470 <<
"\nNo conditions associated to menu are found for this menu.";
476 int resultsMenuCondRows = resultsMenuCond.
numberRows();
478 for (
int iRow = 0; iRow < resultsMenuCondRows; ++iRow) {
480 for (std::vector<std::string>::const_iterator constIt = columnsMenuCond.begin(); constIt
481 != columnsMenuCond.end(); ++constIt) {
483 if ( ( *constIt ) ==
"COND") {
486 }
else if ( ( *constIt ) ==
"COND_CATEGORY") {
489 }
else if ( ( *constIt ) ==
"COND_TYPE") {
492 }
else if ( ( *constIt ) ==
"GT_OBJECT_1") {
495 }
else if ( ( *constIt ) ==
"GT_OBJECT_2") {
498 }
else if ( ( *constIt ) ==
"COND_GEQ") {
504 }
else if ( ( *constIt ) ==
"COUNT_INDEX") {
507 }
else if ( ( *constIt ) ==
"COUNT_THRESHOLD") {
510 }
else if ( ( *constIt ) ==
"CHARGE_CORRELATION") {
514 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_1_FK") {
518 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_2_FK") {
522 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_3_FK") {
526 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_4_FK") {
530 }
else if ( ( *constIt ) ==
"DELTA_ETA_RANGE") {
533 }
else if ( ( *constIt ) ==
"DELTA_PHI_RANGE") {
543 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
544 <<
" COND " << menuCond.
cond 546 <<
" COND_TYPE " << menuCond.
condType 549 <<
" COND_GEQ " << menuCond.
condGEq <<
"\n" 566 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
567 <<
"\n Number of rows read from L1T_MENU_COND_VIEW: " << resultsMenuCondRows
586 gtSchema,
"L1T_MENU_OP_VIEW");
589 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n List of columns in L1T_MENU_OP_VIEW:\n" 591 for (std::vector<std::string>::const_iterator iter = columnsMenuOp.begin(); iter
592 != columnsMenuOp.end(); iter++) {
593 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
596 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
600 columnsMenuOp, gtSchema,
"L1T_MENU_OP_VIEW",
"L1T_MENU_OP_VIEW.MENU_IMPLEMENTATION",
607 <<
"Warning: Content of L1T_MENU_OP_VIEW for L1GtTriggerMenu implementation key: " 608 <<
"\n " << objectKey <<
"\nis empty!" 609 <<
"\nNo object parameters associated to menu are found for this menu.";
614 int resultsMenuOpRows = resultsMenuOp.
numberRows();
616 for (
int iRow = 0; iRow < resultsMenuOpRows; ++iRow) {
618 for (std::vector<std::string>::const_iterator constIt = columnsMenuOp.begin(); constIt
619 != columnsMenuOp.end(); ++constIt) {
621 if ( ( *constIt ) ==
"ID") {
624 }
else if ( ( *constIt ) ==
"PT_HIGH_THRESHOLD") {
628 }
else if ( ( *constIt ) ==
"PT_LOW_THRESHOLD") {
632 }
else if ( ( *constIt ) ==
"ENABLE_MIP") {
635 }
else if ( ( *constIt ) ==
"ENABLE_ISO") {
638 }
else if ( ( *constIt ) ==
"REQUEST_ISO") {
641 }
else if ( ( *constIt ) ==
"ENERGY_OVERFLOW") {
645 }
else if ( ( *constIt ) ==
"ET_THRESHOLD") {
648 }
else if ( ( *constIt ) ==
"ETA_RANGE") {
651 }
else if ( ( *constIt ) ==
"PHI_RANGE") {
654 }
else if ( ( *constIt ) ==
"PHI_LOW") {
657 }
else if ( ( *constIt ) ==
"PHI_HIGH") {
660 }
else if ( ( *constIt ) ==
"QUALITY_RANGE") {
663 }
else if ( ( *constIt ) ==
"CHARGE") {
673 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
674 <<
" ID " << menuObjectParameters.
opId 677 <<
" ENABLE_MIP " << menuObjectParameters.
enableMip 678 <<
" ENABLE_ISO " << menuObjectParameters.
enableIso 679 <<
" REQUEST_ISO " << menuObjectParameters.
requestIso 681 <<
" ET_THRESHOLD " << menuObjectParameters.
etThreshold 682 <<
" ETA_RANGE " << menuObjectParameters.
etaRange 683 <<
" PHI_RANGE " << menuObjectParameters.
phiRange 684 <<
" PHI_LOW " << menuObjectParameters.
phiLow 685 <<
" PHI_HIGH " << menuObjectParameters.
phiHigh 686 <<
" QUALITY_RANGE " << menuObjectParameters.
qualityRange 687 <<
" CHARGE " << menuObjectParameters.
charge 694 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
695 <<
"\n Number of rows read from L1T_MENU_OP_VIEW: " << resultsMenuOpRows
711 const std::vector<std::string>& columnsMenuTechTrig =
715 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
716 <<
"\n List of columns in L1T_MENU_TECHTRIG_VIEW:\n" 718 for (std::vector<std::string>::const_iterator iter =
719 columnsMenuTechTrig.begin(); iter != columnsMenuTechTrig.end(); iter++) {
720 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << (*iter) << std::endl;
723 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
728 "L1T_MENU_TECHTRIG_VIEW",
729 "L1T_MENU_TECHTRIG_VIEW.MENU_IMPLEMENTATION",
736 <<
"Warning: Content of L1T_MENU_TECHTRIG_VIEW for L1GtTriggerMenu implementation key: " 737 <<
"\n " << objectKey <<
"\nis empty!" 738 <<
"\nNo technical triggers are found for this menu.";
743 int resultsMenuTechTrigRows = resultsMenuTechTrig.
numberRows();
745 for (
int iRow = 0; iRow < resultsMenuTechTrigRows; ++iRow) {
747 for (std::vector<std::string>::const_iterator constIt =
748 columnsMenuTechTrig.begin(); constIt
749 != columnsMenuTechTrig.end(); ++constIt) {
751 if ((*constIt) ==
"TECHTRIG_INDEX") {
755 }
else if ((*constIt) ==
"NAME") {
766 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"Row " << iRow
767 <<
": index = " << menuTechTrig.
bitNumberSh <<
" techName = " 768 << menuTechTrig.
techName << std::endl;
775 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
776 <<
"\n Number of rows read from L1T_MENU_TECHTRIG_VIEW: " 777 << resultsMenuTechTrigRows << std::endl;
788 const short bitNr)
const {
790 std::map<int, std::string> mapIndexName;
792 for (std::vector<TableMenuAlgoCond>::const_iterator constIt =
m_tableMenuAlgoCond.begin(); constIt
795 if (bitNr == (*constIt).bitNumberSh) {
796 mapIndexName[
static_cast<int>((*constIt).condIndexF)] = (*constIt).condFK;
803 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Bit number : " << bitNr << std::endl;
805 for (std::map<int, std::string>::const_iterator constIt = mapIndexName.begin(); constIt
806 != mapIndexName.end(); ++constIt) {
808 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
" Condition index -> name: " 809 << ( ( *constIt ).first ) <<
" " << ( ( *constIt ).second ) << std::endl;
822 const std::string& expressionIndices,
const std::map<int, std::string>& mapCondIndexName)
const {
830 return expressionNames;
838 const unsigned numberConditionChips = 2;
839 const unsigned pinsOnConditionChip = 96;
840 std::vector<int> orderConditionChip;
841 orderConditionChip.push_back(2);
842 orderConditionChip.push_back(1);
844 int posChip = (
static_cast<unsigned> (bitNumberSh) / pinsOnConditionChip ) + 1;
845 for (
unsigned int iChip = 0; iChip < numberConditionChips; ++iChip) {
846 if (posChip == orderConditionChip[iChip]) {
847 return static_cast<int>(iChip);
865 for (std::vector<TableMenuAlgo>::const_iterator constIt =
m_tableMenuAlgo.begin(); constIt
868 bitNumber =
static_cast<int> ((*constIt).bitNumberSh);
870 const std::map<int, std::string>& condIndexName =
condIndexNameMap((*constIt).bitNumberSh);
874 L1GtAlgorithm alg((*constIt).algName, logicalExpression, bitNumber);
878 int algChipNr =
chipNumber((*constIt).bitNumberSh);
897 for (std::vector<TableMenuTechTrig>::const_iterator constIt =
900 bitNumber =
static_cast<int> ((*constIt).bitNumberSh);
904 L1GtAlgorithm techTrig((*constIt).techName, logicalExpression, bitNumber);
920 if (strCategory ==
"CondMuon") {
922 }
else if (strCategory ==
"CondCalo") {
924 }
else if (strCategory ==
"CondEnergySum") {
926 }
else if (strCategory ==
"CondJetCounts") {
928 }
else if (strCategory ==
"CondCorrelation") {
930 }
else if (strCategory ==
"CondCastor") {
932 }
else if (strCategory ==
"CondHfBitCounts") {
934 }
else if (strCategory ==
"CondHfRingEtSums") {
936 }
else if (strCategory ==
"CondBptx") {
938 }
else if (strCategory ==
"CondExternal") {
940 }
else if (strCategory ==
"CondNull") {
944 <<
"\n Warning: string " << strCategory
945 <<
" not defined. Returning CondNull.\n" << std::endl;
956 if (strType ==
"1s") {
958 }
else if (strType ==
"2s") {
960 }
else if (strType ==
"2wsc") {
962 }
else if (strType ==
"2cor") {
964 }
else if (strType ==
"3s") {
966 }
else if (strType ==
"4s") {
968 }
else if (strType ==
"ETM") {
970 }
else if (strType ==
"ETT") {
972 }
else if (strType ==
"HTT") {
974 }
else if (strType ==
"HTM") {
976 }
else if (strType ==
"JetCounts") {
978 }
else if (strType ==
"Castor") {
980 }
else if (strType ==
"HfBitCounts") {
982 }
else if (strType ==
"HfRingEtSums") {
984 }
else if (strType ==
"Bptx") {
986 }
else if (strType ==
"TypeExternal") {
990 <<
"\n Warning: string " << strType
991 <<
" not associated to any L1GtConditionType. Returning TypeNull.\n" 1003 if (strObject ==
"Mu") {
1005 }
else if (strObject ==
"NoIsoEG") {
1007 }
else if (strObject ==
"IsoEG") {
1009 }
else if (strObject ==
"CenJet") {
1011 }
else if (strObject ==
"ForJet") {
1013 }
else if (strObject ==
"TauJet") {
1015 }
else if (strObject ==
"ETM") {
1017 }
else if (strObject ==
"ETT") {
1019 }
else if (strObject ==
"HTT") {
1021 }
else if (strObject ==
"HTM") {
1023 }
else if (strObject ==
"JetCounts") {
1025 }
else if (strObject ==
"HfBitCounts") {
1027 }
else if (strObject ==
"HfRingEtSums") {
1029 }
else if (strObject ==
"TechTrig") {
1031 }
else if (strObject ==
"Castor") {
1033 }
else if (strObject ==
"BPTX") {
1035 }
else if (strObject ==
"GtExternal") {
1039 <<
"\n Warning: string " << strObject
1040 <<
" not associated to any L1GtObject. Returning Mu (no Null type).\n" 1053 unsigned int lenHexStr = hexStr.length();
1055 if (lenHexStr < 3) {
1056 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Warning: string " << hexStr
1057 <<
" has length less than 3." <<
"\n Not possible to split it in two 64-bit words." 1058 <<
"\n Return two zero strings." << std::endl;
1059 hex0WordStr =
"0x0";
1060 hex1WordStr =
"0x0";
1065 unsigned int lenHex = lenHexStr - 2;
1066 unsigned int len0Word = lenHex > 16 ? 16 : lenHex;
1067 unsigned int len1Word = lenHex - len0Word;
1069 unsigned int pos0Word = lenHexStr - len0Word;
1070 hex0WordStr =
"0x" + hexStr.substr(pos0Word, len0Word);
1073 unsigned int pos1Word = pos0Word - len1Word;
1074 hex1WordStr =
"0x" + hexStr.substr(pos1Word, len1Word);
1076 hex1WordStr =
"0x0";
1083 std::list<int> chipList;
1086 for (std::vector<TableMenuAlgoCond>::const_iterator constIt =
m_tableMenuAlgoCond.begin(); constIt
1089 if (condFK == ( *constIt ).condFK) {
1090 int chipNr =
chipNumber( ( *constIt ).bitNumberSh);
1091 chipList.push_back(chipNr);
1103 for (std::vector<TableMenuObjectParameters>::const_iterator constIt =
1106 if (opFK == ( *constIt ).opId) {
1107 objPar.
ptHighThreshold =
static_cast<unsigned int> ( ( *constIt ).ptHighThreshold);
1108 objPar.
ptLowThreshold =
static_cast<unsigned int> ( ( *constIt ).ptLowThreshold);
1109 objPar.
enableMip =
static_cast<bool> ( ( *constIt ).enableMip);
1110 objPar.
enableIso =
static_cast<bool> ( ( *constIt ).enableIso);
1111 objPar.
requestIso =
static_cast<bool> ( ( *constIt ).requestIso);
1112 objPar.
etaRange = lexical_cast_from_hex<unsigned long long>( ( *constIt ).etaRange);
1113 objPar.
phiHigh =
static_cast<unsigned int> ( ( *constIt ).phiHigh);
1114 objPar.
phiLow =
static_cast<unsigned int> ( ( *constIt ).phiLow);
1115 objPar.
qualityRange = lexical_cast_from_hex<unsigned int>( ( *constIt ).qualityRange);
1133 std::vector<L1GtObject> objType(nrObj,
Mu);
1139 std::vector<L1GtMuonTemplate::ObjectParameter> objParameter(nrObj);
1141 for (
int iObj = 0; iObj < nrObj; ++iObj) {
1144 }
else if (iObj == 1) {
1146 }
else if (iObj == 2) {
1148 }
else if (iObj == 3) {
1151 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
1152 <<
"\n Warning: number of objects requested " << nrObj
1153 <<
" not available in DB." <<
"\n Maximum 4 object parameters implemented. \n" 1160 if (muonCond.
wsc()) {
1161 corrParameter.
deltaEtaRange = lexical_cast_from_hex<unsigned long long> (
1168 corrParameter.
deltaPhiRange0Word = lexical_cast_from_hex<unsigned long long> (word0);
1169 corrParameter.
deltaPhiRange1Word = lexical_cast_from_hex<unsigned long long> (word1);
1184 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1192 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1193 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1195 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << muonCond <<
"\n" << std::endl;
1205 for (std::vector<TableMenuObjectParameters>::const_iterator constIt =
1208 if (opFK == ( *constIt ).opId) {
1209 objPar.
etThreshold =
static_cast<unsigned int> ( ( *constIt ).etThreshold);
1210 objPar.
etaRange = lexical_cast_from_hex<unsigned int> ( ( *constIt ).etaRange);
1211 objPar.
phiRange = lexical_cast_from_hex<unsigned int> ( ( *constIt ).phiRange);
1229 std::vector<L1GtObject> objType(nrObj, obj);
1235 std::vector<L1GtCaloTemplate::ObjectParameter> objParameter(nrObj);
1237 for (
int iObj = 0; iObj < nrObj; ++iObj) {
1240 }
else if (iObj == 1) {
1242 }
else if (iObj == 2) {
1244 }
else if (iObj == 3) {
1247 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
1248 <<
"\n Warning: number of objects requested " << nrObj
1249 <<
" not available in DB." <<
"\n Maximum 4 object parameters implemented. \n" 1255 if (caloCond.
wsc()) {
1256 corrParameter.
deltaEtaRange = lexical_cast_from_hex<unsigned long long> (
1259 corrParameter.
deltaPhiRange = lexical_cast_from_hex<unsigned long long> (
1274 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1282 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1283 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1285 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << caloCond <<
"\n" << std::endl;
1296 for (std::vector<TableMenuObjectParameters>::const_iterator constIt =
1299 if (opFK == ( *constIt ).opId) {
1300 objPar.
etThreshold =
static_cast<unsigned int> ( ( *constIt ).etThreshold);
1301 objPar.
energyOverflow =
static_cast<bool> ( ( *constIt ).energyOverflow);
1308 objPar.
phiRange0Word = lexical_cast_from_hex<unsigned long long> (word0);
1309 objPar.
phiRange1Word = lexical_cast_from_hex<unsigned long long> (word1);
1311 }
else if (obj ==
HTM) {
1312 objPar.
phiRange0Word = lexical_cast_from_hex<unsigned long long> (word0);
1331 std::vector<L1GtObject> objType(nrObj, obj);
1337 std::vector<L1GtEnergySumTemplate::ObjectParameter> objParameter(nrObj);
1350 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1358 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1359 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1361 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << esumCond <<
"\n" << std::endl;
1377 std::vector<L1GtObject> objType(nrObj, obj);
1384 std::vector<L1GtJetCountsTemplate::ObjectParameter> objParameter(nrObj);
1385 objParameter.at(0).countIndex =
static_cast<unsigned int>(condDB.
countIndex);
1386 objParameter.at(0).countThreshold =
static_cast<unsigned int>(condDB.
countThreshold);
1387 objParameter.at(0).countOverflow =
false ;
1399 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1407 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1408 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1410 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << jcCond <<
"\n" << std::endl;
1425 std::vector<L1GtObject> objType(nrObj, obj);
1432 std::vector<L1GtHfBitCountsTemplate::ObjectParameter> objParameter(nrObj);
1433 objParameter.at(0).countIndex =
static_cast<unsigned int>(condDB.
countIndex);
1434 objParameter.at(0).countThreshold =
static_cast<unsigned int>(condDB.
countThreshold);
1446 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1454 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1455 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1457 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << countsCond <<
"\n" << std::endl;
1472 std::vector<L1GtObject> objType(nrObj, obj);
1479 std::vector<L1GtHfRingEtSumsTemplate::ObjectParameter> objParameter(nrObj);
1480 objParameter.at(0).etSumIndex =
static_cast<unsigned int>(condDB.
countIndex);
1481 objParameter.at(0).etSumThreshold =
static_cast<unsigned int>(condDB.
countThreshold);
1493 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1501 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1502 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1504 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << esumCond <<
"\n" << std::endl;
1520 std::vector<L1GtObject> objType(nrObj, obj);
1536 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1544 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1545 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1547 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << castorCond <<
"\n" << std::endl;
1563 std::vector<L1GtObject> objType(nrObj, obj);
1581 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1589 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1590 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1592 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << bptxCond <<
"\n" << std::endl;
1608 std::vector<L1GtObject> objType(nrObj, obj);
1626 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1634 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1635 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1637 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << externalCond <<
"\n" << std::endl;
1650 const int nrObj = 2;
1652 std::vector<L1GtObject> objType(nrObj);
1670 std::vector<L1GtConditionCategory> subcondCategory(nrObj);
1671 std::vector<int> subcondIndex(nrObj);
1673 bool wrongSubcondition =
false;
1675 for (
int iObj = 0; iObj < nrObj; ++iObj) {
1685 std::vector<L1GtMuonTemplate::ObjectParameter> objParameter(1);
1691 }
else if (iObj == 1) {
1707 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1708 != chipList.end(); ++itChip) {
1719 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " 1720 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n " 1723 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1739 std::vector<L1GtCaloTemplate::ObjectParameter> objParameter(1);
1745 }
else if (iObj == 1) {
1758 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1759 != chipList.end(); ++itChip) {
1770 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " 1771 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n " 1774 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1786 std::vector<L1GtEnergySumTemplate::ObjectParameter> objParameter(1);
1792 }
else if (iObj == 1) {
1810 <<
"\n Warning: wrong L1GtConditionType " 1811 << gtObj << std::endl;
1823 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1824 != chipList.end(); ++itChip) {
1835 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " 1836 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n " 1839 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1853 wrongSubcondition =
true;
1855 <<
"\n Warning: correlation condition " 1857 <<
" with invalid sub-condition object type " << gtObj
1858 <<
"\n Condition ignored!" << std::endl;
1861 wrongSubcondition =
true;
1863 <<
"\n Warning: correlation condition " 1865 <<
" with invalid sub-condition object type " << gtObj
1866 <<
"\n Condition ignored!" << std::endl;
1876 if (wrongSubcondition) {
1878 <<
"\n Warning: wrong sub-condition for correlation condition " 1880 <<
"\n Condition not inserted in menu. \n A sub-condition may be left in the menu" 1905 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1913 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1914 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1916 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << correlationCond <<
"\n" << std::endl;
1928 for (std::vector<TableMenuCond>::const_iterator constIt =
m_tableMenuCond.begin(); constIt
1933 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
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="")
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
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