CMS 3D CMS Logo

HcalDetIdTransform.h
Go to the documentation of this file.
1 #ifndef CondFormats_HcalObjects_HcalDetIdTransform_h
2 #define CondFormats_HcalObjects_HcalDetIdTransform_h
3 
4 class HcalDetId;
5 
6 namespace HcalDetIdTransform {
7  // When you add more transforms, add codes for them at the end
8  // of the enum, just before "N_TRANSFORMS". Don't forget to adjust
9  // the "transform" function accordingly.
10  enum {
11  RAWID = 0, // Raw detector id
12  IETA, // ieta() + shift
13  IETAABS, // ietaAbs()
14  SUBDET, // subdetId()
15  IETADEPTH, // maps ieta() and depth() into a unique number
16  IETAABSDEPTH, // maps ietaAbs() and depth() into a unique number
18  };
19 
20  // Transform the detector id
21  unsigned transform(const HcalDetId& id, unsigned transformCode);
22 
23  // The following function will throw an exception
24  // if the transform code is invalid
25  void validateCode(unsigned transformCode);
26 } // namespace HcalDetIdTransform
27 
28 #endif // CondFormats_HcalObjects_HcalDetIdTransform_h
void validateCode(unsigned transformCode)
unsigned transform(const HcalDetId &id, unsigned transformCode)