CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GtAlgorithmEvaluation.h
Go to the documentation of this file.
1 #ifndef GlobalTrigger_L1GtAlgorithmEvaluation_h
2 #define GlobalTrigger_L1GtAlgorithmEvaluation_h
3 
20 // system include files
21 #include <iostream>
22 
23 #include <string>
24 #include <vector>
25 #include <map>
26 
27 #include <boost/cstdint.hpp>
28 
29 // if hash map is used
30 
31 #include <ext/hash_map>
32 
33 // how to hash std::string, using a "template specialization"
34 namespace __gnu_cxx
35 {
36 
41 template <> struct hash<std::string>
42 {
43  size_t operator()(const std::string& x) const {
44  return hash<const char*>()(x.c_str());
45  }
46 };
47 
48 }
49 // end hash map
50 
51 
52 // user include files
53 
54 // base class
56 
57 //
59 
61 
62 // forward declarations
63 class L1GtAlgorithm;
65 
66 // class interface
68 {
69 
70 public:
71 
74 
77 
80 
82  virtual ~L1GtAlgorithmEvaluation();
83 
84  //typedef std::map<std::string, L1GtConditionEvaluation*> ConditionEvaluationMap;
85  typedef __gnu_cxx::hash_map<std::string, L1GtConditionEvaluation*> ConditionEvaluationMap;
86  typedef ConditionEvaluationMap::const_iterator CItEvalMap ;
87  typedef ConditionEvaluationMap::iterator ItEvalMap ;
88 
89 public:
90 
92  inline const bool& gtAlgoResult() const {
93  return m_algoResult;
94  }
95 
96  inline void setGtAlgoResult(const bool algoResult) {
97  m_algoResult = algoResult;
98  }
99 
101  void evaluateAlgorithm(const int chipNumber, const std::vector<ConditionEvaluationMap>&);
102 
105  inline const std::vector<CombinationsInCond>* gtAlgoCombinationVector() const {
106  return &m_algoCombinationVector;
107  }
108 
109  void print(std::ostream& myCout) const;
110 
111 
112 private:
113 
116 
117  std::vector<CombinationsInCond> m_algoCombinationVector;
118 
119 };
120 
121 #endif
size_t operator()(const std::string &x) const
virtual ~L1GtAlgorithmEvaluation()
destructor
bool m_algoResult
algorithm result
__gnu_cxx::hash_map< std::string, L1GtConditionEvaluation * > ConditionEvaluationMap
const std::vector< CombinationsInCond > * gtAlgoCombinationVector() const
std::vector< CombinationsInCond > m_algoCombinationVector
void setGtAlgoResult(const bool algoResult)
const bool & gtAlgoResult() const
get / set the result of the algorithm
ConditionEvaluationMap::iterator ItEvalMap
void print(std::ostream &myCout) const
ConditionEvaluationMap::const_iterator CItEvalMap
void evaluateAlgorithm(const int chipNumber, const std::vector< ConditionEvaluationMap > &)
evaluate an algorithm