File indexing completed on 2024-04-06 12:19:59
0001 #ifndef GlobalTrigger_L1GtAlgorithmEvaluation_h
0002 #define GlobalTrigger_L1GtAlgorithmEvaluation_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerObjectMapFwd.h"
0019 #include "DataFormats/L1GlobalTrigger/interface/L1GtLogicParser.h"
0020
0021 #include <iostream>
0022 #include <map>
0023 #include <queue>
0024 #include <stack>
0025 #include <string>
0026 #include <unordered_map>
0027 #include <vector>
0028
0029
0030 class L1GtAlgorithm;
0031 class L1GtConditionEvaluation;
0032
0033
0034 class L1GtAlgorithmEvaluation {
0035 public:
0036 typedef L1GtLogicParser::TokenRPN TokenRPN;
0037 typedef std::vector<TokenRPN> RpnVector;
0038 typedef L1GtLogicParser::OperandToken OperandToken;
0039
0040
0041
0042
0043
0044 explicit L1GtAlgorithmEvaluation(const L1GtAlgorithm &);
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054 typedef std ::unordered_map<std::string, L1GtConditionEvaluation *> ConditionEvaluationMap;
0055 typedef ConditionEvaluationMap::const_iterator CItEvalMap;
0056 typedef ConditionEvaluationMap::iterator ItEvalMap;
0057
0058 public:
0059
0060 inline bool gtAlgoResult() const { return m_algoResult; }
0061
0062 inline void setGtAlgoResult(const bool algoResult) { m_algoResult = algoResult; }
0063
0064
0065 void evaluateAlgorithm(const int chipNumber, const std::vector<ConditionEvaluationMap> &);
0066
0067
0068
0069 inline std::vector<CombinationsInCond> >AlgoCombinationVector() { return m_algoCombinationVector; }
0070
0071 inline std::vector<L1GtLogicParser::OperandToken> &operandTokenVector() { return m_operandTokenVector; }
0072
0073 void print(std::ostream &myCout) const;
0074
0075 private:
0076
0077 bool m_algoResult;
0078
0079
0080 std::string const &m_logicalExpression;
0081 RpnVector const &m_rpnVector;
0082
0083 std::vector<OperandToken> m_operandTokenVector;
0084
0085 std::vector<CombinationsInCond> m_algoCombinationVector;
0086 };
0087
0088 #endif