CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuDTSecProcMap.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuDTSecProcMap
4 //
5 // Description: Sector Processor container
6 //
7 //
8 // $Date: 2011/12/21 08:39:04 $
9 // $Revision: 1.5 $
10 //
11 // Author :
12 // N. Neumeister CERN EP
13 //
14 //--------------------------------------------------
15 
16 //-----------------------
17 // This Class's Header --
18 //-----------------------
19 
21 
22 //---------------
23 // C++ Headers --
24 //---------------
25 
26 #include <iostream>
27 
28 //-------------------------------
29 // Collaborating Class Headers --
30 //-------------------------------
31 
34 
35 using namespace std;
36 
37 // --------------------------------
38 // class L1MuDTSecProcMap
39 //---------------------------------
40 
41 //----------------
42 // Constructors --
43 //----------------
44 
46 
47 //--------------
48 // Destructor --
49 //--------------
50 
52 
53  SPmap_iter iter = m_map.begin();
54  while ( iter != m_map.end() ) {
55  delete (*iter).second;
56  iter++;
57  }
58  m_map.clear();
59 
60 }
61 
62 
63 //--------------
64 // Operations --
65 //--------------
66 
67 //
68 // return Sector Processor
69 //
71 
72  SPmap::const_iterator it = m_map.find(id);
73  if ( it == m_map.end() ) {
74  // cerr << "Error: Sector Processor not in the map" << endl;
75  return 0;
76  }
77  return (*it).second;
78 
79 }
80 
81 
82 //
83 // insert Sector Processor into container
84 //
86 
87  //SPmap::const_iterator it = m_map.find(id);
88  // if ( it != m_map.end() )
89  // cerr << "Error: More than one Sector Processor with same identifier"
90  // << endl;
91  m_map[id] = sp;
92 
93 }
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