CMS 3D CMS Logo

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