CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Typedefs | Enumerations | Functions | Variables
hcaldqm::hashfunctions Namespace Reference

Typedefs

typedef uint32_t(* hash_function_did )(HcalDetId const &)
 
typedef uint32_t(* hash_function_eid )(HcalElectronicsId const &)
 
typedef uint32_t(* hash_function_mixid )(HcalTrigTowerDetId const &, HcalElectronicsId const &)
 
typedef uint32_t(* hash_function_tid )(HcalTrigTowerDetId const &)
 
typedef std::string(* name_function_did )(HcalDetId const &)
 
typedef std::string(* name_function_eid )(HcalElectronicsId const &)
 
typedef std::string(* name_function_mixid )(HcalTrigTowerDetId const &, HcalElectronicsId const &)
 
typedef std::string(* name_function_tid )(HcalTrigTowerDetId const &)
 

Enumerations

enum  HashType {
  fSubdet = 0, fSubdetiphi = 1, fSubdetieta = 2, fSubdetdepth = 3,
  fSubdetPM = 4, fSubdetPMiphi = 5, fiphi = 6, fieta = 7,
  fdepth = 8, fHFPMiphi = 9, fHBHEPartition = 10, fDChannel = 11,
  nHashType_did = 12, fFED = 13, fFEDSpigot = 14, fFEDSlot = 15,
  fCrate = 16, fCrateSpigot = 17, fCrateSlot = 18, fFiber = 19,
  fFiberFiberCh = 20, fFiberCh = 21, fElectronics = 22, fEChannel = 23,
  nHashType_eid = 24, fTTSubdet = 25, fTTSubdetPM = 26, fTTSubdetPMiphi = 27,
  fTTSubdetieta = 28, fTTdepth = 29, fTChannel = 30, nHashType_tid = 31,
  fTTSubdetFW = 32, nHashType_mixid = 33, nHashType = 34
}
 

Functions

uint32_t hash_Crate (HcalElectronicsId const &)
 
uint32_t hash_Crate (std::string const &)
 
uint32_t hash_CrateSlot (HcalElectronicsId const &)
 
uint32_t hash_CrateSlot (std::string const &)
 
uint32_t hash_CrateSpigot (HcalElectronicsId const &)
 
uint32_t hash_CrateSpigot (std::string const &)
 
uint32_t hash_DChannel (HcalDetId const &)
 
uint32_t hash_DChannel (std::string const &)
 
uint32_t hash_depth (HcalDetId const &)
 
uint32_t hash_depth (std::string const &)
 
uint32_t hash_EChannel (HcalElectronicsId const &)
 
uint32_t hash_EChannel (std::string const &)
 
uint32_t hash_Electronics (HcalElectronicsId const &)
 
uint32_t hash_Electronics (std::string const &)
 
uint32_t hash_FED (HcalElectronicsId const &)
 
uint32_t hash_FED (std::string const &)
 
uint32_t hash_FEDSlot (HcalElectronicsId const &)
 
uint32_t hash_FEDSlot (std::string const &)
 
uint32_t hash_FEDSpigot (HcalElectronicsId const &)
 
uint32_t hash_FEDSpigot (std::string const &)
 
uint32_t hash_Fiber (HcalElectronicsId const &)
 
uint32_t hash_Fiber (std::string const &)
 
uint32_t hash_FiberCh (HcalElectronicsId const &)
 
uint32_t hash_FiberCh (std::string const &)
 
uint32_t hash_FiberFiberCh (HcalElectronicsId const &)
 
uint32_t hash_FiberFiberCh (std::string const &)
 
uint32_t hash_HBHEPartition (HcalDetId const &)
 
uint32_t hash_HBHEPartition (std::string const &)
 
uint32_t hash_HFPMiphi (HcalDetId const &)
 
uint32_t hash_HFPMiphi (std::string const &)
 
uint32_t hash_ieta (HcalDetId const &)
 
uint32_t hash_ieta (std::string const &)
 
uint32_t hash_iphi (HcalDetId const &)
 
uint32_t hash_iphi (std::string const &)
 
uint32_t hash_Subdet (HcalDetId const &)
 
uint32_t hash_Subdet (std::string const &)
 
uint32_t hash_Subdetdepth (HcalDetId const &)
 
uint32_t hash_Subdetdepth (std::string const &)
 
uint32_t hash_Subdetieta (HcalDetId const &)
 
uint32_t hash_Subdetieta (std::string const &)
 
uint32_t hash_Subdetiphi (HcalDetId const &)
 
uint32_t hash_Subdetiphi (std::string const &)
 
uint32_t hash_SubdetPM (HcalDetId const &)
 
uint32_t hash_SubdetPM (std::string const &)
 
uint32_t hash_SubdetPMiphi (HcalDetId const &)
 
uint32_t hash_SubdetPMiphi (std::string const &)
 
uint32_t hash_TChannel (HcalTrigTowerDetId const &)
 
uint32_t hash_TChannel (std::string const &)
 
uint32_t hash_TTdepth (HcalTrigTowerDetId const &)
 
uint32_t hash_TTdepth (std::string const &)
 
uint32_t hash_TTSubdet (HcalTrigTowerDetId const &)
 
uint32_t hash_TTSubdet (std::string const &)
 
uint32_t hash_TTSubdetFW (HcalTrigTowerDetId const &, HcalElectronicsId const &)
 
uint32_t hash_TTSubdetFW (std::string const &)
 
uint32_t hash_TTSubdetieta (HcalTrigTowerDetId const &)
 
uint32_t hash_TTSubdetieta (std::string const &)
 
uint32_t hash_TTSubdetPM (HcalTrigTowerDetId const &)
 
uint32_t hash_TTSubdetPM (std::string const &)
 
uint32_t hash_TTSubdetPMiphi (HcalTrigTowerDetId const &)
 
uint32_t hash_TTSubdetPMiphi (std::string const &)
 
std::string name_Crate (HcalElectronicsId const &)
 
std::string name_CrateSlot (HcalElectronicsId const &)
 
std::string name_CrateSpigot (HcalElectronicsId const &)
 
std::string name_DChannel (HcalDetId const &)
 
std::string name_depth (HcalDetId const &)
 
std::string name_EChannel (HcalElectronicsId const &)
 
std::string name_Electronics (HcalElectronicsId const &)
 
std::string name_FED (HcalElectronicsId const &)
 
std::string name_FEDSlot (HcalElectronicsId const &)
 
std::string name_FEDSpigot (HcalElectronicsId const &)
 
std::string name_Fiber (HcalElectronicsId const &)
 
std::string name_FiberCh (HcalElectronicsId const &)
 
std::string name_FiberFiberCh (HcalElectronicsId const &)
 
std::string name_HBHEPartition (HcalDetId const &)
 
std::string name_HFPMiphi (HcalDetId const &)
 
std::string name_ieta (HcalDetId const &)
 
std::string name_iphi (HcalDetId const &)
 
std::string name_Subdet (HcalDetId const &)
 
std::string name_Subdetdepth (HcalDetId const &)
 
std::string name_Subdetieta (HcalDetId const &)
 
std::string name_Subdetiphi (HcalDetId const &)
 
std::string name_SubdetPM (HcalDetId const &)
 
std::string name_SubdetPMiphi (HcalDetId const &)
 
std::string name_TChannel (HcalTrigTowerDetId const &)
 
std::string name_TTdepth (HcalTrigTowerDetId const &)
 
std::string name_TTSubdet (HcalTrigTowerDetId const &)
 
std::string name_TTSubdetFW (HcalTrigTowerDetId const &, HcalElectronicsId const &)
 
std::string name_TTSubdetieta (HcalTrigTowerDetId const &)
 
std::string name_TTSubdetPM (HcalTrigTowerDetId const &)
 
std::string name_TTSubdetPMiphi (HcalTrigTowerDetId const &)
 

Variables

hash_function_did const hash_did [nHashType_did]
 
hash_function_eid const hash_eid [nHashType_eid-nHashType_did-1]
 
hash_function_mixid const hash_mixid [nHashType_mixid-nHashType_tid-1] = {hash_TTSubdetFW}
 
std::string const hash_names [nhashes]
 
hash_function_tid const hash_tid [nHashType_tid-nHashType_eid-1]
 
name_function_did const name_did [nHashType_did]
 
