28 #include "boost/lexical_cast.hpp"
85 const std::string& objectKey) {
91 boost::shared_ptr<L1GtTriggerMenu> pL1GtTriggerMenuEmpty =
96 const unsigned int numberConditionChips = 2;
97 init(numberConditionChips);
99 const std::string gtSchema =
"CMS_GT";
108 return pL1GtTriggerMenuEmpty;
119 return pL1GtTriggerMenuEmpty;
125 return pL1GtTriggerMenuEmpty;
131 return pL1GtTriggerMenuEmpty;
138 return pL1GtTriggerMenuEmpty;
144 return pL1GtTriggerMenuEmpty;
158 boost::shared_ptr<L1GtTriggerMenu> pL1GtTriggerMenu = boost::shared_ptr<L1GtTriggerMenu>(
184 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
185 <<
"\nThe following L1GtTriggerMenu record was read from OMDS: \n"
188 std::ostringstream myCoutStream;
190 pL1GtTriggerMenu->print(myCoutStream, verbosity);
191 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n" << std::endl;
194 pL1GtTriggerMenu->print(myCoutStream, verbosity);
195 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << myCoutStream.str() <<
"\n" << std::endl;
199 return pL1GtTriggerMenu;
204 const std::string& gtSchema,
const std::string& objectKey) {
210 gtSchema,
"L1T_MENU_GENERAL_VIEW");
213 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
214 <<
"\n List of columns in L1T_MENU_GENERAL_VIEW:\n" << std::endl;
215 for (std::vector<std::string>::const_iterator iter = columns.begin(); iter != columns.end(); iter++) {
216 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
219 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
223 columns, gtSchema,
"L1T_MENU_GENERAL_VIEW",
229 <<
"Problem to get content of L1T_MENU_GENERAL_VIEW for L1GtTriggerMenu implementation key: "
236 for (std::vector<std::string>::const_iterator constIt = columns.begin(); constIt
237 != columns.end(); ++constIt) {
239 if ( ( *constIt ) ==
"MENU_IMPLEMENTATION") {
242 }
else if ( ( *constIt ) ==
"INTERFACE") {
245 }
else if ( ( *constIt ) ==
"SCALES_KEY") {
248 }
else if ( ( *constIt ) ==
"ALGO_IMPL_TAG") {
261 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
262 <<
"\n L1 trigger menu implementation read from querying view not identical"
263 <<
"\n with menu key:"
265 <<
"\n from key: " << objectKey
266 <<
"\n Menu implementation name set from key."
278 const std::string& gtSchema,
const std::string& objectKey) {
284 gtSchema,
"L1T_MENU_ALGO_VIEW");
287 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n List of columns in L1T_MENU_ALGO_VIEW:\n"
289 for (std::vector<std::string>::const_iterator iter = columnsMenuAlgo.begin(); iter != columnsMenuAlgo.end(); iter++) {
290 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
293 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
297 columnsMenuAlgo, gtSchema,
"L1T_MENU_ALGO_VIEW",
"L1T_MENU_ALGO_VIEW.MENU_IMPLEMENTATION",
305 <<
"Warning: Content of L1T_MENU_ALGO_VIEW for L1GtTriggerMenu implementation key: "
306 <<
"\n " << objectKey <<
"\nis empty!"
307 <<
"\nNo physics algorithms are found for this menu.";
312 int resultsMenuAlgoRows = resultsMenuAlgo.
numberRows();
314 for (
int iRow = 0; iRow < resultsMenuAlgoRows; ++iRow) {
316 for (std::vector<std::string>::const_iterator constIt = columnsMenuAlgo.begin(); constIt
317 != columnsMenuAlgo.end(); ++constIt) {
319 if ( ( *constIt ) ==
"ALGO_INDEX") {
322 }
else if ( ( *constIt ) ==
"NAME") {
325 }
else if ( ( *constIt ) ==
"ALIAS") {
328 }
else if ( ( *constIt ) ==
"LOGICEXPR") {
338 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
339 <<
"Row " << iRow <<
": index = " << menuAlgo.
bitNumberSh <<
" algName = " << menuAlgo.
algName
349 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
350 <<
"\n Number of rows read from L1T_MENU_ALGO_VIEW: " << resultsMenuAlgoRows
361 const std::string& gtSchema,
const std::string& objectKey) {
369 gtSchema,
"L1T_MENU_ALGO_COND_VIEW");
372 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
373 <<
"\n List of columns in L1T_MENU_ALGO_COND_VIEW:\n" << std::endl;
374 for (std::vector<std::string>::const_iterator iter = columnsMenuAlgoCond.begin(); iter
375 != columnsMenuAlgoCond.end(); iter++) {
376 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
379 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
383 columnsMenuAlgoCond, gtSchema,
"L1T_MENU_ALGO_COND_VIEW",
390 <<
"Warning: Content of L1T_MENU_ALGO_COND_VIEW for L1GtTriggerMenu implementation key: "
391 <<
"\n " << objectKey <<
"\nis empty!"
392 <<
"\nNo list of condition associated to each algorithm are found for this menu.";
398 int resultsMenuAlgoCondRows = resultsMenuAlgoCond.
numberRows();
400 for (
int iRow = 0; iRow < resultsMenuAlgoCondRows; ++iRow) {
402 for (std::vector<std::string>::const_iterator constIt = columnsMenuAlgoCond.begin(); constIt
403 != columnsMenuAlgoCond.end(); ++constIt) {
405 if ( ( *constIt ) ==
"ALGO_INDEX") {
409 }
else if ( ( *constIt ) ==
"COND_INDEX") {
413 }
else if ( ( *constIt ) ==
"COND_FK") {
423 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"Row " << iRow <<
": ALGO_INDEX = "
425 <<
" COND_FK = " << menuAlgoCond.
condFK << std::endl;
432 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
433 <<
"\n Number of rows read from L1T_MENU_ALGO_COND_VIEW: "
434 << resultsMenuAlgoCondRows << std::endl;
444 const std::string& gtSchema,
const std::string& objectKey) {
450 gtSchema,
"L1T_MENU_COND_VIEW");
453 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
454 <<
"\n List of columns in L1T_MENU_COND_VIEW:\n" << std::endl;
455 for (std::vector<std::string>::const_iterator iter = columnsMenuCond.begin(); iter
456 != columnsMenuCond.end(); iter++) {
457 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
460 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
464 columnsMenuCond, gtSchema,
"L1T_MENU_COND_VIEW",
471 <<
"Warning: Content of L1T_MENU_COND_VIEW for L1GtTriggerMenu implementation key: "
472 <<
"\n " << objectKey <<
"\nis empty!"
473 <<
"\nNo conditions associated to menu are found for this menu.";
479 int resultsMenuCondRows = resultsMenuCond.
numberRows();
481 for (
int iRow = 0; iRow < resultsMenuCondRows; ++iRow) {
483 for (std::vector<std::string>::const_iterator constIt = columnsMenuCond.begin(); constIt
484 != columnsMenuCond.end(); ++constIt) {
486 if ( ( *constIt ) ==
"COND") {
489 }
else if ( ( *constIt ) ==
"COND_CATEGORY") {
492 }
else if ( ( *constIt ) ==
"COND_TYPE") {
495 }
else if ( ( *constIt ) ==
"GT_OBJECT_1") {
498 }
else if ( ( *constIt ) ==
"GT_OBJECT_2") {
501 }
else if ( ( *constIt ) ==
"COND_GEQ") {
507 }
else if ( ( *constIt ) ==
"COUNT_INDEX") {
510 }
else if ( ( *constIt ) ==
"COUNT_THRESHOLD") {
513 }
else if ( ( *constIt ) ==
"CHARGE_CORRELATION") {
517 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_1_FK") {
521 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_2_FK") {
525 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_3_FK") {
529 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_4_FK") {
533 }
else if ( ( *constIt ) ==
"DELTA_ETA_RANGE") {
536 }
else if ( ( *constIt ) ==
"DELTA_PHI_RANGE") {
546 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
547 <<
" COND " << menuCond.
cond
549 <<
" COND_TYPE " << menuCond.
condType
552 <<
" COND_GEQ " << menuCond.
condGEq <<
"\n"
569 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
570 <<
"\n Number of rows read from L1T_MENU_COND_VIEW: " << resultsMenuCondRows
581 const std::string& gtSchema,
const std::string& objectKey) {
589 gtSchema,
"L1T_MENU_OP_VIEW");
592 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n List of columns in L1T_MENU_OP_VIEW:\n"
594 for (std::vector<std::string>::const_iterator iter = columnsMenuOp.begin(); iter
595 != columnsMenuOp.end(); iter++) {
596 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
599 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
603 columnsMenuOp, gtSchema,
"L1T_MENU_OP_VIEW",
"L1T_MENU_OP_VIEW.MENU_IMPLEMENTATION",
610 <<
"Warning: Content of L1T_MENU_OP_VIEW for L1GtTriggerMenu implementation key: "
611 <<
"\n " << objectKey <<
"\nis empty!"
612 <<
"\nNo object parameters associated to menu are found for this menu.";
617 int resultsMenuOpRows = resultsMenuOp.
numberRows();
619 for (
int iRow = 0; iRow < resultsMenuOpRows; ++iRow) {
621 for (std::vector<std::string>::const_iterator constIt = columnsMenuOp.begin(); constIt
622 != columnsMenuOp.end(); ++constIt) {
624 if ( ( *constIt ) ==
"ID") {
627 }
else if ( ( *constIt ) ==
"PT_HIGH_THRESHOLD") {
631 }
else if ( ( *constIt ) ==
"PT_LOW_THRESHOLD") {
635 }
else if ( ( *constIt ) ==
"ENABLE_MIP") {
638 }
else if ( ( *constIt ) ==
"ENABLE_ISO") {
641 }
else if ( ( *constIt ) ==
"REQUEST_ISO") {
644 }
else if ( ( *constIt ) ==
"ENERGY_OVERFLOW") {
648 }
else if ( ( *constIt ) ==
"ET_THRESHOLD") {
651 }
else if ( ( *constIt ) ==
"ETA_RANGE") {
654 }
else if ( ( *constIt ) ==
"PHI_RANGE") {
657 }
else if ( ( *constIt ) ==
"PHI_LOW") {
660 }
else if ( ( *constIt ) ==
"PHI_HIGH") {
663 }
else if ( ( *constIt ) ==
"QUALITY_RANGE") {
666 }
else if ( ( *constIt ) ==
"CHARGE") {
676 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
677 <<
" ID " << menuObjectParameters.
opId
680 <<
" ENABLE_MIP " << menuObjectParameters.
enableMip
681 <<
" ENABLE_ISO " << menuObjectParameters.
enableIso
682 <<
" REQUEST_ISO " << menuObjectParameters.
requestIso
684 <<
" ET_THRESHOLD " << menuObjectParameters.
etThreshold
685 <<
" ETA_RANGE " << menuObjectParameters.
etaRange
686 <<
" PHI_RANGE " << menuObjectParameters.
phiRange
687 <<
" PHI_LOW " << menuObjectParameters.
phiLow
688 <<
" PHI_HIGH " << menuObjectParameters.
phiHigh
689 <<
" QUALITY_RANGE " << menuObjectParameters.
qualityRange
690 <<
" CHARGE " << menuObjectParameters.
charge
697 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
698 <<
"\n Number of rows read from L1T_MENU_OP_VIEW: " << resultsMenuOpRows
709 const std::string& gtSchema,
const std::string& objectKey) {
714 const std::vector<std::string>& columnsMenuTechTrig =
718 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
719 <<
"\n List of columns in L1T_MENU_TECHTRIG_VIEW:\n"
721 for (std::vector<std::string>::const_iterator iter =
722 columnsMenuTechTrig.begin(); iter != columnsMenuTechTrig.end(); iter++) {
723 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << (*iter) << std::endl;
726 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
731 "L1T_MENU_TECHTRIG_VIEW",
732 "L1T_MENU_TECHTRIG_VIEW.MENU_IMPLEMENTATION",
739 <<
"Warning: Content of L1T_MENU_TECHTRIG_VIEW for L1GtTriggerMenu implementation key: "
740 <<
"\n " << objectKey <<
"\nis empty!"
741 <<
"\nNo technical triggers are found for this menu.";
746 int resultsMenuTechTrigRows = resultsMenuTechTrig.
numberRows();
748 for (
int iRow = 0; iRow < resultsMenuTechTrigRows; ++iRow) {
750 for (std::vector<std::string>::const_iterator constIt =
751 columnsMenuTechTrig.begin(); constIt
752 != columnsMenuTechTrig.end(); ++constIt) {
754 if ((*constIt) ==
"TECHTRIG_INDEX") {
758 }
else if ((*constIt) ==
"NAME") {
769 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"Row " << iRow
770 <<
": index = " << menuTechTrig.
bitNumberSh <<
" techName = "
771 << menuTechTrig.
techName << std::endl;
778 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
779 <<
"\n Number of rows read from L1T_MENU_TECHTRIG_VIEW: "
780 << resultsMenuTechTrigRows << std::endl;
791 const short bitNr)
const {
793 std::map<int, std::string> mapIndexName;
795 for (std::vector<TableMenuAlgoCond>::const_iterator constIt =
m_tableMenuAlgoCond.begin(); constIt
798 if (bitNr == (*constIt).bitNumberSh) {
799 mapIndexName[
static_cast<int>((*constIt).condIndexF)] = (*constIt).condFK;
806 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Bit number : " << bitNr << std::endl;
808 for (std::map<int, std::string>::const_iterator constIt = mapIndexName.begin(); constIt
809 != mapIndexName.end(); ++constIt) {
811 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
" Condition index -> name: "
812 << ( ( *constIt ).first ) <<
" " << ( ( *constIt ).second ) << std::endl;
825 const std::string& expressionIndices,
const std::map<int, std::string>& mapCondIndexName)
const {
827 std::string expressionNames;
833 return expressionNames;
841 const unsigned numberConditionChips = 2;
842 const unsigned pinsOnConditionChip = 96;
843 std::vector<int> orderConditionChip;
844 orderConditionChip.push_back(2);
845 orderConditionChip.push_back(1);
847 int posChip = (
static_cast<unsigned> (bitNumberSh) / pinsOnConditionChip ) + 1;
848 for (
unsigned int iChip = 0; iChip < numberConditionChips; ++iChip) {
849 if (posChip == orderConditionChip[iChip]) {
850 return static_cast<int>(iChip);
865 std::string logicalExpression;
868 for (std::vector<TableMenuAlgo>::const_iterator constIt =
m_tableMenuAlgo.begin(); constIt
871 bitNumber =
static_cast<int> ((*constIt).bitNumberSh);
873 const std::map<int, std::string>& condIndexName =
condIndexNameMap((*constIt).bitNumberSh);
877 L1GtAlgorithm alg((*constIt).algName, logicalExpression, bitNumber);
881 int algChipNr =
chipNumber((*constIt).bitNumberSh);
897 std::string logicalExpression;
900 for (std::vector<TableMenuTechTrig>::const_iterator constIt =
903 bitNumber =
static_cast<int> ((*constIt).bitNumberSh);
907 L1GtAlgorithm techTrig((*constIt).techName, logicalExpression, bitNumber);
921 const std::string& strCategory) {
923 if (strCategory ==
"CondMuon") {
925 }
else if (strCategory ==
"CondCalo") {
927 }
else if (strCategory ==
"CondEnergySum") {
929 }
else if (strCategory ==
"CondJetCounts") {
931 }
else if (strCategory ==
"CondCorrelation") {
933 }
else if (strCategory ==
"CondCastor") {
935 }
else if (strCategory ==
"CondHfBitCounts") {
937 }
else if (strCategory ==
"CondHfRingEtSums") {
939 }
else if (strCategory ==
"CondBptx") {
941 }
else if (strCategory ==
"CondExternal") {
943 }
else if (strCategory ==
"CondNull") {
947 <<
"\n Warning: string " << strCategory
948 <<
" not defined. Returning CondNull.\n" << std::endl;
959 if (strType ==
"1s") {
961 }
else if (strType ==
"2s") {
963 }
else if (strType ==
"2wsc") {
965 }
else if (strType ==
"2cor") {
967 }
else if (strType ==
"3s") {
969 }
else if (strType ==
"4s") {
971 }
else if (strType ==
"ETM") {
973 }
else if (strType ==
"ETT") {
975 }
else if (strType ==
"HTT") {
977 }
else if (strType ==
"HTM") {
979 }
else if (strType ==
"JetCounts") {
981 }
else if (strType ==
"Castor") {
983 }
else if (strType ==
"HfBitCounts") {
985 }
else if (strType ==
"HfRingEtSums") {
987 }
else if (strType ==
"Bptx") {
989 }
else if (strType ==
"TypeExternal") {
993 <<
"\n Warning: string " << strType
994 <<
" not associated to any L1GtConditionType. Returning TypeNull.\n"
1006 if (strObject ==
"Mu") {
1008 }
else if (strObject ==
"NoIsoEG") {
1010 }
else if (strObject ==
"IsoEG") {
1012 }
else if (strObject ==
"CenJet") {
1014 }
else if (strObject ==
"ForJet") {
1016 }
else if (strObject ==
"TauJet") {
1018 }
else if (strObject ==
"ETM") {
1020 }
else if (strObject ==
"ETT") {
1022 }
else if (strObject ==
"HTT") {
1024 }
else if (strObject ==
"HTM") {
1026 }
else if (strObject ==
"JetCounts") {
1028 }
else if (strObject ==
"HfBitCounts") {
1030 }
else if (strObject ==
"HfRingEtSums") {
1032 }
else if (strObject ==
"TechTrig") {
1034 }
else if (strObject ==
"Castor") {
1036 }
else if (strObject ==
"BPTX") {
1038 }
else if (strObject ==
"GtExternal") {
1042 <<
"\n Warning: string " << strObject
1043 <<
" not associated to any L1GtObject. Returning Mu (no Null type).\n"
1054 const std::string& hexStr, std::string& hex0WordStr, std::string& hex1WordStr) {
1056 unsigned int lenHexStr = hexStr.length();
1058 if (lenHexStr < 3) {
1059 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Warning: string " << hexStr
1060 <<
" has length less than 3." <<
"\n Not possible to split it in two 64-bit words."
1061 <<
"\n Return two zero strings." << std::endl;
1062 hex0WordStr =
"0x0";
1063 hex1WordStr =
"0x0";
1068 unsigned int lenHex = lenHexStr - 2;
1069 unsigned int len0Word = lenHex > 16 ? 16 : lenHex;
1070 unsigned int len1Word = lenHex - len0Word;
1072 unsigned int pos0Word = lenHexStr - len0Word;
1073 hex0WordStr =
"0x" + hexStr.substr(pos0Word, len0Word);
1076 unsigned int pos1Word = pos0Word - len1Word;
1077 hex1WordStr =
"0x" + hexStr.substr(pos1Word, len1Word);
1079 hex1WordStr =
"0x0";
1086 std::list<int> chipList;
1089 for (std::vector<TableMenuAlgoCond>::const_iterator constIt =
m_tableMenuAlgoCond.begin(); constIt
1092 if (condFK == ( *constIt ).condFK) {
1093 int chipNr =
chipNumber( ( *constIt ).bitNumberSh);
1094 chipList.push_back(chipNr);
1106 for (std::vector<TableMenuObjectParameters>::const_iterator constIt =
1109 if (opFK == ( *constIt ).opId) {
1110 objPar.
ptHighThreshold =
static_cast<unsigned int> ( ( *constIt ).ptHighThreshold);
1111 objPar.
ptLowThreshold =
static_cast<unsigned int> ( ( *constIt ).ptLowThreshold);
1112 objPar.
enableMip =
static_cast<bool> ( ( *constIt ).enableMip);
1113 objPar.
enableIso =
static_cast<bool> ( ( *constIt ).enableIso);
1114 objPar.
requestIso =
static_cast<bool> ( ( *constIt ).requestIso);
1115 objPar.
etaRange = lexical_cast_from_hex<unsigned long long>( ( *constIt ).etaRange);
1116 objPar.
phiHigh =
static_cast<unsigned int> ( ( *constIt ).phiHigh);
1117 objPar.
phiLow =
static_cast<unsigned int> ( ( *constIt ).phiLow);
1118 objPar.
qualityRange = lexical_cast_from_hex<unsigned int>( ( *constIt ).qualityRange);
1136 std::vector<L1GtObject> objType(nrObj,
Mu);
1142 std::vector<L1GtMuonTemplate::ObjectParameter> objParameter(nrObj);
1144 for (
int iObj = 0; iObj < nrObj; ++iObj) {
1147 }
else if (iObj == 1) {
1149 }
else if (iObj == 2) {
1151 }
else if (iObj == 3) {
1154 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
1155 <<
"\n Warning: number of objects requested " << nrObj
1156 <<
" not available in DB." <<
"\n Maximum 4 object parameters implemented. \n"
1167 if (muonCond.
wsc()) {
1168 corrParameter.
deltaEtaRange = lexical_cast_from_hex<unsigned long long> (
1175 corrParameter.
deltaPhiRange0Word = lexical_cast_from_hex<unsigned long long> (word0);
1176 corrParameter.
deltaPhiRange1Word = lexical_cast_from_hex<unsigned long long> (word1);
1191 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1199 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1200 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1202 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << muonCond <<
"\n" << std::endl;
1212 for (std::vector<TableMenuObjectParameters>::const_iterator constIt =
1215 if (opFK == ( *constIt ).opId) {
1216 objPar.
etThreshold =
static_cast<unsigned int> ( ( *constIt ).etThreshold);
1217 objPar.
etaRange = lexical_cast_from_hex<unsigned int> ( ( *constIt ).etaRange);
1218 objPar.
phiRange = lexical_cast_from_hex<unsigned int> ( ( *constIt ).phiRange);
1236 std::vector<L1GtObject> objType(nrObj, obj);
1242 std::vector<L1GtCaloTemplate::ObjectParameter> objParameter(nrObj);
1244 for (
int iObj = 0; iObj < nrObj; ++iObj) {
1247 }
else if (iObj == 1) {
1249 }
else if (iObj == 2) {
1251 }
else if (iObj == 3) {
1254 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
1255 <<
"\n Warning: number of objects requested " << nrObj
1256 <<
" not available in DB." <<
"\n Maximum 4 object parameters implemented. \n"
1262 if (caloCond.
wsc()) {
1263 corrParameter.
deltaEtaRange = lexical_cast_from_hex<unsigned long long> (
1266 corrParameter.
deltaPhiRange = lexical_cast_from_hex<unsigned long long> (
1281 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1289 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1290 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1292 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << caloCond <<
"\n" << std::endl;
1303 for (std::vector<TableMenuObjectParameters>::const_iterator constIt =
1306 if (opFK == ( *constIt ).opId) {
1307 objPar.
etThreshold =
static_cast<unsigned int> ( ( *constIt ).etThreshold);
1308 objPar.
energyOverflow =
static_cast<bool> ( ( *constIt ).energyOverflow);
1315 objPar.
phiRange0Word = lexical_cast_from_hex<unsigned long long> (word0);
1316 objPar.
phiRange1Word = lexical_cast_from_hex<unsigned long long> (word1);
1318 }
else if (obj ==
HTM) {
1319 objPar.
phiRange0Word = lexical_cast_from_hex<unsigned long long> (word0);
1338 std::vector<L1GtObject> objType(nrObj, obj);
1344 std::vector<L1GtEnergySumTemplate::ObjectParameter> objParameter(nrObj);
1357 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1365 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1366 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1368 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << esumCond <<
"\n" << std::endl;
1384 std::vector<L1GtObject> objType(nrObj, obj);
1391 std::vector<L1GtJetCountsTemplate::ObjectParameter> objParameter(nrObj);
1392 objParameter.at(0).countIndex =
static_cast<unsigned int>(condDB.
countIndex);
1393 objParameter.at(0).countThreshold =
static_cast<unsigned int>(condDB.
countThreshold);
1394 objParameter.at(0).countOverflow =
false ;
1406 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1414 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1415 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1417 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << jcCond <<
"\n" << std::endl;
1432 std::vector<L1GtObject> objType(nrObj, obj);
1439 std::vector<L1GtHfBitCountsTemplate::ObjectParameter> objParameter(nrObj);
1440 objParameter.at(0).countIndex =
static_cast<unsigned int>(condDB.
countIndex);
1441 objParameter.at(0).countThreshold =
static_cast<unsigned int>(condDB.
countThreshold);
1453 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1461 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1462 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1464 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << countsCond <<
"\n" << std::endl;
1479 std::vector<L1GtObject> objType(nrObj, obj);
1486 std::vector<L1GtHfRingEtSumsTemplate::ObjectParameter> objParameter(nrObj);
1487 objParameter.at(0).etSumIndex =
static_cast<unsigned int>(condDB.
countIndex);
1488 objParameter.at(0).etSumThreshold =
static_cast<unsigned int>(condDB.
countThreshold);
1500 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1508 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1509 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1511 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << esumCond <<
"\n" << std::endl;
1527 std::vector<L1GtObject> objType(nrObj, obj);
1543 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1551 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1552 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1554 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << castorCond <<
"\n" << std::endl;
1570 std::vector<L1GtObject> objType(nrObj, obj);
1588 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1596 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1597 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1599 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << bptxCond <<
"\n" << std::endl;
1615 std::vector<L1GtObject> objType(nrObj, obj);
1633 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1641 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1642 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1644 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << externalCond <<
"\n" << std::endl;
1657 const int nrObj = 2;
1659 std::vector<L1GtObject> objType(nrObj);
1677 std::vector<L1GtConditionCategory> subcondCategory(nrObj);
1678 std::vector<int> subcondIndex(nrObj);
1680 bool wrongSubcondition =
false;
1682 for (
int iObj = 0; iObj < nrObj; ++iObj) {
1692 std::vector<L1GtMuonTemplate::ObjectParameter> objParameter(1);
1694 std::string subcondName;
1698 }
else if (iObj == 1) {
1715 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1716 != chipList.end(); ++itChip) {
1727 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition "
1728 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n "
1731 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1747 std::vector<L1GtCaloTemplate::ObjectParameter> objParameter(1);
1749 std::string subcondName;
1753 }
else if (iObj == 1) {
1766 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1767 != chipList.end(); ++itChip) {
1778 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition "
1779 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n "
1782 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1794 std::vector<L1GtEnergySumTemplate::ObjectParameter> objParameter(1);
1796 std::string subcondName;
1800 }
else if (iObj == 1) {
1818 <<
"\n Warning: wrong L1GtConditionType "
1819 << gtObj << std::endl;
1831 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1832 != chipList.end(); ++itChip) {
1843 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition "
1844 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n "
1847 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1861 wrongSubcondition =
true;
1863 <<
"\n Warning: correlation condition "
1865 <<
" with invalid sub-condition object type " << gtObj
1866 <<
"\n Condition ignored!" << std::endl;
1869 wrongSubcondition =
true;
1871 <<
"\n Warning: correlation condition "
1873 <<
" with invalid sub-condition object type " << gtObj
1874 <<
"\n Condition ignored!" << std::endl;
1884 if (wrongSubcondition) {
1886 <<
"\n Warning: wrong sub-condition for correlation condition "
1888 <<
"\n Condition not inserted in menu. \n A sub-condition may be left in the menu"
1913 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1921 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1922 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1924 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << correlationCond <<
"\n" << std::endl;
1936 for (std::vector<TableMenuCond>::const_iterator constIt =
m_tableMenuCond.begin(); constIt
1941 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
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