#include <CSCReadoutMapping.h>
Classes | |
struct | CSCLabel |
Public Member Functions | |
void | addRecord (int endcap, int station, int ring, int chamber, int vmecrate, int dmb, int tmb, int tsector, int cscid, int ddu, int dcc) |
int | chamber (int endcap, int station, int vmecrate, int dmb, int tmb) const |
int | crate (const CSCDetId &) const |
returns vmecrate given CSCDetId More... | |
CSCReadoutMapping () | |
Default constructor. More... | |
int | dccId (const CSCDetId &) const |
returns DCC# given CSCDetId More... | |
int | dduId (const CSCDetId &) const |
returns DDU# given CSCDetId More... | |
bool | debugV (void) const |
CSCDetId | detId (int endcap, int station, int vmecrate, int dmb, int tmb, int cfeb, int layer=0) const |
int | dmbId (const CSCDetId &) const |
returns dmbId given CSCDetId More... | |
CSCLabel | findHardwareId (const CSCDetId &) const |
returns hardware ids given chamber id More... | |
const std::string & | myName (void) const |
void | setDebugV (bool dbg) |
virtual | ~CSCReadoutMapping () |
Destructor. More... | |
Private Member Functions | |
virtual int | hwId (int endcap, int station, int vme, int dmb, int tmb) const =0 |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
int | swId (int endcap, int station, int ring, int chamber) const |
Private Attributes | |
bool | debugV_ |
std::map< int, int > | hw2sw_ |
std::vector< CSCLabel > | mapping_ |
std::string | myName_ |
std::map< int, CSCLabel > | sw2hw_ |
Friends | |
class | boost::serialization::access |
template<typename CondSerializationT , typename Enabled > | |
struct | cond::serialization::access |
Defines the ids and labels in the mapping and supplies translation interface. A derived class must define how hardware labels map to a unique integer. A derived, concrete, class must define from where the mapping information comes.
Definition at line 22 of file CSCReadoutMapping.h.
CSCReadoutMapping::CSCReadoutMapping | ( | ) |
|
virtual |
void CSCReadoutMapping::addRecord | ( | int | endcap, |
int | station, | ||
int | ring, | ||
int | chamber, | ||
int | vmecrate, | ||
int | dmb, | ||
int | tmb, | ||
int | tsector, | ||
int | cscid, | ||
int | ddu, | ||
int | dcc | ||
) |
Add one record of info to mapping
reverse mapping for software -> hadrware labels
Definition at line 47 of file CSCReadoutMapping.cc.
References chamber(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::barrel::dcc(), makeMuonMisalignmentScenario::endcap, hw2sw_, hwId(), mapping_, relativeConstraints::ring, relativeConstraints::station, sw2hw_, and swId().
Referenced by CSCReadoutMappingFromFile::fill().
int CSCReadoutMapping::chamber | ( | int | endcap, |
int | station, | ||
int | vmecrate, | ||
int | dmb, | ||
int | tmb | ||
) | const |
Return chamber label corresponding to readout ids vme, tmb and dmb for given endcap endcap = 1 (+z), 2 (-z), station, vme crate number, dmb slot number, tmb slot number.
Definition at line 9 of file CSCReadoutMapping.cc.
References makeMuonMisalignmentScenario::endcap, hw2sw_, hwId(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and relativeConstraints::station.
Referenced by addRecord(), detId(), findHardwareId(), geometryXMLparser.CSCAlignable::index(), and swId().
int CSCReadoutMapping::crate | ( | const CSCDetId & | id | ) | const |
returns vmecrate given CSCDetId
Definition at line 92 of file CSCReadoutMapping.cc.
References findHardwareId(), and CSCReadoutMapping::CSCLabel::vmecrate_.
int CSCReadoutMapping::dccId | ( | const CSCDetId & | id | ) | const |
returns DCC# given CSCDetId
Definition at line 104 of file CSCReadoutMapping.cc.
References CSCReadoutMapping::CSCLabel::dcc_, and findHardwareId().
int CSCReadoutMapping::dduId | ( | const CSCDetId & | id | ) | const |
returns DDU# given CSCDetId
Definition at line 100 of file CSCReadoutMapping.cc.
References CSCReadoutMapping::CSCLabel::ddu_, and findHardwareId().
|
inline |
Status of debug printout flag
Definition at line 123 of file CSCReadoutMapping.h.
References debugV_.
CSCDetId CSCReadoutMapping::detId | ( | int | endcap, |
int | station, | ||
int | vmecrate, | ||
int | dmb, | ||
int | tmb, | ||
int | cfeb, | ||
int | layer = 0 |
||
) | const |
Return CSCDetId for layer corresponding to readout ids vme, tmb, and dmb for given endcap and layer no. 1-6, or for chamber if no layer no. supplied. Args: endcap = 1 (+z), 2 (-z), station, vme crate number, dmb slot number, tmb slot number, cfeb number (so we can identify ME1a/b within ME11), layer number
Definition at line 25 of file CSCReadoutMapping.cc.
References CSCDetId::chamber(), chamber(), CSCDetId::endcap(), makeMuonMisalignmentScenario::endcap, nano_mu_digi_cff::layer, relativeConstraints::ring, CSCDetId::ring(), relativeConstraints::station, and CSCDetId::station().
int CSCReadoutMapping::dmbId | ( | const CSCDetId & | id | ) | const |
returns dmbId given CSCDetId
Definition at line 96 of file CSCReadoutMapping.cc.
References CSCReadoutMapping::CSCLabel::dmb_, and findHardwareId().
CSCReadoutMapping::CSCLabel CSCReadoutMapping::findHardwareId | ( | const CSCDetId & | id | ) | const |
returns hardware ids given chamber id
Search for that sw id in mapping
Definition at line 77 of file CSCReadoutMapping.cc.
References chamber(), makeMuonMisalignmentScenario::endcap, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, CSCDetId::rawIdMaker(), relativeConstraints::ring, relativeConstraints::station, and sw2hw_.
Referenced by crate(), dccId(), dduId(), and dmbId().
|
privatepure virtual |
Build a unique integer out of the readout electronics labels.
In general this must depend on endcap and station, as well as vme crate number and dmb slot number. And possibly tmb slot?
Implemented in CSCReadoutMappingForSliceTest.
Referenced by addRecord(), and chamber().
|
inline |
|
private |
|
inline |
|
private |
Build a unique integer out of chamber labels.
We'll probably use rawId of CSCDetId... You know it makes sense!
Definition at line 72 of file CSCReadoutMapping.cc.
References chamber(), makeMuonMisalignmentScenario::endcap, CSCDetId::rawIdMaker(), relativeConstraints::ring, and relativeConstraints::station.
Referenced by addRecord().
|
friend |
Definition at line 152 of file CSCReadoutMapping.h.
|
friend |
Definition at line 152 of file CSCReadoutMapping.h.
|
private |
Definition at line 147 of file CSCReadoutMapping.h.
Referenced by debugV(), and setDebugV().
|
private |
Definition at line 149 of file CSCReadoutMapping.h.
Referenced by addRecord(), and chamber().
|
private |
Definition at line 148 of file CSCReadoutMapping.h.
Referenced by addRecord().
|
private |
Definition at line 146 of file CSCReadoutMapping.h.
Referenced by myName().
|
private |
Definition at line 150 of file CSCReadoutMapping.h.
Referenced by addRecord(), and findHardwareId().