CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/CondFormats/RPCObjects/src/LinkConnSpec.cc

Go to the documentation of this file.
00001 #include "CondFormats/RPCObjects/interface/LinkConnSpec.h"
00002 #include <sstream>
00003 
00004 std::string LinkConnSpec::print(int depth) const
00005 {
00006   std::ostringstream str;
00007   str << "LinkConnSpec number="<<theTriggerBoardInputNumber<<std::endl;
00008   depth--;
00009   if (depth >= 0) {
00010     typedef std::vector<LinkBoardSpec>::const_iterator ILB;
00011     for (ILB it = theLBs.begin(); it != theLBs.end(); it++) str << (*it).print(depth);  
00012   }
00013   return str.str();
00014 }
00015 
00016 void LinkConnSpec::add(const LinkBoardSpec & lb) 
00017 { 
00018   theLBs.push_back(lb); 
00019 }
00020 
00021 const LinkBoardSpec * LinkConnSpec::linkBoard( int linkBoardNumInLink) const
00022 {
00023   //FIXME - temporary implementaion, to be replace by LUT (in preparation)
00024   typedef std::vector<LinkBoardSpec>::const_iterator IT;
00025   for (IT it=theLBs.begin(); it != theLBs.end(); it++) {
00026     if(linkBoardNumInLink==it->linkBoardNumInLink()) return &(*it);
00027   }
00028   return 0;
00029 }
00030