name_function_eid const name_eid [nHashType_eid-nHashType_did-1]
 
name_function_mixid const name_mixid [nHashType_mixid-nHashType_tid-1] = {name_TTSubdetFW}
 
name_function_tid const name_tid [nHashType_tid-nHashType_eid-1]
 
int const nhashes
 

Typedef Documentation

typedef uint32_t(* hcaldqm::hashfunctions::hash_function_did)(HcalDetId const &)

Definition at line 168 of file HashFunctions.h.

typedef uint32_t(* hcaldqm::hashfunctions::hash_function_eid)(HcalElectronicsId const &)

Definition at line 169 of file HashFunctions.h.

typedef uint32_t(* hcaldqm::hashfunctions::hash_function_mixid)(HcalTrigTowerDetId const &, HcalElectronicsId const &)

Definition at line 171 of file HashFunctions.h.

typedef uint32_t(* hcaldqm::hashfunctions::hash_function_tid)(HcalTrigTowerDetId const &)

Definition at line 170 of file HashFunctions.h.

typedef std::string(* hcaldqm::hashfunctions::name_function_did)(HcalDetId const &)

Definition at line 172 of file HashFunctions.h.

typedef std::string(* hcaldqm::hashfunctions::name_function_eid)(HcalElectronicsId const &)

Definition at line 173 of file HashFunctions.h.

typedef std::string(* hcaldqm::hashfunctions::name_function_mixid)(HcalTrigTowerDetId const &, HcalElectronicsId const &)

Definition at line 175 of file HashFunctions.h.

typedef std::string(* hcaldqm::hashfunctions::name_function_tid)(HcalTrigTowerDetId const &)

Definition at line 174 of file HashFunctions.h.

Enumeration Type Documentation

Enumerator
fSubdet 
fSubdetiphi 
fSubdetieta 
fSubdetdepth 
fSubdetPM 
fSubdetPMiphi 
fiphi 
fieta 
fdepth 
fHFPMiphi 
fHBHEPartition 
fDChannel 
nHashType_did 
fFED 
fFEDSpigot 
fFEDSlot 
fCrate 
fCrateSpigot 
fCrateSlot 
fFiber 
fFiberFiberCh 
fFiberCh 
fElectronics 
fEChannel 
nHashType_eid 
fTTSubdet 
fTTSubdetPM 
fTTSubdetPMiphi 
fTTSubdetieta 
fTTdepth 
fTChannel 
nHashType_tid 
fTTSubdetFW 
nHashType_mixid 
nHashType 

Definition at line 131 of file HashFunctions.h.

131  {
132  fSubdet = 0,
133  fSubdetiphi = 1,
134  fSubdetieta = 2,
135  fSubdetdepth = 3,
136  fSubdetPM = 4,
137  fSubdetPMiphi = 5,
138  fiphi = 6,
139  fieta = 7,
140  fdepth = 8,
141  fHFPMiphi = 9,
142  fHBHEPartition = 10,
143  fDChannel = 11,
144  nHashType_did = 12,
145  fFED = 13,
146  fFEDSpigot = 14,
147  fFEDSlot = 15,
148  fCrate = 16,
149  fCrateSpigot = 17,
150  fCrateSlot = 18,
151  fFiber = 19,
152  fFiberFiberCh = 20,
153  fFiberCh = 21,
154  fElectronics = 22,
155  fEChannel = 23,
156  nHashType_eid = 24,
157  fTTSubdet = 25,
158  fTTSubdetPM = 26,
159  fTTSubdetPMiphi = 27,
160  fTTSubdetieta = 28,
161  fTTdepth = 29,
162  fTChannel = 30,
163  nHashType_tid = 31,
164  fTTSubdetFW = 32,
165  nHashType_mixid = 33,
166  nHashType = 34
167  };

Function Documentation

uint32_t hcaldqm::hashfunctions::hash_Crate ( HcalElectronicsId const &  eid)

Definition at line 273 of file HashFunctions.cc.

References HcalElectronicsId::crateId(), HcalElectronicsId::dccid(), hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, hcaldqm::utilities::hash(), HcalElectronicsId::isVMEid(), hcaldqm::constants::SLOT_uTCA_MIN, and hcaldqm::constants::SPIGOT_MIN.

273  {
274  // note hashing of VME is done with dccId
275  // note 2: there are two dccids per crate, <even> and <even+1>. We don't
276  // care about this, so use the even one.
277  return eid.isVMEid()
279  FIBERCH_MIN, FIBER_VME_MIN, SPIGOT_MIN, (eid.dccid() % 2 == 0 ? eid.dccid() : eid.dccid() - 1)))
280  : utilities::hash(
282  }
int const SPIGOT_MIN
Definition: Constants.h:120
int const FIBER_VME_MIN
Definition: Constants.h:125
int const FIBERCH_MIN
Definition: Constants.h:134
int const FIBER_uTCA_MIN1
Definition: Constants.h:128
Readout chain identification for Hcal.
int const SLOT_uTCA_MIN
Definition: Constants.h:107
uint32_t hcaldqm::hashfunctions::hash_Crate ( std::string const &  )

Definition at line 411 of file HashFunctions.cc.

References HcalElectronicsId::rawId().

411 { return HcalElectronicsId().rawId(); }
constexpr uint32_t rawId() const
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_CrateSlot ( HcalElectronicsId const &  eid)
uint32_t hcaldqm::hashfunctions::hash_CrateSlot ( std::string const &  )

Definition at line 429 of file HashFunctions.cc.

References HcalElectronicsId::rawId().

429 { return HcalElectronicsId().rawId(); }
constexpr uint32_t rawId() const
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_CrateSpigot ( HcalElectronicsId const &  eid)

Definition at line 284 of file HashFunctions.cc.

References HcalElectronicsId::crateId(), HcalElectronicsId::dccid(), hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, hcaldqm::utilities::hash(), HcalElectronicsId::isVMEid(), HcalElectronicsId::slot(), and HcalElectronicsId::spigot().

284  {
285  // note hashing of VME is done with dccid and
286  // uTCA with Slots
287  return eid.isVMEid()
289  FIBERCH_MIN, FIBER_VME_MIN, eid.spigot(), (eid.dccid() % 2 == 0 ? eid.dccid() : eid.dccid() - 1)))
290  : utilities::hash(HcalElectronicsId(eid.crateId(), eid.slot(), FIBER_uTCA_MIN1, FIBERCH_MIN, false));
291  }
int const FIBER_VME_MIN
Definition: Constants.h:125
int const FIBERCH_MIN
Definition: Constants.h:134
int const FIBER_uTCA_MIN1
Definition: Constants.h:128
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_CrateSpigot ( std::string const &  )

Definition at line 420 of file HashFunctions.cc.

References HcalElectronicsId::rawId().

420 { return HcalElectronicsId().rawId(); }
constexpr uint32_t rawId() const
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_DChannel ( HcalDetId const &  did)

Definition at line 60 of file HashFunctions.cc.

References hcaldqm::utilities::hash().

60 { return utilities::hash(did); }
uint32_t hcaldqm::hashfunctions::hash_DChannel ( std::string const &  name)

Definition at line 237 of file HashFunctions.cc.

References HcalBarrel, and DetId::rawId().

237 { return HcalDetId(HcalBarrel, 1, 1, 1).rawId(); }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t hcaldqm::hashfunctions::hash_depth ( HcalDetId const &  did)

Definition at line 36 of file HashFunctions.cc.

References HcalDetId::depth(), hcaldqm::utilities::hash(), HcalBarrel, HcalOuter, and HcalDetId::subdet().

36  {
37  if (did.subdet() == HcalOuter)
38  return 9; // key of map, can be any uint32_t valure that is not a raw hcal detid
39  else
40  return utilities::hash(HcalDetId(HcalBarrel, 1, 1, did.depth()));
41  }
uint32_t hcaldqm::hashfunctions::hash_depth ( std::string const &  name)

Definition at line 184 of file HashFunctions.cc.

References HLT_FULL_cff::depth, HcalBarrel, and DetId::rawId().

