52 m_l1GtStableParCacheID(0ULL), m_numberAlgorithmTriggers(0),
54 m_numberTechnicalTriggers(0),
56 m_l1GtPfAlgoCacheID(0ULL), m_l1GtPfTechCacheID(0ULL),
58 m_l1GtTmAlgoCacheID(0ULL), m_l1GtTmTechCacheID(0ULL),
60 m_l1GtTmVetoAlgoCacheID(0ULL), m_l1GtTmVetoTechCacheID(0ULL),
62 m_l1GtMenuCacheID(0ULL),
64 m_l1EventSetupValid(
false),
66 m_l1GtMenuLiteValid(
false),
68 m_physicsDaqPartition(0),
70 m_retrieveL1EventSetup(
false),
72 m_retrieveL1GtTriggerMenuLite(
false)
89 switch (trigCategory) {
91 return "Algorithm Trigger";
95 return "Technical Trigger";
118 unsigned long long l1GtStableParCacheID =
148 unsigned long long l1GtPfAlgoCacheID =
163 unsigned long long l1GtPfTechCacheID = evSetup.
get<
181 unsigned long long l1GtTmAlgoCacheID =
196 unsigned long long l1GtTmTechCacheID =
211 unsigned long long l1GtTmVetoAlgoCacheID =
226 unsigned long long l1GtTmVetoTechCacheID =
244 unsigned long long l1GtMenuCacheID =
297 iRun.
getByLabel(l1GtMenuLiteInputTag, l1GtMenuLite);
301 LogDebug(
"L1GtUtils") <<
"\nL1GtTriggerMenuLite with \n "
302 << l1GtMenuLiteInputTag
303 <<
"\nrequested in configuration, but not found in the event."
311 LogDebug(
"L1GtUtils") <<
"\nL1GtTriggerMenuLite with \n "
312 << l1GtMenuLiteInputTag <<
"\nretrieved for run "
343 typedef std::vector<edm::Provenance const*> Provenances;
344 Provenances provenances;
346 std::string modLabel;
347 std::string instanceName;
348 std::string processName;
354 bool foundL1GtRecord =
false;
355 bool foundL1GtReadoutRecord =
false;
367 for (Provenances::iterator itProv = provenances.begin(), itProvEnd =
368 provenances.end(); itProv != itProvEnd; ++itProv) {
370 friendlyName = (*itProv)->friendlyClassName();
371 modLabel = (*itProv)->moduleLabel();
372 instanceName = (*itProv)->productInstanceName();
373 processName = (*itProv)->processName();
379 if (friendlyName ==
"L1GlobalTriggerRecord") {
380 l1GtRecordInputTagVal =
edm::InputTag(modLabel, instanceName,
382 foundL1GtRecord =
true;
383 }
else if (friendlyName ==
"L1GlobalTriggerReadoutRecord") {
385 l1GtReadoutRecordInputTagVal =
edm::InputTag(modLabel, instanceName,
387 foundL1GtReadoutRecord =
true;
392 l1GtRecordInputTag = l1GtRecordInputTagVal;
393 l1GtReadoutRecordInputTag = l1GtReadoutRecordInputTagVal;
413 typedef std::vector<edm::Provenance const*> Provenances;
414 Provenances provenances;
416 std::string modLabel;
417 std::string instanceName;
418 std::string processName;
422 bool foundL1GtTriggerMenuLite =
false;
439 for (Provenances::iterator itProv = provenances.begin(), itProvEnd =
440 provenances.end(); itProv != itProvEnd; ++itProv) {
442 friendlyName = (*itProv)->friendlyClassName();
443 modLabel = (*itProv)->moduleLabel();
444 instanceName = (*itProv)->productInstanceName();
445 processName = (*itProv)->processName();
451 if (friendlyName ==
"L1GtTriggerMenuLite") {
453 instanceName, processName);
454 foundL1GtTriggerMenuLite =
true;
460 l1GtTriggerMenuLiteInputTag = l1GtTriggerMenuLiteInputTagVal;
472 int& bitNumber)
const {
485 if (itTrig->second == nameAlgoTechTrig) {
488 bitNumber = itTrig->first;
499 if (itTrig->second == nameAlgoTechTrig) {
502 bitNumber = itTrig->first;
513 if (itTrig->second == nameAlgoTechTrig) {
516 bitNumber = itTrig->first;
528 bitNumber = (itAlgo->second).algoBitNumber();
537 bitNumber = (itAlgo->second).algoBitNumber();
546 bitNumber = (itAlgo->second).algoBitNumber();
562 bitNumber = (itAlgo->second).algoBitNumber();
571 bitNumber = (itAlgo->second).algoBitNumber();
580 bitNumber = (itAlgo->second).algoBitNumber();
599 const std::string& nameAlgoTechTrig,
int& triggerAlgoTechTrig,
600 int& bitNumber)
const {
606 trigCategory, bitNumber);
607 triggerAlgoTechTrig = trigCategory;
609 return trigCategBitNr;
617 const std::string& nameAlgoTechTrig,
bool& decisionBeforeMask,
618 bool& decisionAfterMask,
int&
prescaleFactor,
int& triggerMask)
const {
621 decisionBeforeMask =
false;
622 decisionAfterMask =
false;
648 iError = l1ConfCode + 1;
653 LogDebug(
"L1GtUtils") <<
"\nAlgorithm/technical trigger \n "
655 <<
"\not found in the trigger menu \n "
657 <<
"\nretrieved from L1GtTriggerMenuLite" << std::endl;
662 LogDebug(
"L1GtUtils") <<
"\nAlgorithm/technical trigger \n "
664 <<
"\not found in the trigger menu \n "
666 <<
"\nretrieved from Event Setup" << std::endl;
672 LogDebug(
"L1GtUtils") <<
"\nAlgorithm/technical trigger \n "
674 <<
"\not found in the trigger menu \n "
676 <<
"\nretrieved from Event Setup" << std::endl;
689 iError = l1ConfCode + 2;
693 LogDebug(
"L1GtUtils") <<
"\nNegative bit number for "
695 << nameAlgoTechTrig <<
"\nfrom menu \n "
697 <<
"\nretrieved from L1GtTriggerMenuLite" << std::endl;
701 LogDebug(
"L1GtUtils") <<
"\nNegative bit number for "
703 << nameAlgoTechTrig <<
"\nfrom menu \n "
705 <<
"\nretrieved from Event Setup" << std::endl;
711 LogDebug(
"L1GtUtils") <<
"\nNegative bit number for "
713 << nameAlgoTechTrig <<
"\nfrom menu \n "
715 <<
"\nretrieved from Event Setup" << std::endl;
727 int iErrorRecord = 0;
729 bool validRecord =
false;
730 bool gtRecordValid =
false;
731 bool gtReadoutRecordValid =
false;
734 iEvent.
getByLabel(l1GtRecordInputTag, gtRecord);
738 gtRecordValid =
true;
744 LogDebug(
"L1GtUtils") <<
"\nL1GlobalTriggerRecord with \n "
745 << l1GtRecordInputTag <<
"\nnot found in the event."
750 iEvent.
getByLabel(l1GtReadoutRecordInputTag, gtReadoutRecord);
752 if (gtReadoutRecord.
isValid()) {
754 gtReadoutRecordValid =
true;
759 iErrorRecord = iErrorRecord + 100;
760 LogDebug(
"L1GtUtils") <<
"\nL1GlobalTriggerReadoutRecord with \n "
761 << l1GtReadoutRecordInputTag <<
"\nnot found in the event."
772 int pfIndexTechTrig = -1;
773 int pfIndexAlgoTrig = -1;
776 if (gtReadoutRecordValid) {
779 = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexTech();
781 = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexAlgo();
786 =
static_cast<int> (gtRecord->gtPrescaleFactorIndexTech());
788 =
static_cast<int> (gtRecord->gtPrescaleFactorIndexAlgo());
794 LogDebug(
"L1GtUtils") <<
"\nError: "
795 <<
"\nNo valid L1GlobalTriggerRecord with \n "
796 << l1GtRecordInputTag <<
"\nfound in the event."
797 <<
"\nNo valid L1GlobalTriggerReadoutRecord with \n "
798 << l1GtReadoutRecordInputTag <<
"\nfound in the event."
801 iError = l1ConfCode + iErrorRecord;
814 size_t pfSetsSize = 0;
816 const std::vector<int>* prescaleFactorsSubset = 0;
817 const std::vector<unsigned int>* triggerMasksSet = 0;
819 switch (trigCategory) {
840 pfIndex = pfIndexAlgoTrig;
864 pfIndex = pfIndexTechTrig;
870 iError = l1ConfCode + iErrorRecord + 3;
882 iError = l1ConfCode + iErrorRecord + 1000;
884 <<
"\nError: index of prescale factor set retrieved from the data \n"
886 <<
"\n Value of index retrieved from data = " << pfIndex
891 }
else if (pfIndex >= (static_cast<int>(pfSetsSize))) {
892 iError = l1ConfCode + iErrorRecord + 2000;
894 <<
"\nError: index of prescale factor set retrieved from the data \n"
895 <<
"greater than the size of the vector of prescale factor sets."
896 <<
"\n Value of index retrieved from data = " << pfIndex
897 <<
"\n Vector size = " << pfSetsSize << std::endl;
902 switch (trigCategory) {
906 prescaleFactorsSubset
907 = &((*m_prescaleFactorsAlgoTrigLite).at(pfIndex));
911 prescaleFactorsSubset
912 = &((*m_prescaleFactorsAlgoTrig).at(pfIndex));
918 prescaleFactorsSubset
919 = &((*m_prescaleFactorsAlgoTrig).at(pfIndex));
928 prescaleFactorsSubset
929 = &((*m_prescaleFactorsTechTrigLite).at(pfIndex));
933 prescaleFactorsSubset
934 = &((*m_prescaleFactorsTechTrig).at(pfIndex));
940 prescaleFactorsSubset
941 = &((*m_prescaleFactorsTechTrig).at(pfIndex));
960 switch (trigCategory) {
962 if (gtReadoutRecordValid) {
963 const DecisionWord& decWord = gtReadoutRecord->decisionWord();
964 decisionBeforeMask =
trigResult(decWord, bitNumber,
965 nameAlgoTechTrig, trigCategory, iError);
967 return (iError + l1ConfCode + iErrorRecord);
973 gtRecord->decisionWordBeforeMask();
974 decisionBeforeMask =
trigResult(decWord, bitNumber,
975 nameAlgoTechTrig, trigCategory, iError);
977 return (iError + l1ConfCode + iErrorRecord);
985 if (gtReadoutRecordValid) {
987 gtReadoutRecord->technicalTriggerWord();
988 decisionBeforeMask =
trigResult(decWord, bitNumber,
989 nameAlgoTechTrig, trigCategory, iError);
991 return (iError + l1ConfCode + iErrorRecord);
997 gtRecord->technicalTriggerWordBeforeMask();
998 decisionBeforeMask =
trigResult(decWord, bitNumber,
999 nameAlgoTechTrig, trigCategory, iError);
1001 return (iError + l1ConfCode + iErrorRecord);
1018 if (bitNumber < (static_cast<int> (prescaleFactorsSubset->size()))) {
1019 prescaleFactor = (*prescaleFactorsSubset)[bitNumber];
1021 iError = l1ConfCode + iErrorRecord + 4000;
1022 LogDebug(
"L1GtUtils") <<
"\nError: bit number " << bitNumber
1025 <<
"\ngreater than size of actual L1 GT prescale factor set: "
1026 << prescaleFactorsSubset->size()
1027 <<
"\nError: Inconsistent L1 trigger configuration!"
1035 if (bitNumber < (static_cast<int> ((*triggerMasksSet).size()))) {
1039 triggerMask = (*triggerMasksSet)[bitNumber];
1044 triggerMask = ((*triggerMasksSet)[bitNumber]) & (1
1052 triggerMask = ((*triggerMasksSet)[bitNumber]) & (1
1059 iError = l1ConfCode + iErrorRecord + 5000;
1060 LogDebug(
"L1GtUtils") <<
"\nError: bit number " << bitNumber
1063 <<
"\ngreater than size of L1 GT trigger mask set: "
1064 << (*triggerMasksSet).size()
1065 <<
"\nError: Inconsistent L1 trigger configuration!"
1075 decisionAfterMask =
false;
1084 const std::string& nameAlgoTechTrig,
bool& decisionBeforeMask,
1085 bool& decisionAfterMask,
int&
prescaleFactor,
int& triggerMask)
const {
1091 decisionBeforeMask =
false;
1092 decisionAfterMask =
false;
1093 prescaleFactor = -1;
1096 getInputTag(iEvent, l1GtRecordInputTag, l1GtReadoutRecordInputTag);
1098 int l1ErrorCode = 0;
1100 l1ErrorCode =
l1Results(iEvent, l1GtRecordInputTag,
1101 l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1102 decisionAfterMask, prescaleFactor, triggerMask);
1113 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1121 errorCode =
l1Results(iEvent, l1GtRecordInputTag,
1122 l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1123 decisionAfterMask, prescaleFactor, triggerMask);
1130 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1138 errorCode =
l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1139 decisionAfterMask, prescaleFactor, triggerMask);
1150 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1158 errorCode =
l1Results(iEvent, l1GtRecordInputTag,
1159 l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1160 decisionAfterMask, prescaleFactor, triggerMask);
1167 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1175 errorCode =
l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1176 decisionAfterMask, prescaleFactor, triggerMask);
1187 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1195 errorCode =
l1Results(iEvent, l1GtRecordInputTag,
1196 l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1197 decisionAfterMask, prescaleFactor, triggerMask);
1204 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1212 errorCode =
l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1213 decisionAfterMask, prescaleFactor, triggerMask);
1224 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1232 errorCode =
l1Results(iEvent, l1GtRecordInputTag,
1233 l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1234 decisionAfterMask, prescaleFactor, triggerMask);
1241 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1249 errorCode =
l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1250 decisionAfterMask, prescaleFactor, triggerMask);
1259 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1267 errorCode =
l1Results(iEvent, l1GtRecordInputTag,
1268 l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1269 decisionAfterMask, prescaleFactor, triggerMask);
1276 const std::string& nameAlgoTechTrig,
int& errorCode)
const {
1284 errorCode =
l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1285 decisionAfterMask, prescaleFactor, triggerMask);
1292 int& errorCode)
const {
1295 int triggerMaskValue = -1;
1305 return triggerMaskValue;
1319 iError = l1ConfCode + 1;
1324 LogDebug(
"L1GtUtils") <<
"\nAlgorithm/technical trigger \n "
1326 <<
"\not found in the trigger menu \n "
1328 <<
"\nretrieved from L1GtTriggerMenuLite" << std::endl;
1333 LogDebug(
"L1GtUtils") <<
"\nAlgorithm/technical trigger \n "
1335 <<
"\not found in the trigger menu \n "
1337 <<
"\nretrieved from Event Setup" << std::endl;
1343 LogDebug(
"L1GtUtils") <<
"\nAlgorithm/technical trigger \n "
1345 <<
"\not found in the trigger menu \n "
1347 <<
"\nretrieved from Event Setup" << std::endl;
1352 return triggerMaskValue;
1359 if (bitNumber < 0) {
1361 iError = l1ConfCode + 2;
1365 LogDebug(
"L1GtUtils") <<
"\nNegative bit number for "
1367 << nameAlgoTechTrig <<
"\nfrom menu \n "
1369 <<
"\nretrieved from L1GtTriggerMenuLite" << std::endl;
1373 LogDebug(
"L1GtUtils") <<
"\nNegative bit number for "
1375 << nameAlgoTechTrig <<
"\nfrom menu \n "
1377 <<
"\nretrieved from Event Setup" << std::endl;
1383 LogDebug(
"L1GtUtils") <<
"\nNegative bit number for "
1385 << nameAlgoTechTrig <<
"\nfrom menu \n "
1387 <<
"\nretrieved from Event Setup" << std::endl;
1392 return triggerMaskValue;
1400 const std::vector<unsigned int>* triggerMasksSet = 0;
1402 switch (trigCategory) {
1443 iError = l1ConfCode + 3;
1446 return triggerMaskValue;
1454 if (bitNumber < (static_cast<int> ((*triggerMasksSet).size()))) {
1458 triggerMaskValue = (*triggerMasksSet)[bitNumber];
1463 triggerMaskValue = ((*triggerMasksSet)[bitNumber]) & (1
1471 triggerMaskValue = ((*triggerMasksSet)[bitNumber]) & (1
1477 iError = l1ConfCode + 5000;
1478 LogDebug(
"L1GtUtils") <<
"\nError: bit number " << bitNumber
1481 <<
"\ngreater than size of L1 GT trigger mask set: "
1482 << (*triggerMasksSet).size()
1483 <<
"\nError: Inconsistent L1 trigger configuration!"
1487 return triggerMaskValue;
1492 return triggerMaskValue;
1522 int iErrorRecord = 0;
1524 bool validRecord =
false;
1525 bool gtRecordValid =
false;
1526 bool gtReadoutRecordValid =
false;
1529 iEvent.
getByLabel(l1GtRecordInputTag, gtRecord);
1533 gtRecordValid =
true;
1539 LogDebug(
"L1GtUtils") <<
"\nL1GlobalTriggerRecord with \n "
1540 << l1GtRecordInputTag <<
"\nnot found in the event."
1545 iEvent.
getByLabel(l1GtReadoutRecordInputTag, gtReadoutRecord);
1547 if (gtReadoutRecord.
isValid()) {
1549 gtReadoutRecordValid =
true;
1554 iErrorRecord = iErrorRecord + 100;
1555 LogDebug(
"L1GtUtils") <<
"\nL1GlobalTriggerReadoutRecord with \n "
1556 << l1GtReadoutRecordInputTag <<
"\nnot found in the event."
1567 int pfIndexTechTrig = -1;
1568 int pfIndexAlgoTrig = -1;
1571 if (gtReadoutRecordValid) {
1574 = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexTech();
1576 = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexAlgo();
1581 =
static_cast<int> (gtRecord->gtPrescaleFactorIndexTech());
1583 =
static_cast<int> (gtRecord->gtPrescaleFactorIndexAlgo());
1589 LogDebug(
"L1GtUtils") <<
"\nError: "
1590 <<
"\nNo valid L1GlobalTriggerRecord with \n "
1591 << l1GtRecordInputTag <<
"\nfound in the event."
1592 <<
"\nNo valid L1GlobalTriggerReadoutRecord with \n "
1593 << l1GtReadoutRecordInputTag <<
"\nfound in the event."
1596 iError = l1ConfCode + iErrorRecord;
1611 size_t pfSetsSize = 0;
1613 switch (trigCategory) {
1631 pfIndex = pfIndexAlgoTrig;
1652 pfIndex = pfIndexTechTrig;
1658 iError = l1ConfCode + iErrorRecord + 3;
1670 iError = l1ConfCode + iErrorRecord + 1000;
1672 <<
"\nError: index of prescale factor set retrieved from the data \n"
1673 <<
"less than zero."
1674 <<
"\n Value of index retrieved from data = " << pfIndex
1680 }
else if (pfIndex >= (static_cast<int>(pfSetsSize))) {
1681 iError = l1ConfCode + iErrorRecord + 2000;
1683 <<
"\nError: index of prescale factor set retrieved from the data \n"
1684 <<
"greater than the size of the vector of prescale factor sets."
1685 <<
"\n Value of index retrieved from data = " << pfIndex
1686 <<
"\n Vector size = " << pfSetsSize << std::endl;
1713 getInputTag(iEvent, l1GtRecordInputTag, l1GtReadoutRecordInputTag);
1716 l1GtReadoutRecordInputTag, trigCategory, iError);
1730 const std::string& triggerAlgoTechTrig,
int& errorCode)
const {
1747 if (triggerAlgoTechTrig ==
"TechnicalTriggers") {
1750 }
else if (triggerAlgoTechTrig ==
"PhysicsAlgorithms") {
1756 <<
"\nErrr : prescale factor set index cannot be retrieved for the argument "
1757 << triggerAlgoTechTrig
1758 <<
"\n Supported arguments: 'PhysicsAlgorithms' or 'TechnicalTriggers'"
1759 <<
"\nWarning: this method is deprecated, please use method with TriggerCategory."
1762 iError = l1ConfCode + 6000;
1770 l1GtReadoutRecordInputTag, trigCategory, errorCode);
1779 const std::string& triggerAlgoTechTrig,
int& errorCode)
const {
1788 getInputTag(iEvent, l1GtRecordInputTag, l1GtReadoutRecordInputTag);
1791 l1GtReadoutRecordInputTag, triggerAlgoTechTrig, iError);
1812 l1GtReadoutRecordInputTag, trigCategory, iError);
1816 switch (trigCategory) {
1821 = (*m_prescaleFactorsAlgoTrigLite).at(pfIndex);
1843 = (*m_prescaleFactorsTechTrigLite).at(pfIndex);
1887 getInputTag(iEvent, l1GtRecordInputTag, l1GtReadoutRecordInputTag);
1890 l1GtReadoutRecordInputTag, trigCategory, iError);
1902 const std::string& triggerAlgoTechTrig,
int& errorCode) {
1921 if (triggerAlgoTechTrig ==
"TechnicalTriggers") {
1924 }
else if (triggerAlgoTechTrig ==
"PhysicsAlgorithms") {
1930 <<
"\nErrr : prescale factor set cannot be retrieved for the argument "
1931 << triggerAlgoTechTrig
1932 <<
"\n Supported arguments: 'PhysicsAlgorithms' or 'TechnicalTriggers'"
1933 <<
"\nWarning: this method is deprecated, please use method with TriggerCategory."
1936 iError = l1ConfCode + 6000;
1944 l1GtReadoutRecordInputTag, trigCategory, iError);
1953 const std::string& triggerAlgoTechTrig,
int& errorCode) {
1961 getInputTag(iEvent, l1GtRecordInputTag, l1GtReadoutRecordInputTag);
1964 l1GtReadoutRecordInputTag, triggerAlgoTechTrig, iError);
1998 switch (trigCategory) {
2055 iError = l1ConfCode + 3;
2072 const std::string& triggerAlgoTechTrig,
int& errorCode) {
2091 if (triggerAlgoTechTrig ==
"TechnicalTriggers") {
2094 }
else if (triggerAlgoTechTrig ==
"PhysicsAlgorithms") {
2100 <<
"\nErrr : trigger mask set cannot be retrieved for the argument "
2101 << triggerAlgoTechTrig
2102 <<
"\n Supported arguments: 'PhysicsAlgorithms' or 'TechnicalTriggers'"
2103 <<
"\nWarning: this method is deprecated, please use method with TriggerCategory."
2106 iError = l1ConfCode + 6000;
2187 iError = l1ConfCode;
2218 iError = l1ConfCode;
2224 iError = l1ConfCode;
2240 <<
"\nRetrieve L1 trigger configuration from L1GtTriggerMenuLite only\n"
2245 <<
"\nFall through: retrieve L1 trigger configuration from L1GtTriggerMenuLite"
2246 <<
"\n if L1GtTriggerMenuLite not valid, try to retrieve from event setup "
2248 l1ConfCode = 100000;
2253 <<
"\nRetrieve L1 trigger configuration from L1GtTriggerMenuLite, valid product\n"
2255 l1ConfCode = l1ConfCode + 10000;
2263 <<
"\nFall through: retrieve L1 trigger configuration from event setup."
2264 <<
"\nFirst option was L1GtTriggerMenuLite - but product is not valid.\n"
2266 l1ConfCode = l1ConfCode + 20000;
2273 <<
"\nFall through: L1GtTriggerMenuLite not valid, event setup not valid.\n"
2276 errorCode = l1ConfCode;
2285 <<
"\nError: L1 trigger configuration requested from L1GtTriggerMenuLite only"
2286 <<
"\nbut L1GtTriggerMenuLite is not valid.\n" << std::endl;
2288 errorCode = l1ConfCode;
2296 <<
"\nRetrieve L1 trigger configuration from event setup."
2297 <<
"\nL1GtTriggerMenuLite product was not requested.\n"
2299 l1ConfCode = 200000;
2303 <<
"\nRetrieve L1 trigger configuration from event setup only."
2304 <<
"\nValid L1 trigger event setup.\n"
2306 l1ConfCode = l1ConfCode + 10000;
2313 <<
"\nRetrieve L1 trigger configuration from event setup only."
2314 <<
"\nNo valid L1 trigger event setup.\n"
2317 errorCode = l1ConfCode;
2326 <<
"\nError: no L1 trigger configuration requested to be retrieved."
2327 <<
"\nMust call before either retrieveL1GtTriggerMenuLite or retrieveL1EventSetup.\n"
2329 l1ConfCode = 300000;
2330 errorCode = l1ConfCode;
2340 const int bitNumber,
const std::string& nameAlgoTechTrig,
2343 bool trigRes =
false;
2346 if (bitNumber < (static_cast<int> (decWord.size()))) {
2347 trigRes = decWord[bitNumber];
2350 LogDebug(
"L1GtUtils") <<
"\nError: bit number " << bitNumber
2353 <<
"\ngreater than size of L1 GT decision word: "
2355 <<
"\nError: Inconsistent L1 trigger configuration!"
bool m_retrieveL1GtTriggerMenuLite
bool getByLabel(std::string const &label, Handle< PROD > &result) const
void getAllProvenance(std::vector< Provenance const * > &provenances) 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
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
const L1GtTriggerMenuLite * ptrL1GtTriggerMenuLite(int &errorCode)
return a pointer to the L1GtTriggerMenuLite product
const std::vector< unsigned int > * m_triggerMaskTechTrig
const L1GtTriggerMask * m_l1GtTmVetoTech
void getInputTag(const edm::Event &iEvent, edm::InputTag &l1GtRecordInputTag, edm::InputTag &l1GtReadoutRecordInputTag) const
get the input tags for L1GlobalTriggerRecord and L1GlobalTriggerReadoutRecord
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
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::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)
void getL1GtTriggerMenuLiteInputTag(const edm::Event &iEvent, edm::InputTag &l1GtTriggerMenuLiteInputTag) const
get the input tags for L1GtTriggerMenuLite
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
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmMapLite
unsigned int gtNumberTechnicalTriggers() const
get / set the number of technical triggers
unsigned long long m_l1GtTmVetoTechCacheID
const edm::RunID * m_runIDCache
unsigned int gtNumberPhysTriggers() const
get / set the number of physics trigger algorithms
const bool decision(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
const std::string & l1TriggerMenuImplementation() const
return the L1 trigger menu implementation
const AlgorithmMap * m_algorithmAliasMap
const bool l1AlgTechTrigBitNumber(const std::string &nameAlgoTechTrig, int &triggerAlgoTechTrig, int &bitNumber) const
deprecated version - use l1AlgoTechTrigBitNumber
std::string friendlyName(std::string const &iFullName)
unsigned long long m_l1GtTmTechCacheID
const T & max(const T &a, const T &b)
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 edm::RunID * m_provRunIDCache
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
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 ...
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
const L1GtTriggerMask * m_l1GtTmTech
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
void retrieveL1GtTriggerMenuLite(const edm::Event &, edm::InputTag &)
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
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
T const * product() const
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
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
unsigned long long m_l1GtPfTechCacheID
static const int L1GtNotValidError
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
unsigned long long m_l1GtStableParCacheID
const L1GtTriggerMenuLite::L1TriggerMap * m_technicalTriggerMapLite
const std::vector< unsigned int > * m_triggerMaskVetoTechTrig