Definition at line 53 of file RPCEMap.h.
References TriggerBoardSpec::add(), LinkBoardSpec::add(), LinkConnSpec::add(), DccSpec::add(), RPCReadOutMapping::add(), FebConnectorSpec::addStrips(), theDccs, theFebs, theLBs, theLinks, theTBs, and theVersion.
Referenced by popcon::RPCEMapSourceHandler::Compare2EMaps().
{
RPCReadOutMapping* cabling = new RPCReadOutMapping(theVersion);
int lastTB=0;
int lastLink=0;
int lastLB=0;
int lastFeb=0;
for (unsigned int idcc=0; idcc<theDccs.size(); idcc++) {
DccSpec dcc(theDccs[idcc].theId);
for (int itb=lastTB; itb<lastTB+theDccs[idcc].nTBs; itb++) {
TriggerBoardSpec tb(theTBs[itb].theNum);
for (int ilink=lastLink; ilink<lastLink+theTBs[itb].nLinks; ilink++) {
LinkConnSpec lc(theLinks[ilink].theTriggerBoardInputNumber);
for (int ilb=lastLB; ilb<lastLB+theLinks[ilink].nLBs; ilb++) {
LinkBoardSpec lb(theLBs[ilb].theMaster,theLBs[ilb].theLinkBoardNumInLink,theLBs[ilb].theCode);
for (int ifeb=lastFeb; ifeb<lastFeb+theLBs[ilb].nFebs; ifeb++) {
int sector=(theFebs[ifeb].theChamber)%100;
char subsector=((theFebs[ifeb].theChamber)/100)%10-2;
char febZRadOrnt=((theFebs[ifeb].theChamber)/1000)%5;
char febZOrnt=((theFebs[ifeb].theChamber)/5000)%2;
char diskOrWheel=((theFebs[ifeb].theChamber)/10000)%10-3;
char layer=((theFebs[ifeb].theChamber)/100000)%10;
char barrelOrEndcap=(theFebs[ifeb].theChamber)/1000000;
ChamberLocationSpec chamber={diskOrWheel,layer,sector,subsector,febZOrnt,febZRadOrnt,barrelOrEndcap};
char cmsEtaPartition=(theFebs[ifeb].thePartition)/1000;
char positionInCmsEtaPartition=((theFebs[ifeb].thePartition)%1000)/100;
char localEtaPartition=((theFebs[ifeb].thePartition)%100)/10;
char positionInLocalEtaPartition=(theFebs[ifeb].thePartition)%10;
FebLocationSpec afeb={cmsEtaPartition,positionInCmsEtaPartition,localEtaPartition,positionInLocalEtaPartition};
FebConnectorSpec febConnector(theFebs[ifeb].theLinkBoardInputNum,chamber,afeb);
febConnector.addStrips(theFebs[ifeb].theAlgo);
lb.add(febConnector);
}
lc.add(lb);
lastFeb+=theLBs[ilb].nFebs;
}
tb.add(lc);
lastLB+=theLinks[ilink].nLBs;
}
dcc.add(tb);
lastLink+=theTBs[itb].nLinks;
}
cabling->add(dcc);
lastTB+=theDccs[idcc].nTBs;
}
return cabling;
};