CMS 3D CMS Logo

L1GtAlgorithmEvaluation.h
Go to the documentation of this file.
1 #ifndef GlobalTrigger_L1GtAlgorithmEvaluation_h
2 #define GlobalTrigger_L1GtAlgorithmEvaluation_h
3 
20 
21 #include <iostream>
22 #include <map>
23 #include <queue>
24 #include <stack>
25 #include <string>
26 #include <unordered_map>
27 #include <vector>
28 
29 // forward declarations
30 class L1GtAlgorithm;
32 
33 // class interface
35 public:
37  typedef std::vector<TokenRPN> RpnVector;
39 
41  // L1GtAlgorithmEvaluation();
42 
44  explicit L1GtAlgorithmEvaluation(const L1GtAlgorithm &);
45 
47  // L1GtAlgorithmEvaluation(L1GtAlgorithmEvaluation&);
48 
50  // virtual ~L1GtAlgorithmEvaluation();
51 
52  // typedef std::map<std::string, L1GtConditionEvaluation*>
53  // ConditionEvaluationMap;
54  typedef std ::unordered_map<std::string, L1GtConditionEvaluation *> ConditionEvaluationMap;
55  typedef ConditionEvaluationMap::const_iterator CItEvalMap;
56  typedef ConditionEvaluationMap::iterator ItEvalMap;
57 
58 public:
60  inline bool gtAlgoResult() const { return m_algoResult; }
61 
62  inline void setGtAlgoResult(const bool algoResult) { m_algoResult = algoResult; }
63 
65  void evaluateAlgorithm(const int chipNumber, const std::vector<ConditionEvaluationMap> &);
66 
69  inline std::vector<CombinationsInCond> &gtAlgoCombinationVector() { return m_algoCombinationVector; }
70 
71  inline std::vector<L1GtLogicParser::OperandToken> &operandTokenVector() { return m_operandTokenVector; }
72 
73  void print(std::ostream &myCout) const;
74 
75 private:
78 
79  // input
82 
83  std::vector<OperandToken> m_operandTokenVector;
84 
85  std::vector<CombinationsInCond> m_algoCombinationVector;
86 };
87 
88 #endif
std::vector< TokenRPN > RpnVector
bool m_algoResult
algorithm result
L1GtLogicParser::TokenRPN TokenRPN
std::vector< CombinationsInCond > & gtAlgoCombinationVector()
bool gtAlgoResult() const
get / set the result of the algorithm
std::vector< L1GtLogicParser::OperandToken > & operandTokenVector()
std::vector< OperandToken > m_operandTokenVector
L1GtLogicParser::OperandToken OperandToken
void print(std::ostream &myCout) const
std::vector< CombinationsInCond > m_algoCombinationVector
std ::unordered_map< std::string, L1GtConditionEvaluation * > ConditionEvaluationMap
copy constructor
void setGtAlgoResult(const bool algoResult)
ConditionEvaluationMap::iterator ItEvalMap
L1GtAlgorithmEvaluation(const L1GtAlgorithm &)
constructor
std::string const & m_logicalExpression
ConditionEvaluationMap::const_iterator CItEvalMap
void evaluateAlgorithm(const int chipNumber, const std::vector< ConditionEvaluationMap > &)
evaluate an algorithm