CMS 3D CMS Logo

NumberOfDevices.cc
Go to the documentation of this file.
1 
3 #include <iomanip>
4 
5 // -----------------------------------------------------------------------------
6 //
8  nFecCrates_ = 0;
9  nFecSlots_ = 0;
10  nFecRings_ = 0;
11  nCcuAddrs_ = 0;
12  nCcuChans_ = 0;
13  nApvs_ = 0;
14  nDcuIds_ = 0;
15  nDetIds_ = 0;
16  nApvPairs_ = 0;
17  nApvPairs0_ = 0;
18  nApvPairs1_ = 0;
19  nApvPairs2_ = 0;
20  nApvPairs3_ = 0;
21  nApvPairsX_ = 0;
22  nFedCrates_ = 0;
23  nFedSlots_ = 0;
24  nFedIds_ = 0;
25  nFedChans_ = 0;
26  nDcus_ = 0;
27  nMuxes_ = 0;
28  nPlls_ = 0;
29  nLlds_ = 0;
30 }
31 
32 // -----------------------------------------------------------------------------
33 //
34 void NumberOfDevices::print(std::stringstream &ss) const {
35  ss << " FEC crates : " << nFecCrates_ << std::endl
36  << " FEC slots : " << nFecSlots_ << std::endl
37  << " FEC rings : " << nFecRings_ << std::endl
38  << " CCU addrs : " << nCcuAddrs_ << std::endl
39  << " CCU chans : " << nCcuChans_ << std::endl
40  << " DCU ids : " << nDcuIds_ << std::endl
41  << " DCUs : " << nDcus_ << std::endl
42  << " MUXes : " << nMuxes_ << std::endl
43  << " PLLs : " << nPlls_ << std::endl
44  << " LLDs : " << nLlds_ << std::endl
45  << " DET ids : " << nDetIds_ << std::endl
46  << " APV pairs : " << nApvPairs_ << std::endl
47  << " APVs : " << nApvs_ << std::endl
48  << " FED crates : " << nFedCrates_ << std::endl
49  << " FED slots : " << nFedSlots_ << std::endl
50  << " FED ids : " << nFedIds_ << std::endl
51  << " FED channels : " << nFedChans_ << std::endl
52  << " Number of APV pairs (0/1/2/3/>3) per module : " << nApvPairs0_ << "/" << nApvPairs1_ << "/"
53  << nApvPairs2_ << "/" << nApvPairs3_ << "/" << nApvPairsX_ << std::endl
54  << " Total number of modules/channels (nApvPairs<=3) : "
56  << (0 * nApvPairs0_ + 1 * nApvPairs1_ + 2 * nApvPairs2_ + 3 * nApvPairs3_);
57 }
58 
59 // -----------------------------------------------------------------------------
60 //
61 std::ostream &operator<<(std::ostream &os, const NumberOfDevices &devs) {
62  std::stringstream ss;
63  devs.print(ss);
64  os << ss.str();
65  return os;
66 }
uint32_t nFecCrates_
void print(std::stringstream &) const
uint32_t nApvPairs3_
uint32_t nApvPairsX_
uint32_t nApvPairs0_
Simple container class for counting devices.
std::ostream & operator<<(std::ostream &os, const NumberOfDevices &devs)
uint32_t nApvPairs2_
uint32_t nApvPairs1_
uint32_t nFedCrates_