DQM
SiStripCommissioningSummary
src
VpspScanSummaryFactory.cc
Go to the documentation of this file.
1
#include "
DQM/SiStripCommissioningSummary/interface/VpspScanSummaryFactory.h
"
2
#include "
CondFormats/SiStripObjects/interface/VpspScanAnalysis.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
VpspScanSummaryFactory::extract
(
Iterator
iter) {
13
VpspScanAnalysis
*
anal
= dynamic_cast<VpspScanAnalysis*>(iter->second);
14
if
(!
anal
) {
15
return
;
16
}
17
18
std::vector<float>
value
(2, 1. *
sistrip::invalid_
);
19
std::vector<float>
error
(2, 1. *
sistrip::invalid_
);
20
21
bool
two =
true
;
22
if
(mon_ ==
sistrip::VPSP_SCAN_APV_SETTINGS
) {
23
value
[0] = 1. *
anal
->vpsp()[0];
24
value
[1] = 1. *
anal
->vpsp()[1];
25
}
else
if
(mon_ ==
sistrip::VPSP_SCAN_APV0_SETTING
) {
26
value
[0] = 1. *
anal
->vpsp()[0];
27
two =
false
;
28
}
else
if
(mon_ ==
sistrip::VPSP_SCAN_APV1_SETTING
) {
29
value
[0] = 1. *
anal
->vpsp()[1];
30
two =
false
;
31
}
else
if
(mon_ ==
sistrip::VPSP_SCAN_ADC_LEVEL
) {
32
value
[0] = 1. *
anal
->adcLevel()[0];
33
value
[1] = 1. *
anal
->adcLevel()[1];
34
}
else
if
(mon_ ==
sistrip::VPSP_SCAN_DIGITAL_HIGH
) {
35
value
[0] = 1. *
anal
->topLevel()[0];
36
value
[1] = 1. *
anal
->topLevel()[1];
37
}
else
if
(mon_ ==
sistrip::VPSP_SCAN_DIGITAL_LOW
) {
38
value
[0] = 1. *
anal
->bottomLevel()[0];
39
value
[1] = 1. *
anal
->bottomLevel()[1];
40
}
else
{
41
edm::LogWarning
(
mlSummaryPlots_
) <<
"[SummaryPlotFactory::"
<< __func__ <<
"]"
42
<<
" Unexpected monitorable: "
43
<<
SiStripEnumsAndStrings::monitorable
(
SummaryPlotFactoryBase::mon_
);
44
return
;
45
}
46
47
SummaryPlotFactoryBase::generator_
->
fillMap
(
48
SummaryPlotFactoryBase::level_
,
SummaryPlotFactoryBase::gran_
, iter->first,
value
[0],
error
[0]);
49
50
if
(two) {
51
SummaryPlotFactoryBase::generator_
->
fillMap
(
52
SummaryPlotFactoryBase::level_
,
SummaryPlotFactoryBase::gran_
, iter->first,
value
[1],
error
[1]);
53
}
54
}
55
56
// -----------------------------------------------------------------------------
57
//
58
void
VpspScanSummaryFactory::format
() {
59
if
(mon_ ==
sistrip::VPSP_SCAN_APV_SETTINGS
) {
60
}
else
if
(mon_ ==
sistrip::VPSP_SCAN_APV0_SETTING
) {
61
}
else
if
(mon_ ==
sistrip::VPSP_SCAN_APV1_SETTING
) {
62
}
else
if
(mon_ ==
sistrip::VPSP_SCAN_ADC_LEVEL
) {
63
}
else
if
(mon_ ==
sistrip::VPSP_SCAN_DIGITAL_HIGH
) {
64
}
else
if
(mon_ ==
sistrip::VPSP_SCAN_DIGITAL_LOW
) {
65
}
else
{
66
edm::LogWarning
(
mlSummaryPlots_
) <<
"[SummaryPlotFactory::"
<< __func__ <<
"]"
67
<<
" Unexpected SummaryHisto value: "
68
<<
SiStripEnumsAndStrings::monitorable
(
SummaryPlotFactoryBase::mon_
);
69
}
70
}
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
VpspScanSummaryFactory::format
void format() override
Definition:
VpspScanSummaryFactory.cc:58
VpspScanSummaryFactory::extract
void extract(Iterator) override
Definition:
VpspScanSummaryFactory.cc:12
MessageLogger.h
SummaryPlotFactoryBase::mon_
sistrip::Monitorable mon_
Definition:
SummaryPlotFactoryBase.h:25
Iterator
Definition:
DQMStoreStats.h:94
relativeConstraints.error
error
Definition:
relativeConstraints.py:53
SummaryPlotFactoryBase::level_
std::string level_
Definition:
SummaryPlotFactoryBase.h:28
sistrip::VPSP_SCAN_DIGITAL_HIGH
Definition:
ConstantsForMonitorable.h:246
sistrip::VPSP_SCAN_APV1_SETTING
Definition:
ConstantsForMonitorable.h:244
sistrip::VPSP_SCAN_ADC_LEVEL
Definition:
ConstantsForMonitorable.h:245
sistrip::VPSP_SCAN_APV_SETTINGS
Definition:
ConstantsForMonitorable.h:242
edm::LogWarning
Definition:
MessageLogger.h:141
SummaryPlotFactoryBase::generator_
SummaryGenerator * generator_
Definition:
SummaryPlotFactoryBase.h:32
value
Definition:
value.py:1
sistrip::invalid_
static const uint16_t invalid_
Definition:
Constants.h:16
SiStripEnumsAndStrings::monitorable
static std::string monitorable(const sistrip::Monitorable &)
Definition:
SiStripEnumsAndStrings.cc:547
SummaryPlotFactoryBase::gran_
sistrip::Granularity gran_
Definition:
SummaryPlotFactoryBase.h:29
sistrip::mlSummaryPlots_
static const char mlSummaryPlots_[]
Definition:
ConstantsForLogger.h:26
relativeConstraints.value
value
Definition:
relativeConstraints.py:53
SiStripEnumsAndStrings.h
VpspScanAnalysis
Histogram-based analysis for VPSP scan.
Definition:
VpspScanAnalysis.h:15
sistrip
sistrip classes
Definition:
SiStripQualityHelpers.h:14
sistrip::VPSP_SCAN_DIGITAL_LOW
Definition:
ConstantsForMonitorable.h:247
conversion_template_cfg.anal
anal
Definition:
conversion_template_cfg.py:16
sistrip::VPSP_SCAN_APV0_SETTING
Definition:
ConstantsForMonitorable.h:243
VpspScanAnalysis.h
VpspScanSummaryFactory.h
Generated for CMSSW Reference Manual by
1.8.16