Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:49

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuDTQualPatternLut
0004  *
0005  *   Look-up tables for eta matching unit (EMU)
0006  *   stores lists of qualified patterns and
0007  *   coarse eta values 
0008  *
0009  *
0010  *   $Date: 2007/03/30 07:48:02 $
0011  *   $Revision: 1.1 $
0012  *
0013  *   N. Neumeister            CERN EP
0014  */
0015 //
0016 //--------------------------------------------------
0017 #ifndef L1MUBMT_QUALPATTERN_LUT_H
0018 #define L1MUBMT_QUALPATTERN_LUT_H
0019 
0020 //---------------
0021 // C++ Headers --
0022 //---------------
0023 
0024 #include "CondFormats/Serialization/interface/Serializable.h"
0025 #include "CondFormats/L1TObjects/interface/L1TriggerLutFile.h"
0026 
0027 #include <vector>
0028 #include <map>
0029 
0030 //----------------------
0031 // Base Class Headers --
0032 //----------------------
0033 
0034 //------------------------------------
0035 // Collaborating Class Declarations --
0036 //------------------------------------
0037 
0038 //              ---------------------
0039 //              -- Class Interface --
0040 //              ---------------------
0041 
0042 class L1MuBMTQualPatternLut {
0043 public:
0044   typedef std::pair<short, short> LUTID;
0045   typedef std::pair<short, std::vector<short> > LUTCONT;
0046   typedef std::map<LUTID, LUTCONT> LUT;
0047   typedef LUT::iterator EMULut_iter;
0048 
0049   /// constructor
0050   L1MuBMTQualPatternLut();
0051 
0052   /// destructor
0053   virtual ~L1MuBMTQualPatternLut();
0054 
0055   /// reset look-up tables
0056   void reset();
0057 
0058   /// load look-up tables
0059   int load();
0060 
0061   /// print look-up tables
0062   void print() const;
0063 
0064   int getIgnoredLines(L1TriggerLutFile file) const;
0065 
0066   /// get coarse eta value for a given sector processor [1-6] and address [1-22]
0067   int getCoarseEta(int sp, int adr) const;
0068 
0069   /// get list of qualified patterns for a given sector processor [1-6] and address [1-22]
0070   const std::vector<short>& getQualifiedPatterns(int sp, int adr) const;
0071 
0072   /// return number of entries in the LUT
0073   inline int size() const { return m_lut.size(); }
0074 
0075   /// return iterator which points to the first entry of the LUT
0076   inline EMULut_iter begin() { return m_lut.begin(); }
0077 
0078   /// return iterator which points to the one-past-last entry of the LUT
0079   inline EMULut_iter end() { return m_lut.end(); }
0080 
0081 public:
0082   LUT m_lut;  // coarse eta values and list of qualified patterns
0083 
0084   COND_SERIALIZABLE;
0085 };
0086 
0087 #endif