CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HcalTestNS Class Reference

#include <HcalTestNS.h>

Public Member Functions

bool compare (HcalNumberingFromDDD::HcalID const &, uint32_t const &)
 
 HcalTestNS (const edm::EventSetup *)
 
virtual ~HcalTestNS ()
 

Private Attributes

const HcalDDDRecConstantshcons_
 

Detailed Description

Definition at line 8 of file HcalTestNS.h.

Constructor & Destructor Documentation

HcalTestNS::HcalTestNS ( const edm::EventSetup iSetup)

Definition at line 11 of file HcalTestNS.cc.

References edm::EventSetup::get(), hcons_, edm::ESHandleBase::isValid(), and edm::ESHandle< T >::product().

11  {
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 }
const HcalDDDRecConstants * hcons_
Definition: HcalTestNS.h:16
T get() const
Definition: EventSetup.h:73
bool isValid() const
Definition: ESHandle.h:44
T const * product() const
Definition: ESHandle.h:86
HcalTestNS::~HcalTestNS ( )
virtual

Definition at line 22 of file HcalTestNS.cc.

22 {}

Member Function Documentation

bool HcalTestNS::compare ( HcalNumberingFromDDD::HcalID const &  tmp,
uint32_t const &  id 
)

Definition at line 24 of file HcalTestNS.cc.

References TauDecayModes::dec, HcalNumberingScheme::getUnitID(), hcons_, convertSQLiteXML::ok, DetId::rawId(), HcalHitRelabeller::relabel(), generator_cfi::scheme, and AlCaHLTBitMon_QueryRunRegistry::string.

24  {
26  uint32_t id0 = scheme->getUnitID(tmp);
28  bool ok = (id == hid.rawId());
29 #ifdef EDM_ML_DEBUG
30  std::string ck = (ok ? " OK " : " **** ERROR ****");
31  edm::LogVerbatim("HcalSim") << "HcalTestNS:: Det ID from HCalSD " << HcalDetId(id) << " " << std::hex << id
32  << std::dec << " from relabller " << HcalDetId(hid) << " " << std::hex << hid.rawId()
33  << std::dec << ck;
34 #endif
35  return ok;
36 }
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
const HcalDDDRecConstants * hcons_
Definition: HcalTestNS.h:16
Definition: DetId.h:17
DetId relabel(const uint32_t testId) const
tmp
align.sh
Definition: createJobs.py:716

Member Data Documentation

const HcalDDDRecConstants* HcalTestNS::hcons_
private

Definition at line 16 of file HcalTestNS.h.

Referenced by compare(), and HcalTestNS().