CMS 3D CMS Logo

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

#include <CSCChamberMap.h>

Public Types

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

Public Member Functions

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

Public Attributes

CSCMap ch_map
 

Private Member Functions

int dbIndex (const CSCDetId &) const
 

Private Attributes

 COND_SERIALIZABLE
 

Detailed Description

Definition at line 11 of file CSCChamberMap.h.

Member Typedef Documentation

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

Data are public. @Should be private?

Definition at line 40 of file CSCChamberMap.h.

Constructor & Destructor Documentation

CSCChamberMap::CSCChamberMap ( )

Definition at line 4 of file CSCChamberMap.cc.

4 {}
CSCChamberMap::~CSCChamberMap ( )

Definition at line 6 of file CSCChamberMap.cc.

6 {}

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

26  {
27  int igor = dbIndex( id );
28  CSCMapItem::MapItem mitem = this->item( igor );
29  return mitem.crateid;
30 }
const CSCMapItem::MapItem & item(int key) const
Accessor for item according to key.
Definition: CSCChamberMap.cc:8
int dbIndex(const CSCDetId &) const
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().

12  {
13 
14  int ie = id.endcap();
15  int is = id.station();
16  int ir = id.ring();
17  int ic = id.chamber();
18  // int il = id.layer(); // zero for parent chamber
19 
20  // ME1a must be reset to ME11
21  if ( ( is == 1 ) && ( ir == 4 ) ) ir=1;
22 
23  return ie*100000 + is*10000 + ir*1000 + ic*10;
24 }
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().

38  {
39  int igor = dbIndex( id );
40  CSCMapItem::MapItem mitem = this->item( igor );
41  return mitem.ddu;
42 }
const CSCMapItem::MapItem & item(int key) const
Accessor for item according to key.
Definition: CSCChamberMap.cc:8
int dbIndex(const CSCDetId &) const
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().

56  {
57  int igor = dbIndex( id );
58  CSCMapItem::MapItem mitem = this->item( igor );
59  return mitem.ddu_input;
60 }
const CSCMapItem::MapItem & item(int key) const
Accessor for item according to key.
Definition: CSCChamberMap.cc:8
int dbIndex(const CSCDetId &) const
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().

50  {
51  int igor = dbIndex( id );
52  CSCMapItem::MapItem mitem = this->item( igor );
53  return mitem.ddu_slot;
54 }
const CSCMapItem::MapItem & item(int key) const
Accessor for item according to key.
Definition: CSCChamberMap.cc:8
int dbIndex(const CSCDetId &) const
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().

32  {
33  int igor = dbIndex( id );
34  CSCMapItem::MapItem mitem = this->item( igor );
35  return mitem.dmb;
36 }
const CSCMapItem::MapItem & item(int key) const
Accessor for item according to key.
Definition: CSCChamberMap.cc:8
int dbIndex(const CSCDetId &) const
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 Vispa.Views.TableView.TableView::_selectedRow(), crate(), ddu(), dduInput(), dduSlot(), dmb(), Vispa.Views.TableView.TableView::itemSelectionChanged(), Vispa.Views.TableView.TableView::select(), Vispa.Views.TableView.TableView::selection(), and slink().

8  {
9  return (ch_map.find(key))->second;
10 }
U second(std::pair< T, U > const &p)
list key
Definition: combine.py:13
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().

44  {
45  int igor = dbIndex( id );
46  CSCMapItem::MapItem mitem = this->item( igor );
47  return mitem.slink;
48 }
const CSCMapItem::MapItem & item(int key) const
Accessor for item according to key.
Definition: CSCChamberMap.cc:8
int dbIndex(const CSCDetId &) const

Member Data Documentation

CSCMap CSCChamberMap::ch_map

Definition at line 41 of file CSCChamberMap.h.

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

CSCChamberMap::COND_SERIALIZABLE
private

Definition at line 53 of file CSCChamberMap.h.