DQM
SiStripCommissioningSummary
src
OptoScanSummaryFactory.cc
Go to the documentation of this file.
1
#include "
DQM/SiStripCommissioningSummary/interface/OptoScanSummaryFactory.h
"
2
#include "
CondFormats/SiStripObjects/interface/OptoScanAnalysis.h
"
3
#include "
DataFormats/SiStripCommon/interface/SiStripEnumsAndStrings.h
"
4
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
5
#include <iostream>
6
#include <sstream>
7
8
using namespace
sistrip
;
9
10
// -----------------------------------------------------------------------------
11
//
12
void
OptoScanSummaryFactory::extract
(
Iterator
iter) {
13
OptoScanAnalysis
*
anal
=
dynamic_cast<
OptoScanAnalysis
*
>
(iter->second);
14
if
(!
anal
) {
15
return
;
16
}
17
18
uint16_t igain =
anal
->gain();
19
if
(igain >
sistrip::valid_
) {
20
return
;
21
}
22
23
float
value
= 1. *
sistrip::invalid_
;
24
float
error
= 1. *
sistrip::invalid_
;
25
26
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_LLD_GAIN_SETTING
) {
27
value
= igain;
28
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_LLD_BIAS_SETTING
) {
29
value
=
anal
->bias()[igain];
30
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_MEASURED_GAIN
) {
31
value
=
anal
->measGain()[igain];
32
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_ZERO_LIGHT_LEVEL
) {
33
value
=
anal
->zeroLight()[igain];
34
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_LINK_NOISE
) {
35
value
=
anal
->linkNoise()[igain];
36
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_BASELINE_LIFT_OFF
) {
37
value
=
anal
->liftOff()[igain];
38
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_LASER_THRESHOLD
) {
39
value
=
anal
->threshold()[igain];
40
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_TICK_HEIGHT
) {
41
value
=
anal
->tickHeight()[igain];
42
}
else
{
43
edm::LogWarning
(
mlSummaryPlots_
) <<
"[SummaryPlotFactory::"
<< __func__ <<
"]"
44
<<
" Unexpected monitorable: "
45
<<
SiStripEnumsAndStrings::monitorable
(
SummaryPlotFactoryBase::mon_
);
46
return
;
47
}
48
49
SummaryPlotFactoryBase::generator_
->
fillMap
(
50
SummaryPlotFactoryBase::level_
,
SummaryPlotFactoryBase::gran_
, iter->first,
value
,
error
);
51
}
52
53
// -----------------------------------------------------------------------------
54
//
55
void
OptoScanSummaryFactory::format
() {
56
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_LLD_GAIN_SETTING
) {
57
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_LLD_BIAS_SETTING
) {
58
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_MEASURED_GAIN
) {
59
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_ZERO_LIGHT_LEVEL
) {
60
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_LINK_NOISE
) {
61
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_BASELINE_LIFT_OFF
) {
62
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_LASER_THRESHOLD
) {
63
}
else
if
(
SummaryPlotFactoryBase::mon_
==
sistrip::OPTO_SCAN_TICK_HEIGHT
) {
64
}
else
{
65
edm::LogWarning
(
mlSummaryPlots_
) <<
"[SummaryPlotFactory::"
<< __func__ <<
"]"
66
<<
" Unexpected SummaryHisto value:"
67
<<
SiStripEnumsAndStrings::monitorable
(
SummaryPlotFactoryBase::mon_
);
68
}
69
}
OptoScanAnalysis
Histogram-based analysis for opto bias/gain scan.
Definition:
OptoScanAnalysis.h:15
SiStripEnumsAndStrings::monitorable
static std::string monitorable(const sistrip::Monitorable &)
Definition:
SiStripEnumsAndStrings.cc:547
relativeConstraints.error
error
Definition:
relativeConstraints.py:53
SummaryPlotFactoryBase::mon_
sistrip::Monitorable mon_
Definition:
SummaryPlotFactoryBase.h:25
MessageLogger.h
SiStripEnumsAndStrings.h
sistrip::OPTO_SCAN_LASER_THRESHOLD
Definition:
ConstantsForMonitorable.h:239
OptoScanSummaryFactory::format
void format() override
Definition:
OptoScanSummaryFactory.cc:55
sistrip::OPTO_SCAN_TICK_HEIGHT
Definition:
ConstantsForMonitorable.h:240
sistrip::valid_
static const uint16_t valid_
Definition:
Constants.h:17
sistrip::OPTO_SCAN_MEASURED_GAIN
Definition:
ConstantsForMonitorable.h:235
sistrip
sistrip classes
Definition:
EnsembleCalibrationLA.cc:9
SummaryGenerator::fillMap
void fillMap(const std::string &top_level_dir, const sistrip::Granularity &, const uint32_t &key, const float &value, const float &error=0.)
Definition:
SummaryGenerator.cc:222
SummaryPlotFactoryBase::level_
std::string level_
Definition:
SummaryPlotFactoryBase.h:28
OptoScanAnalysis.h
sistrip::OPTO_SCAN_BASELINE_LIFT_OFF
Definition:
ConstantsForMonitorable.h:238
value
Definition:
value.py:1
SummaryPlotFactoryBase::gran_
sistrip::Granularity gran_
Definition:
SummaryPlotFactoryBase.h:29
sistrip::OPTO_SCAN_LINK_NOISE
Definition:
ConstantsForMonitorable.h:237
sistrip::OPTO_SCAN_LLD_GAIN_SETTING
Definition:
ConstantsForMonitorable.h:233
sistrip::mlSummaryPlots_
static const char mlSummaryPlots_[]
Definition:
ConstantsForLogger.h:26
OptoScanSummaryFactory::extract
void extract(Iterator) override
Definition:
OptoScanSummaryFactory.cc:12
Iterator
Definition:
DQMStoreStats.cc:107
SummaryPlotFactoryBase::generator_
SummaryGenerator * generator_
Definition:
SummaryPlotFactoryBase.h:32
sistrip::invalid_
static const uint16_t invalid_
Definition:
Constants.h:16
sistrip::OPTO_SCAN_LLD_BIAS_SETTING
Definition:
ConstantsForMonitorable.h:234
OptoScanSummaryFactory.h
conversion_template_cfg.anal
anal
Definition:
conversion_template_cfg.py:16
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition:
MessageLogger.h:122
sistrip::OPTO_SCAN_ZERO_LIGHT_LEVEL
Definition:
ConstantsForMonitorable.h:236
Generated for CMSSW Reference Manual by
1.8.14