CMS 3D CMS Logo

HcalElectronicsId.cc
Go to the documentation of this file.
2 
4  std::string retval;
5  if (isTriggerChainId() && isVMEid()) {
6  if (htrTopBottom()) { // top
7  switch (slbChannelIndex()) {
8  case (0):
9  retval = "A0";
10  break;
11  case (1):
12  retval = "A1";
13  break;
14  case (2):
15  retval = "C0";
16  break;
17  case (3):
18  retval = "C1";
19  break;
20  }
21  } else {
22  switch (slbChannelIndex()) {
23  case (0):
24  retval = "B0";
25  break;
26  case (1):
27  retval = "B1";
28  break;
29  case (2):
30  retval = "D0";
31  break;
32  case (3):
33  retval = "D1";
34  break;
35  }
36  }
37  }
38  return retval;
39 }
40 
41 std::ostream& operator<<(std::ostream& os, const HcalElectronicsId& id) {
42  if (id.isUTCAid()) {
43  if (id.isTriggerChainId())
44  os << "UTCA(trigger): ";
45  else
46  os << "UTCA: ";
47  return os << id.crateId() << ',' << id.slot() << ',' << id.fiberIndex() << ',' << id.fiberChanId();
48  } else {
49  if (id.isTriggerChainId()) {
50  return os << id.dccid() << ',' << id.spigot() << ",SLB" << id.slbSiteNumber() << ',' << id.slbChannelIndex()
51  << " (HTR " << id.readoutVMECrateId() << ":" << id.htrSlot()
52  << ((id.htrTopBottom() == 1) ? ('t') : ('b')) << ')';
53 
54  } else {
55  return os << id.dccid() << ',' << id.spigot() << ',' << id.fiberIndex() << ',' << id.fiberChanId() << " (HTR "
56  << id.readoutVMECrateId() << ":" << id.htrSlot() << ((id.htrTopBottom() == 1) ? ('t') : ('b')) << ')';
57  }
58  }
59 }
HcalElectronicsId::isVMEid
constexpr bool isVMEid() const
Definition: HcalElectronicsId.h:61
HcalElectronicsId
Readout chain identification for Hcal.
Definition: HcalElectronicsId.h:32
HcalElectronicsId::isTriggerChainId
constexpr bool isTriggerChainId() const
Definition: HcalElectronicsId.h:63
HcalElectronicsId::htrTopBottom
constexpr int htrTopBottom() const
get the htr top/bottom (1=top/0=bottom), valid for VME
Definition: HcalElectronicsId.h:103
HcalElectronicsId.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
operator<<
std::ostream & operator<<(std::ostream &os, const HcalElectronicsId &id)
Definition: HcalElectronicsId.cc:41
HcalElectronicsId::slbChannelIndex
constexpr int slbChannelIndex() const
get the SLB channel index (valid only for VME trigger-chain ids)
Definition: HcalElectronicsId.h:82
HcalElectronicsId::slbChannelCode
std::string slbChannelCode() const
get the HTR-wide slb channel code (letter plus number)
Definition: HcalElectronicsId.cc:3