Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:42

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 #include <memory>
0023 
0024 //----------------------
0025 // Base Class Headers --
0026 //----------------------
0027 
0028 //------------------------------------
0029 // Collaborating Class Declarations --
0030 //------------------------------------
0031 
0032 #include "L1Trigger/DTTrackFinder/interface/L1MuDTSecProcId.h"
0033 class L1MuDTSectorProcessor;
0034 
0035 //              ---------------------
0036 //              -- Class Interface --
0037 //              ---------------------
0038 
0039 class L1MuDTSecProcMap {
0040 public:
0041   typedef std::map<L1MuDTSecProcId, std::unique_ptr<L1MuDTSectorProcessor>> SPmap;
0042   typedef SPmap::iterator SPmap_iter;
0043 
0044   /// constructor
0045   L1MuDTSecProcMap();
0046 
0047   /// destructor
0048   ~L1MuDTSecProcMap();
0049 
0050   /// return pointer to Sector Processor
0051   const L1MuDTSectorProcessor* sp(const L1MuDTSecProcId&) const;
0052 
0053   /// insert a Sector Processor into the container
0054   void insert(const L1MuDTSecProcId&, std::unique_ptr<L1MuDTSectorProcessor> sp);
0055 
0056   /// return number of entries present in the container
0057   inline int size() const { return m_map.size(); }
0058 
0059   /// return iterator which points to the first entry of the container
0060   inline SPmap_iter begin() { return m_map.begin(); }
0061 
0062   /// return iterator which points to the one-past-last entry of the container
0063   inline SPmap_iter end() { return m_map.end(); }
0064 
0065 private:
0066   SPmap m_map;
0067 };
0068 
0069 #endif