Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:31

0001 #include "CondFormats/RPCObjects/interface/LinkConnSpec.h"
0002 #include <sstream>
0003 
0004 std::string LinkConnSpec::print(int depth) const {
0005   std::ostringstream str;
0006   str << "LinkConnSpec number=" << theTriggerBoardInputNumber << std::endl;
0007   depth--;
0008   if (depth >= 0) {
0009     typedef std::vector<LinkBoardSpec>::const_iterator ILB;
0010     for (ILB it = theLBs.begin(); it != theLBs.end(); it++)
0011       str << (*it).print(depth);
0012   }
0013   return str.str();
0014 }
0015 
0016 void LinkConnSpec::add(const LinkBoardSpec& lb) { theLBs.push_back(lb); }
0017 
0018 const LinkBoardSpec* LinkConnSpec::linkBoard(int linkBoardNumInLink) const {
0019   //FIXME - temporary implementaion, to be replace by LUT (in preparation)
0020   typedef std::vector<LinkBoardSpec>::const_iterator IT;
0021   for (IT it = theLBs.begin(); it != theLBs.end(); it++) {
0022     if (linkBoardNumInLink == it->linkBoardNumInLink())
0023       return &(*it);
0024   }
0025   return nullptr;
0026 }