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
L1GtConditionEvaluation
Definition: L1GtConditionEvaluation.h:37
L1GtLogicParser::OperandToken
Definition: L1GtLogicParser.h:33
L1GtAlgorithmEvaluation::TokenRPN
L1GtLogicParser::TokenRPN TokenRPN
Definition: L1GtAlgorithmEvaluation.h:36
L1GtAlgorithmEvaluation::gtAlgoCombinationVector
std::vector< CombinationsInCond > & gtAlgoCombinationVector()
Definition: L1GtAlgorithmEvaluation.h:69
L1GtAlgorithmEvaluation::m_algoResult
bool m_algoResult
algorithm result
Definition: L1GtAlgorithmEvaluation.h:77
L1GtAlgorithmEvaluation::operandTokenVector
std::vector< L1GtLogicParser::OperandToken > & operandTokenVector()
Definition: L1GtAlgorithmEvaluation.h:71
L1GtAlgorithmEvaluation::gtAlgoResult
bool gtAlgoResult() const
get / set the result of the algorithm
Definition: L1GtAlgorithmEvaluation.h:60
L1GtAlgorithmEvaluation::m_operandTokenVector
std::vector< OperandToken > m_operandTokenVector
Definition: L1GtAlgorithmEvaluation.h:83
L1GtLogicParser::TokenRPN
Definition: L1GtLogicParser.h:50
L1GtAlgorithmEvaluation::OperandToken
L1GtLogicParser::OperandToken OperandToken
Definition: L1GtAlgorithmEvaluation.h:38
L1GtAlgorithmEvaluation::print
void print(std::ostream &myCout) const
Definition: L1GtAlgorithmEvaluation.cc:159
L1GtAlgorithmEvaluation::m_logicalExpression
const std::string & m_logicalExpression
Definition: L1GtAlgorithmEvaluation.h:80
L1GtAlgorithmEvaluation::ConditionEvaluationMap
std ::unordered_map< std::string, L1GtConditionEvaluation * > ConditionEvaluationMap
copy constructor
Definition: L1GtAlgorithmEvaluation.h:54
L1GtAlgorithm
Definition: L1GtAlgorithm.h:32
L1GtAlgorithmEvaluation::setGtAlgoResult
void setGtAlgoResult(const bool algoResult)
Definition: L1GtAlgorithmEvaluation.h:62
L1GtAlgorithmEvaluation::m_algoCombinationVector
std::vector< CombinationsInCond > m_algoCombinationVector
Definition: L1GtAlgorithmEvaluation.h:85
L1GtAlgorithmEvaluation::m_rpnVector
const RpnVector & m_rpnVector
Definition: L1GtAlgorithmEvaluation.h:81
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1GtAlgorithmEvaluation
Definition: L1GtAlgorithmEvaluation.h:34
L1GlobalTriggerObjectMapFwd.h
L1GtLogicParser.h
L1GtAlgorithmEvaluation::L1GtAlgorithmEvaluation
L1GtAlgorithmEvaluation(const L1GtAlgorithm &)
constructor
Definition: L1GtAlgorithmEvaluation.cc:42
L1GtAlgorithmEvaluation::CItEvalMap
ConditionEvaluationMap::const_iterator CItEvalMap
Definition: L1GtAlgorithmEvaluation.h:55
L1GtAlgorithmEvaluation::ItEvalMap
ConditionEvaluationMap::iterator ItEvalMap
Definition: L1GtAlgorithmEvaluation.h:56
L1GtAlgorithmEvaluation::evaluateAlgorithm
void evaluateAlgorithm(const int chipNumber, const std::vector< ConditionEvaluationMap > &)
evaluate an algorithm
Definition: L1GtAlgorithmEvaluation.cc:50
L1GtAlgorithmEvaluation::RpnVector
std::vector< TokenRPN > RpnVector
Definition: L1GtAlgorithmEvaluation.h:37