CMS 3D CMS Logo

Classes | Public Member Functions | Public Attributes

RPCEMap Class Reference

#include <RPCEMap.h>

List of all members.

Classes

struct  dccItem
struct  febItem
struct  lbItem
struct  linkItem
struct  tbItem

Public Member Functions

RPCReadOutMappingconvert () const
 RPCEMap (const std::string &version="")
virtual ~RPCEMap ()

Public Attributes

std::vector< dccItemtheDccs
std::vector< febItemtheFebs
std::vector< lbItemtheLBs
std::vector< linkItemtheLinks
std::vector< tbItemtheTBs
std::string theVersion

Detailed Description

Definition at line 12 of file RPCEMap.h.


Constructor & Destructor Documentation

RPCEMap::RPCEMap ( const std::string &  version = "") [inline]

Definition at line 15 of file RPCEMap.h.

virtual RPCEMap::~RPCEMap ( ) [inline, virtual]

Definition at line 18 of file RPCEMap.h.

{}

Member Function Documentation

RPCReadOutMapping* RPCEMap::convert ( ) const [inline]

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);
//              std::cout<<"End of FEB"<<std::endl;
            }
            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;
};

Member Data Documentation

std::vector<dccItem> RPCEMap::theDccs

Definition at line 47 of file RPCEMap.h.

Referenced by convert().

std::vector<febItem> RPCEMap::theFebs

Definition at line 51 of file RPCEMap.h.

Referenced by convert().

std::vector<lbItem> RPCEMap::theLBs

Definition at line 50 of file RPCEMap.h.

Referenced by convert().

Definition at line 49 of file RPCEMap.h.

Referenced by convert().

std::vector<tbItem> RPCEMap::theTBs

Definition at line 48 of file RPCEMap.h.

Referenced by convert().

std::string RPCEMap::theVersion

Definition at line 20 of file RPCEMap.h.

Referenced by convert().