CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
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=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecordtokReco_
 
const edm::ESGetToken< HcalDDDSimConstants, HcalSimNumberingRecordtokSim_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

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 60 of file HcalTestNumberingTest.cc.

61  : tokSim_(esConsumes<HcalDDDSimConstants, HcalSimNumberingRecord>()),
62  tokReco_(esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord>()) {}
const edm::ESGetToken< HcalDDDSimConstants, HcalSimNumberingRecord > tokSim_
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tokReco_

◆ ~HcalTestNumberingTester()

HcalTestNumberingTester::~HcalTestNumberingTester ( )
overridedefault

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 70 of file HcalTestNumberingTest.cc.

References TauDecayModes::dec, PVValHelper::eta, EnergyCorrector::etas, edm::EventSetup::getData(), HcalDDDSimConstants::getEtaDepth(), HcalDDDRecConstants::getEtaRange(), HcalDDDRecConstants::getPhis(), HcalNumberingScheme::getUnitID(), HcalBarrel, HcalEndcap, globals_cff::id1, globals_cff::id2, dqmdumpme::k, convertSQLiteXML::ok, phi, DetId::rawId(), HcalHitRelabeller::relabel(), AlCaHLTBitMon_QueryRunRegistry::string, createJobs::tmp, tokReco_, tokSim_, and ecaldqm::zside().

70  {
71  const HcalDDDSimConstants* hcs = &iSetup.getData(tokSim_);
72  const HcalDDDRecConstants* hcr = &iSetup.getData(tokReco_);
74  HcalNumberingScheme* schme2 = dynamic_cast<HcalNumberingScheme*>(new HcalTestNumberingScheme(false));
75 
76  for (int type = 0; type < 2; ++type) {
77  HcalSubdetector sub = (type == 0) ? HcalBarrel : HcalEndcap;
78  for (int zs = 0; zs < 2; ++zs) {
79  int zside = 2 * zs - 1;
80  std::pair<int, int> etas = hcr->getEtaRange(type);
81  for (int eta = etas.first; eta <= etas.second; ++eta) {
82  std::vector<std::pair<int, double> > phis = hcr->getPhis(sub, eta);
83  for (unsigned int k = 0; k < phis.size(); ++k) {
84  int phi = phis[k].first;
85  int lmin = (type == 1 && eta == 16) ? 8 : 1;
86  int lmax = (type == 1) ? 19 : ((eta == 16) ? 7 : 17);
87  for (int lay = lmin; lay <= lmax; ++lay) {
88  std::pair<int, int> etd = hcs->getEtaDepth(sub, eta, phi, zside, 0, lay);
89  HcalNumberingFromDDD::HcalID tmp(sub, zs, etd.second, etd.first, phi, phi, lay);
90  uint32_t id1 = schme1->getUnitID(tmp);
91  uint32_t id2 = schme2->getUnitID(tmp);
93  std::string ok = (id1 != id0.rawId()) ? " *** ERROR ***" : " ";
94  edm::LogVerbatim("HcalSim") << "I/P " << sub << ":" << zside * eta << ":" << phi << ":" << lay << " Normal "
95  << std::hex << id1 << std::dec << " " << HcalDetId(id1) << " Test " << std::hex
96  << id2 << std::dec << " " << HcalDetId(id0) << ok;
97  }
98  }
99  }
100  }
101  }
102 }
const edm::ESGetToken< HcalDDDSimConstants, HcalSimNumberingRecord > tokSim_
Log< level::Info, true > LogVerbatim
std::pair< int, int > getEtaRange(const int &i) const
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tokReco_
std::vector< std::pair< int, double > > getPhis(const int &subdet, const int &ieta) const
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id)
int zside(DetId const &)
std::pair< int, int > getEtaDepth(const int &det, int etaR, const int &phi, const int &zside, int depth, const int &lay) const
HcalSubdetector
Definition: HcalAssistant.h:31
DetId relabel(const uint32_t testId) const
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
tmp
align.sh
Definition: createJobs.py:716

◆ beginJob()

void HcalTestNumberingTester::beginJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 51 of file HcalTestNumberingTest.cc.

51 {}

◆ endJob()

void HcalTestNumberingTester::endJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 53 of file HcalTestNumberingTest.cc.

53 {}

◆ fillDescriptions()

void HcalTestNumberingTester::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 64 of file HcalTestNumberingTest.cc.

References edm::ConfigurationDescriptions::add(), and submitPVResolutionJobs::desc.

64  {
66  descriptions.add("hcalTestNumberingTest", desc);
67 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ tokReco_

const edm::ESGetToken<HcalDDDRecConstants, HcalRecNumberingRecord> HcalTestNumberingTester::tokReco_
private

Definition at line 57 of file HcalTestNumberingTest.cc.

Referenced by analyze().

◆ tokSim_

const edm::ESGetToken<HcalDDDSimConstants, HcalSimNumberingRecord> HcalTestNumberingTester::tokSim_
private

Definition at line 56 of file HcalTestNumberingTest.cc.

Referenced by analyze().