CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/CalibFormats/SiStripObjects/src/SiStripRing.cc

Go to the documentation of this file.
00001 // Last commit: $Id: SiStripRing.cc,v 1.7 2008/01/22 18:44:27 muzaffar Exp $
00002 
00003 #include "CalibFormats/SiStripObjects/interface/SiStripRing.h"
00004 #include <iostream>
00005 
00006 // -----------------------------------------------------------------------------
00007 //
00008 SiStripRing::SiStripRing( const FedChannelConnection& conn )
00009   : fecRing_( conn.fecRing() ), 
00010     ccus_()
00011 { 
00012   ccus_.reserve(256);
00013   addDevices( conn ); 
00014 }
00015 
00016 // -----------------------------------------------------------------------------
00017 //
00018 void SiStripRing::addDevices( const FedChannelConnection& conn ) {
00019   std::vector<SiStripCcu>::const_iterator iccu = ccus().begin();
00020   while ( iccu != ccus().end() && (*iccu).ccuAddr() != conn.ccuAddr() ) { iccu++; }
00021   if ( iccu == ccus().end() ) { 
00022     ccus_.push_back( SiStripCcu( conn ) ); 
00023   } else { 
00024     const_cast<SiStripCcu&>(*iccu).addDevices( conn ); 
00025   }
00026 }
00027