• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/Users/jmonk/Physics/ForIA/ForIA/TriggerConfiguration.hh

Go to the documentation of this file.
00001 #ifndef FORIA_TRIGGER_CONFIGURATION_HH
00002 #define FORIA_TRIGGER_CONFIGURATION_HH
00003 
00004 #include "boost/smart_ptr.hpp"
00005 #include "boost/unordered_map.hpp"
00006 
00007 #include <map>
00008 #include <vector>
00009 #include <string>
00010 
00011 namespace ForIA{
00012  
00013   using std::map;
00014   using std::vector;
00015   using std::string;
00016   
00018   
00019   class TriggerConfiguration{
00020     
00021     typedef map<string, int> NameIDMap;
00022     typedef map<string, float> PrescaleMap;
00023     typedef map<string, string> LowerChainMap;
00024     
00025   public:
00026     
00028     enum Status{FILLED, EMPTY};
00029     
00030     TriggerConfiguration();
00031     
00037     unsigned int superMasterKey()const;
00038     
00044     unsigned int l1PrescaleKey()const;
00045     
00051     unsigned int hltPrescaleKey()const;
00052     
00053     
00059     const string &lowerChainName(const string &hltName)const;
00060     
00064     void clear();
00065     
00072     int l1Ctpid(const string &name)const;
00073     
00079     const vector<string> &l1Names()const;
00080     
00087     int hltChainID(const string &name)const;
00088     
00095     string hltChainName(int id)const;
00096     
00103     float hltPrescale(const string &name)const;
00104     
00110     float l1Prescale(const string &name)const;
00111     
00118     float chainPrescale(const string &name)const;
00119     
00125     const vector<string> &hltChainNames()const;
00126     
00131     Status status()const;
00132     
00136     void resetChainNames();
00137     
00138     static const string BAD_TRIGGER_NAME;
00139     
00140   private:
00141     
00142     friend class DataConverter;
00143     
00144     Status m_status;
00145     
00146     unsigned int m_smk;
00147     
00148     unsigned int m_l1PSK;
00149     
00150     unsigned int m_hltPSK;
00151     
00152     PrescaleMap m_l1Prescales;
00153     PrescaleMap m_hltPrescales;
00154     
00155     NameIDMap m_l1Names;
00156     NameIDMap m_hltNames;
00157     
00158     mutable map<int, string> m_hltIDs;
00159     
00160     mutable vector<string> m_l1BitNames;
00161     mutable bool m_gotL1BitNames;
00162     mutable vector<string> m_hltChainNames;
00163     mutable bool m_gotHltChainNames;
00164     
00165     LowerChainMap m_lowerChainNames;
00166     
00167     mutable boost::unordered_map<string, float> m_totalPrescale;
00168     
00169   };
00170   
00171   typedef boost::shared_ptr<TriggerConfiguration> TriggerConfigurationPtr;
00172   typedef boost::shared_ptr<const TriggerConfiguration> TriggerConfigurationConstPtr;
00173 }
00174 #endif

Generated on Mon Jul 30 2012 16:56:35 for ForIA by  doxygen 1.7.2