CondFormats
DTObjects
src
DTRecoUncertainties.cc
Go to the documentation of this file.
1
2
/*
3
* See header file for a description of this class.
4
*
5
* \author G. Cerminara - CERN
6
*/
7
8
#include "
CondFormats/DTObjects/interface/DTRecoUncertainties.h
"
9
#include "
DataFormats/MuonDetId/src/DTWireId.cc
"
10
#include <iostream>
11
12
using
std::cout
;
13
using
std::endl;
14
using
std::map
;
15
using
std::vector
;
16
17
DTRecoUncertainties::DTRecoUncertainties
() {}
18
19
DTRecoUncertainties::~DTRecoUncertainties
() {}
20
21
float
DTRecoUncertainties::get
(
const
DTWireId
& wireid,
unsigned
int
index
)
const
{
22
// FIXME: what to do in case the superlayerId is not found in the map?
23
// FIXME: any check on the type?
24
map<uint32_t, vector<float> >
::const_iterator
slIt =
payload
.find(wireid.
superlayerId
().
rawId
());
25
if
(slIt ==
payload
.end()) {
26
cout
<<
"[DTRecoUncertainties]***Error: the SLId: "
<< wireid.
superlayerId
() <<
" is not in the paylaod map!"
27
<< endl;
28
// FIXME: what to do here???
29
return
-1.;
30
}
else
if
(
vector<float>::size_type
(
index
) >= (*slIt).second.size()) {
31
cout
<<
"[DTRecoUncertainties]***Error: requesting parameter index: "
<<
index
<<
" for vector of size "
32
<< (*slIt).second.size() << endl;
33
// FIXME: what to do here???
34
return
-1.;
35
}
36
37
return
(*slIt).second[
index
];
38
}
39
40
void
DTRecoUncertainties::set
(
const
DTWireId
& wireid,
const
std::vector<float>&
values
) {
41
payload
[wireid.
superlayerId
()] =
values
;
42
}
43
44
DTRecoUncertainties::const_iterator
DTRecoUncertainties::begin
()
const
{
return
payload
.begin(); }
45
46
DTRecoUncertainties::const_iterator
DTRecoUncertainties::end
()
const
{
return
payload
.end(); }
DTRecoUncertainties::const_iterator
std::map< uint32_t, std::vector< float > >::const_iterator const_iterator
Access methods to data.
Definition:
DTRecoUncertainties.h:40
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
DTRecoUncertainties::payload
std::map< uint32_t, std::vector< float > > payload
Definition:
DTRecoUncertainties.h:47
DTRecoUncertainties::get
float get(const DTWireId &wireid, unsigned int index) const
get the uncertainties for the SL correspoding to the given WireId and for the correct step as defined...
Definition:
DTRecoUncertainties.cc:21
DTWireId.cc
trigger::size_type
uint16_t size_type
Definition:
TriggerTypeDefs.h:18
DTRecoUncertainties::set
void set(const DTWireId &wireid, const std::vector< float > &values)
fills the map
Definition:
DTRecoUncertainties.cc:40
DTWireId
Definition:
DTWireId.h:12
contentValuesCheck.values
values
Definition:
contentValuesCheck.py:38
DTRecoUncertainties::end
const_iterator end() const
Definition:
DTRecoUncertainties.cc:46
DTRecoUncertainties::DTRecoUncertainties
DTRecoUncertainties()
Constructor.
Definition:
DTRecoUncertainties.cc:17
trackerHitRTTI::vector
Definition:
trackerHitRTTI.h:21
DTRecoUncertainties::~DTRecoUncertainties
virtual ~DTRecoUncertainties()
Destructor.
Definition:
DTRecoUncertainties.cc:19
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition:
DetId.h:57
DTLayerId::superlayerId
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition:
DTLayerId.h:45
AlignmentPI::index
index
Definition:
AlignmentPayloadInspectorHelper.h:46
genParticles_cff.map
map
Definition:
genParticles_cff.py:11
DTRecoUncertainties.h
DTRecoUncertainties::begin
const_iterator begin() const
Definition:
DTRecoUncertainties.cc:44
Generated for CMSSW Reference Manual by
1.8.16