Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:30

0001 
0002 #include "CalibFormats/SiStripObjects/interface/NumberOfDevices.h"
0003 #include <iomanip>
0004 
0005 // -----------------------------------------------------------------------------
0006 //
0007 void NumberOfDevices::clear() {
0008   nFecCrates_ = 0;
0009   nFecSlots_ = 0;
0010   nFecRings_ = 0;
0011   nCcuAddrs_ = 0;
0012   nCcuChans_ = 0;
0013   nApvs_ = 0;
0014   nDcuIds_ = 0;
0015   nDetIds_ = 0;
0016   nApvPairs_ = 0;
0017   nApvPairs0_ = 0;
0018   nApvPairs1_ = 0;
0019   nApvPairs2_ = 0;
0020   nApvPairs3_ = 0;
0021   nApvPairsX_ = 0;
0022   nFedCrates_ = 0;
0023   nFedSlots_ = 0;
0024   nFedIds_ = 0;
0025   nFedChans_ = 0;
0026   nDcus_ = 0;
0027   nMuxes_ = 0;
0028   nPlls_ = 0;
0029   nLlds_ = 0;
0030 }
0031 
0032 // -----------------------------------------------------------------------------
0033 //
0034 void NumberOfDevices::print(std::stringstream &ss) const {
0035   ss << "  FEC crates   : " << nFecCrates_ << std::endl
0036      << "  FEC slots    : " << nFecSlots_ << std::endl
0037      << "  FEC rings    : " << nFecRings_ << std::endl
0038      << "  CCU addrs    : " << nCcuAddrs_ << std::endl
0039      << "  CCU chans    : " << nCcuChans_ << std::endl
0040      << "  DCU ids      : " << nDcuIds_ << std::endl
0041      << "  DCUs         : " << nDcus_ << std::endl
0042      << "  MUXes        : " << nMuxes_ << std::endl
0043      << "  PLLs         : " << nPlls_ << std::endl
0044      << "  LLDs         : " << nLlds_ << std::endl
0045      << "  DET ids      : " << nDetIds_ << std::endl
0046      << "  APV pairs    : " << nApvPairs_ << std::endl
0047      << "  APVs         : " << nApvs_ << std::endl
0048      << "  FED crates   : " << nFedCrates_ << std::endl
0049      << "  FED slots    : " << nFedSlots_ << std::endl
0050      << "  FED ids      : " << nFedIds_ << std::endl
0051      << "  FED channels : " << nFedChans_ << std::endl
0052      << "  Number of APV pairs (0/1/2/3/>3) per module     : " << nApvPairs0_ << "/" << nApvPairs1_ << "/"
0053      << nApvPairs2_ << "/" << nApvPairs3_ << "/" << nApvPairsX_ << std::endl
0054      << "  Total number of modules/channels (nApvPairs<=3) : "
0055      << (nApvPairs0_ + nApvPairs1_ + nApvPairs2_ + nApvPairs3_) << "/"
0056      << (0 * nApvPairs0_ + 1 * nApvPairs1_ + 2 * nApvPairs2_ + 3 * nApvPairs3_);
0057 }
0058 
0059 // -----------------------------------------------------------------------------
0060 //
0061 std::ostream &operator<<(std::ostream &os, const NumberOfDevices &devs) {
0062   std::stringstream ss;
0063   devs.print(ss);
0064   os << ss.str();
0065   return os;
0066 }