CMS 3D CMS Logo

HashFunctions.h
Go to the documentation of this file.
1 #ifndef HashFunctions_h
2 #define HashFunctions_h
3 
14 
15 namespace hcaldqm {
16  namespace hashfunctions {
20  uint32_t hash_Subdet(HcalDetId const &);
21  uint32_t hash_Subdetiphi(HcalDetId const &);
22  uint32_t hash_Subdetieta(HcalDetId const &);
23  uint32_t hash_Subdetdepth(HcalDetId const &);
24  uint32_t hash_SubdetPM(HcalDetId const &);
25  uint32_t hash_SubdetPMiphi(HcalDetId const &);
26  uint32_t hash_iphi(HcalDetId const &);
27  uint32_t hash_ieta(HcalDetId const &);
28  uint32_t hash_depth(HcalDetId const &);
29  uint32_t hash_HFPMiphi(HcalDetId const &);
30  uint32_t hash_HBHEPartition(HcalDetId const &);
31  uint32_t hash_DChannel(HcalDetId const &);
32 
36  uint32_t hash_FED(HcalElectronicsId const &);
37  uint32_t hash_FEDSpigot(HcalElectronicsId const &);
38  uint32_t hash_FEDSlot(HcalElectronicsId const &);
39  uint32_t hash_Crate(HcalElectronicsId const &);
40  uint32_t hash_CrateSpigot(HcalElectronicsId const &);
41  uint32_t hash_CrateSlot(HcalElectronicsId const &);
42  uint32_t hash_Fiber(HcalElectronicsId const &);
43  uint32_t hash_FiberFiberCh(HcalElectronicsId const &);
44  uint32_t hash_FiberCh(HcalElectronicsId const &);
45  uint32_t hash_Electronics(HcalElectronicsId const &);
46  uint32_t hash_EChannel(HcalElectronicsId const &);
47 
51  uint32_t hash_TTSubdet(HcalTrigTowerDetId const &);
52  uint32_t hash_TTSubdetPM(HcalTrigTowerDetId const &);
53  uint32_t hash_TTSubdetPMiphi(HcalTrigTowerDetId const &);
54  uint32_t hash_TTSubdetieta(HcalTrigTowerDetId const &);
55  uint32_t hash_TTdepth(HcalTrigTowerDetId const &);
56  uint32_t hash_TChannel(HcalTrigTowerDetId const &);
57 
70 
71  uint32_t hash_Subdet(std::string const &);
72  uint32_t hash_Subdetiphi(std::string const &);
73  uint32_t hash_Subdetieta(std::string const &);
74  uint32_t hash_Subdetdepth(std::string const &);
75  uint32_t hash_SubdetPM(std::string const &);
76  uint32_t hash_SubdetPMiphi(std::string const &);
77  uint32_t hash_iphi(std::string const &);
78  uint32_t hash_ieta(std::string const &);
79  uint32_t hash_depth(std::string const &);
80  uint32_t hash_HFPMiphi(std::string const &);
81  uint32_t hash_HBHEPartition(std::string const &);
82  uint32_t hash_DChannel(std::string const &);
83 
95 
96  uint32_t hash_FED(std::string const &);
97  uint32_t hash_FEDSpigot(std::string const &);
98  uint32_t hash_FEDSlot(std::string const &);
99  uint32_t hash_Crate(std::string const &);
100  uint32_t hash_CrateSpigot(std::string const &);
101  uint32_t hash_CrateSlot(std::string const &);
102  uint32_t hash_Fiber(std::string const &);
103  uint32_t hash_FiberFiberCh(std::string const &);
104  uint32_t hash_FiberCh(std::string const &);
105  uint32_t hash_Electronics(std::string const &);
106  uint32_t hash_EChannel(std::string const &);
107 
114 
115  uint32_t hash_TTSubdet(std::string const &);
116  uint32_t hash_TTSubdetPM(std::string const &);
117  uint32_t hash_TTSubdetPMiphi(std::string const &);
118  uint32_t hash_TTSubdetieta(std::string const &);
119  uint32_t hash_TTdepth(std::string const &);
120  uint32_t hash_TChannel(std::string const &);
121 
122  enum HashType {
123  fSubdet = 0,
129  fiphi = 6,
130  fieta = 7,
131  fdepth = 8,
134  fDChannel = 11,
136  fFED = 13,
138  fFEDSlot = 15,
139  fCrate = 16,
142  fFiber = 19,
144  fFiberCh = 21,
146  fEChannel = 23,
148  fTTSubdet = 25,
152  fTTdepth = 29,
153  fTChannel = 30,
156  };
157  typedef uint32_t (*hash_function_did)(HcalDetId const &);
158  typedef uint32_t (*hash_function_eid)(HcalElectronicsId const &);
159  typedef uint32_t (*hash_function_tid)(HcalTrigTowerDetId const &);
169  hash_iphi,
170  hash_ieta,
171  hash_depth,
174  hash_DChannel};
177  hash_FEDSlot,
178  hash_Crate,
181  hash_Fiber,
183  hash_FiberCh,
185  hash_EChannel};
194  name_iphi,
195  name_ieta,
196  name_depth,
199  name_DChannel};
202  name_FEDSlot,
203  name_Crate,
206  name_Fiber,
208  name_FiberCh,
210  name_EChannel};
215  "Subdet", "Subdetiphi", "Subdetieta", "Subdetdepth", "SubdetPM", "SubdetPMiphi",
216  "iphi", "ieta", "depth", "HFPMiphi", "HBHEPartition", "DChannel",
217 
218  "FED", "FEDSpigot", "FEDSlot", "Crate", "CrateSpigot", "CrateSlot",
219  "Fiber", "FiberFiberCh", "FiberCh", "Electronics", "EChannel",
220 
221  "TTSubdet", "TTSubdetPM", "TTSubdetPMiphi", "TTSubdetieta", "TTdepth", "TChannel"};
222  } // namespace hashfunctions
223 } // namespace hcaldqm
224 
225 #endif
std::string name_CrateSpigot(HcalElectronicsId const &)
std::string name_Electronics(HcalElectronicsId const &)
uint32_t hash_Subdetdepth(HcalDetId const &)
std::string name_CrateSlot(HcalElectronicsId const &)
std::string name_Crate(HcalElectronicsId const &)
uint32_t hash_SubdetPM(HcalDetId const &)
uint32_t(* hash_function_eid)(HcalElectronicsId const &)
uint32_t hash_SubdetPMiphi(HcalDetId const &)
std::string name_FiberFiberCh(HcalElectronicsId const &)
uint32_t hash_TTSubdet(HcalTrigTowerDetId const &)
uint32_t hash_Subdetiphi(HcalDetId const &)
std::string name_TTdepth(HcalTrigTowerDetId const &)
std::string name_FiberCh(HcalElectronicsId const &)
std::string name_TChannel(HcalTrigTowerDetId const &)
uint32_t hash_Subdetieta(HcalDetId const &)
std::string name_Subdetieta(HcalDetId const &)
std::string name_Subdetiphi(HcalDetId const &)
uint32_t hash_Crate(HcalElectronicsId const &)
uint32_t hash_iphi(HcalDetId const &)
uint32_t hash_FED(HcalElectronicsId const &)
std::string const hash_names[nhashes]
std::string(* name_function_did)(HcalDetId const &)
std::string(* name_function_eid)(HcalElectronicsId const &)
uint32_t hash_DChannel(HcalDetId const &)
uint32_t hash_TTSubdetieta(HcalTrigTowerDetId const &)
uint32_t hash_FiberFiberCh(HcalElectronicsId const &)
std::string name_EChannel(HcalElectronicsId const &)
std::string name_FEDSpigot(HcalElectronicsId const &)
uint32_t hash_Fiber(HcalElectronicsId const &)
uint32_t hash_TTSubdetPM(HcalTrigTowerDetId const &)
std::string name_TTSubdet(HcalTrigTowerDetId const &)
std::string name_SubdetPM(HcalDetId const &)
hash_function_tid const hash_tid[nHashType_tid-nHashType_eid-1]
std::string name_TTSubdetieta(HcalTrigTowerDetId const &)
uint32_t hash_TChannel(HcalTrigTowerDetId const &)
uint32_t hash_FEDSpigot(HcalElectronicsId const &)
uint32_t hash_depth(HcalDetId const &)
std::string name_DChannel(HcalDetId const &)
uint32_t(* hash_function_tid)(HcalTrigTowerDetId const &)
std::string name_HFPMiphi(HcalDetId const &)
hash_function_did const hash_did[nHashType_did]
uint32_t hash_TTSubdetPMiphi(HcalTrigTowerDetId const &)
uint32_t hash_FEDSlot(HcalElectronicsId const &)
uint32_t hash_Subdet(HcalDetId const &)
std::string(* name_function_tid)(HcalTrigTowerDetId const &)
uint32_t hash_FiberCh(HcalElectronicsId const &)
uint32_t hash_ieta(HcalDetId const &)
std::string name_TTSubdetPMiphi(HcalTrigTowerDetId const &)
std::string name_SubdetPMiphi(HcalDetId const &)
uint32_t hash_HFPMiphi(HcalDetId const &)
name_function_tid const name_tid[nHashType_tid-nHashType_eid-1]
hash_function_eid const hash_eid[nHashType_eid-nHashType_did-1]
uint32_t hash_CrateSlot(HcalElectronicsId const &)
uint32_t hash_CrateSpigot(HcalElectronicsId const &)
std::string name_FED(HcalElectronicsId const &)
std::string name_ieta(HcalDetId const &)
std::string name_HBHEPartition(HcalDetId const &)
std::string name_depth(HcalDetId const &)
name_function_did const name_did[nHashType_did]
std::string name_iphi(HcalDetId const &)
uint32_t(* hash_function_did)(HcalDetId const &)
uint32_t hash_Electronics(HcalElectronicsId const &)
name_function_eid const name_eid[nHashType_eid-nHashType_did-1]
uint32_t hash_EChannel(HcalElectronicsId const &)
Readout chain identification for Hcal.
uint32_t hash_TTdepth(HcalTrigTowerDetId const &)
std::string name_TTSubdetPM(HcalTrigTowerDetId const &)
uint32_t hash_HBHEPartition(HcalDetId const &)
std::string name_Fiber(HcalElectronicsId const &)
std::string name_FEDSlot(HcalElectronicsId const &)
std::string name_Subdet(HcalDetId const &)
std::string name_Subdetdepth(HcalDetId const &)