CMS 3D CMS Logo

AlgorithmEvaluation.h
Go to the documentation of this file.
1 #ifndef L1Trigger_L1TGlobal_AlgorithmEvaluation_h
2 #define L1Trigger_L1TGlobal_AlgorithmEvaluation_h
3 
4 // work-around for missing dependency - force checkout...
5 
22 
23 #include <iostream>
24 #include <map>
25 #include <queue>
26 #include <stack>
27 #include <string>
28 #include <unordered_map>
29 #include <vector>
30 
31 // forward declarations
32 class GlobalAlgorithm;
33 
34 namespace l1t {
35 
36  class ConditionEvaluation;
37 
38  // class interface
40  public:
42  typedef std::vector<TokenRPN> RpnVector;
44 
46  // AlgorithmEvaluation();
47 
49  explicit AlgorithmEvaluation(const GlobalAlgorithm&);
50 
52  // AlgorithmEvaluation(AlgorithmEvaluation&);
53 
55  // virtual ~AlgorithmEvaluation();
56 
57  //typedef std::map<std::string, ConditionEvaluation*> ConditionEvaluationMap;
58  typedef std::unordered_map<std::string, ConditionEvaluation*> ConditionEvaluationMap;
59  typedef ConditionEvaluationMap::const_iterator CItEvalMap;
60  typedef ConditionEvaluationMap::iterator ItEvalMap;
61 
62  public:
64  inline bool gtAlgoResult() const { return m_algoResult; }
65 
66  inline void setGtAlgoResult(const bool algoResult) { m_algoResult = algoResult; }
67 
69  void evaluateAlgorithm(const int chipNumber, const std::vector<ConditionEvaluationMap>&);
70 
73  inline std::vector<CombinationsInCond>& gtAlgoCombinationVector() { return m_algoCombinationVector; }
74 
75  inline std::vector<GlobalLogicParser::OperandToken>& operandTokenVector() { return m_operandTokenVector; }
76 
77  void print(std::ostream& myCout) const;
78 
79  private:
82 
83  // input
86 
87  std::vector<OperandToken> m_operandTokenVector;
88 
89  std::vector<CombinationsInCond> m_algoCombinationVector;
90  };
91 
92 } // namespace l1t
93 #endif
l1t::AlgorithmEvaluation::ItEvalMap
ConditionEvaluationMap::iterator ItEvalMap
Definition: AlgorithmEvaluation.h:60
l1t::AlgorithmEvaluation::RpnVector
std::vector< TokenRPN > RpnVector
Definition: AlgorithmEvaluation.h:42
l1t::AlgorithmEvaluation::AlgorithmEvaluation
AlgorithmEvaluation(const GlobalAlgorithm &)
constructor
Definition: AlgorithmEvaluation.cc:39
l1t::AlgorithmEvaluation::operandTokenVector
std::vector< GlobalLogicParser::OperandToken > & operandTokenVector()
Definition: AlgorithmEvaluation.h:75
l1t::AlgorithmEvaluation::m_logicalExpression
std::string const & m_logicalExpression
Definition: AlgorithmEvaluation.h:84
GlobalObjectMapFwd.h
l1t::AlgorithmEvaluation::m_algoResult
bool m_algoResult
algorithm result
Definition: AlgorithmEvaluation.h:81
l1t::AlgorithmEvaluation::ConditionEvaluationMap
std::unordered_map< std::string, ConditionEvaluation * > ConditionEvaluationMap
copy constructor
Definition: AlgorithmEvaluation.h:58
l1t::AlgorithmEvaluation::TokenRPN
GlobalLogicParser::TokenRPN TokenRPN
Definition: AlgorithmEvaluation.h:41
GlobalLogicParser.h
GlobalAlgorithm
Definition: GlobalAlgorithm.h:32
l1t::AlgorithmEvaluation::setGtAlgoResult
void setGtAlgoResult(const bool algoResult)
Definition: AlgorithmEvaluation.h:66
l1t::AlgorithmEvaluation::gtAlgoResult
bool gtAlgoResult() const
get / set the result of the algorithm
Definition: AlgorithmEvaluation.h:64
l1t::AlgorithmEvaluation::m_algoCombinationVector
std::vector< CombinationsInCond > m_algoCombinationVector
Definition: AlgorithmEvaluation.h:89
l1t
delete x;
Definition: CaloConfig.h:22
l1t::AlgorithmEvaluation
Definition: AlgorithmEvaluation.h:39
l1t::AlgorithmEvaluation::m_operandTokenVector
std::vector< OperandToken > m_operandTokenVector
Definition: AlgorithmEvaluation.h:87
l1t::AlgorithmEvaluation::m_rpnVector
RpnVector const & m_rpnVector
Definition: AlgorithmEvaluation.h:85
l1t::AlgorithmEvaluation::evaluateAlgorithm
void evaluateAlgorithm(const int chipNumber, const std::vector< ConditionEvaluationMap > &)
evaluate an algorithm
Definition: AlgorithmEvaluation.cc:47
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
l1t::AlgorithmEvaluation::OperandToken
GlobalLogicParser::OperandToken OperandToken
Definition: AlgorithmEvaluation.h:43
l1t::AlgorithmEvaluation::CItEvalMap
ConditionEvaluationMap::const_iterator CItEvalMap
Definition: AlgorithmEvaluation.h:59
l1t::AlgorithmEvaluation::gtAlgoCombinationVector
std::vector< CombinationsInCond > & gtAlgoCombinationVector()
Definition: AlgorithmEvaluation.h:73
ConditionEvaluation
GlobalLogicParser::TokenRPN
Definition: GlobalLogicParser.h:37
GlobalLogicParser::OperandToken
Definition: GlobalLogicParser.h:19
l1t::AlgorithmEvaluation::print
void print(std::ostream &myCout) const
Definition: AlgorithmEvaluation.cc:161