51 m_l1GtStableParCacheID(0ULL), m_numberAlgorithmTriggers(0),
53 m_numberTechnicalTriggers(0),
55 m_l1GtPfAlgoCacheID(0ULL), m_l1GtPfTechCacheID(0ULL),
57 m_l1GtTmAlgoCacheID(0ULL), m_l1GtTmTechCacheID(0ULL),
59 m_l1GtTmVetoAlgoCacheID(0ULL), m_l1GtTmVetoTechCacheID(0ULL),
61 m_l1GtMenuCacheID(0ULL),
63 m_l1EventSetupValid(
false),
65 m_l1GtMenuLiteValid(
false),
67 m_beginRunCache(
false),
73 m_physicsDaqPartition(0),
75 m_retrieveL1EventSetup(
false),
77 m_retrieveL1GtTriggerMenuLite(
false)
94 switch (trigCategory) {
96 return "Algorithm Trigger";
100 return "Technical Trigger";
123 unsigned long long l1GtStableParCacheID =
153 unsigned long long l1GtPfAlgoCacheID =
168 unsigned long long l1GtPfTechCacheID = evSetup.
get<
186 unsigned long long l1GtTmAlgoCacheID =
201 unsigned long long l1GtTmTechCacheID =
216 unsigned long long l1GtTmVetoAlgoCacheID =
231 unsigned long long l1GtTmVetoTechCacheID =
249 unsigned long long l1GtMenuCacheID =
278 iRun.
getByLabel(l1GtMenuLiteInputTag, l1GtMenuLite);
282 LogDebug(
"L1GtUtils") <<
"\nL1GtTriggerMenuLite with \n "
283 << l1GtMenuLiteInputTag
284 <<
"\nrequested in configuration, but not found in the event."
292 LogDebug(
"L1GtUtils") <<
"\nL1GtTriggerMenuLite with \n "
293 << l1GtMenuLiteInputTag <<
"\nretrieved for run "
322 if (useL1EventSetup) {
331 if (useL1GtTriggerMenuLite) {
342 if (useL1GtTriggerMenuLite) {
347 getL1GtRunCache(iRun, evSetup, useL1EventSetup, useL1GtTriggerMenuLite,
363 if (useL1EventSetup) {
379 if (useL1GtTriggerMenuLite) {
409 if (useL1GtTriggerMenuLite) {
422 getL1GtRunCache(iEvent, evSetup, useL1EventSetup, useL1GtTriggerMenuLite,
432 typedef std::vector<edm::Provenance const*> Provenances;
433 Provenances provenances;
439 bool foundL1GtRecord =
false;
440 bool foundL1GtReadoutRecord =
false;
442 bool foundMultipleL1GtRecord =
false;
443 bool foundMultipleL1GtReadoutRecord =
false;
446 std::vector<edm::InputTag> inputTagsL1GtRecord;
447 std::vector<edm::InputTag> inputTagsL1GtReadoutRecord;
451 std::vector<edm::InputTag> preferredL1GtRecordInputTag;
452 preferredL1GtRecordInputTag.reserve(5);
453 preferredL1GtRecordInputTag.push_back(
edm::InputTag(
"gtDigis"));
454 preferredL1GtRecordInputTag.push_back(
edm::InputTag(
"hltGtDigis"));
456 std::vector<edm::InputTag> preferredL1GtReadoutRecordInputTag;
457 preferredL1GtReadoutRecordInputTag.reserve(5);
458 preferredL1GtReadoutRecordInputTag.push_back(
edm::InputTag(
"gtDigis"));
459 preferredL1GtReadoutRecordInputTag.push_back(
edm::InputTag(
"hltGtDigis"));
461 LogDebug(
"L1GtUtils") <<
"\nTry to get AllProvenance for event "
462 << iEvent.
id().
event() << std::endl;
466 LogTrace(
"L1GtUtils") <<
"\n" <<
"Event contains " << provenances.size()
467 <<
" product" << (provenances.size() == 1 ?
"" :
"s")
468 <<
" with friendlyClassName, moduleLabel, productInstanceName and processName:\n"
471 for (Provenances::iterator itProv = provenances.begin(), itProvEnd =
472 provenances.end(); itProv != itProvEnd; ++itProv) {
474 friendlyName = (*itProv)->friendlyClassName();
475 modLabel = (*itProv)->moduleLabel();
476 instanceName = (*itProv)->productInstanceName();
477 processName = (*itProv)->processName();
479 LogTrace(
"L1GtUtils") << friendlyName <<
"\t \"" << modLabel
480 <<
"\" \t \"" << instanceName <<
"\" \t \"" << processName
481 <<
"\"" << std::endl;
483 if (friendlyName ==
"L1GlobalTriggerRecord") {
486 inputTagsL1GtRecord.push_back(l1GtRecordInputTag);
488 foundL1GtRecord =
true;
489 if (inputTagsL1GtRecord.size() > 1) {
490 foundMultipleL1GtRecord =
true;
492 }
else if (friendlyName ==
"L1GlobalTriggerReadoutRecord") {
493 l1GtReadoutRecordInputTag =
edm::InputTag(modLabel, instanceName,
495 inputTagsL1GtReadoutRecord.push_back(l1GtReadoutRecordInputTag);
497 foundL1GtReadoutRecord =
true;
499 if (inputTagsL1GtReadoutRecord.size() > 1) {
500 foundMultipleL1GtReadoutRecord =
true;
507 int nrInpuTags = inputTagsL1GtReadoutRecord.size();
508 if (nrInpuTags == 1) {
509 LogDebug(
"L1GtUtils") <<
"\n Unique L1GlobalTriggerReadoutRecord product found in the event."
512 }
else if (nrInpuTags > 1) {
513 LogDebug(
"L1GtUtils") <<
"\nWARNING: Multiple L1GlobalTriggerReadoutRecord products found in the event.\n "
515 <<
" L1GlobalTriggerReadoutRecord products:"
518 LogDebug(
"L1GtUtils") <<
"\nWARNING: No L1GlobalTriggerReadoutRecord product found in the event.\n "
522 for (
int iTag = 0; iTag < nrInpuTags; ++iTag) {
524 << inputTagsL1GtReadoutRecord[iTag]
531 if (!foundL1GtRecord) {
533 }
else if (foundMultipleL1GtRecord) {
535 bool foundPreferredInputTag =
false;
536 for (std::vector<edm::InputTag>::const_iterator itTag = inputTagsL1GtRecord.begin(), itTagEnd =
537 inputTagsL1GtRecord.end(); itTag != itTagEnd; ++itTag) {
539 for (std::vector<edm::InputTag>::const_iterator itPrefTag = preferredL1GtRecordInputTag.begin(), itPrefTagEnd =
540 preferredL1GtRecordInputTag.end(); itPrefTag != itPrefTagEnd; ++itPrefTag) {
542 if (itTag->label() == itPrefTag->label()) {
544 <<
"\nWARNING: multiple L1GlobalTriggerRecord products found in the event."
545 <<
"\nInput tag set to the preferred input tag" << (*itTag)
547 l1GtRecordInputTag = *itTag;
548 foundPreferredInputTag =
true;
553 if (foundPreferredInputTag) {
558 if (!foundPreferredInputTag) {
560 <<
"\nWARNING: multiple L1GlobalTriggerRecord products found in the event."
561 <<
"\nNo preferred input tag within the found values"
562 <<
"\n Input tag put to empty input tag."
569 <<
"\nUnique L1GlobalTriggerRecord found in the event with \n "
570 << l1GtRecordInputTag << std::endl;
573 if (!foundL1GtReadoutRecord) {
575 }
else if (foundMultipleL1GtReadoutRecord) {
577 bool foundPreferredInputTag =
false;
578 for (std::vector<edm::InputTag>::const_iterator itTag = inputTagsL1GtReadoutRecord.begin(), itTagEnd =
579 inputTagsL1GtReadoutRecord.end(); itTag != itTagEnd; ++itTag) {
581 for (std::vector<edm::InputTag>::const_iterator itPrefTag = preferredL1GtReadoutRecordInputTag.begin(), itPrefTagEnd =
582 preferredL1GtReadoutRecordInputTag.end(); itPrefTag != itPrefTagEnd; ++itPrefTag) {
584 if (itTag->label() == itPrefTag->label()) {
586 <<
"\nWARNING: multiple L1GlobalTriggerReadoutRecord products found in the event."
587 <<
"\nInput tag set to the preferred input tag" << (*itTag)
589 l1GtReadoutRecordInputTag = *itTag;
590 foundPreferredInputTag =
true;
595 if (foundPreferredInputTag) {
600 if (!foundPreferredInputTag) {
602 <<
"\nWARNING: multiple L1GlobalTriggerReadoutRecord products found in the event."
603 <<
"\nNo preferred input tag within the found values"
604 <<
"\n Input tag put to empty input tag."
611 <<
"\nUnique L1GlobalTriggerReadoutRecord found in the event with \n "
612 << l1GtReadoutRecordInputTag << std::endl;
620 typedef std::vector<edm::Provenance const*> Provenances;
621 Provenances provenances;
627 bool foundL1GtTriggerMenuLite =
false;
629 LogDebug(
"L1GtUtils") <<
"\nTry to get AllProvenance for run "
634 LogTrace(
"L1GtUtils") <<
"\n" <<
"Run contains " << provenances.size()
635 <<
" product" << (provenances.size() == 1 ?
"" :
"s")
636 <<
" with friendlyClassName, moduleLabel, productInstanceName and processName:\n"
639 for (Provenances::iterator itProv = provenances.begin(), itProvEnd =
640 provenances.end(); itProv != itProvEnd; ++itProv) {
642 friendlyName = (*itProv)->friendlyClassName();
643 modLabel = (*itProv)->moduleLabel();
644 instanceName = (*itProv)->productInstanceName();
645 processName = (*itProv)->processName();
647 LogTrace(
"L1GtUtils") << friendlyName <<
"\t \"" << modLabel
648 <<
"\" \t \"" << instanceName <<
"\" \t \"" << processName
649 <<
"\"" << std::endl;
651 if (friendlyName ==
"L1GtTriggerMenuLite") {
652 l1GtTriggerMenuLiteInputTag =
edm::InputTag(modLabel, instanceName,
654 foundL1GtTriggerMenuLite =
true;
659 if (!foundL1GtTriggerMenuLite) {
661 LogTrace(
"L1GtUtils") <<
"\nL1GtTriggerMenuLite not found in Run"
664 LogTrace(
"L1GtUtils") <<
"\nL1GtTriggerMenuLite found in Run with \n "
665 << l1GtTriggerMenuLiteInputTag << std::endl;
673 int& bitNumber)
const {
686 if (itTrig->second == nameAlgoTechTrig) {
689 bitNumber = itTrig->first;
700 if (itTrig->second == nameAlgoTechTrig) {
703 bitNumber = itTrig->first;
714 if (itTrig->second == nameAlgoTechTrig) {
717 bitNumber = itTrig->first;
729 bitNumber = (itAlgo->second).algoBitNumber();
738 bitNumber = (itAlgo->second).algoBitNumber();
747 bitNumber = (itAlgo->second).algoBitNumber();
763 bitNumber = (itAlgo->second).algoBitNumber();
772 bitNumber = (itAlgo->second).algoBitNumber();
781 bitNumber = (itAlgo->second).algoBitNumber();
802 aliasL1Trigger.clear();
803 nameL1Trigger.clear();
811 bool trigAliasFound =
false;
812 bool trigNameFound =
false;
818 if (static_cast<int>(itTrig->first) == bitNumber) {
819 aliasL1Trigger = itTrig->second;
820 trigAliasFound =
true;
829 if (static_cast<int>(itTrig->first) == bitNumber) {
830 nameL1Trigger = itTrig->second;
831 trigNameFound =
true;
836 if (!(trigAliasFound && trigNameFound)) {
846 bool trigNameFound =
false;
852 if (static_cast<int>(itTrig->first) == bitNumber) {
853 nameL1Trigger = itTrig->second;
857 aliasL1Trigger = itTrig->second;
859 trigNameFound =
true;
864 if (!(trigNameFound)) {
881 bool trigAliasFound =
false;
886 if ((itTrig->second).algoBitNumber() == bitNumber) {
887 aliasL1Trigger = itTrig->first;
889 nameL1Trigger = (itTrig->second).algoName();
891 trigAliasFound =
true;
896 if (!(trigAliasFound)) {
906 bool trigNameFound =
false;
911 if ((itTrig->second).algoBitNumber() == bitNumber) {
912 nameL1Trigger = (itTrig->second).algoName();
915 aliasL1Trigger = nameL1Trigger;
917 trigNameFound =
true;
922 if (!(trigNameFound)) {
944 bool trigAliasFound =
false;
949 if ((itTrig->second).algoBitNumber() == bitNumber) {
950 aliasL1Trigger = itTrig->first;
952 nameL1Trigger = (itTrig->second).algoName();
954 trigAliasFound =
true;
959 if (!(trigAliasFound)) {
969 bool trigNameFound =
false;
974 if ((itTrig->second).algoBitNumber() == bitNumber) {
975 nameL1Trigger = (itTrig->second).algoName();
978 aliasL1Trigger = itTrig->first;
980 trigNameFound =
true;
985 if (!(trigNameFound)) {
1011 const std::string& nameAlgoTechTrig,
bool& decisionBeforeMask,
1012 bool& decisionAfterMask,
int&
prescaleFactor,
int& triggerMask)
const {
1015 decisionBeforeMask =
false;
1016 decisionAfterMask =
false;
1017 prescaleFactor = -1;
1042 iError = l1ConfCode + 1;
1047 LogDebug(
"L1GtUtils") <<
"\nAlgorithm/technical trigger \n "
1049 <<
"\not found in the trigger menu \n "
1051 <<
"\nretrieved from L1GtTriggerMenuLite" << std::endl;
1056 LogDebug(
"L1GtUtils") <<
"\nAlgorithm/technical trigger \n "
1058 <<
"\not found in the trigger menu \n "
1060 <<
"\nretrieved from Event Setup" << std::endl;
1066 LogDebug(
"L1GtUtils") <<
"\nAlgorithm/technical trigger \n "
1068 <<
"\not found in the trigger menu \n "
1070 <<
"\nretrieved from Event Setup" << std::endl;
1081 if (bitNumber < 0) {
1083 iError = l1ConfCode + 2;
1087 LogDebug(
"L1GtUtils") <<
"\nNegative bit number for "
1089 << nameAlgoTechTrig <<
"\nfrom menu \n "
1091 <<
"\nretrieved from L1GtTriggerMenuLite" << std::endl;
1095 LogDebug(
"L1GtUtils") <<
"\nNegative bit number for "
1097 << nameAlgoTechTrig <<
"\nfrom menu \n "
1099 <<
"\nretrieved from Event Setup" << std::endl;
1105 LogDebug(
"L1GtUtils") <<
"\nNegative bit number for "
1107 << nameAlgoTechTrig <<
"\nfrom menu \n "
1109 <<
"\nretrieved from Event Setup" << std::endl;
1121 int iErrorRecord = 0;
1123 bool validRecord =
false;
1124 bool gtReadoutRecordValid =
false;
1127 iEvent.
getByLabel(l1GtRecordInputTag, gtRecord);
1136 LogDebug(
"L1GtUtils") <<
"\nL1GlobalTriggerRecord with \n "
1137 << l1GtRecordInputTag <<
"\nnot found in the event."
1142 iEvent.
getByLabel(l1GtReadoutRecordInputTag, gtReadoutRecord);
1144 if (gtReadoutRecord.
isValid()) {
1146 gtReadoutRecordValid =
true;
1151 iErrorRecord = iErrorRecord + 100;
1152 LogDebug(
"L1GtUtils") <<
"\nL1GlobalTriggerReadoutRecord with \n "
1153 << l1GtReadoutRecordInputTag <<
"\nnot found in the event."
1164 int pfIndexTechTrig = -1;
1165 int pfIndexAlgoTrig = -1;
1168 if (gtReadoutRecordValid) {
1171 = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexTech();
1173 = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexAlgo();
1178 =
static_cast<int> (gtRecord->gtPrescaleFactorIndexTech());
1180 =
static_cast<int> (gtRecord->gtPrescaleFactorIndexAlgo());
1186 LogDebug(
"L1GtUtils") <<
"\nError: "
1187 <<
"\nNo valid L1GlobalTriggerRecord with \n "
1188 << l1GtRecordInputTag <<
"\nfound in the event."
1189 <<
"\nNo valid L1GlobalTriggerReadoutRecord with \n "
1190 << l1GtReadoutRecordInputTag <<
"\nfound in the event."
1193 iError = l1ConfCode + iErrorRecord;
1206 size_t pfSetsSize = 0;
1208 const std::vector<int>* prescaleFactorsSubset = 0;
1209 const std::vector<unsigned int>* triggerMasksSet = 0;
1211 switch (trigCategory) {
1232 pfIndex = pfIndexAlgoTrig;
1256 pfIndex = pfIndexTechTrig;
1262 iError = l1ConfCode + iErrorRecord + 3;
1274 iError = l1ConfCode + iErrorRecord + 1000;
1276 <<
"\nError: index of prescale factor set retrieved from the data \n"
1277 <<
"less than zero."
1278 <<
"\n Value of index retrieved from data = " << pfIndex
1283 }
else if (pfIndex >= (static_cast<int>(pfSetsSize))) {
1284 iError = l1ConfCode + iErrorRecord + 2000;
1286 <<
"\nError: index of prescale factor set retrieved from the data \n"
1287 <<
"greater than the size of the vector of prescale factor sets."
1288 <<
"\n Value of index retrieved from data = " << pfIndex
1289 <<
"\n Vector size = " << pfSetsSize << std::endl;
1294 switch (trigCategory) {
1298 prescaleFactorsSubset
1299 = &((*m_prescaleFactorsAlgoTrigLite).at(pfIndex));
1303 prescaleFactorsSubset
1304 = &((*m_prescaleFactorsAlgoTrig).at(pfIndex));
1310 prescaleFactorsSubset
1311 = &((*m_prescaleFactorsAlgoTrig).at(pfIndex));
1320 prescaleFactorsSubset
1321 = &((*m_prescaleFactorsTechTrigLite).at(pfIndex));
1325 prescaleFactorsSubset
1326 = &((*m_prescaleFactorsTechTrig).at(pfIndex));
1332 prescaleFactorsSubset
1333 = &((*m_prescaleFactorsTechTrig).at(pfIndex));
1352 switch (trigCategory) {
1354 if (gtReadoutRecordValid) {
1355 const DecisionWord& decWord = gtReadoutRecord->decisionWord();
1356 decisionBeforeMask =
trigResult(decWord, bitNumber,
1357 nameAlgoTechTrig, trigCategory, iError);
1359 return (iError + l1ConfCode + iErrorRecord);
1365 gtRecord->decisionWordBeforeMask();
1366 decisionBeforeMask =
trigResult(decWord, bitNumber,
1367 nameAlgoTechTrig, trigCategory, iError);
1369 return (iError + l1ConfCode + iErrorRecord);
1377 if (gtReadoutRecordValid) {
1379 gtReadoutRecord->technicalTriggerWord();
1380 decisionBeforeMask =
trigResult(decWord, bitNumber,
1381 nameAlgoTechTrig, trigCategory, iError);
1383 return (iError + l1ConfCode + iErrorRecord);
1389 gtRecord->technicalTriggerWordBeforeMask();
1390 decisionBeforeMask =
trigResult(decWord, bitNumber,
1391 nameAlgoTechTrig, trigCategory, iError);
1393 return (iError + l1ConfCode + iErrorRecord);
1410 if (bitNumber < (static_cast<int> (prescaleFactorsSubset->size()))) {
1411 prescaleFactor = (*prescaleFactorsSubset)[bitNumber];
1413 iError = l1ConfCode + iErrorRecord + 4000;
1414 LogDebug(
"L1GtUtils") <<
"\nError: bit number " << bitNumber
1417 <<
"\ngreater than size of actual L1 GT prescale factor set: "
1418 << prescaleFactorsSubset->size()
1419 <<
"\nError: Inconsistent L1 trigger configuration!"
1427 if (bitNumber < (static_cast<int> ((*triggerMasksSet).size()))) {
1431 triggerMask = (*triggerMasksSet)[bitNumber];
1436 triggerMask = ((*triggerMasksSet)[bitNumber]) & (1
1444 triggerMask = ((*triggerMasksSet)[bitNumber]) & (1
1451 iError = l1ConfCode + iErrorRecord + 5000;
1452 LogDebug(
"L1GtUtils") <<
"\nError: bit number " << bitNumber
1455 <<
"\ngreater than size of L1 GT trigger mask set: "
1456 << (*triggerMasksSet).size()
1457 <<
"\nError: Inconsistent L1 trigger configuration!"
1467 decisionAfterMask =
false;
1476 const std::string& nameAlgoTechTrig,
bool& decisionBeforeMask,
1477 bool& decisionAfterMask,
int&
prescaleFactor,
int& triggerMask)
const {
1480 decisionBeforeMask =
false;
1481 decisionAfterMask =
false;
1482 prescaleFactor = -1;
1485 int l1ErrorCode = 0;
1489 decisionAfterMask, prescaleFactor, triggerMask);
1500 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1508 errorCode =
l1Results(iEvent, l1GtRecordInputTag,
1509 l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1510 decisionAfterMask, prescaleFactor, triggerMask);
1517 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1525 errorCode =
l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1526 decisionAfterMask, prescaleFactor, triggerMask);
1537 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1545 errorCode =
l1Results(iEvent, l1GtRecordInputTag,
1546 l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1547 decisionAfterMask, prescaleFactor, triggerMask);
1554 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1562 errorCode =
l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1563 decisionAfterMask, prescaleFactor, triggerMask);
1574 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1582 errorCode =
l1Results(iEvent, l1GtRecordInputTag,
1583 l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1584 decisionAfterMask, prescaleFactor, triggerMask);
1591 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1599 errorCode =
l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1600 decisionAfterMask, prescaleFactor, triggerMask);
1611 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1619 errorCode =
l1Results(iEvent, l1GtRecordInputTag,
1620 l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1621 decisionAfterMask, prescaleFactor, triggerMask);
1628 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1636 errorCode =
l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1637 decisionAfterMask, prescaleFactor, triggerMask);
1646 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1654 errorCode =
l1Results(iEvent, l1GtRecordInputTag,
1655 l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1656 decisionAfterMask, prescaleFactor, triggerMask);
1663 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1671 errorCode =
l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1672 decisionAfterMask, prescaleFactor, triggerMask);
1679 int& errorCode)
const {
1682 int triggerMaskValue = -1;
1692 return triggerMaskValue;
1706 iError = l1ConfCode + 1;
1711 LogDebug(
"L1GtUtils") <<
"\nAlgorithm/technical trigger \n "
1713 <<
"\not found in the trigger menu \n "
1715 <<
"\nretrieved from L1GtTriggerMenuLite" << std::endl;
1720 LogDebug(
"L1GtUtils") <<
"\nAlgorithm/technical trigger \n "
1722 <<
"\not found in the trigger menu \n "
1724 <<
"\nretrieved from Event Setup" << std::endl;
1730 LogDebug(
"L1GtUtils") <<
"\nAlgorithm/technical trigger \n "
1732 <<
"\not found in the trigger menu \n "
1734 <<
"\nretrieved from Event Setup" << std::endl;
1739 return triggerMaskValue;
1746 if (bitNumber < 0) {
1748 iError = l1ConfCode + 2;
1752 LogDebug(
"L1GtUtils") <<
"\nNegative bit number for "
1754 << nameAlgoTechTrig <<
"\nfrom menu \n "
1756 <<
"\nretrieved from L1GtTriggerMenuLite" << std::endl;
1760 LogDebug(
"L1GtUtils") <<
"\nNegative bit number for "
1762 << nameAlgoTechTrig <<
"\nfrom menu \n "
1764 <<
"\nretrieved from Event Setup" << std::endl;
1770 LogDebug(
"L1GtUtils") <<
"\nNegative bit number for "
1772 << nameAlgoTechTrig <<
"\nfrom menu \n "
1774 <<
"\nretrieved from Event Setup" << std::endl;
1779 return triggerMaskValue;
1787 const std::vector<unsigned int>* triggerMasksSet = 0;
1789 switch (trigCategory) {
1830 iError = l1ConfCode + 3;
1833 return triggerMaskValue;
1841 if (bitNumber < (static_cast<int> ((*triggerMasksSet).size()))) {
1845 triggerMaskValue = (*triggerMasksSet)[bitNumber];
1850 triggerMaskValue = ((*triggerMasksSet)[bitNumber]) & (1
1858 triggerMaskValue = ((*triggerMasksSet)[bitNumber]) & (1
1864 iError = l1ConfCode + 5000;
1865 LogDebug(
"L1GtUtils") <<
"\nError: bit number " << bitNumber
1868 <<
"\ngreater than size of L1 GT trigger mask set: "
1869 << (*triggerMasksSet).size()
1870 <<
"\nError: Inconsistent L1 trigger configuration!"
1874 return triggerMaskValue;
1879 return triggerMaskValue;
1909 int iErrorRecord = 0;
1911 bool validRecord =
false;
1912 bool gtReadoutRecordValid =
false;
1915 iEvent.
getByLabel(l1GtRecordInputTag, gtRecord);
1924 LogDebug(
"L1GtUtils") <<
"\nL1GlobalTriggerRecord with \n "
1925 << l1GtRecordInputTag <<
"\nnot found in the event."
1930 iEvent.
getByLabel(l1GtReadoutRecordInputTag, gtReadoutRecord);
1932 if (gtReadoutRecord.
isValid()) {
1934 gtReadoutRecordValid =
true;
1939 iErrorRecord = iErrorRecord + 100;
1940 LogDebug(
"L1GtUtils") <<
"\nL1GlobalTriggerReadoutRecord with \n "
1941 << l1GtReadoutRecordInputTag <<
"\nnot found in the event."
1952 int pfIndexTechTrig = -1;
1953 int pfIndexAlgoTrig = -1;
1956 if (gtReadoutRecordValid) {
1959 = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexTech();
1961 = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexAlgo();
1966 =
static_cast<int> (gtRecord->gtPrescaleFactorIndexTech());
1968 =
static_cast<int> (gtRecord->gtPrescaleFactorIndexAlgo());
1974 LogDebug(
"L1GtUtils") <<
"\nError: "
1975 <<
"\nNo valid L1GlobalTriggerRecord with \n "
1976 << l1GtRecordInputTag <<
"\nfound in the event."
1977 <<
"\nNo valid L1GlobalTriggerReadoutRecord with \n "
1978 << l1GtReadoutRecordInputTag <<
"\nfound in the event."
1981 iError = l1ConfCode + iErrorRecord;
1996 size_t pfSetsSize = 0;
1998 switch (trigCategory) {
2016 pfIndex = pfIndexAlgoTrig;
2037 pfIndex = pfIndexTechTrig;
2043 iError = l1ConfCode + iErrorRecord + 3;
2055 iError = l1ConfCode + iErrorRecord + 1000;
2057 <<
"\nError: index of prescale factor set retrieved from the data \n"
2058 <<
"less than zero."
2059 <<
"\n Value of index retrieved from data = " << pfIndex
2065 }
else if (pfIndex >= (static_cast<int>(pfSetsSize))) {
2066 iError = l1ConfCode + iErrorRecord + 2000;
2068 <<
"\nError: index of prescale factor set retrieved from the data \n"
2069 <<
"greater than the size of the vector of prescale factor sets."
2070 <<
"\n Value of index retrieved from data = " << pfIndex
2071 <<
"\n Vector size = " << pfSetsSize << std::endl;
2119 l1GtReadoutRecordInputTag, trigCategory, iError);
2123 switch (trigCategory) {
2128 = (*m_prescaleFactorsAlgoTrigLite).at(pfIndex);
2150 = (*m_prescaleFactorsTechTrigLite).at(pfIndex);
2228 switch (trigCategory) {
2285 iError = l1ConfCode + 3;
2368 iError = l1ConfCode;
2399 iError = l1ConfCode;
2405 iError = l1ConfCode;
2421 <<
"\nRetrieve L1 trigger configuration from L1GtTriggerMenuLite only.\n"
2426 <<
"\nFall through: retrieve L1 trigger configuration from L1GtTriggerMenuLite."
2427 <<
"\nIf L1GtTriggerMenuLite not valid, try to retrieve from event setup.\n"
2429 l1ConfCode = 100000;
2434 <<
"\nRetrieve L1 trigger configuration from L1GtTriggerMenuLite, valid product.\n"
2436 l1ConfCode = l1ConfCode + 10000;
2444 <<
"\nFall through: retrieve L1 trigger configuration from event setup."
2445 <<
"\nFirst option was L1GtTriggerMenuLite - but product is not valid.\n"
2447 l1ConfCode = l1ConfCode + 20000;
2454 <<
"\nFall through: L1GtTriggerMenuLite not valid, event setup not valid.\n"
2457 errorCode = l1ConfCode;
2466 <<
"\nError: L1 trigger configuration requested from L1GtTriggerMenuLite only"
2467 <<
"\nbut L1GtTriggerMenuLite is not valid.\n" << std::endl;
2469 errorCode = l1ConfCode;
2477 <<
"\nRetrieve L1 trigger configuration from event setup."
2478 <<
"\nL1GtTriggerMenuLite product was not requested.\n"
2480 l1ConfCode = 200000;
2484 <<
"\nRetrieve L1 trigger configuration from event setup only."
2485 <<
"\nValid L1 trigger event setup.\n"
2487 l1ConfCode = l1ConfCode + 10000;
2494 <<
"\nRetrieve L1 trigger configuration from event setup only."
2495 <<
"\nNo valid L1 trigger event setup.\n"
2498 errorCode = l1ConfCode;
2507 <<
"\nError: no L1 trigger configuration requested to be retrieved."
2508 <<
"\nMust call before getL1GtRunCache in beginRun and analyze.\n"
2510 l1ConfCode = 300000;
2511 errorCode = l1ConfCode;
2521 const int bitNumber,
const std::string& nameAlgoTechTrig,
2524 bool trigRes =
false;
2527 if (bitNumber < (static_cast<int> (decWord.size()))) {
2528 trigRes = decWord[bitNumber];
2531 LogDebug(
"L1GtUtils") <<
"\nError: bit number " << bitNumber
2534 <<
"\ngreater than size of L1 GT decision word: "
2536 <<
"\nError: Inconsistent L1 trigger configuration!"
2546 m_logicalExpression(expression),
2548 m_l1GtUtils(l1GtUtils),
2550 m_l1GtRecordInputTag(edm::
InputTag()),
2552 m_l1GtReadoutRecordInputTag(edm::
InputTag()),
2556 m_validL1Configuration(
false),
2558 m_validLogicalExpression(
false),
2560 m_l1GtInputTagsFromProv(
true),
2562 m_l1ResultsAlreadyCalled(
false),
2564 m_expL1TriggersSize(0),
2566 m_expBitsTechTrigger(
false) {
2576 m_logicalExpression(expression),
2578 m_l1GtUtils(l1GtUtils),
2580 m_l1GtRecordInputTag(l1GtRecordInputTag),
2582 m_l1GtReadoutRecordInputTag(l1GtReadoutRecordInputTag),
2586 m_validL1Configuration(
false),
2588 m_validLogicalExpression(
false),
2590 m_l1GtInputTagsFromProv(
false),
2592 m_l1ResultsAlreadyCalled(
false),
2594 m_expL1TriggersSize(0),
2596 m_expBitsTechTrigger(
false) {
2616 m_logicalExpression);
2620 m_expL1TriggersSize = m_expL1Triggers.size();
2622 m_validLogicalExpression =
true;
2625 m_validLogicalExpression =
false;
2639 m_expBitsTechTrigger =
true;
2641 for (
size_t iTrig = 0; iTrig < m_expL1TriggersSize; ++iTrig) {
2642 const std::string& bitString = (m_expL1Triggers[iTrig]).tokenName;
2643 std::istringstream bitStream(bitString);
2646 if ((bitStream >> bitInt).
fail()) {
2648 m_expBitsTechTrigger =
false;
2653 (m_expL1Triggers[iTrig]).tokenNumber = bitInt;
2658 m_decisionsBeforeMask.resize(m_expL1TriggersSize);
2659 m_decisionsAfterMask.resize(m_expL1TriggersSize);
2660 m_prescaleFactors.resize(m_expL1TriggersSize);
2661 m_triggerMasks.resize(m_expL1TriggersSize);
2662 m_errorCodes.resize(m_expL1TriggersSize);
2663 m_expTriggerCategory.resize(m_expL1TriggersSize);
2664 m_expTriggerInMenu.resize(m_expL1TriggersSize);
2666 LogDebug(
"L1GtUtils") << std::endl;
2667 LogTrace(
"L1GtUtils") <<
"\nLogical expression\n " << m_logicalExpression
2668 <<
"\n has " << m_expL1TriggersSize <<
" L1 triggers" << std::endl;
2669 for (
size_t iTrig = 0; iTrig < m_expL1TriggersSize; ++iTrig) {
2671 const std::string& trigNameOrAlias = (m_expL1Triggers[iTrig]).tokenName;
2672 LogTrace(
"L1GtUtils") <<
" " << trigNameOrAlias << std::endl;
2674 (m_decisionsBeforeMask[iTrig]).
first = trigNameOrAlias;
2675 (m_decisionsBeforeMask[iTrig]).
second =
false;
2677 (m_decisionsAfterMask[iTrig]).
first = trigNameOrAlias;
2678 (m_decisionsAfterMask[iTrig]).
second =
false;
2680 (m_prescaleFactors[iTrig]).
first = trigNameOrAlias;
2681 (m_prescaleFactors[iTrig]).
second = -1;
2683 (m_triggerMasks[iTrig]).
first = trigNameOrAlias;
2684 (m_triggerMasks[iTrig]).
second = -1;
2686 (m_errorCodes[iTrig]).
first = trigNameOrAlias;
2687 (m_errorCodes[iTrig]).
second = -1;
2691 m_expTriggerInMenu[iTrig] =
false;
2694 LogTrace(
"L1GtUtils") << std::endl;
2711 m_logicalExpression = logicExpression;
2712 m_validLogicalExpression =
false;
2714 m_l1ResultsAlreadyCalled =
false;
2716 m_expL1TriggersSize = 0;
2717 m_expBitsTechTrigger =
false;
2720 m_decisionsBeforeMask.clear();
2721 m_decisionsAfterMask.clear();
2722 m_prescaleFactors.clear();
2723 m_triggerMasks.clear();
2724 m_errorCodes.clear();
2725 m_expTriggerCategory.clear();
2726 m_expTriggerInMenu.clear();
2732 errorCode = logicalExpressionRunUpdate(iRun, evSetup);
2749 if (!(m_l1GtUtils.availableL1Configuration(errorCode, l1ConfCode))) {
2751 m_validL1Configuration =
false;
2755 m_validL1Configuration =
true;
2756 m_l1ConfCode = l1ConfCode;
2769 for (
size_t iTrig = 0; iTrig < m_expL1TriggersSize; ++iTrig) {
2773 const std::string& trigNameOrAlias = (m_expL1Triggers[iTrig]).tokenName;
2775 if (!m_expBitsTechTrigger) {
2776 const bool triggerInMenu = m_l1GtUtils.l1AlgoTechTrigBitNumber(
2777 trigNameOrAlias, trigCategory, bitNumber);
2779 (m_expL1Triggers[iTrig]).tokenNumber = bitNumber;
2780 m_expTriggerCategory[iTrig] = trigCategory;
2781 m_expTriggerInMenu[iTrig] = triggerInMenu;
2789 bitNumber = (m_expL1Triggers[iTrig]).tokenNumber;
2791 const bool triggerInMenu = m_l1GtUtils.l1TriggerNameFromBit(
2792 bitNumber, trigCategory, aliasL1Trigger, nameL1Trigger);
2794 if (!triggerInMenu) {
2795 aliasL1Trigger =
"Technical_trigger_bit_"
2796 + (m_expL1Triggers[iTrig]).tokenName +
"_empty";
2799 (m_expL1Triggers[iTrig]).tokenName = aliasL1Trigger;
2800 m_expTriggerCategory[iTrig] = trigCategory;
2801 m_expTriggerInMenu[iTrig] = triggerInMenu;
2805 (m_decisionsBeforeMask[iTrig]).
first = aliasL1Trigger;
2806 (m_decisionsAfterMask[iTrig]).
first = aliasL1Trigger;
2807 (m_prescaleFactors[iTrig]).
first = aliasL1Trigger;
2808 (m_triggerMasks[iTrig]).
first = aliasL1Trigger;
2809 (m_errorCodes[iTrig]).
first = aliasL1Trigger;
2821 if (!m_l1ResultsAlreadyCalled) {
2823 <<
"\n Method 'errorCodes' must be called in the event loop before attempting to use this method.\n"
2827 return m_decisionsBeforeMask;
2834 if (!m_l1ResultsAlreadyCalled) {
2836 <<
"\n Method 'errorCodes' must be called in the event loop before attempting to use this method.\n"
2840 return m_decisionsAfterMask;
2847 if (!m_l1ResultsAlreadyCalled) {
2849 <<
"\n Method 'errorCodes' must be called in the event loop before attempting to use this method.\n"
2853 return m_prescaleFactors;
2860 if (!m_l1ResultsAlreadyCalled) {
2862 <<
"\n Method 'errorCodes' must be called in the event loop before attempting to use this method.\n"
2866 return m_triggerMasks;
2873 m_l1ResultsAlreadyCalled =
false;
2876 if (!m_validL1Configuration) {
2877 reset(m_decisionsBeforeMask);
2878 reset(m_decisionsAfterMask);
2879 reset(m_prescaleFactors);
2880 reset(m_triggerMasks);
2881 reset(m_errorCodes);
2883 m_l1ResultsAlreadyCalled =
true;
2884 return m_errorCodes;
2888 if (m_l1GtInputTagsFromProv) {
2890 l1Results(iEvent, m_l1GtUtils.provL1GtRecordInputTag(),
2891 m_l1GtUtils.provL1GtReadoutRecordInputTag());
2895 l1Results(iEvent, m_l1GtRecordInputTag, m_l1GtReadoutRecordInputTag);
2898 m_l1ResultsAlreadyCalled =
true;
2900 return m_errorCodes;
2905 const std::vector<std::pair<std::string, bool> >& _pairVector)
const {
2906 std::vector<std::pair<std::string, bool> > pairVector = _pairVector;
2907 for (
size_t iTrig = 0; iTrig < m_expL1TriggersSize; ++iTrig) {
2908 (pairVector[iTrig]).
second =
false;
2913 const std::vector<std::pair<std::string, int> >& _pairVector)
const {
2914 std::vector<std::pair<std::string, int> > pairVector = _pairVector;
2915 for (
size_t iTrig = 0; iTrig < m_expL1TriggersSize; ++iTrig) {
2916 (pairVector[iTrig]).
second = -1;
2925 reset(m_decisionsBeforeMask);
2926 reset(m_decisionsAfterMask);
2927 reset(m_prescaleFactors);
2928 reset(m_triggerMasks);
2929 reset(m_errorCodes);
2932 bool decisionBeforeMaskValue =
false;
2933 bool decisionAfterMaskValue =
false;
2934 int prescaleFactorValue = -1;
2935 int triggerMaskValue = -1;
2938 LogDebug(
"L1GtUtils") << std::endl;
2939 LogTrace(
"L1GtUtils") <<
"\nLogical expression\n " << m_logicalExpression
2944 for (
size_t iTrig = 0; iTrig < m_expL1TriggersSize; ++iTrig) {
2946 const std::string& trigNameOrAlias = (m_expL1Triggers[iTrig]).tokenName;
2948 if (m_expTriggerInMenu[iTrig]) {
2949 errorCode = m_l1GtUtils.l1Results(iEvent, l1GtRecordInputTag,
2950 l1GtReadoutRecordInputTag, trigNameOrAlias,
2951 decisionBeforeMaskValue, decisionAfterMaskValue,
2952 prescaleFactorValue, triggerMaskValue);
2954 if (errorCode != 0) {
2959 decisionBeforeMaskValue =
false;
2960 decisionAfterMaskValue =
false;
2961 prescaleFactorValue = -1;
2962 triggerMaskValue = -1;
2970 decisionBeforeMaskValue =
false;
2971 decisionAfterMaskValue =
false;
2972 prescaleFactorValue = -1;
2973 triggerMaskValue = -1;
2974 errorCode = m_l1ConfCode + 1;
2978 LogTrace(
"L1GtUtils") <<
"\n" << trigNameOrAlias <<
":" << std::endl;
2980 (m_decisionsBeforeMask[iTrig]).
second = decisionBeforeMaskValue;
2981 LogTrace(
"L1GtUtils") <<
" decision before mask = "
2982 << decisionBeforeMaskValue << std::endl;
2984 (m_decisionsAfterMask[iTrig]).
second = decisionAfterMaskValue;
2985 LogTrace(
"L1GtUtils") <<
" decision after mask = "
2986 << decisionAfterMaskValue << std::endl;
2988 (m_prescaleFactors[iTrig]).
second = prescaleFactorValue;
2989 LogTrace(
"L1GtUtils") <<
" prescale factor = "
2990 << prescaleFactorValue << std::endl;
2992 (m_triggerMasks[iTrig]).
second = triggerMaskValue;
2993 LogTrace(
"L1GtUtils") <<
" trigger mask = "
2994 << triggerMaskValue << std::endl;
2996 (m_errorCodes[iTrig]).
second = errorCode;
2997 LogTrace(
"L1GtUtils") <<
" error code = " << errorCode
3002 LogDebug(
"L1GtUtils") << std::endl;
bool m_retrieveL1GtTriggerMenuLite
virtual char const * what() const
edm::RunID m_runIDCache
run cache ID
EventNumber_t event() const
static AlgebraicMatrix initialize()
bool getByLabel(std::string const &label, Handle< PROD > &result) const
void getAllProvenance(std::vector< Provenance const * > &provenances) const
const bool l1TriggerNameFromBit(const int &bitNumber, const TriggerCategory &trigCategory, std::string &aliasL1Trigger, std::string &nameL1Trigger) const
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
LogicalExpressionL1Results(const std::string &, L1GtUtils &)
constructor(s)
const int l1Results(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
std::vector< unsigned int > m_triggerMaskSet
unsigned long long m_l1GtMenuCacheID
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
static const bool useL1GtTriggerMenuLite(false)
const int logicalExpressionRunUpdate(const edm::Run &, const edm::EventSetup &, const std::string &)
edm::InputTag m_provL1GtReadoutRecordInputTag
void retrieveL1GtTriggerMenuLite(const edm::Run &, const edm::InputTag &)
retrieve L1GtTriggerMenuLite (per run product) and cache it to improve the speed
const L1GtTriggerMenuLite * ptrL1GtTriggerMenuLite(int &errorCode)
return a pointer to the L1GtTriggerMenuLite product
const std::vector< unsigned int > * m_triggerMaskTechTrig
void l1Results(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag)
virtual std::string explainSelf() const
const L1GtTriggerMask * m_l1GtTmVetoTech
const bool l1AlgoTechTrigBitNumber(const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
void getAllProvenance(std::vector< Provenance const * > &provenances) const
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
edm::InputTag m_provL1GtTriggerMenuLiteInputTag
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrigLite
virtual ~L1GtUtils()
destructor
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks & veto masks
const AlgorithmMap * m_algorithmMap
const std::vector< std::pair< std::string, int > > & prescaleFactors()
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Run const & getRun() const
const L1GtStableParameters * m_l1GtStablePar
event setup cached stuff
unsigned long long m_l1GtPfAlgoCacheID
const std::vector< unsigned int > & triggerMaskSet(const TriggerCategory &trigCategory, int &errorCode)
const std::vector< std::pair< std::string, int > > & triggerMasks()
const std::string & l1TriggerMenu() const
return the L1 trigger menu name
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmAliasMapLite
U second(std::pair< T, U > const &p)
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmMapLite
unsigned int gtNumberTechnicalTriggers() const
get / set the number of technical triggers
unsigned long long m_l1GtTmVetoTechCacheID
const std::vector< std::pair< std::string, bool > > & decisionsAfterMask()
void getL1GtRecordInputTag(const edm::Event &iEvent, edm::InputTag &l1GtRecordInputTag, edm::InputTag &l1GtReadoutRecordInputTag) const
unsigned int gtNumberPhysTriggers() const
get / set the number of physics trigger algorithms
const std::vector< std::pair< std::string, bool > > & decisionsBeforeMask()
const bool decision(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
edm::InputTag m_provL1GtRecordInputTag
cached input tags from provenance - they are updated once per run only
edm::RunID m_provRunIDCache
const std::string & l1TriggerMenuImplementation() const
return the L1 trigger menu implementation
const AlgorithmMap * m_algorithmAliasMap
std::string friendlyName(std::string const &iFullName)
std::vector< OperandToken > & operandTokenVector()
return the vector of operand tokens
unsigned long long m_l1GtTmTechCacheID
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrigLite
const L1GtTriggerMask * m_l1GtTmVetoAlgo
std::vector< bool > DecisionWord
typedefs
static const std::string EmptyString
const std::string triggerCategory(const TriggerCategory &) const
public methods
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
unsigned long long m_l1GtTmAlgoCacheID
const std::vector< int > & prescaleFactorSet(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode)
unsigned int m_numberTechnicalTriggers
number of technical triggers
void getL1GtTriggerMenuLiteInputTag(const edm::Run &iRun, edm::InputTag &l1GtTriggerMenuLiteInputTag) const
get the input tag for L1GtTriggerMenuLite
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed ...
static const bool useL1EventSetup(true)
unsigned int m_physicsDaqPartition
index of physics DAQ partition
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void getL1GtRunCache(const edm::Run &, const edm::EventSetup &, const bool, const bool, const edm::InputTag &)
get all the run-constant quantities for L1 trigger and cache them
const L1GtTriggerMask * m_l1GtTmTech
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
void reset(const std::vector< std::pair< std::string, bool > > &) const
reset for each L1 trigger the value from pair.second
T const * product() const
const L1GtPrescaleFactors * m_l1GtPfTech
const AlgorithmMap * m_technicalTriggerMap
const std::vector< unsigned int > * m_triggerMaskVetoAlgoTrig
T const * product() const
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
RunAuxiliary const & runAuxiliary() const
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
bool m_beginRunCache
flag for call of getL1GtRunCache in beginRun
const int prescaleFactorSetIndex(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode) const
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
const bool trigResult(const DecisionWord &decWord, const int bitNumber, const std::string &nameAlgoTechTrig, const TriggerCategory &trigCategory, int &errorCode) const
const L1GtTriggerMenu * m_l1GtMenu
~LogicalExpressionL1Results()
destructor
unsigned long long m_l1GtPfTechCacheID
static const int L1GtNotValidError
volatile std::atomic< bool > shutdown_flag false
unsigned long long m_l1GtTmVetoAlgoCacheID
std::vector< int > m_prescaleFactorSet
const L1GtTriggerMenu * ptrL1TriggerMenuEventSetup(int &errorCode)
return a pointer to the L1 trigger menu from event setup
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
void reset(double vett[256])
unsigned long long m_l1GtStableParCacheID
const L1GtTriggerMenuLite::L1TriggerMap * m_technicalTriggerMapLite
const std::vector< unsigned int > * m_triggerMaskVetoTechTrig
const std::vector< std::pair< std::string, int > > & errorCodes(const edm::Event &)