Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-15 23:40:40

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuBMSecProcMap
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 L1MUBM_SEC_PROC_MAP_H
0015 #define L1MUBM_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 "DataFormats/L1TMuon/interface/BMTF/L1MuBMSecProcId.h"
0033 
0034 class L1MuBMSectorProcessor;
0035 
0036 //              ---------------------
0037 //              -- Class Interface --
0038 //              ---------------------
0039 
0040 class L1MuBMSecProcMap {
0041 public:
0042   typedef std::map<L1MuBMSecProcId, std::unique_ptr<L1MuBMSectorProcessor>, std::less<L1MuBMSecProcId> > SPmap;
0043   typedef SPmap::iterator SPmap_iter;
0044 
0045   /// constructor
0046   L1MuBMSecProcMap();
0047 
0048   /// return pointer to Sector Processor
0049   L1MuBMSectorProcessor* sp(const L1MuBMSecProcId&) const;
0050 
0051   /// insert a Sector Processor into the container
0052   void insert(const L1MuBMSecProcId&, std::unique_ptr<L1MuBMSectorProcessor> sp);
0053 
0054   /// return number of entries present in the container
0055   inline int size() const { return m_map.size(); }
0056 
0057   /// return iterator which points to the first entry of the container
0058   inline SPmap_iter begin() { return m_map.begin(); }
0059 
0060   /// return iterator which points to the one-past-last entry of the container
0061   inline SPmap_iter end() { return m_map.end(); }
0062 
0063 private:
0064   SPmap m_map;
0065 };
0066 
0067 #endif