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::HcalTestNS ( const edm::EventSetup iSetup)

Definition at line 11 of file HcalTestNS.cc.

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 }

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

◆ ~HcalTestNS()

HcalTestNS::~HcalTestNS ( )
virtual

Definition at line 22 of file HcalTestNS.cc.

22 {}

Member Function Documentation

◆ compare()

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

Definition at line 24 of file HcalTestNS.cc.

24  {
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::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 }

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

Member Data Documentation

◆ hcons_

const HcalDDDRecConstants* HcalTestNS::hcons_
private

Definition at line 16 of file HcalTestNS.h.

Referenced by compare(), and HcalTestNS().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
DetId
Definition: DetId.h:17
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
edm::ESHandle
Definition: DTSurvey.h:22
HcalRecNumberingRecord
Definition: HcalRecNumberingRecord.h:23
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalTestNumberingScheme
Definition: HcalTestNumberingScheme.h:11
HcalDetId
Definition: HcalDetId.h:12
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
HcalNumberingScheme
Definition: HcalNumberingScheme.h:13
generator_cfi.scheme
scheme
Definition: generator_cfi.py:22
HcalHitRelabeller::relabel
DetId relabel(const uint32_t testId) const
Definition: HcalHitRelabeller.cc:49
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
HcalTestNS::hcons_
const HcalDDDRecConstants * hcons_
Definition: HcalTestNS.h:16