CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/CalibFormats/SiStripObjects/src/NumberOfDevices.cc

Go to the documentation of this file.
00001 // Last commit: $Id: NumberOfDevices.cc,v 1.10 2007/12/19 17:51:54 bainbrid Exp $
00002 
00003 #include "CalibFormats/SiStripObjects/interface/NumberOfDevices.h"
00004 #include <iomanip>
00005 
00006 // -----------------------------------------------------------------------------
00007 //
00008 void NumberOfDevices::clear() {
00009   nFecCrates_ = 0;
00010   nFecSlots_ = 0;
00011   nFecRings_ = 0;
00012   nCcuAddrs_ = 0;
00013   nCcuChans_ = 0;
00014   nApvs_ = 0;
00015   nDcuIds_ = 0;
00016   nDetIds_ = 0;
00017   nApvPairs_ = 0;
00018   nApvPairs0_ = 0; 
00019   nApvPairs1_ = 0; 
00020   nApvPairs2_ = 0; 
00021   nApvPairs3_ = 0;
00022   nApvPairsX_ = 0;
00023   nFedCrates_ = 0;
00024   nFedSlots_ = 0;
00025   nFedIds_ = 0;
00026   nFedChans_ = 0;
00027   nDcus_ = 0;
00028   nMuxes_ = 0;
00029   nPlls_ = 0;
00030   nLlds_ = 0;
00031 }
00032 
00033 // -----------------------------------------------------------------------------
00034 //
00035 void NumberOfDevices::print( std::stringstream& ss ) const {
00036   ss << "  FEC crates   : " << nFecCrates_ << std::endl
00037      << "  FEC slots    : " << nFecSlots_ << std::endl
00038      << "  FEC rings    : " << nFecRings_ << std::endl
00039      << "  CCU addrs    : " << nCcuAddrs_ << std::endl
00040      << "  CCU chans    : " << nCcuChans_ << std::endl
00041      << "  DCU ids      : " << nDcuIds_ << std::endl
00042      << "  DCUs         : " << nDcus_ << std::endl
00043      << "  MUXes        : " << nMuxes_ << std::endl
00044      << "  PLLs         : " << nPlls_ << std::endl
00045      << "  LLDs         : " << nLlds_ << std::endl
00046      << "  DET ids      : " << nDetIds_ << std::endl
00047      << "  APV pairs    : " << nApvPairs_ << std::endl
00048      << "  APVs         : " << nApvs_ << std::endl
00049      << "  FED crates   : " << nFedCrates_ << std::endl
00050      << "  FED slots    : " << nFedSlots_ << std::endl
00051      << "  FED ids      : " << nFedIds_ << std::endl
00052      << "  FED channels : " << nFedChans_ << std::endl
00053      << "  Number of APV pairs (0/1/2/3/>3) per module     : " 
00054      << nApvPairs0_ << "/" 
00055      << nApvPairs1_ << "/"
00056      << nApvPairs2_ << "/"
00057      << nApvPairs3_ << "/"
00058      << nApvPairsX_ << std::endl
00059      << "  Total number of modules/channels (nApvPairs<=3) : " 
00060      << ( nApvPairs0_ + nApvPairs1_ + nApvPairs2_ + nApvPairs3_ ) << "/"
00061      << ( 0*nApvPairs0_ + 1*nApvPairs1_ + 2*nApvPairs2_ + 3*nApvPairs3_ );
00062 }
00063   
00064 // -----------------------------------------------------------------------------
00065 //
00066 std::ostream& operator<< ( std::ostream& os, const NumberOfDevices& devs ) {
00067   std::stringstream ss;
00068   devs.print(ss);
00069   os << ss.str();
00070   return os;
00071 }