CMS 3D CMS Logo

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

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