CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/L1Trigger/GlobalTrigger/interface/L1GtAlgorithmEvaluation.h

Go to the documentation of this file.
00001 #ifndef GlobalTrigger_L1GtAlgorithmEvaluation_h
00002 #define GlobalTrigger_L1GtAlgorithmEvaluation_h
00003 
00020 // system include files
00021 #include <iostream>
00022 
00023 #include <string>
00024 #include <vector>
00025 #include <map>
00026 
00027 #include <boost/cstdint.hpp>
00028 
00029 // if hash map is used
00030 
00031 #include <ext/hash_map>
00032 
00033 //   how to hash std::string, using a "template specialization"
00034 namespace __gnu_cxx
00035 {
00036 
00041 template <> struct hash<std::string>
00042 {
00043     size_t operator()(const std::string& x) const {
00044         return hash<const char*>()(x.c_str());
00045     }
00046 };
00047 
00048 }
00049 // end hash map
00050 
00051 
00052 // user include files
00053 
00054 //   base class
00055 #include "DataFormats/L1GlobalTrigger/interface/L1GtLogicParser.h"
00056 
00057 //
00058 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerObjectMapFwd.h"
00059 
00060 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00061 
00062 // forward declarations
00063 class L1GtAlgorithm;
00064 class L1GtConditionEvaluation;
00065 
00066 // class interface
00067 class L1GtAlgorithmEvaluation : public L1GtLogicParser
00068 {
00069 
00070 public:
00071 
00073     L1GtAlgorithmEvaluation();
00074 
00076     L1GtAlgorithmEvaluation(const L1GtAlgorithm&);
00077 
00079     L1GtAlgorithmEvaluation(L1GtAlgorithmEvaluation&);
00080 
00082     virtual ~L1GtAlgorithmEvaluation();
00083     
00084     //typedef std::map<std::string, L1GtConditionEvaluation*> ConditionEvaluationMap;
00085     typedef __gnu_cxx::hash_map<std::string, L1GtConditionEvaluation*> ConditionEvaluationMap;
00086     typedef ConditionEvaluationMap::const_iterator CItEvalMap ;
00087     typedef ConditionEvaluationMap::iterator ItEvalMap  ;
00088 
00089 public:
00090 
00092     inline const bool& gtAlgoResult() const {
00093         return m_algoResult;
00094     }
00095 
00096     inline void setGtAlgoResult(const bool algoResult) {
00097         m_algoResult = algoResult;
00098     }
00099 
00101     void evaluateAlgorithm(const int chipNumber, const std::vector<ConditionEvaluationMap>&);
00102 
00105     inline const std::vector<CombinationsInCond>* gtAlgoCombinationVector() const {
00106         return &m_algoCombinationVector;
00107     }
00108     
00109     void print(std::ostream& myCout) const;
00110 
00111 
00112 private:
00113 
00115     bool m_algoResult;
00116 
00117     std::vector<CombinationsInCond> m_algoCombinationVector;
00118 
00119 };
00120 
00121 #endif