File indexing completed on 2024-04-06 12:04:59
0001
0002
0003
0004 #include "DataFormats/PatCandidates/interface/TriggerAlgorithm.h"
0005
0006 using namespace pat;
0007
0008
0009
0010
0011 TriggerAlgorithm::TriggerAlgorithm()
0012 : name_(),
0013 alias_(),
0014 logic_(),
0015 tech_(),
0016 bit_(),
0017 gtlResult_(),
0018 prescale_(),
0019 mask_(),
0020 decisionBeforeMask_(),
0021 decisionAfterMask_() {
0022 conditionKeys_.clear();
0023 }
0024
0025
0026 TriggerAlgorithm::TriggerAlgorithm(const std::string& name)
0027 : name_(name),
0028 alias_(),
0029 logic_(),
0030 tech_(),
0031 bit_(),
0032 gtlResult_(),
0033 prescale_(),
0034 mask_(),
0035 decisionBeforeMask_(),
0036 decisionAfterMask_() {
0037 conditionKeys_.clear();
0038 }
0039
0040
0041 TriggerAlgorithm::TriggerAlgorithm(const std::string& name,
0042 const std::string& alias,
0043 bool tech,
0044 unsigned bit,
0045 unsigned prescale,
0046 bool mask,
0047 bool decisionBeforeMask,
0048 bool decisionAfterMask)
0049 : name_(name),
0050 alias_(alias),
0051 logic_(),
0052 tech_(tech),
0053 bit_(bit),
0054 gtlResult_(),
0055 prescale_(prescale),
0056 mask_(mask),
0057 decisionBeforeMask_(decisionBeforeMask),
0058 decisionAfterMask_(decisionAfterMask) {
0059 conditionKeys_.clear();
0060 }
0061 TriggerAlgorithm::TriggerAlgorithm(const std::string& name,
0062 const std::string& alias,
0063 bool tech,
0064 unsigned bit,
0065 bool gtlResult,
0066 unsigned prescale,
0067 bool mask,
0068 bool decisionBeforeMask,
0069 bool decisionAfterMask)
0070 : name_(name),
0071 alias_(alias),
0072 logic_(),
0073 tech_(tech),
0074 bit_(bit),
0075 gtlResult_(gtlResult),
0076 prescale_(prescale),
0077 mask_(mask),
0078 decisionBeforeMask_(decisionBeforeMask),
0079 decisionAfterMask_(decisionAfterMask) {
0080 conditionKeys_.clear();
0081 }
0082
0083
0084
0085
0086 bool TriggerAlgorithm::hasConditionKey(unsigned conditionKey) const {
0087 for (size_t iO = 0; iO < conditionKeys().size(); ++iO) {
0088 if (conditionKeys().at(iO) == conditionKey) {
0089 return true;
0090 }
0091 }
0092 return false;
0093 }