CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
L1MuDTSecProcMap.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuDTSecProcMap
4 //
5 // Description: Sector Processor container
6 //
7 //
8 //
9 // Author :
10 // N. Neumeister CERN EP
11 //
12 //--------------------------------------------------
13 
14 //-----------------------
15 // This Class's Header --
16 //-----------------------
17 
19 
20 //---------------
21 // C++ Headers --
22 //---------------
23 
24 #include <iostream>
25 
26 //-------------------------------
27 // Collaborating Class Headers --
28 //-------------------------------
29 
32 
33 using namespace std;
34 
35 // --------------------------------
36 // class L1MuDTSecProcMap
37 //---------------------------------
38 
39 //----------------
40 // Constructors --
41 //----------------
42 
44 
45 //--------------
46 // Destructor --
47 //--------------
48 
50 
51 //--------------
52 // Operations --
53 //--------------
54 
55 //
56 // return Sector Processor
57 //
59  SPmap::const_iterator it = m_map.find(id);
60  if (it == m_map.end()) {
61  // cerr << "Error: Sector Processor not in the map" << endl;
62  return nullptr;
63  }
64  return (*it).second.get();
65 }
66 
67 //
68 // insert Sector Processor into container
69 //
70 void L1MuDTSecProcMap::insert(const L1MuDTSecProcId& id, std::unique_ptr<L1MuDTSectorProcessor> sp) {
71  //SPmap::const_iterator it = m_map.find(id);
72  // if ( it != m_map.end() )
73  // cerr << "Error: More than one Sector Processor with same identifier"
74  // << endl;
75  m_map[id] = std::move(sp);
76 }
const L1MuDTSectorProcessor * sp(const L1MuDTSecProcId &) const
return pointer to Sector Processor
~L1MuDTSecProcMap()
destructor
L1MuDTSecProcMap()
constructor
void insert(const L1MuDTSecProcId &, std::unique_ptr< L1MuDTSectorProcessor > sp)
insert a Sector Processor into the container
def move(src, dest)
Definition: eostools.py:511