Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-02 03:45:48

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuDTSecProcMap
0004  *
0005  *   Sector Processor container
0006  *   map which contains all sector processors
0007  *
0008  *
0009  *
0010  *   N. Neumeister            CERN EP
0011  */
0012 //
0013 //--------------------------------------------------
0014 #ifndef L1MUDT_SEC_PROC_MAP_H
0015 #define L1MUDT_SEC_PROC_MAP_H
0016 
0017 //---------------
0018 // C++ Headers --
0019 //---------------
0020 
0021 #include <map>
0022 
0023 //----------------------
0024 // Base Class Headers --
0025 //----------------------
0026 
0027 //------------------------------------
0028 // Collaborating Class Declarations --
0029 //------------------------------------
0030 
0031 #include "L1Trigger/DTTrackFinder/interface/L1MuDTSecProcId.h"
0032 class L1MuDTSectorProcessor;
0033 
0034 //              ---------------------
0035 //              -- Class Interface --
0036 //              ---------------------
0037 
0038 class L1MuDTSecProcMap {
0039 public:
0040   typedef std::map<L1MuDTSecProcId, L1MuDTSectorProcessor*, std::less<L1MuDTSecProcId> > SPmap;
0041   typedef SPmap::iterator SPmap_iter;
0042 
0043   /// constructor
0044   L1MuDTSecProcMap();
0045 
0046   /// destructor
0047   virtual ~L1MuDTSecProcMap();
0048 
0049   /// return pointer to Sector Processor
0050   L1MuDTSectorProcessor* sp(const L1MuDTSecProcId&) const;
0051 
0052   /// insert a Sector Processor into the container
0053   void insert(const L1MuDTSecProcId&, L1MuDTSectorProcessor* sp);
0054 
0055   /// return number of entries present in the container
0056   inline int size() const { return m_map.size(); }
0057 
0058   /// return iterator which points to the first entry of the container
0059   inline SPmap_iter begin() { return m_map.begin(); }
0060 
0061   /// return iterator which points to the one-past-last entry of the container
0062   inline SPmap_iter end() { return m_map.end(); }
0063 
0064 private:
0065   SPmap m_map;
0066 };
0067 
0068 #endif