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

RPCReadOutMapping const * convert () 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 const* 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, theVersion, and create_public_lumi_plots::year.

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

53  {
55  int diskOffset=4;
56  int year=atoi(theVersion.substr(6,4).c_str());
57  int month=atoi(theVersion.substr(3,2).c_str());
58  if (year < 2012 || (year==2012 && month<11)) diskOffset=3;
59  int lastTB=0;
60  int lastLink=0;
61  int lastLB=0;
62  int lastFeb=0;
63  for (unsigned int idcc=0; idcc<theDccs.size(); idcc++) {
64  DccSpec dcc(theDccs[idcc].theId);
65  for (int itb=lastTB; itb<lastTB+theDccs[idcc].nTBs; itb++) {
66  TriggerBoardSpec tb(theTBs[itb].theNum);
67  for (int ilink=lastLink; ilink<lastLink+theTBs[itb].nLinks; ilink++) {
68  LinkConnSpec lc(theLinks[ilink].theTriggerBoardInputNumber);
69  for (int ilb=lastLB; ilb<lastLB+theLinks[ilink].nLBs; ilb++) {
70  LinkBoardSpec lb(theLBs[ilb].theMaster,theLBs[ilb].theLinkBoardNumInLink,theLBs[ilb].theCode);
71  for (int ifeb=lastFeb; ifeb<lastFeb+theLBs[ilb].nFebs; ifeb++) {
72  int sector=(theFebs[ifeb].theChamber)%100;
73  char subsector=((theFebs[ifeb].theChamber)/100)%10-2;
74  char febZRadOrnt=((theFebs[ifeb].theChamber)/1000)%5;
75  char febZOrnt=((theFebs[ifeb].theChamber)/5000)%2;
76  char diskOrWheel=((theFebs[ifeb].theChamber)/10000)%10-diskOffset;
77  char layer=((theFebs[ifeb].theChamber)/100000)%10;
78  char barrelOrEndcap=(theFebs[ifeb].theChamber)/1000000;
79  ChamberLocationSpec chamber={diskOrWheel,layer,sector,subsector,febZOrnt,febZRadOrnt,barrelOrEndcap};
80  char cmsEtaPartition=(theFebs[ifeb].thePartition)/1000;
81  char positionInCmsEtaPartition=((theFebs[ifeb].thePartition)%1000)/100;
82  char localEtaPartition=((theFebs[ifeb].thePartition)%100)/10;
83  char positionInLocalEtaPartition=(theFebs[ifeb].thePartition)%10;
84  FebLocationSpec afeb={cmsEtaPartition,positionInCmsEtaPartition,localEtaPartition,positionInLocalEtaPartition};
85  FebConnectorSpec febConnector(theFebs[ifeb].theLinkBoardInputNum,chamber,afeb);
86  febConnector.addStrips(theFebs[ifeb].theAlgo);
87  lb.add(febConnector);
88 // std::cout<<"End of FEB"<<std::endl;
89  }
90  lc.add(lb);
91  lastFeb+=theLBs[ilb].nFebs;
92  }
93  tb.add(lc);
94  lastLB+=theLinks[ilink].nLBs;
95  }
96  dcc.add(tb);
97  lastLink+=theTBs[itb].nLinks;
98  }
99  cabling->add(dcc);
100  lastTB+=theDccs[idcc].nTBs;
101  }
102  return cabling;
103 };
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().