CMS 3D CMS Logo

HcalTestNS.cc
Go to the documentation of this file.
8 
9 //#define EDM_ML_DEBUG
10 
13  iSetup->get<HcalRecNumberingRecord>().get(hdc);
14  if (hdc.isValid()) {
15  hcons_ = hdc.product();
16  } else {
17  edm::LogError("HcalSim") << "HcalTestNS : Cannot find HcalDDDRecConstant";
18  hcons_ = nullptr;
19  }
20 }
21 
23 
24 bool HcalTestNS::compare(HcalNumberingFromDDD::HcalID const& tmp, uint32_t const& id) {
25  HcalNumberingScheme* scheme = dynamic_cast<HcalNumberingScheme*>(new HcalTestNumberingScheme(false));
26  uint32_t id0 = scheme->getUnitID(tmp);
28  bool ok = (id == hid.rawId());
29 #ifdef EDM_ML_DEBUG
30  std::cout << "Det ID from HCalSD " << HcalDetId(id) << " " << std::hex << id << std::dec << " from relabller "
31  << HcalDetId(hid) << " " << std::hex << hid.rawId() << std::dec;
32  if (!ok)
33  std::cout << " **** ERROR ****" << std::endl;
34  else
35  std::cout << " OK " << std::endl;
36 #endif
37  return ok;
38 }
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
bool compare(HcalNumberingFromDDD::HcalID const &, uint32_t const &)
Definition: HcalTestNS.cc:24
const HcalDDDRecConstants * hcons_
Definition: HcalTestNS.h:16
HcalTestNS(const edm::EventSetup *)
Definition: HcalTestNS.cc:11
Definition: DetId.h:18
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
T get() const
Definition: EventSetup.h:71
virtual ~HcalTestNS()
Definition: HcalTestNS.cc:22
DetId relabel(const uint32_t testId) const
bool isValid() const
Definition: ESHandle.h:44
T const * product() const
Definition: ESHandle.h:86