CMS 3D CMS Logo

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  SPmap_iter iter = m_map.begin();
52  while ( iter != m_map.end() ) {
53  delete (*iter).second;
54  iter++;
55  }
56  m_map.clear();
57 
58 }
59 
60 
61 //--------------
62 // Operations --
63 //--------------
64 
65 //
66 // return Sector Processor
67 //
69 
70  SPmap::const_iterator it = m_map.find(id);
71  if ( it == m_map.end() ) {
72  // cerr << "Error: Sector Processor not in the map" << endl;
73  return 0;
74  }
75  return (*it).second;
76 
77 }
78 
79 
80 //
81 // insert Sector Processor into container
82 //
84 
85  //SPmap::const_iterator it = m_map.find(id);
86  // if ( it != m_map.end() )
87  // cerr << "Error: More than one Sector Processor with same identifier"
88  // << endl;
89  m_map[id] = sp;
90 
91 }
virtual ~L1MuDTSecProcMap()
destructor
L1MuDTSecProcMap()
constructor
void insert(const L1MuDTSecProcId &, L1MuDTSectorProcessor *sp)
insert a Sector Processor into the container
SPmap::iterator SPmap_iter
L1MuDTSectorProcessor * sp(const L1MuDTSecProcId &) const
return pointer to Sector Processor