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 | Private 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
 

Private Attributes

 COND_SERIALIZABLE
 

Detailed Description

Definition at line 14 of file RPCEMap.h.

Constructor & Destructor Documentation

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

Definition at line 17 of file RPCEMap.h.

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

Definition at line 20 of file RPCEMap.h.

20 {}

Member Function Documentation

RPCReadOutMapping const* RPCEMap::convert ( ) const
inline

Definition at line 65 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().

65  {
67  int diskOffset=4;
68  int year=atoi(theVersion.substr(6,4).c_str());
69  int month=atoi(theVersion.substr(3,2).c_str());
70  if (year < 2012 || (year==2012 && month<11)) diskOffset=3;
71  int lastTB=0;
72  int lastLink=0;
73  int lastLB=0;
74  int lastFeb=0;
75  for (unsigned int idcc=0; idcc<theDccs.size(); idcc++) {
76  DccSpec dcc(theDccs[idcc].theId);
77  for (int itb=lastTB; itb<lastTB+theDccs[idcc].nTBs; itb++) {
78  TriggerBoardSpec tb(theTBs[itb].theNum);
79  for (int ilink=lastLink; ilink<lastLink+theTBs[itb].nLinks; ilink++) {
80  LinkConnSpec lc(theLinks[ilink].theTriggerBoardInputNumber);
81  for (int ilb=lastLB; ilb<lastLB+theLinks[ilink].nLBs; ilb++) {
82  LinkBoardSpec lb(theLBs[ilb].theMaster,theLBs[ilb].theLinkBoardNumInLink,theLBs[ilb].theCode);
83  for (int ifeb=lastFeb; ifeb<lastFeb+theLBs[ilb].nFebs; ifeb++) {
84  int sector=(theFebs[ifeb].theChamber)%100;
85  char subsector=((theFebs[ifeb].theChamber)/100)%10-2;
86  char febZRadOrnt=((theFebs[ifeb].theChamber)/1000)%5;
87  char febZOrnt=((theFebs[ifeb].theChamber)/5000)%2;
88  char diskOrWheel=((theFebs[ifeb].theChamber)/10000)%10-diskOffset;
89  char layer=((theFebs[ifeb].theChamber)/100000)%10;
90  char barrelOrEndcap=(theFebs[ifeb].theChamber)/1000000;
91  ChamberLocationSpec chamber={diskOrWheel,layer,sector,subsector,febZOrnt,febZRadOrnt,barrelOrEndcap};
92  char cmsEtaPartition=(theFebs[ifeb].thePartition)/1000;
93  char positionInCmsEtaPartition=((theFebs[ifeb].thePartition)%1000)/100;
94  char localEtaPartition=((theFebs[ifeb].thePartition)%100)/10;
95  char positionInLocalEtaPartition=(theFebs[ifeb].thePartition)%10;
96  FebLocationSpec afeb={cmsEtaPartition,positionInCmsEtaPartition,localEtaPartition,positionInLocalEtaPartition};
97  FebConnectorSpec febConnector(theFebs[ifeb].theLinkBoardInputNum,chamber,afeb);
98  febConnector.addStrips(theFebs[ifeb].theAlgo);
99  lb.add(febConnector);
100 // std::cout<<"End of FEB"<<std::endl;
101  }
102  lc.add(lb);
103  lastFeb+=theLBs[ilb].nFebs;
104  }
105  tb.add(lc);
106  lastLB+=theLinks[ilink].nLBs;
107  }
108  dcc.add(tb);
109  lastLink+=theTBs[itb].nLinks;
110  }
111  cabling->add(dcc);
112  lastTB+=theDccs[idcc].nTBs;
113  }
114  return cabling;
115 };
std::vector< tbItem > theTBs
Definition: RPCEMap.h:60
std::vector< dccItem > theDccs
Definition: RPCEMap.h:59
std::vector< febItem > theFebs
Definition: RPCEMap.h:63
void add(const DccSpec &dcc)
attach FED to map
std::vector< linkItem > theLinks
Definition: RPCEMap.h:61
std::vector< lbItem > theLBs
Definition: RPCEMap.h:62
std::string theVersion
Definition: RPCEMap.h:22

Member Data Documentation

RPCEMap::COND_SERIALIZABLE
private

Definition at line 115 of file RPCEMap.h.

std::vector<dccItem> RPCEMap::theDccs

Definition at line 59 of file RPCEMap.h.

Referenced by convert().

std::vector<febItem> RPCEMap::theFebs

Definition at line 63 of file RPCEMap.h.

Referenced by convert().

std::vector<lbItem> RPCEMap::theLBs

Definition at line 62 of file RPCEMap.h.

Referenced by convert().

std::vector<linkItem> RPCEMap::theLinks

Definition at line 61 of file RPCEMap.h.

Referenced by convert().

std::vector<tbItem> RPCEMap::theTBs

Definition at line 60 of file RPCEMap.h.

Referenced by convert().

std::string RPCEMap::theVersion

Definition at line 22 of file RPCEMap.h.

Referenced by convert().