CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes | Private Member Functions | Friends
CSCCrateMap Class Reference

#include <CSCCrateMap.h>

Public Types

typedef std::map< int, CSCMapItem::MapItemCSCMap
 

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. More...
 
 ~CSCCrateMap ()
 

Public Attributes

CSCMap crate_map
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 11 of file CSCCrateMap.h.

Member Typedef Documentation

◆ CSCMap

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

Definition at line 24 of file CSCCrateMap.h.

Constructor & Destructor Documentation

◆ CSCCrateMap()

CSCCrateMap::CSCCrateMap ( )

Definition at line 3 of file CSCCrateMap.cc.

3 {}

◆ ~CSCCrateMap()

CSCCrateMap::~CSCCrateMap ( )

Definition at line 5 of file CSCCrateMap.cc.

5 {}

Member Function Documentation

◆ detId()

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 9 of file CSCCrateMap.cc.

References CSCMapItem::MapItem::chamber, CSCMapItem::MapItem::endcap, item(), crabWrapper::key, phase1PixelTopology::layer, CSCMapItem::MapItem::ring, and CSCMapItem::MapItem::station.

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

9  {
10  int cscid = dmb;
11  if (dmb >= 6)
12  --cscid;
13  int key = vme * 10 + cscid;
14  const CSCMapItem::MapItem& mitem = this->item(key);
15  int ie = mitem.endcap;
16  int is = mitem.station;
17  int ir = mitem.ring;
18  int ic = mitem.chamber;
19 
20  // Now sort out ME1a from ME11-combined
21  // cfeb =0-3 for ME1b, cfeb=4 for ME1a (pre-LS1) cfeb=4-6 for ME1a (post-LS1)
22  if (is == 1 && ir == 1 && cfeb >= 4 && cfeb <= 6) {
23  // This is ME1a region
24  ir = 4; // reset from 1 to 4 which flags ME1a
25  }
26  return CSCDetId(ie, is, ir, ic, layer);
27 }
constexpr std::array< uint8_t, layerIndexSize > layer
const CSCMapItem::MapItem & item(int key) const
Accessor for item according to a key.
Definition: CSCCrateMap.cc:7

◆ item()

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, crabWrapper::key, and edm::second().

Referenced by detId().

7 { return (crate_map.find(key))->second; }
U second(std::pair< T, U > const &p)
CSCMap crate_map
Definition: CSCCrateMap.h:25

◆ serialize()

template<class Archive >
void CSCCrateMap::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 27 of file CSCCrateMap.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 27 of file CSCCrateMap.h.

Member Data Documentation

◆ crate_map

CSCMap CSCCrateMap::crate_map

Definition at line 25 of file CSCCrateMap.h.

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