CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/CalibFormats/SiStripObjects/src/SiStripFecCrate.cc

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