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