CondFormats
SiStripObjects
src
FedCablingAnalysis.cc
Go to the documentation of this file.
1
#include "
CondFormats/SiStripObjects/interface/FedCablingAnalysis.h
"
2
#include "
DataFormats/SiStripCommon/interface/SiStripHistoTitle.h
"
3
#include "
DataFormats/SiStripCommon/interface/SiStripEnumsAndStrings.h
"
4
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
5
#include <iostream>
6
#include <sstream>
7
#include <iomanip>
8
#include <cmath>
9
10
using namespace
sistrip
;
11
12
// ----------------------------------------------------------------------------
13
//
14
const
float
FedCablingAnalysis::threshold_
= 100.;
// [ADC]
15
16
// ----------------------------------------------------------------------------
17
//
18
FedCablingAnalysis::FedCablingAnalysis
(
const
uint32_t&
key
)
19
:
CommissioningAnalysis
(
key
,
sistrip
::
fedCablingAnalysis_
),
20
fedId_(
sistrip
::
invalid_
),
21
fedCh_(
sistrip
::
invalid_
),
22
adcLevel_(1. *
sistrip
::
invalid_
),
23
candidates_() {
24
;
25
}
26
27
// ----------------------------------------------------------------------------
28
//
29
FedCablingAnalysis::FedCablingAnalysis
()
30
:
CommissioningAnalysis
(
sistrip
::
fedCablingAnalysis_
),
31
fedId_(
sistrip
::
invalid_
),
32
fedCh_(
sistrip
::
invalid_
),
33
adcLevel_(1. *
sistrip
::
invalid_
),
34
candidates_() {
35
;
36
}
37
38
// ----------------------------------------------------------------------------
39
//
40
void
FedCablingAnalysis::reset
() {
41
fedId_
=
sistrip::invalid_
;
42
fedCh_
=
sistrip::invalid_
;
43
adcLevel_
= 1. *
sistrip::invalid_
;
44
candidates_
.clear();
45
}
46
47
// ----------------------------------------------------------------------------
48
//
49
bool
FedCablingAnalysis::isValid
()
const
{
50
return
(
fedId_
<
sistrip::maximum_
&&
fedCh_
<
sistrip::maximum_
&&
adcLevel_
< 1 +
sistrip::maximum_
&&
51
!
candidates_
.empty() &&
getErrorCodes
().empty());
52
}
53
54
// ----------------------------------------------------------------------------
55
//
56
void
FedCablingAnalysis::print
(std::stringstream&
ss
, uint32_t not_used) {
57
header
(
ss
);
58
ss
<<
std::fixed
<< std::setprecision(2) <<
" Connected FED id : "
<<
fedId_
<< std::endl
59
<<
" Connected FED channel : "
<<
fedCh_
<< std::endl
60
<<
" Signal level [ADC] : "
<<
adcLevel_
<< std::endl;
61
ss
<<
" nCandidates : "
<<
candidates_
.size() << std::endl <<
" FedId/FedChannel/ADC) : "
;
62
if
(
candidates_
.empty()) {
63
ss
<<
"(none)"
;
64
}
else
{
65
Candidates::const_iterator iter;
66
for
(iter =
candidates_
.begin(); iter !=
candidates_
.end(); iter++) {
67
SiStripFedKey
path
(iter->first);
68
ss
<<
path
.fedId() <<
"/"
<<
path
.fedChannel() <<
"/"
<< iter->second <<
" "
;
69
}
70
}
71
ss
<< std::endl;
72
ss
<< std::boolalpha <<
" isValid : "
<<
isValid
() << std::endl
73
<< std::noboolalpha <<
" Error codes (found "
<< std::setw(2) << std::setfill(
' '
) <<
getErrorCodes
().size()
74
<<
") : "
;
75
if
(
getErrorCodes
().
empty
()) {
76
ss
<<
"(none)"
;
77
}
else
{
78
VString::const_iterator istr =
getErrorCodes
().begin();
79
VString::const_iterator jstr =
getErrorCodes
().end();
80
for
(; istr != jstr; ++istr) {
81
ss
<< *istr <<
" "
;
82
}
83
}
84
ss
<< std::endl;
85
}
CommissioningAnalysis::getErrorCodes
const VString & getErrorCodes() const
Definition:
CommissioningAnalysis.h:131
FedCablingAnalysis::adcLevel_
float adcLevel_
Definition:
FedCablingAnalysis.h:71
alignBH_cfg.fixed
fixed
Definition:
alignBH_cfg.py:54
FedCablingAnalysis::threshold_
static const float threshold_
Definition:
FedCablingAnalysis.h:59
FedCablingAnalysis::print
void print(std::stringstream &, uint32_t not_used=0) override
Definition:
FedCablingAnalysis.cc:56
MessageLogger.h
FedCablingAnalysis::fedId_
uint16_t fedId_
Definition:
FedCablingAnalysis.h:65
FedCablingAnalysis::fedCh_
uint16_t fedCh_
Definition:
FedCablingAnalysis.h:68
FedCablingAnalysis::FedCablingAnalysis
FedCablingAnalysis()
Definition:
FedCablingAnalysis.cc:29
SiStripFedKey
A container class for generic run and event-related info, information required by the commissioning a...
Definition:
SiStripFedKey.h:56
contentValuesCheck.ss
ss
Definition:
contentValuesCheck.py:33
CommissioningAnalysis::header
virtual void header(std::stringstream &) const
Definition:
CommissioningAnalysis.cc:33
FedCablingAnalysis::isValid
bool isValid() const override
Definition:
FedCablingAnalysis.cc:49
FedCablingAnalysis::candidates_
Candidates candidates_
Definition:
FedCablingAnalysis.h:74
sistrip::maximum_
static const uint16_t maximum_
Definition:
Constants.h:20
sistrip::invalid_
static const uint16_t invalid_
Definition:
Constants.h:16
CommissioningAnalysis
Abstract base for derived classes that provide analysis of commissioning histograms.
Definition:
CommissioningAnalysis.h:18
SiStripEnumsAndStrings.h
relativeConstraints.empty
bool empty
Definition:
relativeConstraints.py:46
SiStripHistoTitle.h
castor_dqm_sourceclient_file_cfg.path
path
Definition:
castor_dqm_sourceclient_file_cfg.py:37
sistrip
sistrip classes
Definition:
EnsembleCalibrationLA.cc:10
FedCablingAnalysis::reset
void reset() override
Definition:
FedCablingAnalysis.cc:40
crabWrapper.key
key
Definition:
crabWrapper.py:19
sistrip::fedCablingAnalysis_
static const char fedCablingAnalysis_[]
Definition:
ConstantsForCommissioningAnalysis.h:32
FedCablingAnalysis.h
Generated for CMSSW Reference Manual by
1.8.16