CMS 3D CMS Logo

HGCalTriggerBackendDetId.cc
Go to the documentation of this file.
3 #include <iostream>
4 
6 
8 
12  int zside = (zp < 0) ? 1 : 0;
16 }
17 
19  if (!gen.null()) {
20  if (gen.det() != Forward) {
21  throw cms::Exception("Invalid DetId")
22  << "Cannot initialize HGCalTriggerBackendDetId from " << std::hex << gen.rawId() << std::dec;
23  }
24  }
25  id_ = gen.rawId();
26 }
27 
29  if (!gen.null()) {
30  if (gen.det() != Forward) {
31  throw cms::Exception("Invalid DetId")
32  << "Cannot assign HGCalTriggerBackendDetId from " << std::hex << gen.rawId() << std::dec;
33  }
34  }
35  id_ = gen.rawId();
36  return (*this);
37 }
38 
39 std::ostream& operator<<(std::ostream& s, const HGCalTriggerBackendDetId& id) {
40  return s << "HGCalTriggerBackendDetId::lpGBT:Stage1 FPGA:Stage2 FPGA= " << id.isLpGBT() << ":" << id.isStage1FPGA()
41  << ":" << id.isStage1Link() << ":" << id.isStage2FPGA() << " z= " << id.zside() << " sector= " << id.sector()
42  << " id= " << id.label();
43 }
static const int kHGCalTriggerClassIdentifierMask
std::ostream & operator<<(std::ostream &s, const HGCalTriggerBackendDetId &id)
char const * label
int zside() const
get the z-side of the backend object (1/-1)
HGCalTriggerBackendDetId & operator=(const DetId &id)
int sector() const
get the sector #
int label() const
get the value
Definition: DetId.h:17
uint32_t id_
Definition: DetId.h:69
static const int kHGCalTriggerClassIdentifierOffset