CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LinkConnSpec.cc
Go to the documentation of this file.
2 #include <sstream>
3 
5 {
6  std::ostringstream str;
7  str << "LinkConnSpec number="<<theTriggerBoardInputNumber<<std::endl;
8  depth--;
9  if (depth >= 0) {
10  typedef std::vector<LinkBoardSpec>::const_iterator ILB;
11  for (ILB it = theLBs.begin(); it != theLBs.end(); it++) str << (*it).print(depth);
12  }
13  return str.str();
14 }
15 
17 {
18  theLBs.push_back(lb);
19 }
20 
21 const LinkBoardSpec * LinkConnSpec::linkBoard( int linkBoardNumInLink) const
22 {
23  //FIXME - temporary implementaion, to be replace by LUT (in preparation)
24  typedef std::vector<LinkBoardSpec>::const_iterator IT;
25  for (IT it=theLBs.begin(); it != theLBs.end(); it++) {
26  if(linkBoardNumInLink==it->linkBoardNumInLink()) return &(*it);
27  }
28  return 0;
29 }
30 
const LinkBoardSpec * linkBoard(int linkBoardNumInLink) const
LB served by this link, identified by its position in link.
Definition: LinkConnSpec.cc:21
void add(const LinkBoardSpec &lb)
attach LinkBoard to this link
Definition: LinkConnSpec.cc:16
int theTriggerBoardInputNumber
Definition: LinkConnSpec.h:35
std::vector< LinkConnSpec >::const_iterator IT
std::string print(int depth=0) const
debud printaout, call its components with depth dectreased by one
Definition: LinkConnSpec.cc:4
std::vector< LinkBoardSpec > theLBs
Definition: LinkConnSpec.h:36