File indexing completed on 2024-04-06 12:20:03
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "L1Trigger/GlobalTriggerAnalyzer/interface/L1GtTrigReportEntry.h"
0017
0018
0019 #include <string>
0020
0021
0022
0023
0024 L1GtTrigReportEntry::L1GtTrigReportEntry(const std::string& menuName,
0025 const std::string& algName,
0026 const int prescaleFactor,
0027 const int triggerMask,
0028 const int daqPartition) {
0029 m_triggerMenuName = menuName;
0030 m_algoName = algName;
0031 m_prescaleFactor = prescaleFactor;
0032 m_triggerMask = triggerMask;
0033 m_daqPartition = daqPartition;
0034
0035
0036
0037 m_nrEventsAccept = 0;
0038 m_nrEventsReject = 0;
0039 m_nrEventsAcceptBeforeMask = 0;
0040 m_nrEventsRejectBeforeMask = 0;
0041 m_nrEventsError = 0;
0042 }
0043
0044
0045 L1GtTrigReportEntry::~L1GtTrigReportEntry() {
0046
0047 }
0048
0049
0050 L1GtTrigReportEntry& L1GtTrigReportEntry::operator=(const L1GtTrigReportEntry& repEntry) {
0051 if (this != &repEntry) {
0052 m_triggerMenuName = repEntry.m_triggerMenuName;
0053
0054 m_algoName = repEntry.m_algoName;
0055
0056 m_prescaleFactor = repEntry.m_prescaleFactor;
0057
0058 m_triggerMask = repEntry.m_triggerMask;
0059
0060 m_daqPartition = repEntry.m_daqPartition;
0061 }
0062
0063 return *this;
0064 }
0065
0066
0067 bool L1GtTrigReportEntry::operator==(const L1GtTrigReportEntry& repEntry) const {
0068
0069
0070 if (m_daqPartition != repEntry.m_daqPartition) {
0071 return false;
0072 }
0073
0074 if (m_triggerMask != repEntry.m_triggerMask) {
0075 return false;
0076 }
0077
0078 if (m_prescaleFactor != repEntry.m_prescaleFactor) {
0079 return false;
0080 }
0081
0082 if (m_algoName != repEntry.m_algoName) {
0083 return false;
0084 }
0085
0086 if (m_triggerMenuName != repEntry.m_triggerMenuName) {
0087 return false;
0088 }
0089
0090
0091 return true;
0092 }
0093
0094
0095 bool L1GtTrigReportEntry::operator!=(const L1GtTrigReportEntry& result) const { return !(result == *this); }
0096
0097
0098
0099
0100 void L1GtTrigReportEntry::addValidEntry(const bool algResultAfterMask, const bool algResultBeforeMask) {
0101 if (algResultAfterMask) {
0102 m_nrEventsAccept++;
0103 } else {
0104 m_nrEventsReject++;
0105 }
0106
0107 if (algResultBeforeMask) {
0108 m_nrEventsAcceptBeforeMask++;
0109 } else {
0110 m_nrEventsRejectBeforeMask++;
0111 }
0112 }
0113
0114
0115 void L1GtTrigReportEntry::addErrorEntry() { m_nrEventsError++; }