CMS 3D CMS Logo

Public Types | Public Member Functions | Public Attributes

CSCCrateMap Class Reference

#include <CSCCrateMap.h>

List of all members.

Public Types

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

Public Member Functions

 CSCCrateMap ()
CSCDetId detId (int vme, int dmb, int cfeb, int layer=0) const
const CSCMapItem::MapItemitem (int key) const
 Accessor for item according to a key.
 ~CSCCrateMap ()

Public Attributes

CSCMap crate_map

Detailed Description

Definition at line 9 of file CSCCrateMap.h.


Member Typedef Documentation

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

Definition at line 22 of file CSCCrateMap.h.


Constructor & Destructor Documentation

CSCCrateMap::CSCCrateMap ( )

Definition at line 3 of file CSCCrateMap.cc.

{}
CSCCrateMap::~CSCCrateMap ( )

Definition at line 5 of file CSCCrateMap.cc.

{}

Member Function Documentation

CSCDetId CSCCrateMap::detId ( int  vme,
int  dmb,
int  cfeb,
int  layer = 0 
) const

Build DetId from hardware labels of vme crate, dmb Need cfeb to split ME11 into ME1a and ME1b. May need layer # 1-6 (set 0 for chamber, as default arg.)

Definition at line 11 of file CSCCrateMap.cc.

References CSCMapItem::MapItem::chamber, CSCDetId, CSCMapItem::MapItem::endcap, item(), combine::key, CSCMapItem::MapItem::ring, and CSCMapItem::MapItem::station.

Referenced by CSCOfflineMonitor::doBXMonitor(), CSCValidation::doTimeMonitoring(), CSCMonitorModule::getCSCDetId(), and CSCDCCUnpacker::produce().

                                                                         {
  int cscid = dmb; 
  if ( dmb >= 6 ) --cscid; 
  int key = vme*10 + cscid; 
  const CSCMapItem::MapItem& mitem = this->item( key ); 
  int ie = mitem.endcap; 
  int is = mitem.station; 
  int ir = mitem.ring;
  int ic = mitem.chamber;

  // Now sort out ME1a from ME11-combined
  // cfeb =0-3 for ME1b, cfeb=4 for ME1a 
  if ( is == 1  && ir == 1 && cfeb == 4 ) { 
    // This is ME1a region  
    ir = 4; // reset from 1 to 4 which flags ME1a 
  }
  return CSCDetId( ie, is, ir, ic, layer );
} 
const CSCMapItem::MapItem & CSCCrateMap::item ( int  key) const

Accessor for item according to a key.

Definition at line 7 of file CSCCrateMap.cc.

References crate_map, and edm::second().

Referenced by detId().

                                                          {
  return (crate_map.find(key))->second;
}

Member Data Documentation

Definition at line 23 of file CSCCrateMap.h.

Referenced by CSCCrateMapValues::fillCrateMap(), and item().