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") {
502 float condGEqFloat = -1;
504 menuCond.
condGEq = (condGEqFloat > 0.5) ?
true :
false;
506 }
else if ( ( *constIt ) ==
"COUNT_INDEX") {
509 }
else if ( ( *constIt ) ==
"COUNT_THRESHOLD") {
512 }
else if ( ( *constIt ) ==
"CHARGE_CORRELATION") {
516 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_1_FK") {
520 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_2_FK") {
524 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_3_FK") {
528 }
else if ( ( *constIt ) ==
"OBJECT_PARAMETER_4_FK") {
532 }
else if ( ( *constIt ) ==
"DELTA_ETA_RANGE") {
535 }
else if ( ( *constIt ) ==
"DELTA_PHI_RANGE") {
545 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
546 <<
" COND " << menuCond.
cond
548 <<
" COND_TYPE " << menuCond.
condType
551 <<
" COND_GEQ " << menuCond.
condGEq <<
"\n"
568 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
569 <<
"\n Number of rows read from L1T_MENU_COND_VIEW: " << resultsMenuCondRows
580 const std::string& gtSchema,
const std::string& objectKey) {
588 gtSchema,
"L1T_MENU_OP_VIEW");
591 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n List of columns in L1T_MENU_OP_VIEW:\n"
593 for (std::vector<std::string>::const_iterator iter = columnsMenuOp.begin(); iter
594 != columnsMenuOp.end(); iter++) {
595 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << ( *iter ) << std::endl;
598 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
602 columnsMenuOp, gtSchema,
"L1T_MENU_OP_VIEW",
"L1T_MENU_OP_VIEW.MENU_IMPLEMENTATION",
609 <<
"Warning: Content of L1T_MENU_OP_VIEW for L1GtTriggerMenu implementation key: "
610 <<
"\n " << objectKey <<
"\nis empty!"
611 <<
"\nNo object parameters associated to menu are found for this menu.";
616 int resultsMenuOpRows = resultsMenuOp.
numberRows();
618 for (
int iRow = 0; iRow < resultsMenuOpRows; ++iRow) {
620 for (std::vector<std::string>::const_iterator constIt = columnsMenuOp.begin(); constIt
621 != columnsMenuOp.end(); ++constIt) {
623 if ( ( *constIt ) ==
"ID") {
626 }
else if ( ( *constIt ) ==
"PT_HIGH_THRESHOLD") {
630 }
else if ( ( *constIt ) ==
"PT_LOW_THRESHOLD") {
634 }
else if ( ( *constIt ) ==
"ENABLE_MIP") {
637 }
else if ( ( *constIt ) ==
"ENABLE_ISO") {
640 }
else if ( ( *constIt ) ==
"REQUEST_ISO") {
643 }
else if ( ( *constIt ) ==
"ENERGY_OVERFLOW") {
647 }
else if ( ( *constIt ) ==
"ET_THRESHOLD") {
650 }
else if ( ( *constIt ) ==
"ETA_RANGE") {
653 }
else if ( ( *constIt ) ==
"PHI_RANGE") {
656 }
else if ( ( *constIt ) ==
"PHI_LOW") {
659 }
else if ( ( *constIt ) ==
"PHI_HIGH") {
662 }
else if ( ( *constIt ) ==
"QUALITY_RANGE") {
665 }
else if ( ( *constIt ) ==
"CHARGE") {
675 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
676 <<
" ID " << menuObjectParameters.
opId
679 <<
" ENABLE_MIP " << menuObjectParameters.
enableMip
680 <<
" ENABLE_ISO " << menuObjectParameters.
enableIso
681 <<
" REQUEST_ISO " << menuObjectParameters.
requestIso
683 <<
" ET_THRESHOLD " << menuObjectParameters.
etThreshold
684 <<
" ETA_RANGE " << menuObjectParameters.
etaRange
685 <<
" PHI_RANGE " << menuObjectParameters.
phiRange
686 <<
" PHI_LOW " << menuObjectParameters.
phiLow
687 <<
" PHI_HIGH " << menuObjectParameters.
phiHigh
688 <<
" QUALITY_RANGE " << menuObjectParameters.
qualityRange
689 <<
" CHARGE " << menuObjectParameters.
charge
696 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
697 <<
"\n Number of rows read from L1T_MENU_OP_VIEW: " << resultsMenuOpRows
708 const std::string& gtSchema,
const std::string& objectKey) {
713 const std::vector<std::string>& columnsMenuTechTrig =
717 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
718 <<
"\n List of columns in L1T_MENU_TECHTRIG_VIEW:\n"
720 for (std::vector<std::string>::const_iterator iter =
721 columnsMenuTechTrig.begin(); iter != columnsMenuTechTrig.end(); iter++) {
722 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << (*iter) << std::endl;
725 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n\n" << std::endl;
730 "L1T_MENU_TECHTRIG_VIEW",
731 "L1T_MENU_TECHTRIG_VIEW.MENU_IMPLEMENTATION",
738 <<
"Warning: Content of L1T_MENU_TECHTRIG_VIEW for L1GtTriggerMenu implementation key: "
739 <<
"\n " << objectKey <<
"\nis empty!"
740 <<
"\nNo technical triggers are found for this menu.";
745 int resultsMenuTechTrigRows = resultsMenuTechTrig.
numberRows();
747 for (
int iRow = 0; iRow < resultsMenuTechTrigRows; ++iRow) {
749 for (std::vector<std::string>::const_iterator constIt =
750 columnsMenuTechTrig.begin(); constIt
751 != columnsMenuTechTrig.end(); ++constIt) {
753 if ((*constIt) ==
"TECHTRIG_INDEX") {
757 }
else if ((*constIt) ==
"NAME") {
768 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"Row " << iRow
769 <<
": index = " << menuTechTrig.
bitNumberSh <<
" techName = "
770 << menuTechTrig.
techName << std::endl;
777 LogTrace(
"L1GtTriggerMenuConfigOnlineProd")
778 <<
"\n Number of rows read from L1T_MENU_TECHTRIG_VIEW: "
779 << resultsMenuTechTrigRows << std::endl;
790 const short bitNr)
const {
792 std::map<int, std::string> mapIndexName;
794 for (std::vector<TableMenuAlgoCond>::const_iterator constIt =
m_tableMenuAlgoCond.begin(); constIt
797 if (bitNr == (*constIt).bitNumberSh) {
798 mapIndexName[
static_cast<int>((*constIt).condIndexF)] = (*constIt).condFK;
805 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Bit number : " << bitNr << std::endl;
807 for (std::map<int, std::string>::const_iterator constIt = mapIndexName.begin(); constIt
808 != mapIndexName.end(); ++constIt) {
810 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
" Condition index -> name: "
811 << ( ( *constIt ).first ) <<
" " << ( ( *constIt ).second ) << std::endl;
824 const std::string& expressionIndices,
const std::map<int, std::string>& mapCondIndexName)
const {
826 std::string expressionNames;
832 return expressionNames;
840 const unsigned numberConditionChips = 2;
841 const unsigned pinsOnConditionChip = 96;
842 std::vector<int> orderConditionChip;
843 orderConditionChip.push_back(2);
844 orderConditionChip.push_back(1);
846 int posChip = (
static_cast<unsigned> (bitNumberSh) / pinsOnConditionChip ) + 1;
847 for (
unsigned int iChip = 0; iChip < numberConditionChips; ++iChip) {
848 if (posChip == orderConditionChip[iChip]) {
849 return static_cast<int>(iChip);
864 std::string logicalExpression;
867 for (std::vector<TableMenuAlgo>::const_iterator constIt =
m_tableMenuAlgo.begin(); constIt
870 bitNumber =
static_cast<int> ((*constIt).bitNumberSh);
872 const std::map<int, std::string>& condIndexName =
condIndexNameMap((*constIt).bitNumberSh);
876 L1GtAlgorithm alg((*constIt).algName, logicalExpression, bitNumber);
880 int algChipNr =
chipNumber((*constIt).bitNumberSh);
896 std::string logicalExpression;
899 for (std::vector<TableMenuTechTrig>::const_iterator constIt =
902 bitNumber =
static_cast<int> ((*constIt).bitNumberSh);
906 L1GtAlgorithm techTrig((*constIt).techName, logicalExpression, bitNumber);
920 const std::string& strCategory) {
922 if (strCategory ==
"CondMuon") {
924 }
else if (strCategory ==
"CondCalo") {
926 }
else if (strCategory ==
"CondEnergySum") {
928 }
else if (strCategory ==
"CondJetCounts") {
930 }
else if (strCategory ==
"CondCorrelation") {
932 }
else if (strCategory ==
"CondCastor") {
934 }
else if (strCategory ==
"CondHfBitCounts") {
936 }
else if (strCategory ==
"CondHfRingEtSums") {
938 }
else if (strCategory ==
"CondBptx") {
940 }
else if (strCategory ==
"CondExternal") {
942 }
else if (strCategory ==
"CondNull") {
946 <<
"\n Warning: string " << strCategory
947 <<
" not defined. Returning CondNull.\n" << std::endl;
958 if (strType ==
"1s") {
960 }
else if (strType ==
"2s") {
962 }
else if (strType ==
"2wsc") {
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"
1051 const std::string& hexStr, std::string& hex0WordStr, std::string& hex1WordStr) {
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);
1667 std::vector<L1GtConditionCategory> subcondCategory(nrObj);
1668 std::vector<int> subcondIndex(nrObj);
1670 bool wrongSubcondition =
false;
1672 for (
int iObj = 0; iObj < nrObj; ++iObj) {
1679 subcondCategory.push_back(
CondMuon);
1682 std::vector<L1GtMuonTemplate::ObjectParameter> objParameter(1);
1684 std::string subcondName;
1688 }
else if (iObj == 1) {
1701 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1702 != chipList.end(); ++itChip) {
1713 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition "
1714 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n "
1717 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1730 subcondCategory.push_back(
CondCalo);
1733 std::vector<L1GtCaloTemplate::ObjectParameter> objParameter(1);
1735 std::string subcondName;
1739 }
else if (iObj == 1) {
1752 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1753 != chipList.end(); ++itChip) {
1764 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition "
1765 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n "
1768 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1780 std::vector<L1GtEnergySumTemplate::ObjectParameter> objParameter(1);
1782 std::string subcondName;
1786 }
else if (iObj == 1) {
1804 <<
"\n Warning: wrong L1GtConditionType "
1805 << gtObj << std::endl;
1817 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip
1818 != chipList.end(); ++itChip) {
1829 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition "
1830 << ( condDB.
cond ) <<
" on chip " << ( *itChip ) <<
"\n "
1833 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << subcond <<
"\n" << std::endl;
1847 wrongSubcondition =
true;
1849 <<
"\n Warning: correlation condition "
1851 <<
" with invalid sub-condition object type " << gtObj
1852 <<
"\n Condition ignored!" << std::endl;
1855 wrongSubcondition =
true;
1857 <<
"\n Warning: correlation condition "
1859 <<
" with invalid sub-condition object type " << gtObj
1860 <<
"\n Condition ignored!" << std::endl;
1870 if (wrongSubcondition) {
1872 <<
"\n Warning: wrong sub-condition for correlation condition "
1874 <<
"\n Condition not inserted in menu. \n A sub-condition may be left in the menu"
1899 for (std::list<int>::const_iterator itChip = chipList.begin(); itChip != chipList.end(); ++itChip) {
1907 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") <<
"\n Adding condition " << ( condDB.
cond )
1908 <<
" on chip " << ( *itChip ) <<
"\n " << std::endl;
1910 LogTrace(
"L1GtTriggerMenuConfigOnlineProd") << correlationCond <<
"\n" << std::endl;
1922 for (std::vector<TableMenuCond>::const_iterator constIt =
m_tableMenuCond.begin(); constIt
1927 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
tuple obj
Example code starts here #.
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
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
L1GtConditionCategory
condition categories
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