1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
#include "CondFormats/SiStripObjects/interface/CommissioningAnalysis.h"
#include "DataFormats/SiStripCommon/interface/SiStripHistoTitle.h"
#include "DataFormats/SiStripCommon/interface/SiStripEnumsAndStrings.h"
#include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
#include <iomanip>
// ----------------------------------------------------------------------------
//
CommissioningAnalysis::CommissioningAnalysis(const uint32_t& key, const std::string& my_name)
: fecKey_(key),
fedKey_(sistrip::invalid32_),
dcuId_(sistrip::invalid32_),
detId_(sistrip::invalid32_),
myName_(my_name),
errors_(VString(0, "")) {
;
}
// ----------------------------------------------------------------------------
//
CommissioningAnalysis::CommissioningAnalysis(const std::string& my_name)
: fecKey_(sistrip::invalid32_),
fedKey_(sistrip::invalid32_),
dcuId_(sistrip::invalid32_),
detId_(sistrip::invalid32_),
myName_(my_name),
errors_(VString(0, "")) {
;
}
// ----------------------------------------------------------------------------
//
void CommissioningAnalysis::header(std::stringstream& ss) const {
ss << "[" << myName() << "] Monitorables (65535 means \"invalid\"):" << std::endl;
//summary(ss);
SiStripFecKey fec_key(fecKey_);
ss << " Crate/FEC/Ring/CCU/Mod/LLD : " << fec_key.fecCrate() << "/" << fec_key.fecSlot() << "/"
<< fec_key.fecRing() << "/" << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << "/" << fec_key.lldChan()
<< std::endl;
SiStripFedKey fed_key(fedKey_);
ss << " FedId/FeUnit/FeChan/FedChannel : " << fed_key.fedId() << "/" << fed_key.feUnit() << "/" << fed_key.feChan()
<< "/" << fed_key.fedChannel() << std::endl;
// if ( fed_key.fedChannel() != sistrip::invalid_ ) { ss << fed_key.fedChannel(); }
// else { ss << "(invalid)"; }
// ss << std::endl;
// ss << " FecKey/Fedkey (hex) : 0x"
// << std::hex
// << std::setw(8) << std::setfill('0') << fecKey_
// << " / 0x"
// << std::setw(8) << std::setfill('0') << fedKey_
// << std::dec
// << std::endl;
ss << " FecKey (hex/dec) : 0x" << std::hex << std::setw(8) << std::setfill('0') << fecKey_ << " / "
<< std::dec << std::setw(10) << std::setfill(' ') << fecKey_ << std::endl;
ss << " FedKey (hex/dec) : 0x" << std::hex << std::setw(8) << std::setfill('0') << fedKey_ << " / "
<< std::dec << std::setw(10) << std::setfill(' ') << fedKey_ << std::endl;
ss << " DcuId (hex/dec) : 0x" << std::hex << std::setw(8) << std::setfill('0') << dcuId_ << " / "
<< std::dec << std::setw(10) << std::setfill(' ') << dcuId_ << std::endl;
ss << " DetId (hex/dec) : 0x" << std::hex << std::setw(8) << std::setfill('0') << detId_ << " / "
<< std::dec << std::setw(10) << std::setfill(' ') << detId_ << std::endl;
}
// ----------------------------------------------------------------------------
//
void CommissioningAnalysis::summary(std::stringstream& ss) const {
SiStripFecKey fec_key(fecKey_);
sistrip::RunType type = SiStripEnumsAndStrings::runType(myName());
std::string title =
SiStripHistoTitle(sistrip::EXPERT_HISTO, type, sistrip::FED_KEY, fedKey(), sistrip::LLD_CHAN, fec_key.lldChan())
.title();
ss << " Summary"
<< ":" << (isValid() ? "Valid" : "Invalid") << ":" << sistrip::controlView_ << ":" << fec_key.fecCrate() << "/"
<< fec_key.fecSlot() << "/" << fec_key.fecRing() << "/" << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << ":"
<< sistrip::dqmRoot_ << sistrip::dir_ << "Collate" << sistrip::dir_
<< SiStripFecKey(fec_key.fecCrate(), fec_key.fecSlot(), fec_key.fecRing(), fec_key.ccuAddr(), fec_key.ccuChan())
.path()
<< ":" << title << std::endl;
}
|