CMS 3D CMS Logo

Public Types | Public Member Functions | Public Attributes | Private Member Functions

CSCChamberMap Class Reference

#include <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 dduInput (const CSCDetId &) const
 ddu input for given DetId
int dduSlot (const CSCDetId &) const
 ddu slot for given DetId
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

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 38 of file CSCChamberMap.h.


Constructor & Destructor Documentation

CSCChamberMap::CSCChamberMap ( )

Definition at line 4 of file CSCChamberMap.cc.

{}
CSCChamberMap::~CSCChamberMap ( )

Definition at line 6 of file CSCChamberMap.cc.

{}

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

                                                   {
  int igor = dbIndex( id );  
  CSCMapItem::MapItem mitem = this->item( igor );
  return mitem.crateid;   
}
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(), dduInput(), dduSlot(), dmb(), and slink().

                                                    {

  int ie = id.endcap();
  int is = id.station();
  int ir = id.ring();
  int ic = id.chamber();
  //  int il = id.layer(); // zero for parent chamber

  // ME1a must be reset to ME11
  if ( ( is == 1 ) && ( ir == 4 ) ) ir=1;

  return ie*100000 + is*10000 + ir*1000 + ic*10;
}
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().

                                                 {
  int igor = dbIndex( id );  
  CSCMapItem::MapItem mitem = this->item( igor );
  return mitem.ddu;   
}
int CSCChamberMap::dduInput ( const CSCDetId id) const

ddu input for given DetId

Definition at line 56 of file CSCChamberMap.cc.

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

Referenced by CSCDigiToRaw::createFedBuffers().

                                                      {
  int igor = dbIndex( id );
  CSCMapItem::MapItem mitem = this->item( igor );
  return mitem.ddu_input;
}
int CSCChamberMap::dduSlot ( const CSCDetId id) const

ddu slot for given DetId

Definition at line 50 of file CSCChamberMap.cc.

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

Referenced by CSCDigiToRaw::createFedBuffers().

                                                     {
  int igor = dbIndex( id );
  CSCMapItem::MapItem mitem = this->item( igor );
  return mitem.ddu_slot;
}
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().

                                                 {
  int igor = dbIndex( id );  
  CSCMapItem::MapItem mitem = this->item( igor );
  return mitem.dmb;   
}
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(), dduInput(), dduSlot(), dmb(), and slink().

                                                            { 
  return (ch_map.find(key))->second; 
}
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().

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

Member Data Documentation

Definition at line 39 of file CSCChamberMap.h.

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