Main Page
Namespaces
Classes
Package Documentation
L1Trigger
L1TMuonBarrel
src
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
18
#include "
L1Trigger/L1TMuonBarrel/src/L1MuBMSecProcMap.h
"
19
20
//---------------
21
// C++ Headers --
22
//---------------
23
24
#include <iostream>
25
26
//-------------------------------
27
// Collaborating Class Headers --
28
//-------------------------------
29
30
#include "
DataFormats/L1TMuon/interface/BMTF/L1MuBMSecProcId.h
"
31
#include "
L1Trigger/L1TMuonBarrel/src/L1MuBMSectorProcessor.h
"
32
33
using namespace
std
;
34
35
// --------------------------------
36
// class L1MuBMSecProcMap
37
//---------------------------------
38
39
//----------------
40
// Constructors --
41
//----------------
42
43
L1MuBMSecProcMap::L1MuBMSecProcMap
() : m_map() {}
44
45
//--------------
46
// Destructor --
47
//--------------
48
49
L1MuBMSecProcMap::~L1MuBMSecProcMap
() {
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
//
68
L1MuBMSectorProcessor
*
L1MuBMSecProcMap::sp
(
const
L1MuBMSecProcId
&
id
)
const
{
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
nullptr
;
74
}
75
return
(*it).second;
76
77
}
78
79
80
//
81
// insert Sector Processor into container
82
//
83
void
L1MuBMSecProcMap::insert
(
const
L1MuBMSecProcId
&
id
,
L1MuBMSectorProcessor
*
sp
) {
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
}
L1MuBMSecProcMap::sp
L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
return pointer to Sector Processor
Definition:
L1MuBMSecProcMap.cc:68
L1MuBMSectorProcessor.h
L1MuBMSecProcId
Definition:
L1MuBMSecProcId.h:41
L1MuBMSecProcMap::L1MuBMSecProcMap
L1MuBMSecProcMap()
constructor
Definition:
L1MuBMSecProcMap.cc:43
L1MuBMSecProcMap::m_map
SPmap m_map
Definition:
L1MuBMSecProcMap.h:69
L1MuBMSectorProcessor
Definition:
L1MuBMSectorProcessor.h:54
L1MuBMSecProcMap::SPmap_iter
SPmap::iterator SPmap_iter
Definition:
L1MuBMSecProcMap.h:44
std
Definition:
JetResolutionObject.h:76
L1MuBMSecProcMap.h
L1MuBMSecProcId.h
triggerObjects_cff.id
id
Definition:
triggerObjects_cff.py:28
L1MuBMSecProcMap::insert
void insert(const L1MuBMSecProcId &, L1MuBMSectorProcessor *sp)
insert a Sector Processor into the container
Definition:
L1MuBMSecProcMap.cc:83
L1MuBMSecProcMap::~L1MuBMSecProcMap
virtual ~L1MuBMSecProcMap()
destructor
Definition:
L1MuBMSecProcMap.cc:49
Generated for CMSSW Reference Manual by
1.8.11