19 : theVersion(version) { }
24 const DccSpec & ddc = (*im).second;
25 return (im !=
theFeds.end()) ? &ddc : 0;
36 std::vector<const DccSpec*>
result;
39 result.push_back( &(im->second) );
47 if (
theFeds.empty())
return std::make_pair(0,-1);
51 return std::make_pair(first->first, last->first);
56 std::vector< std::pair< LinkBoardElectronicIndex, LinkBoardPackedStrip> >
59 std::vector< std::pair< LinkBoardElectronicIndex, LinkBoardPackedStrip> >
result;
62 const uint32_t & rawDetId = stripInDetUnit.first;
63 const int & stripInDU = stripInDetUnit.second;
66 const DccSpec & dccSpec = (*im).second;
67 const std::vector<TriggerBoardSpec> & triggerBoards = dccSpec.
triggerBoards();
68 for ( std::vector<TriggerBoardSpec>::const_iterator
69 it = triggerBoards.begin(); it != triggerBoards.end(); it++) {
71 typedef std::vector<const LinkConnSpec* > LINKS;
73 for ( LINKS::const_iterator ic = linkConns.begin(); ic != linkConns.end(); ic++) {
76 const std::vector<LinkBoardSpec> & boards = link.
linkBoards();
77 for ( std::vector<LinkBoardSpec>::const_iterator
78 ib = boards.begin();
ib != boards.end();
ib++) {
87 const std::vector<FebConnectorSpec> & febs = board.
febs();
89 for ( std::vector<FebConnectorSpec>::const_iterator
90 ifc = febs.begin(); ifc != febs.end(); ifc++) {
93 if (febConnector.
rawId() != rawDetId)
continue;
98 for (
int istrip=0; istrip<febConnector.
nstrips(); istrip++) {
99 int stripPinInFeb = febConnector.
cablePinNum(istrip);
135 uint32_t detUnit = 0;
137 int febInLB = lbstrip.
febInLB();
142 detUnit = feb->
rawId();
150 LogDebug(
"")<<
"problem with stip for febInLB: "<<febInLB
151 <<
" strip pin: "<< stripPinInFeb
152 <<
" strip pin: "<< stripPinInFeb
153 <<
" for linkBoard: "<<location.
print(3);
157 LogDebug(
"") <<
"problem with detUnit for febInLB: " <<febInLB
158 <<
" for linkBoard: "<<location.
print(1);
160 return std::make_pair(detUnit,stripInDU);
168 std::pair<LinkBoardElectronicIndex, int>
172 linkboard.
dccId = 790;
175 for(
int k=0;
k<18;
k++){
177 for(
int j=0;
j<3;
j++){
181 for(
int i=1;
i<7;
i++){
183 if(feb && feb->
rawId()==detId){
184 for(
int l=1;
l<17;
l++){
188 int bitInLink = (
i-1)*16+
l-1;
189 std::pair<LinkBoardElectronicIndex, int> stripInfo(linkboard,bitInLink);
199 std::cout<<
"Strip: "<<strip<<
" not found for detector: "<<aDet<<std::endl;
200 std::pair<LinkBoardElectronicIndex, int> dummyStripInfo(linkboard,-99);
201 return dummyStripInfo;
208 std::vector<const LinkBoardSpec*> vLBforChamber;
211 linkboard.
dccId = 790;
217 for(
int k=0;
k<18;
k++){
220 for(
int j=0;
j<3;
j++){
223 location = this->
location(linkboard);
226 for(
int j=0;
j<6;
j++){
232 vLBforChamber.push_back(location);
241 return vLBforChamber;
const std::vector< TriggerBoardSpec > & triggerBoards() const
const int cablePinNum(int istrip) const
const uint32_t & rawId() const
DetUnit to which data belongs.
std::vector< const LinkBoardSpec * > getLBforChamber(const std::string &name) const
RPCReadOutMapping(const std::string &version="")
const ChamberLocationSpec & chamber() const
std::string print(int depth=0) const
debud printout
const LinkBoardSpec * linkBoard(int linkBoardNumInLink) const
LB served by this link, identified by its position in link.
std::pair< uint32_t, int > StripInDetUnit
first member is DetUnit ID, second strip in DetUnit frame
std::vector< const LinkConnSpec * > enabledLinkConns() const
not masked links belonging to this TB
std::vector< const DccSpec * > dccList() const
all FEDs in map
std::map< int, DccSpec >::const_iterator IMAP
int triggerBoardInputNumber() const
this link input number in TriggerBoard
const int nstrips() const
const int chamberStripNum(int istrip) const
const TriggerBoardSpec * triggerBoard(int channelNumber) const
TB attached to channel.
const ChamberStripSpec strip(int pinNumber) const
strip info for input pin
std::string link(std::string &nm, std::string &ns)
const LinkConnSpec * linkConn(int tbInputNumber) const
link attached to this TB with given input number
std::map< int, DccSpec > theFeds
std::pair< LinkBoardElectronicIndex, int > getRAWSpecForCMSChamberSrip(uint32_t detId, int strip, int dccInputChannel) const
void add(const DccSpec &dcc)
attach FED to map
int stripPinInFeb() const
const FebConnectorSpec * feb(int febInputNum) const
get Feb by its connection number to this board
std::pair< int, int > dccNumberRange() const
Range of FED IDs in map (min and max id)
int linkBoardInputNum() const
this FEB channel in LinkBoard
virtual StripInDetUnit detUnitFrame(const LinkBoardSpec &location, const LinkBoardPackedStrip &packedStrip) const
convert strip location as in raw data (LB and LBchannel) to detUnit frame
std::string chamberLocationName() const
virtual const LinkBoardSpec * location(const LinkBoardElectronicIndex &ele) const
conversion between electronic and detector indexing
const std::vector< FebConnectorSpec > & febs() const
std::vector< std::pair< LinkBoardElectronicIndex, LinkBoardPackedStrip > > rawDataFrame(const StripInDetUnit &duFrame) const
connection "paths" that lead from one digi to one strip
int dccInputChannelNum() const
input channel number to DCC
const DccSpec * dcc(int dccId) const
FED identified by ID.
int linkBoardNumInLink() const
this LB number in link
unsigned dccId(DetId const &)
const std::vector< LinkBoardSpec > & linkBoards() const