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 {
17  namespace hashfunctions
18  {
22  uint32_t hash_Subdet(HcalDetId const&);
23  uint32_t hash_Subdetiphi(HcalDetId const&);
24  uint32_t hash_Subdetieta(HcalDetId const&);
25  uint32_t hash_Subdetdepth(HcalDetId const&);
26  uint32_t hash_SubdetPM(HcalDetId const&);
27  uint32_t hash_SubdetPMiphi(HcalDetId const&);
28  uint32_t hash_iphi(HcalDetId const&);
29  uint32_t hash_ieta(HcalDetId const&);
30  uint32_t hash_depth(HcalDetId const&);
31  uint32_t hash_HFPMiphi(HcalDetId const&);
32  uint32_t hash_HBHEPartition(HcalDetId const&);
33  uint32_t hash_DChannel(HcalDetId const&);
34 
38  uint32_t hash_FED(HcalElectronicsId const&);
39  uint32_t hash_FEDSpigot(HcalElectronicsId const&);
40  uint32_t hash_FEDSlot(HcalElectronicsId const&);
41  uint32_t hash_Crate(HcalElectronicsId const&);
42  uint32_t hash_CrateSpigot(HcalElectronicsId const&);
43  uint32_t hash_CrateSlot(HcalElectronicsId const&);
44  uint32_t hash_Fiber(HcalElectronicsId const&);
45  uint32_t hash_FiberFiberCh(HcalElectronicsId const&);
46  uint32_t hash_FiberCh(HcalElectronicsId const&);
47  uint32_t hash_Electronics(HcalElectronicsId const&);
48  uint32_t hash_EChannel(HcalElectronicsId const&);
49 
53  uint32_t hash_TTSubdet(HcalTrigTowerDetId const&);
54  uint32_t hash_TTSubdetPM(HcalTrigTowerDetId const&);
55  uint32_t hash_TTSubdetPMiphi(HcalTrigTowerDetId const&);
56  uint32_t hash_TTSubdetieta(HcalTrigTowerDetId const&);
57  uint32_t hash_TTdepth(HcalTrigTowerDetId const&);
58  uint32_t hash_TChannel(HcalTrigTowerDetId const&);
59 
72 
73  uint32_t hash_Subdet(std::string const&);
74  uint32_t hash_Subdetiphi(std::string const&);
75  uint32_t hash_Subdetieta(std::string const&);
76  uint32_t hash_Subdetdepth(std::string const&);
77  uint32_t hash_SubdetPM(std::string const&);
78  uint32_t hash_SubdetPMiphi(std::string const&);
79  uint32_t hash_iphi(std::string const&);
80  uint32_t hash_ieta(std::string const&);
81  uint32_t hash_depth(std::string const&);
82  uint32_t hash_HFPMiphi(std::string const&);
83  uint32_t hash_HBHEPartition(std::string const&);
84  uint32_t hash_DChannel(std::string const&);
85 
97 
98  uint32_t hash_FED(std::string const&);
99  uint32_t hash_FEDSpigot(std::string const&);
100  uint32_t hash_FEDSlot(std::string const&);
101  uint32_t hash_Crate(std::string const&);
102  uint32_t hash_CrateSpigot(std::string const&);
103  uint32_t hash_CrateSlot(std::string const&);
104  uint32_t hash_Fiber(std::string const&);
105  uint32_t hash_FiberFiberCh(std::string const&);
106  uint32_t hash_FiberCh(std::string const&);
107  uint32_t hash_Electronics(std::string const&);
108  uint32_t hash_EChannel(std::string const&);
109 
116 
117  uint32_t hash_TTSubdet(std::string const&);
118  uint32_t hash_TTSubdetPM(std::string const&);
119  uint32_t hash_TTSubdetPMiphi(std::string const&);
120  uint32_t hash_TTSubdetieta(std::string const&);
121  uint32_t hash_TTdepth(std::string const&);
122  uint32_t hash_TChannel(std::string const&);
123 
124  enum HashType
125  {
126  fSubdet = 0,
132  fiphi = 6,
133  fieta = 7,
134  fdepth = 8,
137  fDChannel = 11,
139  fFED = 13,
141  fFEDSlot = 15,
142  fCrate = 16,
145  fFiber = 19,
147  fFiberCh = 21,
149  fEChannel = 23,
151  fTTSubdet = 25,
155  fTTdepth = 29,
156  fTChannel = 30,
159  };
160  typedef uint32_t (*hash_function_did)(HcalDetId const&);
161  typedef uint32_t (*hash_function_eid)(HcalElectronicsId const&);
162  typedef uint32_t (*hash_function_tid)(HcalTrigTowerDetId const&);
170  hash_HBHEPartition, hash_DChannel
171  };
176  hash_Electronics, hash_EChannel
177  };
180  hash_TTSubdetieta, hash_TTdepth, hash_TChannel
181  };
186  name_HBHEPartition, name_DChannel
187  };
192  name_Electronics, name_EChannel
193  };
196  name_TTSubdetieta, name_TTdepth, name_TChannel
197  };
201  "Subdet", "Subdetiphi", "Subdetieta", "Subdetdepth",
202  "SubdetPM", "SubdetPMiphi", "iphi", "ieta", "depth",
203  "HFPMiphi", "HBHEPartition", "DChannel",
204 
205  "FED", "FEDSpigot", "FEDSlot",
206  "Crate", "CrateSpigot", "CrateSlot",
207  "Fiber", "FiberFiberCh", "FiberCh",
208  "Electronics", "EChannel",
209 
210  "TTSubdet", "TTSubdetPM", "TTSubdetPMiphi",
211  "TTSubdetieta", "TTdepth", "TChannel"
212  };
213  }
214 }
215 
216 #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 &)