CMS 3D CMS Logo

L1MuBMSecProcMap.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuBMSecProcMap
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 L1MuBMSecProcMap
37 //---------------------------------
38 
39 //----------------
40 // Constructors --
41 //----------------
42 
44 
45 //--------------
46 // Destructor --
47 //--------------
48 
50  SPmap_iter iter = m_map.begin();
51  while (iter != m_map.end()) {
52  delete (*iter).second;
53  iter++;
54  }
55  m_map.clear();
56 }
57 
58 //--------------
59 // Operations --
60 //--------------
61 
62 //
63 // return Sector Processor
64 //
66  SPmap::const_iterator it = m_map.find(id);
67  if (it == m_map.end()) {
68  // cerr << "Error: Sector Processor not in the map" << endl;
69  return nullptr;
70  }
71  return (*it).second;
72 }
73 
74 //
75 // insert Sector Processor into container
76 //
78  //SPmap::const_iterator it = m_map.find(id);
79  // if ( it != m_map.end() )
80  // cerr << "Error: More than one Sector Processor with same identifier"
81  // << endl;
82  m_map[id] = sp;
83 }
L1MuBMSecProcId
Definition: L1MuBMSecProcId.h:40
L1MuBMSecProcMap::insert
void insert(const L1MuBMSecProcId &, L1MuBMSectorProcessor *sp)
insert a Sector Processor into the container
Definition: L1MuBMSecProcMap.cc:77
L1MuBMSecProcMap::~L1MuBMSecProcMap
virtual ~L1MuBMSecProcMap()
destructor
Definition: L1MuBMSecProcMap.cc:49
L1MuBMSectorProcessor
Definition: L1MuBMSectorProcessor.h:54
L1MuBMSecProcMap::L1MuBMSecProcMap
L1MuBMSecProcMap()
constructor
Definition: L1MuBMSecProcMap.cc:43
L1MuBMSecProcId.h
L1MuBMSecProcMap::sp
L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
return pointer to Sector Processor
Definition: L1MuBMSecProcMap.cc:65
std
Definition: JetResolutionObject.h:76
L1MuBMSecProcMap::m_map
SPmap m_map
Definition: L1MuBMSecProcMap.h:66
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
L1MuBMSecProcMap::SPmap_iter
SPmap::iterator SPmap_iter
Definition: L1MuBMSecProcMap.h:42
L1MuBMSecProcMap.h
L1MuBMSectorProcessor.h