CMS 3D CMS Logo

List of all members | Public Member Functions
HcalTestNumberingTester Class Reference
Inheritance diagram for HcalTestNumberingTester:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (edm::Event const &iEvent, edm::EventSetup const &) override
 
void beginJob () override
 
void endJob () override
 
 HcalTestNumberingTester (const edm::ParameterSet &)
 
 ~HcalTestNumberingTester () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 45 of file HcalTestNumberingTest.cc.

Constructor & Destructor Documentation

◆ HcalTestNumberingTester()

HcalTestNumberingTester::HcalTestNumberingTester ( const edm::ParameterSet )
explicit

Definition at line 55 of file HcalTestNumberingTest.cc.

55 {}

◆ ~HcalTestNumberingTester()

HcalTestNumberingTester::~HcalTestNumberingTester ( )
override

Definition at line 57 of file HcalTestNumberingTest.cc.

57 {}

Member Function Documentation

◆ analyze()

void HcalTestNumberingTester::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 60 of file HcalTestNumberingTest.cc.

60  {
62  iSetup.get<HcalSimNumberingRecord>().get(pHSNDC);
64  iSetup.get<HcalRecNumberingRecord>().get(pHRNDC);
65 
66  if (pHSNDC.isValid() && pHRNDC.isValid()) {
67  std::cout << "about to de-reference the edm's" << std::endl;
68  HcalDDDSimConstants* hcs = (HcalDDDSimConstants*)(&(*pHSNDC));
69  HcalDDDRecConstants* hcr = (HcalDDDRecConstants*)(&(*pHRNDC));
71  HcalNumberingScheme* schme2 = dynamic_cast<HcalNumberingScheme*>(new HcalTestNumberingScheme(false));
72 
73  for (int type = 0; type < 2; ++type) {
74  HcalSubdetector sub = (type == 0) ? HcalBarrel : HcalEndcap;
75  for (int zs = 0; zs < 2; ++zs) {
76  int zside = 2 * zs - 1;
77  std::pair<int, int> etas = hcr->getEtaRange(type);
78  for (int eta = etas.first; eta <= etas.second; ++eta) {
79  std::vector<std::pair<int, double> > phis = hcr->getPhis(sub, eta);
80  for (unsigned int k = 0; k < phis.size(); ++k) {
81  int phi = phis[k].first;
82  int lmin = (type == 1 && eta == 16) ? 8 : 1;
83  int lmax = (type == 1) ? 19 : ((eta == 16) ? 7 : 17);
84  for (int lay = lmin; lay <= lmax; ++lay) {
85  std::pair<int, int> etd = hcs->getEtaDepth(sub, eta, phi, zside, 0, lay);
86  HcalNumberingFromDDD::HcalID tmp(sub, zs, etd.second, etd.first, phi, phi, lay);
87  uint32_t id1 = schme1->getUnitID(tmp);
88  uint32_t id2 = schme2->getUnitID(tmp);
90  std::cout << "I/P " << sub << ":" << zside * eta << ":" << phi << ":" << lay << " Normal " << std::hex
91  << id1 << std::dec << " " << HcalDetId(id1) << " Test " << std::hex << id2 << std::dec << " "
92  << HcalDetId(id0);
93  if (id1 != id0.rawId())
94  std::cout << " *** ERROR ***";
95  std::cout << std::endl;
96  }
97  }
98  }
99  }
100  }
101  }
102 }

References gather_cfg::cout, TauDecayModes::dec, PVValHelper::eta, EnergyCorrector::etas, edm::EventSetup::get(), get, HcalDDDSimConstants::getEtaDepth(), HcalDDDRecConstants::getEtaRange(), HcalDDDRecConstants::getPhis(), HcalNumberingScheme::getUnitID(), HcalBarrel, HcalEndcap, globals_cff::id1, globals_cff::id2, edm::ESHandleBase::isValid(), dqmdumpme::k, phi, DetId::rawId(), HcalHitRelabeller::relabel(), createJobs::tmp, and ecaldqm::zside().

◆ beginJob()

void HcalTestNumberingTester::beginJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 50 of file HcalTestNumberingTest.cc.

50 {}

◆ endJob()

void HcalTestNumberingTester::endJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 52 of file HcalTestNumberingTest.cc.

52 {}
HcalNumberingScheme::getUnitID
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id)
Definition: HcalNumberingScheme.cc:19
HcalDDDRecConstants::getPhis
std::vector< std::pair< int, double > > getPhis(const int &subdet, const int &ieta) const
Definition: HcalDDDRecConstants.cc:373
HcalNumberingFromDDD::HcalID
Definition: HcalNumberingFromDDD.h:21
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
globals_cff.id1
id1
Definition: globals_cff.py:33
gather_cfg.cout
cout
Definition: gather_cfg.py:144
HcalBarrel
Definition: HcalAssistant.h:33
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
HcalDDDSimConstants
Definition: HcalDDDSimConstants.h:24
DetId
Definition: DetId.h:17
EnergyCorrector.etas
etas
Definition: EnergyCorrector.py:45
PVValHelper::eta
Definition: PVValidationHelpers.h:70
edm::ESHandle
Definition: DTSurvey.h:22
dqmdumpme.k
k
Definition: dqmdumpme.py:60
HcalRecNumberingRecord
Definition: HcalRecNumberingRecord.h:23
HcalDDDSimConstants::getEtaDepth
std::pair< int, int > getEtaDepth(const int &det, int etaR, const int &phi, const int &zside, int depth, const int &lay) const
Definition: HcalDDDSimConstants.cc:252
HcalTestNumberingScheme
Definition: HcalTestNumberingScheme.h:11
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
HcalDetId
Definition: HcalDetId.h:12
get
#define get
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
HcalNumberingScheme
Definition: HcalNumberingScheme.h:13
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
DDAxes::phi
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
HcalDDDRecConstants::getEtaRange
std::pair< int, int > getEtaRange(const int &i) const
Definition: HcalDDDRecConstants.h:74
HcalEndcap
Definition: HcalAssistant.h:34
HcalDDDRecConstants
Definition: HcalDDDRecConstants.h:23
globals_cff.id2
id2
Definition: globals_cff.py:34
HcalSimNumberingRecord
Definition: HcalSimNumberingRecord.h:25
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143