CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/CalibFormats/SiStripObjects/src/SiStripCcu.cc

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