CMS 3D CMS Logo

TriggerBoardSpec.cc
Go to the documentation of this file.
2 #include <sstream>
3 #include <iostream>
4 
5 typedef std::vector<LinkConnSpec>::const_iterator IT;
6 
7 TriggerBoardSpec::TriggerBoardSpec(int num, uint32_t aMask) : theNum(num), theMaskedLinks(aMask) {}
8 
9 const LinkConnSpec* TriggerBoardSpec::linkConn(int tbInputNumber) const {
10  //FIXME - temporary implementaion, to be replace by LUT (in preparation)
11  for (IT it = theLinks.begin(); it != theLinks.end(); it++) {
12  if (tbInputNumber == it->triggerBoardInputNumber())
13  return &(*it);
14  }
15  return nullptr;
16 }
17 
18 std::vector<const LinkConnSpec*> TriggerBoardSpec::enabledLinkConns() const {
19  std::vector<const LinkConnSpec*> result;
20  for (IT it = theLinks.begin(); it != theLinks.end(); it++) {
21  //
22  // check that link is not masked!
23  // std::cout <<"masked links:"<<theMaskedLinks<<std::endl;
24  //
25  result.push_back(&(*it));
26  }
27  return result;
28 }
29 
31  std::ostringstream str;
32  str << "TriggerBoardSpec: num=" << dccInputChannelNum() << std::endl;
33  depth--;
34  if (depth >= 0) {
35  for (IT ic = theLinks.begin(); ic != theLinks.end(); ic++)
36  str << (*ic).print(depth);
37  }
38  return str.str();
39 }
40 
41 void TriggerBoardSpec::add(const LinkConnSpec& lc) { theLinks.push_back(lc); }
TriggerBoardSpec::enabledLinkConns
std::vector< const LinkConnSpec * > enabledLinkConns() const
not masked links belonging to this TB
Definition: TriggerBoardSpec.cc:18
LinkConnSpec
Definition: LinkConnSpec.h:14
TriggerBoardSpec::print
std::string print(int depth=0) const
debud printaout, call its components with depth dectreased by one
Definition: TriggerBoardSpec.cc:30
TriggerBoardSpec::theLinks
std::vector< LinkConnSpec > theLinks
Definition: TriggerBoardSpec.h:43
str
#define str(s)
Definition: TestProcessor.cc:48
TriggerBoardSpec::TriggerBoardSpec
TriggerBoardSpec(int num=-1, uint32_t aMask=0)
ctor with ID only
Definition: TriggerBoardSpec.cc:7
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
IT
std::vector< LinkConnSpec >::const_iterator IT
Definition: TriggerBoardSpec.cc:5
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
TriggerBoardSpec.h
TriggerBoardSpec::dccInputChannelNum
int dccInputChannelNum() const
input channel number to DCC
Definition: TriggerBoardSpec.h:20
TriggerBoardSpec::linkConn
const LinkConnSpec * linkConn(int tbInputNumber) const
link attached to this TB with given input number
Definition: TriggerBoardSpec.cc:9
TriggerBoardSpec::add
void add(const LinkConnSpec &lc)
attach connection to TB
Definition: TriggerBoardSpec.cc:41
mps_fire.result
result
Definition: mps_fire.py:303