CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Public Attributes
RPCEMap Class Reference

#include <RPCEMap.h>

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.

16  : theVersion(version) { }
std::string theVersion
Definition: RPCEMap.h:20
virtual RPCEMap::~RPCEMap ( )
inlinevirtual

Definition at line 18 of file RPCEMap.h.

18 {}

Member Function Documentation

RPCReadOutMapping* RPCEMap::convert ( ) const
inline

Definition at line 53 of file RPCEMap.h.

References LinkConnSpec::add(), DccSpec::add(), LinkBoardSpec::add(), TriggerBoardSpec::add(), RPCReadOutMapping::add(), FebConnectorSpec::addStrips(), theDccs, theFebs, theLBs, theLinks, theTBs, and theVersion.

Referenced by popcon::RPCEMapSourceHandler::Compare2EMaps().

53  {
55  int lastTB=0;
56  int lastLink=0;
57  int lastLB=0;
58  int lastFeb=0;
59  for (unsigned int idcc=0; idcc<theDccs.size(); idcc++) {
60  DccSpec dcc(theDccs[idcc].theId);
61  for (int itb=lastTB; itb<lastTB+theDccs[idcc].nTBs; itb++) {
62  TriggerBoardSpec tb(theTBs[itb].theNum);
63  for (int ilink=lastLink; ilink<lastLink+theTBs[itb].nLinks; ilink++) {
64  LinkConnSpec lc(theLinks[ilink].theTriggerBoardInputNumber);
65  for (int ilb=lastLB; ilb<lastLB+theLinks[ilink].nLBs; ilb++) {
66  LinkBoardSpec lb(theLBs[ilb].theMaster,theLBs[ilb].theLinkBoardNumInLink,theLBs[ilb].theCode);
67  for (int ifeb=lastFeb; ifeb<lastFeb+theLBs[ilb].nFebs; ifeb++) {
68  int sector=(theFebs[ifeb].theChamber)%100;
69  char subsector=((theFebs[ifeb].theChamber)/100)%10-2;
70  char febZRadOrnt=((theFebs[ifeb].theChamber)/1000)%5;
71  char febZOrnt=((theFebs[ifeb].theChamber)/5000)%2;
72  char diskOrWheel=((theFebs[ifeb].theChamber)/10000)%10-3;
73  char layer=((theFebs[ifeb].theChamber)/100000)%10;
74  char barrelOrEndcap=(theFebs[ifeb].theChamber)/1000000;
75  ChamberLocationSpec chamber={diskOrWheel,layer,sector,subsector,febZOrnt,febZRadOrnt,barrelOrEndcap};
76  char cmsEtaPartition=(theFebs[ifeb].thePartition)/1000;
77  char positionInCmsEtaPartition=((theFebs[ifeb].thePartition)%1000)/100;
78  char localEtaPartition=((theFebs[ifeb].thePartition)%100)/10;
79  char positionInLocalEtaPartition=(theFebs[ifeb].thePartition)%10;
80  FebLocationSpec afeb={cmsEtaPartition,positionInCmsEtaPartition,localEtaPartition,positionInLocalEtaPartition};
81  FebConnectorSpec febConnector(theFebs[ifeb].theLinkBoardInputNum,chamber,afeb);
82  febConnector.addStrips(theFebs[ifeb].theAlgo);
83  lb.add(febConnector);
84 // std::cout<<"End of FEB"<<std::endl;
85  }
86  lc.add(lb);
87  lastFeb+=theLBs[ilb].nFebs;
88  }
89  tb.add(lc);
90  lastLB+=theLinks[ilink].nLBs;
91  }
92  dcc.add(tb);
93  lastLink+=theTBs[itb].nLinks;
94  }
95  cabling->add(dcc);
96  lastTB+=theDccs[idcc].nTBs;
97  }
98  return cabling;
99 };
std::vector< tbItem > theTBs
Definition: RPCEMap.h:48
std::vector< dccItem > theDccs
Definition: RPCEMap.h:47
std::vector< febItem > theFebs
Definition: RPCEMap.h:51
void add(const DccSpec &dcc)
attach FED to map
std::vector< linkItem > theLinks
Definition: RPCEMap.h:49
std::vector< lbItem > theLBs
Definition: RPCEMap.h:50
std::string theVersion
Definition: RPCEMap.h:20

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().

std::vector<linkItem> RPCEMap::theLinks

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().