CMS 3D CMS Logo

FedCablingAnalysis.cc
Go to the documentation of this file.
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 //
20  fedId_(sistrip::invalid_),
21  fedCh_(sistrip::invalid_),
22  adcLevel_(1. * sistrip::invalid_),
23  candidates_() {
24  ;
25 }
26 
27 // ----------------------------------------------------------------------------
28 //
31  fedId_(sistrip::invalid_),
32  fedCh_(sistrip::invalid_),
33  adcLevel_(1. * sistrip::invalid_),
34  candidates_() {
35  ;
36 }
37 
38 // ----------------------------------------------------------------------------
39 //
44  candidates_.clear();
45 }
46 
47 // ----------------------------------------------------------------------------
48 //
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 }
const VString & getErrorCodes() const
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
static const char fedCablingAnalysis_[]
void print(std::stringstream &, uint32_t not_used=0) override
static const float threshold_
sistrip classes
bool isValid() const override
static const uint16_t maximum_
Definition: Constants.h:20
key
prepare the HTCondor submission files and eventually submit them
void reset() override
static const uint16_t invalid_
Definition: Constants.h:16
virtual void header(std::stringstream &) const
Abstract base for derived classes that provide analysis of commissioning histograms.