Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
// $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
20
#include "
L1Trigger/DTTrackFinder/src/L1MuDTSecProcMap.h
"
21
22
//---------------
23
// C++ Headers --
24
//---------------
25
26
#include <iostream>
27
28
//-------------------------------
29
// Collaborating Class Headers --
30
//-------------------------------
31
32
#include "
L1Trigger/DTTrackFinder/src/L1MuDTSecProcId.h
"
33
#include "
L1Trigger/DTTrackFinder/src/L1MuDTSectorProcessor.h
"
34
35
using namespace
std;
36
37
// --------------------------------
38
// class L1MuDTSecProcMap
39
//---------------------------------
40
41
//----------------
42
// Constructors --
43
//----------------
44
45
L1MuDTSecProcMap::L1MuDTSecProcMap
() : m_map() {}
46
47
//--------------
48
// Destructor --
49
//--------------
50
51
L1MuDTSecProcMap::~L1MuDTSecProcMap
() {
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
//
70
L1MuDTSectorProcessor
*
L1MuDTSecProcMap::sp
(
const
L1MuDTSecProcId
&
id
)
const
{
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
//
85
void
L1MuDTSecProcMap::insert
(
const
L1MuDTSecProcId
&
id
,
L1MuDTSectorProcessor
* sp) {
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
}
L1MuDTSectorProcessor.h
L1MuDTSecProcId.h
L1MuDTSecProcMap::~L1MuDTSecProcMap
virtual ~L1MuDTSecProcMap()
destructor
Definition:
L1MuDTSecProcMap.cc:51
errorMatrix2Lands_multiChannel.id
tuple id
Definition:
errorMatrix2Lands_multiChannel.py:151
L1MuDTSecProcId
Definition:
L1MuDTSecProcId.h:43
L1MuDTSecProcMap::L1MuDTSecProcMap
L1MuDTSecProcMap()
constructor
Definition:
L1MuDTSecProcMap.cc:45
L1MuDTSecProcMap.h
L1MuDTSectorProcessor
Definition:
L1MuDTSectorProcessor.h:54
L1MuDTSecProcMap::insert
void insert(const L1MuDTSecProcId &, L1MuDTSectorProcessor *sp)
insert a Sector Processor into the container
Definition:
L1MuDTSecProcMap.cc:85
L1MuDTSecProcMap::m_map
SPmap m_map
Definition:
L1MuDTSecProcMap.h:70
L1MuDTSecProcMap::SPmap_iter
SPmap::iterator SPmap_iter
Definition:
L1MuDTSecProcMap.h:45
L1MuDTSecProcMap::sp
L1MuDTSectorProcessor * sp(const L1MuDTSecProcId &) const
return pointer to Sector Processor
Definition:
L1MuDTSecProcMap.cc:70
Generated for CMSSW Reference Manual by
1.8.5