CMS 3D CMS Logo

CSCChamberMap Class Reference

#include <CondFormats/CSCObjects/interface/CSCChamberMap.h>

List of all members.

Public Types

typedef std::map< int,
CSCMapItem::MapItem
CSCMap
 Data are public. @Should be private?

Public Member Functions

int crate (const CSCDetId &) const
 Interface required use in digi-to-raw.
 CSCChamberMap ()
int ddu (const CSCDetId &) const
 ddu id for given DetId
int dduSlot (const CSCDetId &) const
int dmb (const CSCDetId &) const
 dmb id for given DetId
const CSCMapItem::MapItemitem (int key) const
 Accessor for item according to key.
int slink (const CSCDetId &) const
 slink id for given DetId
 ~CSCChamberMap ()

Public Attributes

CSCMap ch_map

Private Member Functions

int dbIndex (const CSCDetId &) const
 Decimal-encoded index (as used inside db - the 'Igor' index).


Detailed Description

Definition at line 9 of file CSCChamberMap.h.


Member Typedef Documentation

typedef std::map< int, CSCMapItem::MapItem > CSCChamberMap::CSCMap

Data are public. @Should be private?

Definition at line 34 of file CSCChamberMap.h.


Constructor & Destructor Documentation

CSCChamberMap::CSCChamberMap (  ) 

Definition at line 4 of file CSCChamberMap.cc.

00004 {}

CSCChamberMap::~CSCChamberMap (  ) 

Definition at line 6 of file CSCChamberMap.cc.

00006 {}


Member Function Documentation

int CSCChamberMap::crate ( const CSCDetId id  )  const

Interface required use in digi-to-raw.

vme crate id for given DetId

Definition at line 26 of file CSCChamberMap.cc.

References CSCMapItem::MapItem::crateid, dbIndex(), and item().

Referenced by CSCDigiToRaw::findEventData().

00026                                                    {
00027   int igor = dbIndex( id );  
00028   CSCMapItem::MapItem mitem = this->item( igor );
00029   return mitem.crateid;   
00030 }

int CSCChamberMap::dbIndex ( const CSCDetId id  )  const [private]

Decimal-encoded index (as used inside db - the 'Igor' index).

This is the decimal integer ie*100000 + is*10000 + ir*1000 + ic*10 + il
(ie=1-2, is=1-4, ir=1-4, ic=1-36, il=1-6)
But in this case il=0 labels entire chamber.

Definition at line 12 of file CSCChamberMap.cc.

Referenced by crate(), ddu(), dduSlot(), dmb(), and slink().

00012                                                     {
00013 
00014   int ie = id.endcap();
00015   int is = id.station();
00016   int ir = id.ring();
00017   int ic = id.chamber();
00018   //  int il = id.layer(); // zero for parent chamber
00019 
00020   // ME1a must be reset to ME11
00021   if ( ( is == 1 ) && ( ir == 4 ) ) ir=1;
00022 
00023   return ie*100000 + is*10000 + ir*1000 + ic*10;
00024 }

int CSCChamberMap::ddu ( const CSCDetId id  )  const

ddu id for given DetId

Definition at line 38 of file CSCChamberMap.cc.

References dbIndex(), CSCMapItem::MapItem::ddu, and item().

Referenced by CSCDigiToRaw::createFedBuffers().

00038                                                  {
00039   int igor = dbIndex( id );  
00040   CSCMapItem::MapItem mitem = this->item( igor );
00041   return mitem.ddu;   
00042 }

int CSCChamberMap::dduSlot ( const CSCDetId id  )  const

Definition at line 50 of file CSCChamberMap.cc.

References dbIndex(), CSCMapItem::MapItem::ddu_slot, and item().

Referenced by CSCDigiToRaw::createFedBuffers().

00050                                                      {
00051   int igor = dbIndex( id );
00052   CSCMapItem::MapItem mitem = this->item( igor );
00053   return mitem.ddu_slot;
00054 }

int CSCChamberMap::dmb ( const CSCDetId id  )  const

dmb id for given DetId

Definition at line 32 of file CSCChamberMap.cc.

References dbIndex(), CSCMapItem::MapItem::dmb, and item().

Referenced by CSCDigiToRaw::createFedBuffers(), and CSCDigiToRaw::findEventData().

00032                                                  {
00033   int igor = dbIndex( id );  
00034   CSCMapItem::MapItem mitem = this->item( igor );
00035   return mitem.dmb;   
00036 }

const CSCMapItem::MapItem & CSCChamberMap::item ( int  key  )  const

Accessor for item according to key.

Definition at line 8 of file CSCChamberMap.cc.

References ch_map, and edm::second().

Referenced by crate(), ddu(), dduSlot(), dmb(), and slink().

00008                                                             { 
00009   return (ch_map.find(key))->second; 
00010 }

int CSCChamberMap::slink ( const CSCDetId id  )  const

slink id for given DetId

Definition at line 44 of file CSCChamberMap.cc.

References dbIndex(), item(), and CSCMapItem::MapItem::slink.

Referenced by CSCDigiToRaw::createFedBuffers().

00044                                                    {
00045   int igor = dbIndex( id );  
00046   CSCMapItem::MapItem mitem = this->item( igor );
00047   return mitem.slink;   
00048 }


Member Data Documentation

CSCMap CSCChamberMap::ch_map

Definition at line 35 of file CSCChamberMap.h.

Referenced by CSCChamberMapValues::fillChamberMap(), and item().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:08 2009 for CMSSW by  doxygen 1.5.4