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:71
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 gather_cfg::cout, TauDecayModes::dec, HcalNumberingScheme::getUnitID(), hcons_, convertSQLiteXML::ok, DetId::rawId(), and HcalHitRelabeller::relabel().

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::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
const HcalDDDRecConstants * hcons_
Definition: HcalTestNS.h:16
Definition: DetId.h:18
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
DetId relabel(const uint32_t testId) const

Member Data Documentation

const HcalDDDRecConstants* HcalTestNS::hcons_
private

Definition at line 16 of file HcalTestNS.h.

Referenced by compare(), and HcalTestNS().