184  {
185  int depth = std::stoi(name.substr(5, name.length() - 5), nullptr);
186  if (name.find("HO") != std::string::npos)
187  return 9; // must match the value in method hash_depth(& digi)
188  else
189  return HcalDetId(HcalBarrel, 1, 1, depth).rawId();
190  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t hcaldqm::hashfunctions::hash_EChannel ( HcalElectronicsId const &  eid)

Definition at line 328 of file HashFunctions.cc.

References HcalElectronicsId::crateId(), HcalElectronicsId::dccid(), HcalElectronicsId::fiberChanId(), HcalElectronicsId::fiberIndex(), hcaldqm::utilities::hash(), HcalElectronicsId::isVMEid(), HcalElectronicsId::slot(), and HcalElectronicsId::spigot().

Referenced by hcaldqm::electronicsmap::ElectronicsMap::initialize().

328  {
329  return eid.isVMEid()
330  ? utilities::hash(HcalElectronicsId(eid.fiberChanId(), eid.fiberIndex(), eid.spigot(), eid.dccid()))
331  : utilities::hash(
332  HcalElectronicsId(eid.crateId(), eid.slot(), eid.fiberIndex(), eid.fiberChanId(), false));
333  }
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_EChannel ( std::string const &  )

Definition at line 469 of file HashFunctions.cc.

References HcalElectronicsId::rawId().

469 { return HcalElectronicsId().rawId(); }
constexpr uint32_t rawId() const
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_Electronics ( HcalElectronicsId const &  eid)

Definition at line 306 of file HashFunctions.cc.

References hcaldqm::constants::CRATE_uTCA_MIN, hcaldqm::constants::CRATE_VME_MIN, hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, hcaldqm::utilities::hash(), HcalElectronicsId::isVMEid(), hcaldqm::constants::SLOT_uTCA_MIN, and hcaldqm::constants::SPIGOT_MIN.

306  {
308  : utilities::hash(
310  /* NOTE: as an update - should separate Trigger Eid and Det
311  Eid * return eid.isVMEid() ? eid.isTriggerChainId()?
312  utilities::hash(HcalElectronicsId(SLBCH_MIN,
313  SLB_MIN, SPIGOT_MIN,
314  CRATE_VME_MIN, CRATE_VME_MIN, SLOT_VME_MIN1, 0)):
315  utilities::hash(HcalElectronicsId(FIBERCH_MIN,
316  FIBER_VME_MIN, SPIGOT_MIN,
317  CRATE_VME_MIN))
318  :
319  eid.isTriggerChainId()?
320  utilities::hash(HcalElectronicsId(CRATE_uTCA_MIN,
321  SLOT_uTCA_MIN, TPFIBER_MIN,
322  TPFIBERCH_MIN, true)): utilities::hash(HcalElectronicsId(CRATE_uTCA_MIN,
323  SLOT_uTCA_MIN, FIBER_uTCA_MIN1,
324  FIBERCH_MIN, false));
325  */
326  }
int const CRATE_VME_MIN
Definition: Constants.h:95
int const SPIGOT_MIN
Definition: Constants.h:120
int const FIBER_VME_MIN
Definition: Constants.h:125
int const FIBERCH_MIN
Definition: Constants.h:134
int const FIBER_uTCA_MIN1
Definition: Constants.h:128
int const CRATE_uTCA_MIN
Definition: Constants.h:100
Readout chain identification for Hcal.
int const SLOT_uTCA_MIN
Definition: Constants.h:107
uint32_t hcaldqm::hashfunctions::hash_Electronics ( std::string const &  name)
uint32_t hcaldqm::hashfunctions::hash_FED ( HcalElectronicsId const &  eid)

by ElectronicsId

Definition at line 242 of file HashFunctions.cc.

References HcalElectronicsId::crateId(), HcalElectronicsId::dccid(), hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, hcaldqm::utilities::hash(), HcalObjRepresent::isHF(), HcalObjRepresent::isHO(), HcalElectronicsId::isVMEid(), HcalElectronicsId::slot(), hcaldqm::constants::SLOT_uTCA_MIN, and hcaldqm::constants::SPIGOT_MIN.

242  {
243  if (eid.isVMEid())
245  else {
246  // HO and HO are dual-FED
247  bool isHF = eid.crateId() == 22 || eid.crateId() == 29 || eid.crateId() == 32;
248  bool isHO = eid.crateId() == 23 || eid.crateId() == 27 || eid.crateId() == 26 || eid.crateId() == 38;
249  // for HF, slot number is either
250  int slotToUse = 1;
251  if (isHF || isHO)
252  slotToUse = eid.slot() > 6 ? SLOT_uTCA_MIN + 6 : SLOT_uTCA_MIN;
253  else
254  slotToUse = eid.slot() > 8 ? SLOT_uTCA_MIN + 8 : (eid.slot() > 4 ? SLOT_uTCA_MIN + 4 : SLOT_uTCA_MIN);
255  return utilities::hash(HcalElectronicsId(eid.crateId(), slotToUse, FIBER_uTCA_MIN1, FIBERCH_MIN, false));
256  }
257  }
int const SPIGOT_MIN
Definition: Constants.h:120
int const FIBER_VME_MIN
Definition: Constants.h:125
int const FIBERCH_MIN
Definition: Constants.h:134
int const FIBER_uTCA_MIN1
Definition: Constants.h:128
bool isHF(int etabin, int depth)
bool isHO(int etabin, int depth)
Readout chain identification for Hcal.
int const SLOT_uTCA_MIN
Definition: Constants.h:107
uint32_t hcaldqm::hashfunctions::hash_FED ( std::string const &  name)

Definition at line 341 of file HashFunctions.cc.

References hcaldqm::utilities::fed2crate(), hcaldqm::constants::FED_uTCA_MIN, hcaldqm::constants::FED_VME_MIN, hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, HcalElectronicsId::rawId(), and hcaldqm::constants::SPIGOT_MIN.

341  {
342  int fed = std::stoi(name.substr(3, name.length() - 3), nullptr);
343  if (fed >= constants::FED_uTCA_MIN) {
344  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(fed);
345  return HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId();
346  } else
348 
349  return HcalElectronicsId().rawId();
350  }
constexpr uint32_t rawId() const
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:10
int const SPIGOT_MIN
Definition: Constants.h:120
int const FIBER_VME_MIN
Definition: Constants.h:125
int const FED_uTCA_MIN
Definition: Constants.h:87
int const FIBERCH_MIN
Definition: Constants.h:134
int const FED_VME_MIN
Definition: Constants.h:82
int const FIBER_uTCA_MIN1
Definition: Constants.h:128
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_FEDSlot ( HcalElectronicsId const &  eid)

Definition at line 266 of file HashFunctions.cc.

References HcalElectronicsId::crateId(), HcalElectronicsId::dccid(), hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, hcaldqm::utilities::hash(), HcalElectronicsId::isVMEid(), HcalElectronicsId::slot(), and HcalElectronicsId::spigot().

266  {
267  // note that hashing of VME is done with
268  return eid.isVMEid()
270  : utilities::hash(HcalElectronicsId(eid.crateId(), eid.slot(), FIBER_uTCA_MIN1, FIBERCH_MIN, false));
271  }
int const FIBER_VME_MIN
Definition: Constants.h:125
int const FIBERCH_MIN
Definition: Constants.h:134
int const FIBER_uTCA_MIN1
Definition: Constants.h:128
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_FEDSlot ( std::string const &  name)

Definition at line 383 of file HashFunctions.cc.

References hcaldqm::utilities::fed2crate(), hcaldqm::constants::FED_uTCA_MIN, hcaldqm::constants::FED_VME_MIN, hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, HcalElectronicsId::rawId(), and alignCSCRings::s.

383  {
384  int pos = name.find('S');
385  int fed = std::stoi(name.substr(3, pos - 3), nullptr);
386  int s = std::stoi(name.substr(pos + 1, name.length() - pos - 1), nullptr);
387  if (fed >= FED_uTCA_MIN) {
388  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(fed);
389  return HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId();
390  } else
392 
393  return HcalElectronicsId().rawId();
394  }
constexpr uint32_t rawId() const
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:10
int const FIBER_VME_MIN
Definition: Constants.h:125
int const FED_uTCA_MIN
Definition: Constants.h:87
int const FIBERCH_MIN
Definition: Constants.h:134
int const FED_VME_MIN
Definition: Constants.h:82
int const FIBER_uTCA_MIN1
Definition: Constants.h:128
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_FEDSpigot ( HcalElectronicsId const &  eid)

Definition at line 259 of file HashFunctions.cc.

References HcalElectronicsId::crateId(), HcalElectronicsId::dccid(), hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, hcaldqm::utilities::hash(), HcalElectronicsId::isVMEid(), HcalElectronicsId::slot(), and HcalElectronicsId::spigot().

259  {
260  // note that hashing of uTCA is done by FED-Slot...
261  return eid.isVMEid()
263  : utilities::hash(HcalElectronicsId(eid.crateId(), eid.slot(), FIBER_uTCA_MIN1, FIBERCH_MIN, false));
264  }
int const FIBER_VME_MIN
Definition: Constants.h:125
int const FIBERCH_MIN
Definition: Constants.h:134
int const FIBER_uTCA_MIN1
Definition: Constants.h:128
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_FEDSpigot ( std::string const &  name)

Definition at line 361 of file HashFunctions.cc.

References hcaldqm::utilities::fed2crate(), hcaldqm::constants::FED_uTCA_MIN, hcaldqm::constants::FED_VME_MIN, hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, HcalElectronicsId::rawId(), and alignCSCRings::s.

361  {
362  int pos = name.find('S');
363  int fed = std::stoi(name.substr(3, pos - 3), nullptr);
364  int s = std::stoi(name.substr(pos + 1, name.length() - pos - 1), nullptr);
365  if (fed >= FED_uTCA_MIN) {
366  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(fed);
367  return HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId();
368  } else
370 
371  return HcalElectronicsId().rawId();
372  }
constexpr uint32_t rawId() const
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:10
int const FIBER_VME_MIN
Definition: Constants.h:125
int const FED_uTCA_MIN
Definition: Constants.h:87
int const FIBERCH_MIN
Definition: Constants.h:134
int const FED_VME_MIN
Definition: Constants.h:82
int const FIBER_uTCA_MIN1
Definition: Constants.h:128
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_Fiber ( HcalElectronicsId const &  )

Definition at line 300 of file HashFunctions.cc.

300 { return 0; }
uint32_t hcaldqm::hashfunctions::hash_Fiber ( std::string const &  )

Definition at line 434 of file HashFunctions.cc.

References HcalElectronicsId::rawId().

434 { return HcalElectronicsId().rawId(); }
constexpr uint32_t rawId() const
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_FiberCh ( HcalElectronicsId const &  eid)

Definition at line 304 of file HashFunctions.cc.

304 { return 0; }
uint32_t hcaldqm::hashfunctions::hash_FiberCh ( std::string const &  )

Definition at line 444 of file HashFunctions.cc.

References HcalElectronicsId::rawId().

444 { return HcalElectronicsId().rawId(); }
constexpr uint32_t rawId() const
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_FiberFiberCh ( HcalElectronicsId const &  )

Definition at line 302 of file HashFunctions.cc.

302 { return 0; }
uint32_t hcaldqm::hashfunctions::hash_FiberFiberCh ( std::string const &  )

Definition at line 439 of file HashFunctions.cc.

References HcalElectronicsId::rawId().

439 { return HcalElectronicsId().rawId(); }
constexpr uint32_t rawId() const
Readout chain identification for Hcal.
uint32_t hcaldqm::hashfunctions::hash_HBHEPartition ( HcalDetId const &  did)

Definition at line 47 of file HashFunctions.cc.

References cond::hash, hcaldqm::utilities::hash(), HcalBarrel, and HcalDetId::iphi().

47  {
48  int iphi = did.iphi();
49  uint32_t hash = 0;
50  if (iphi >= 3 && iphi <= 26)
51  hash = utilities::hash(HcalDetId(HcalBarrel, 1, 3, 1));
52  else if (iphi >= 27 && iphi <= 50)
53  hash = utilities::hash(HcalDetId(HcalBarrel, 1, 27, 1));
54  else
55  hash = utilities::hash(HcalDetId(HcalBarrel, 1, 1, 1));
56 
57  return hash;
58  }
uint32_t hcaldqm::hashfunctions::hash_HBHEPartition ( std::string const &  name)

Definition at line 217 of file HashFunctions.cc.

References HcalBarrel, and DetId::rawId().

217  {
218  if (name[4] == 'a')
219  return HcalDetId(HcalBarrel, 1, 5, 1).rawId();
220  else if (name[4] == 'b')
221  return HcalDetId(HcalBarrel, 1, 29, 1).rawId();
222  else
223  return HcalDetId(HcalBarrel, 1, 55, 1).rawId();
224 
225  return HcalDetId().rawId();
226  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t hcaldqm::hashfunctions::hash_HFPMiphi ( HcalDetId const &  did)

Definition at line 43 of file HashFunctions.cc.

References hcaldqm::utilities::hash(), HcalForward, HcalDetId::ieta(), and HcalDetId::iphi().

43  {
44  return utilities::hash(HcalDetId(HcalForward, did.ieta() > 0 ? 1 : -1, did.iphi(), 1));
45  }
uint32_t hcaldqm::hashfunctions::hash_HFPMiphi ( std::string const &  name)

Definition at line 198 of file HashFunctions.cc.

References HcalForward, and DetId::rawId().

198  {
199  int iphi = std::stoi(name.substr(7, name.length() - 7), nullptr);
200  int ieta = name[2] == 'P' ? 1 : -1;
201  return HcalDetId(HcalForward, ieta, iphi, 1).rawId();
202  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t hcaldqm::hashfunctions::hash_ieta ( HcalDetId const &  did)

Definition at line 34 of file HashFunctions.cc.

References hcaldqm::utilities::hash(), HcalBarrel, and HcalDetId::ieta().

34 { return utilities::hash(HcalDetId(HcalBarrel, did.ieta(), 1, 1)); }
uint32_t hcaldqm::hashfunctions::hash_ieta ( std::string const &  name)

Definition at line 170 of file HashFunctions.cc.

References HcalBarrel, and DetId::rawId().

170  {
171  int ieta = std::stoi(name.substr(4, name.length() - 4), nullptr);
172  return HcalDetId(HcalBarrel, ieta, 1, 1).rawId();
173  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t hcaldqm::hashfunctions::hash_iphi ( HcalDetId const &  did)

Definition at line 32 of file HashFunctions.cc.

References hcaldqm::utilities::hash(), HcalBarrel, and HcalDetId::iphi().

32 { return utilities::hash(HcalDetId(HcalBarrel, 1, did.iphi(), 1)); }
uint32_t hcaldqm::hashfunctions::hash_iphi ( std::string const &  name)

Definition at line 159 of file HashFunctions.cc.

References HcalBarrel, and DetId::rawId().

159  {
160  int iphi = std::stoi(name.substr(4, name.length() - 4), nullptr);
161  return HcalDetId(HcalBarrel, 1, iphi, 1).rawId();
162  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t hcaldqm::hashfunctions::hash_Subdet ( HcalDetId const &  did)

by HcalDetId

HcalDetId

Definition at line 10 of file HashFunctions.cc.

References hcaldqm::utilities::hash(), and HcalDetId::subdet().

Referenced by DigiTask::globalEndLuminosityBlock().

10 { return utilities::hash(HcalDetId(did.subdet(), 1, 1, 1)); }
uint32_t hcaldqm::hashfunctions::hash_Subdet ( std::string const &  name)

Definition at line 64 of file HashFunctions.cc.

References mps_fire::i, DetId::rawId(), hcaldqm::constants::SUBDET_NAME, and hcaldqm::constants::SUBDET_NUM.

64  {
65  for (int i = 0; i < constants::SUBDET_NUM; i++)
67  return (HcalDetId((HcalSubdetector)(i + 1), 1, 1, 1).rawId());
68 
69  return HcalDetId().rawId();
70  }
int const SUBDET_NUM
Definition: Constants.h:164
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::string const SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:166
HcalSubdetector
Definition: HcalAssistant.h:31
uint32_t hcaldqm::hashfunctions::hash_Subdetdepth ( HcalDetId const &  did)

Definition at line 20 of file HashFunctions.cc.

References HcalDetId::depth(), hcaldqm::utilities::hash(), and HcalDetId::subdet().

20  {
21  return utilities::hash(HcalDetId(did.subdet(), 1, 1, did.depth()));
22  }
uint32_t hcaldqm::hashfunctions::hash_Subdetdepth ( std::string const &  name)

Definition at line 126 of file HashFunctions.cc.

References HLT_FULL_cff::depth, mps_fire::i, DetId::rawId(), AlCaHLTBitMon_QueryRunRegistry::string, hcaldqm::constants::SUBDET_NAME, and hcaldqm::constants::SUBDET_NUM.

126  {
127  std::string sub = name.substr(0, 2);
128  int depth = std::stoi(name.substr(7, name.length() - 7), nullptr);
129  for (int i = 0; i < constants::SUBDET_NUM; i++)
130  if (constants::SUBDET_NAME[i] == sub)
131  return HcalDetId((HcalSubdetector)(i + 1), 1, 1, depth).rawId();
132 
133  return HcalDetId().rawId();
134  }
int const SUBDET_NUM
Definition: Constants.h:164
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::string const SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:166
HcalSubdetector
Definition: HcalAssistant.h:31
uint32_t hcaldqm::hashfunctions::hash_Subdetieta ( HcalDetId const &  did)

Definition at line 16 of file HashFunctions.cc.

References hcaldqm::utilities::hash(), HcalDetId::ieta(), and HcalDetId::subdet().

16  {
17  return utilities::hash(HcalDetId(did.subdet(), did.ieta(), 1, 1));
18  }
uint32_t hcaldqm::hashfunctions::hash_Subdetieta ( std::string const &  name)

Definition at line 109 of file HashFunctions.cc.

References mps_fire::i, DetId::rawId(), AlCaHLTBitMon_QueryRunRegistry::string, hcaldqm::constants::SUBDET_NAME, and hcaldqm::constants::SUBDET_NUM.

109  {
110  std::string sub = name.substr(0, 2);
111  int ieta = std::stoi(name.substr(6, name.length() - 6), nullptr);
112  for (int i = 0; i < constants::SUBDET_NUM; i++)
113  if (constants::SUBDET_NAME[i] == sub)
114  return HcalDetId((HcalSubdetector)(i + 1), ieta, 1, 1).rawId();
115 
116  // default
117  return HcalDetId().rawId();
118  }
int const SUBDET_NUM
Definition: Constants.h:164
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::string const SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:166
HcalSubdetector
Definition: HcalAssistant.h:31
uint32_t hcaldqm::hashfunctions::hash_Subdetiphi ( HcalDetId const &  did)

Definition at line 12 of file HashFunctions.cc.

References hcaldqm::utilities::hash(), HcalDetId::iphi(), and HcalDetId::subdet().

12  {
13  return utilities::hash(HcalDetId(did.subdet(), 1, did.iphi(), 1));
14  }
uint32_t hcaldqm::hashfunctions::hash_Subdetiphi ( std::string const &  name)

Definition at line 92 of file HashFunctions.cc.

References mps_fire::i, DetId::rawId(), AlCaHLTBitMon_QueryRunRegistry::string, hcaldqm::constants::SUBDET_NAME, and hcaldqm::constants::SUBDET_NUM.

92  {
93  std::string sub = name.substr(0, 2);
94  int iphi = std::stoi(name.substr(6, name.length() - 6), nullptr);
95  for (int i = 0; i < constants::SUBDET_NUM; i++)
96  if (constants::SUBDET_NAME[i] == sub)
97  return HcalDetId((HcalSubdetector)(i + 1), 1, iphi, 1).rawId();
98 
99  // default
100  return HcalDetId().rawId();
101  }
int const SUBDET_NUM
Definition: Constants.h:164
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::string const SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:166
HcalSubdetector
Definition: HcalAssistant.h:31
uint32_t hcaldqm::hashfunctions::hash_SubdetPM ( HcalDetId const &  did)

Definition at line 24 of file HashFunctions.cc.

References hcaldqm::utilities::hash(), HcalDetId::ieta(), and HcalDetId::subdet().

24  {
25  return utilities::hash(HcalDetId(did.subdet(), did.ieta() > 0 ? 1 : -1, 1, 1));
26  }
uint32_t hcaldqm::hashfunctions::hash_SubdetPM ( std::string const &  name)

Definition at line 78 of file HashFunctions.cc.

References mps_fire::i, DetId::rawId(), hcaldqm::constants::SUBDET_NUM, and hcaldqm::constants::SUBDETPM_NAME.

78  {
79  for (int i = 0; i < constants::SUBDET_NUM * 2; i++)
81  return HcalDetId((HcalSubdetector)(i / 2 + 1), i % 2 == 0 ? -1 : 1, 1, 1).rawId();
82 
83  return HcalDetId().rawId();
84  }
int const SUBDET_NUM
Definition: Constants.h:164
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::string const SUBDETPM_NAME[2 *SUBDET_NUM]
Definition: Constants.h:167
HcalSubdetector
Definition: HcalAssistant.h:31
uint32_t hcaldqm::hashfunctions::hash_SubdetPMiphi ( HcalDetId const &  did)

Definition at line 28 of file HashFunctions.cc.

References hcaldqm::utilities::hash(), HcalDetId::ieta(), HcalDetId::iphi(), and HcalDetId::subdet().

28  {
29  return utilities::hash(HcalDetId(did.subdet(), did.ieta() > 0 ? 1 : -1, did.iphi(), 1));
30  }
uint32_t hcaldqm::hashfunctions::hash_SubdetPMiphi ( std::string const &  name)

Definition at line 143 of file HashFunctions.cc.

References mps_fire::i, DetId::rawId(), AlCaHLTBitMon_QueryRunRegistry::string, hcaldqm::constants::SUBDET_NUM, and hcaldqm::constants::SUBDETPM_NAME.

143  {
144  std::string sub = name.substr(0, 3);
145  int iphi = std::stoi(name.substr(7, name.length() - 7), nullptr);
146  for (int i = 0; i < constants::SUBDET_NUM * 2; i++)
147  if (constants::SUBDETPM_NAME[i] == sub)
148  return HcalDetId((HcalSubdetector)(i / 2 + 1), i % 2 == 0 ? -1 : 1, iphi, 1).rawId();
149 
150  return HcalDetId().rawId();
151  }
int const SUBDET_NUM
Definition: Constants.h:164
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::string const SUBDETPM_NAME[2 *SUBDET_NUM]
Definition: Constants.h:167
HcalSubdetector
Definition: HcalAssistant.h:31
uint32_t hcaldqm::hashfunctions::hash_TChannel ( HcalTrigTowerDetId const &  tid)

Definition at line 494 of file HashFunctions.cc.

References HcalTrigTowerDetId::depth(), hcaldqm::utilities::hash(), HcalTrigTowerDetId::ieta(), and HcalTrigTowerDetId::iphi().

494  {
495  return utilities::hash(HcalTrigTowerDetId(tid.ieta(), tid.iphi(), tid.depth()));
496  }
uint32_t hcaldqm::hashfunctions::hash_TChannel ( std::string const &  )

Definition at line 573 of file HashFunctions.cc.

References DetId::rawId().

573 { return HcalTrigTowerDetId().rawId(); }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t hcaldqm::hashfunctions::hash_TTdepth ( HcalTrigTowerDetId const &  tid)

Definition at line 490 of file HashFunctions.cc.

References HcalTrigTowerDetId::depth(), and hcaldqm::utilities::hash().

490  {
491  return utilities::hash(HcalTrigTowerDetId(1, 1, tid.depth()));
492  }
uint32_t hcaldqm::hashfunctions::hash_TTdepth ( std::string const &  name)

Definition at line 561 of file HashFunctions.cc.

References HLT_FULL_cff::depth.

561  {
562  int depth = std::stoi(name.substr(5, name.length() - 5), nullptr);
563  return HcalTrigTowerDetId(1, 1, depth);
564  }
uint32_t hcaldqm::hashfunctions::hash_TTSubdet ( HcalTrigTowerDetId const &  tid)

by TrigTowerDetId

Definition at line 474 of file HashFunctions.cc.

References hcaldqm::utilities::hash(), and HcalTrigTowerDetId::ietaAbs().

474  {
475  return utilities::hash(HcalTrigTowerDetId(tid.ietaAbs() >= 29 ? 29 : 1, 1));
476  }
uint32_t hcaldqm::hashfunctions::hash_TTSubdet ( std::string const &  name)

Definition at line 502 of file HashFunctions.cc.

References DetId::rawId().

502  {
503  if (name == "HBHE")
504  return HcalTrigTowerDetId(1, 1).rawId();
505  else
506  return HcalTrigTowerDetId(29, 1).rawId();
507 
508  return HcalTrigTowerDetId().rawId();
509  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t hcaldqm::hashfunctions::hash_TTSubdetFW ( HcalTrigTowerDetId const &  tid,
HcalElectronicsId const &  eid 
)

by Mixed ElectronicsId and TrigTowerDetId

by Mixed Id

Definition at line 578 of file HashFunctions.cc.

References hcaldqm::utilities::hash(), HcalTrigTowerDetId::ietaAbs(), DetId::rawId(), and HcalElectronicsId::slot().

578  {
579  if (tid.ietaAbs() < 29) {
580  if (eid.slot() % 3 == 1)
581  return utilities::hash(HcalTrigTowerDetId(1, 1));
582  else if (eid.slot() % 3 == 2)
583  return utilities::hash(HcalTrigTowerDetId(17, 1));
584  else if (eid.slot() % 3 == 0)
585  return utilities::hash(HcalTrigTowerDetId(19, 1));
586  } else
587  return utilities::hash(HcalTrigTowerDetId(29, 1));
588 
589  return HcalTrigTowerDetId().rawId();
590  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t hcaldqm::hashfunctions::hash_TTSubdetFW ( std::string const &  name)

Definition at line 606 of file HashFunctions.cc.

References DetId::rawId().

606  {
607  if (name == "HB")
608  return HcalTrigTowerDetId(1, 1).rawId();
609  else if (name == "HBHE")
610  return HcalTrigTowerDetId(17, 1).rawId();
611  else if (name == "HE")
612  return HcalTrigTowerDetId(19, 1).rawId();
613  else
614  return HcalTrigTowerDetId(29, 1).rawId();
615 
616  return HcalTrigTowerDetId().rawId();
617  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t hcaldqm::hashfunctions::hash_TTSubdetieta ( HcalTrigTowerDetId const &  tid)

Definition at line 488 of file HashFunctions.cc.

488 { return 0; }
uint32_t hcaldqm::hashfunctions::hash_TTSubdetieta ( std::string const &  )

Definition at line 553 of file HashFunctions.cc.

References DetId::rawId().

553 { return HcalTrigTowerDetId().rawId(); }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t hcaldqm::hashfunctions::hash_TTSubdetPM ( HcalTrigTowerDetId const &  tid)

Definition at line 478 of file HashFunctions.cc.

References hcaldqm::utilities::hash(), HcalTrigTowerDetId::ieta(), and HcalTrigTowerDetId::ietaAbs().

478  {
479  return utilities::hash(
480  HcalTrigTowerDetId(tid.ietaAbs() < 29 ? (tid.ieta() < 0 ? -1 : 1) : (tid.ieta() < 0 ? -29 : 29), 1));
481  }
uint32_t hcaldqm::hashfunctions::hash_TTSubdetPM ( std::string const &  name)

Definition at line 515 of file HashFunctions.cc.

References DetId::rawId().

515  {
516  if (name == "HBHEM")
517  return HcalTrigTowerDetId(-1, 1).rawId();
518  else if (name == "HBHEP")
519  return HcalTrigTowerDetId(1, 1).rawId();
520  else if (name == "HFM")
521  return HcalTrigTowerDetId(-29, 1).rawId();
522  else
523  return HcalTrigTowerDetId(29, 1).rawId();
524 
525  return HcalTrigTowerDetId().rawId();
526  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t hcaldqm::hashfunctions::hash_TTSubdetPMiphi ( HcalTrigTowerDetId const &  tid)

Definition at line 483 of file HashFunctions.cc.

References hcaldqm::utilities::hash(), HcalTrigTowerDetId::ieta(), HcalTrigTowerDetId::ietaAbs(), and HcalTrigTowerDetId::iphi().

483  {
484  return utilities::hash(
485  HcalTrigTowerDetId(tid.ietaAbs() < 29 ? (tid.ieta() < 0 ? 0 : 1) : (tid.ieta() < 0 ? 2 : 3), tid.iphi()));
486  }
uint32_t hcaldqm::hashfunctions::hash_TTSubdetPMiphi ( std::string const &  name)

Definition at line 534 of file HashFunctions.cc.

References DetId::rawId(), and AlCaHLTBitMon_QueryRunRegistry::string.

534  {
535  int pos = name.find("iphi");
536  std::string sub = name.substr(0, pos);
537  int iphi = std::stoi(name.substr(pos + 4, name.length() - pos - 4), nullptr);
538  if (name == "HBHEM")
539  return HcalTrigTowerDetId(-1, iphi).rawId();
540  else if (name == "HBHEP")
541  return HcalTrigTowerDetId(1, iphi).rawId();
542  else if (name == "HFM")
543  return HcalTrigTowerDetId(-29, iphi).rawId();
544  else
545  return HcalTrigTowerDetId(29, iphi).rawId();
546 
547  return HcalTrigTowerDetId().rawId();
548  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::string hcaldqm::hashfunctions::name_Crate ( HcalElectronicsId const &  eid)

Definition at line 396 of file HashFunctions.cc.

References HcalElectronicsId::crateId(), mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

396  {
397  char name[16];
398  sprintf(name, "Crate%d", eid.crateId());
399 
400  // Note: previous, different hashes were returned for the two dccids in a VME
401  // crate. These now count as one crate.
402  // if (eid.isVMEid()) {
403  // sprintf(name, "Crate%d_VME_DCC%d", eid.crateId(), eid.dccid());
404  //} else {
405  // sprintf(name, "Crate%d", eid.crateId());
406  //}
407  return std::string(name);
408  }
std::string hcaldqm::hashfunctions::name_CrateSlot ( HcalElectronicsId const &  eid)
std::string hcaldqm::hashfunctions::name_CrateSpigot ( HcalElectronicsId const &  eid)
std::string hcaldqm::hashfunctions::name_DChannel ( HcalDetId const &  did)

Definition at line 228 of file HashFunctions.cc.

References HcalDetId::depth(), HcalDetId::ieta(), HcalDetId::iphi(), mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, HcalDetId::subdet(), and hcaldqm::constants::SUBDET_NAME.

228  {
229  char name[40];
230  sprintf(
231  name, "%s-%d-%d-%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.ieta(), did.iphi(), did.depth());
232  return std::string(name);
233  }
std::string const SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:166
std::string hcaldqm::hashfunctions::name_depth ( HcalDetId const &  did)

Definition at line 175 of file HashFunctions.cc.

References HcalDetId::depth(), HcalOuter, mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, and HcalDetId::subdet().

175  {
176  char name[10];
177  if (did.subdet() == HcalOuter)
178  sprintf(name, "depthHO");
179  else
180  sprintf(name, "depth%d", did.depth());
181  return std::string(name);
182  }
std::string hcaldqm::hashfunctions::name_EChannel ( HcalElectronicsId const &  eid)

Definition at line 459 of file HashFunctions.cc.

References HcalElectronicsId::crateId(), HcalElectronicsId::dccid(), HcalElectronicsId::fiberChanId(), HcalElectronicsId::fiberIndex(), HcalElectronicsId::isVMEid(), mergeVDriftHistosByStation::name, HcalElectronicsId::slot(), HcalElectronicsId::spigot(), and AlCaHLTBitMon_QueryRunRegistry::string.

459  {
460  char name[20];
461  if (eid.isVMEid())
462  sprintf(name, "%d-%d-%d-%d", eid.dccid(), eid.spigot(), eid.fiberIndex(), eid.fiberChanId());
463  else
464  sprintf(name, "%d-%d-%d-%d", eid.crateId(), eid.slot(), eid.fiberIndex(), eid.fiberChanId());
465  return std::string(name);
466  }
std::string hcaldqm::hashfunctions::name_Electronics ( HcalElectronicsId const &  eid)

Definition at line 446 of file HashFunctions.cc.

References HcalElectronicsId::isVMEid(), and AlCaHLTBitMon_QueryRunRegistry::string.

446  {
447  return eid.isVMEid() ? std::string("VME") : std::string("uTCA");
448  }
std::string hcaldqm::hashfunctions::name_FED ( HcalElectronicsId const &  eid)
std::string hcaldqm::hashfunctions::name_FEDSlot ( HcalElectronicsId const &  eid)

Definition at line 374 of file HashFunctions.cc.

References hcaldqm::utilities::crate2fed(), HcalElectronicsId::crateId(), HcalElectronicsId::dccid(), HcalElectronicsId::isVMEid(), mergeVDriftHistosByStation::name, HcalElectronicsId::slot(), HcalElectronicsId::spigot(), and AlCaHLTBitMon_QueryRunRegistry::string.

374  {
375  char name[20];
376  sprintf(name,
377  "FED%dS%d",
378  eid.isVMEid() ? eid.dccid() + 700 : utilities::crate2fed(eid.crateId(), eid.slot()),
379  eid.isVMEid() ? eid.spigot() : eid.slot());
380  return std::string(name);
381  }
uint16_t crate2fed(int crate, int slot)
Definition: Utilities.cc:29
std::string hcaldqm::hashfunctions::name_FEDSpigot ( HcalElectronicsId const &  eid)

Definition at line 352 of file HashFunctions.cc.

References hcaldqm::utilities::crate2fed(), HcalElectronicsId::crateId(), HcalElectronicsId::dccid(), HcalElectronicsId::isVMEid(), mergeVDriftHistosByStation::name, HcalElectronicsId::slot(), HcalElectronicsId::spigot(), and AlCaHLTBitMon_QueryRunRegistry::string.

352  {
353  char name[20];
354  sprintf(name,
355  "FED%dS%d",
356  eid.isVMEid() ? eid.dccid() + 700 : utilities::crate2fed(eid.crateId(), eid.slot()),
357  eid.isVMEid() ? eid.spigot() : eid.slot());
358  return std::string(name);
359  }
uint16_t crate2fed(int crate, int slot)
Definition: Utilities.cc:29
std::string hcaldqm::hashfunctions::name_Fiber ( HcalElectronicsId const &  )

Definition at line 431 of file HashFunctions.cc.

431 { return "None"; }
std::string hcaldqm::hashfunctions::name_FiberCh ( HcalElectronicsId const &  )

Definition at line 441 of file HashFunctions.cc.

441 { return "None"; }
std::string hcaldqm::hashfunctions::name_FiberFiberCh ( HcalElectronicsId const &  )

Definition at line 436 of file HashFunctions.cc.

436 { return "None"; }
std::string hcaldqm::hashfunctions::name_HBHEPartition ( HcalDetId const &  did)

Definition at line 204 of file HashFunctions.cc.

References c, HcalDetId::iphi(), mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

204  {
205  char c;
206  if (did.iphi() >= 3 && did.iphi() <= 26)
207  c = 'a';
208  else if (did.iphi() >= 27 && did.iphi() <= 50)
209  c = 'b';
210  else
211  c = 'c';
212  char name[10];
213  sprintf(name, "HBHE%c", c);
214  return std::string(name);
215  }
const edm::EventSetup & c
std::string hcaldqm::hashfunctions::name_HFPMiphi ( HcalDetId const &  did)

Definition at line 192 of file HashFunctions.cc.

References HcalDetId::ieta(), HcalDetId::iphi(), mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

192  {
193  char name[12];
194  snprintf(name, sizeof(name), "HF%ciphi%d", did.ieta() > 0 ? 'P' : 'M', did.iphi());
195  return std::string(name);
196  }
std::string hcaldqm::hashfunctions::name_ieta ( HcalDetId const &  did)

Definition at line 164 of file HashFunctions.cc.

References HcalDetId::ieta(), mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

164  {
165  char name[10];
166  sprintf(name, "ieta%d", did.ieta());
167  return std::string(name);
168  }
std::string hcaldqm::hashfunctions::name_iphi ( HcalDetId const &  did)

Definition at line 153 of file HashFunctions.cc.

References HcalDetId::iphi(), mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

153  {
154  char name[10];
155  sprintf(name, "iphi%d", did.iphi());
156  return std::string(name);
157  }
std::string hcaldqm::hashfunctions::name_Subdet ( HcalDetId const &  did)

Definition at line 62 of file HashFunctions.cc.

References HcalDetId::subdet(), and hcaldqm::constants::SUBDET_NAME.

62 { return constants::SUBDET_NAME[did.subdet() - 1]; }
std::string const SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:166
std::string hcaldqm::hashfunctions::name_Subdetdepth ( HcalDetId const &  did)

Definition at line 120 of file HashFunctions.cc.

References HcalDetId::depth(), mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, HcalDetId::subdet(), and hcaldqm::constants::SUBDET_NAME.

120  {
121  char name[20];
122  sprintf(name, "%sdepth%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.depth());
123  return std::string(name);
124  }
std::string const SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:166
std::string hcaldqm::hashfunctions::name_Subdetieta ( HcalDetId const &  did)

Definition at line 103 of file HashFunctions.cc.

References HcalDetId::ieta(), mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, HcalDetId::subdet(), and hcaldqm::constants::SUBDET_NAME.

103  {
104  char name[20];
105  sprintf(name, "%sieta%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.ieta());
106  return std::string(name);
107  }
std::string const SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:166
std::string hcaldqm::hashfunctions::name_Subdetiphi ( HcalDetId const &  did)

Definition at line 86 of file HashFunctions.cc.

References HcalDetId::iphi(), mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, HcalDetId::subdet(), and hcaldqm::constants::SUBDET_NAME.

86  {
87  char name[10];
88  sprintf(name, "%siphi%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.iphi());
89  return std::string(name);
90  }
std::string const SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:166
std::string hcaldqm::hashfunctions::name_SubdetPM ( HcalDetId const &  did)

Definition at line 72 of file HashFunctions.cc.

References HcalDetId::ieta(), mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, HcalDetId::subdet(), and hcaldqm::constants::SUBDET_NAME.

72  {
73  char name[10];
74  sprintf(name, "%s%s", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.ieta() > 0 ? "P" : "M");
75  return std::string(name);
76  }
std::string const SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:166
std::string hcaldqm::hashfunctions::name_SubdetPMiphi ( HcalDetId const &  did)

Definition at line 136 of file HashFunctions.cc.

References HcalDetId::ieta(), HcalDetId::iphi(), mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, HcalDetId::subdet(), and hcaldqm::constants::SUBDET_NAME.

136  {
137  char name[20];
138  sprintf(
139  name, "%s%siphi%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.ieta() > 0 ? "P" : "M", did.iphi());
140  return std::string(name);
141  }
std::string const SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:166
std::string hcaldqm::hashfunctions::name_TChannel ( HcalTrigTowerDetId const &  tid)

Definition at line 566 of file HashFunctions.cc.

References cms::cuda::stream, and AlCaHLTBitMon_QueryRunRegistry::string.

566  {
567  std::ostringstream stream;
568  stream << tid;
569  return std::string(stream.str());
570  }
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
std::string hcaldqm::hashfunctions::name_TTdepth ( HcalTrigTowerDetId const &  tid)

Definition at line 555 of file HashFunctions.cc.

References HcalTrigTowerDetId::depth(), mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

555  {
556  char name[10];
557  sprintf(name, "depth%d", tid.depth());
558  return std::string(name);
559  }
std::string hcaldqm::hashfunctions::name_TTSubdet ( HcalTrigTowerDetId const &  tid)

Definition at line 498 of file HashFunctions.cc.

References HcalTrigTowerDetId::ietaAbs(), and hcaldqm::constants::TPSUBDET_NAME.

498  {
499  return constants::TPSUBDET_NAME[tid.ietaAbs() < 29 ? 0 : 1];
500  }
std::string const TPSUBDET_NAME[TPSUBDET_NUM]
Definition: Constants.h:169
std::string hcaldqm::hashfunctions::name_TTSubdetFW ( HcalTrigTowerDetId const &  tid,
HcalElectronicsId const &  eid 
)

Definition at line 592 of file HashFunctions.cc.

References HcalTrigTowerDetId::ietaAbs(), HcalElectronicsId::slot(), and hcaldqm::constants::TPSUBDETFW_NAME.

592  {
593  int idx = -1;
594  if (tid.ietaAbs() < 29) {
595  if (eid.slot() % 3 == 1)
596  idx = 0;
597  else if (eid.slot() % 3 == 2)
598  idx = 1;
599  else if (eid.slot() % 3 == 0)
600  idx = 2;
601  } else
602  idx = 3;
603  return constants::TPSUBDETFW_NAME[idx];
604  }
std::string const TPSUBDETFW_NAME[2 *TPSUBDET_NUM]
Definition: Constants.h:171
std::string hcaldqm::hashfunctions::name_TTSubdetieta ( HcalTrigTowerDetId const &  tid)

Definition at line 550 of file HashFunctions.cc.

550 { return "None"; }
std::string hcaldqm::hashfunctions::name_TTSubdetPM ( HcalTrigTowerDetId const &  tid)

Definition at line 511 of file HashFunctions.cc.

References HcalTrigTowerDetId::ieta(), HcalTrigTowerDetId::ietaAbs(), and hcaldqm::constants::TPSUBDETPM_NAME.

Referenced by name_TTSubdetPMiphi().

511  {
512  return constants::TPSUBDETPM_NAME[tid.ietaAbs() < 29 ? (tid.ieta() < 0 ? 0 : 1) : (tid.ieta() < 0 ? 2 : 3)];
513  }
std::string const TPSUBDETPM_NAME[2 *TPSUBDET_NUM]
Definition: Constants.h:170
std::string hcaldqm::hashfunctions::name_TTSubdetPMiphi ( HcalTrigTowerDetId const &  tid)

Definition at line 528 of file HashFunctions.cc.

References HcalTrigTowerDetId::iphi(), mergeVDriftHistosByStation::name, name_TTSubdetPM(), and AlCaHLTBitMon_QueryRunRegistry::string.

528  {
529  char name[10];
530  sprintf(name, "%siphi%d", name_TTSubdetPM(tid).c_str(), tid.iphi());
531  return std::string(name);
532  }
std::string name_TTSubdetPM(HcalTrigTowerDetId const &)

Variable Documentation

hash_function_did const hcaldqm::hashfunctions::hash_did[nHashType_did]
Initial value:
uint32_t hash_Subdetdepth(HcalDetId const &)
uint32_t hash_SubdetPM(HcalDetId const &)
uint32_t hash_SubdetPMiphi(HcalDetId const &)
uint32_t hash_Subdetiphi(HcalDetId const &)
uint32_t hash_Subdetieta(HcalDetId const &)
uint32_t hash_iphi(HcalDetId const &)
uint32_t hash_DChannel(HcalDetId const &)
uint32_t hash_depth(HcalDetId const &)
uint32_t hash_Subdet(HcalDetId const &)
uint32_t hash_ieta(HcalDetId const &)
uint32_t hash_HFPMiphi(HcalDetId const &)
uint32_t hash_HBHEPartition(HcalDetId const &)

Definition at line 176 of file HashFunctions.h.

Referenced by RecHitTask::bookHistograms(), DigiTask::bookHistograms(), and hcaldqm::mapper::HashMapper::getHash().

hash_function_eid const hcaldqm::hashfunctions::hash_eid[nHashType_eid-nHashType_did-1]
Initial value:
uint32_t hash_Crate(HcalElectronicsId const &)
uint32_t hash_FED(HcalElectronicsId const &)
uint32_t hash_FiberFiberCh(HcalElectronicsId const &)
uint32_t hash_Fiber(HcalElectronicsId const &)
uint32_t hash_FEDSpigot(HcalElectronicsId const &)
uint32_t hash_FEDSlot(HcalElectronicsId const &)
uint32_t hash_FiberCh(HcalElectronicsId const &)
uint32_t hash_CrateSlot(HcalElectronicsId const &)
uint32_t hash_CrateSpigot(HcalElectronicsId const &)
uint32_t hash_Electronics(HcalElectronicsId const &)
uint32_t hash_EChannel(HcalElectronicsId const &)

Definition at line 188 of file HashFunctions.h.

Referenced by hcaldqm::mapper::HashMapper::getHash().

hash_function_mixid const hcaldqm::hashfunctions::hash_mixid[nHashType_mixid-nHashType_tid-1] = {hash_TTSubdetFW}

Definition at line 201 of file HashFunctions.h.

Referenced by hcaldqm::mapper::HashMapper::getHash().

std::string const hcaldqm::hashfunctions::hash_names[nhashes]
Initial value:
= {
"Subdet", "Subdetiphi", "Subdetieta", "Subdetdepth", "SubdetPM", "SubdetPMiphi",
"iphi", "ieta", "depth", "HFPMiphi", "HBHEPartition", "DChannel",
"FED", "FEDSpigot", "FEDSlot", "Crate", "CrateSpigot", "CrateSlot",
"Fiber", "FiberFiberCh", "FiberCh", "Electronics", "EChannel",
"TTSubdet", "TTSubdetPM", "TTSubdetPMiphi", "TTSubdetieta", "TTdepth", "TChannel",
"TTSubdetFW"}

Definition at line 230 of file HashFunctions.h.

Referenced by hcaldqm::mapper::HashMapper::getHashTypeName().

hash_function_tid const hcaldqm::hashfunctions::hash_tid[nHashType_tid-nHashType_eid-1]
Initial value:
= {
uint32_t hash_TTSubdet(HcalTrigTowerDetId const &)
uint32_t hash_TTSubdetieta(HcalTrigTowerDetId const &)
uint32_t hash_TTSubdetPM(HcalTrigTowerDetId const &)
uint32_t hash_TChannel(HcalTrigTowerDetId const &)
uint32_t hash_TTSubdetPMiphi(HcalTrigTowerDetId const &)
uint32_t hash_TTdepth(HcalTrigTowerDetId const &)

Definition at line 199 of file HashFunctions.h.

Referenced by hcaldqm::mapper::HashMapper::getHash().

name_function_did const hcaldqm::hashfunctions::name_did[nHashType_did]
Initial value:
std::string name_Subdetieta(HcalDetId const &)
std::string name_Subdetiphi(HcalDetId const &)
std::string name_SubdetPM(HcalDetId const &)
std::string name_DChannel(HcalDetId const &)
std::string name_HFPMiphi(HcalDetId const &)
std::string name_SubdetPMiphi(HcalDetId const &)
std::string name_ieta(HcalDetId const &)
std::string name_HBHEPartition(HcalDetId const &)
std::string name_depth(HcalDetId const &)
std::string name_iphi(HcalDetId const &)
std::string name_Subdet(HcalDetId const &)
std::string name_Subdetdepth(HcalDetId const &)

Definition at line 202 of file HashFunctions.h.

Referenced by hcaldqm::mapper::HashMapper::getName().

name_function_eid const hcaldqm::hashfunctions::name_eid[nHashType_eid-nHashType_did-1]
Initial value:
std::string name_CrateSpigot(HcalElectronicsId const &)
std::string name_Electronics(HcalElectronicsId const &)
std::string name_CrateSlot(HcalElectronicsId const &)
std::string name_Crate(HcalElectronicsId const &)
std::string name_FiberFiberCh(HcalElectronicsId const &)
std::string name_FiberCh(HcalElectronicsId const &)
std::string name_EChannel(HcalElectronicsId const &)
std::string name_FEDSpigot(HcalElectronicsId const &)
std::string name_FED(HcalElectronicsId const &)
std::string name_Fiber(HcalElectronicsId const &)
std::string name_FEDSlot(HcalElectronicsId const &)

Definition at line 214 of file HashFunctions.h.

Referenced by hcaldqm::mapper::HashMapper::getName().

name_function_mixid const hcaldqm::hashfunctions::name_mixid[nHashType_mixid-nHashType_tid-1] = {name_TTSubdetFW}

Definition at line 227 of file HashFunctions.h.

Referenced by hcaldqm::mapper::HashMapper::getName().

name_function_tid const hcaldqm::hashfunctions::name_tid[nHashType_tid-nHashType_eid-1]
Initial value:
= {
std::string name_TTdepth(HcalTrigTowerDetId const &)
std::string name_TChannel(HcalTrigTowerDetId const &)
std::string name_TTSubdet(HcalTrigTowerDetId const &)
std::string name_TTSubdetieta(HcalTrigTowerDetId const &)
std::string name_TTSubdetPMiphi(HcalTrigTowerDetId const &)
std::string name_TTSubdetPM(HcalTrigTowerDetId const &)

Definition at line 225 of file HashFunctions.h.

Referenced by hcaldqm::mapper::HashMapper::getName().

int const hcaldqm::hashfunctions::nhashes