CMS 3D CMS Logo

HcalTopologyIdealEP.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalTopologyIdealEP
4 // Class: HcalTopologyIdealEP
5 //
13 //
14 // Original Author: Jeremiah Mans
15 // Created: Mon Oct 3 11:35:27 CDT 2005
16 //
17 //
18 
26 
27 //#define DebugLog
28 
31  m_restrictions(conf.getUntrackedParameter<std::string>("Exclude")),
32  m_mergePosition(conf.getUntrackedParameter<bool>("MergePosition")) {
33 #ifdef DebugLog
34  std::cout << "HcalTopologyIdealEP::HcalTopologyIdealEP with Exclude: " << m_restrictions
35  << " MergePosition: " << m_mergePosition << std::endl;
36  edm::LogInfo("HCAL") << "HcalTopologyIdealEP::HcalTopologyIdealEP";
37 #endif
38 }
39 
42  desc.addUntracked<std::string>("Exclude", "");
43  desc.addUntracked<bool>("MergePosition", false);
44  descriptions.add("hcalTopologyIdealBase", desc);
45 }
46 
47 // ------------ method called to produce the data ------------
49 #ifdef DebugLog
50  std::cout << "HcalTopologyIdealEP::produce(const IdealGeometryRecord& iRecord)" << std::endl;
51  edm::LogInfo("HCAL") << "HcalTopologyIdealEP::produce(const HcalGeometryRecord& iRecord)";
52 #endif
53  const HcalDDDRecConstants& hdc = iRecord.get(m_hdcToken);
54 
55 #ifdef DebugLog
56  std::cout << "mode = " << hdc.getTopoMode() << ", maxDepthHB = " << hdc.getMaxDepth(0)
57  << ", maxDepthHE = " << hdc.getMaxDepth(1) << ", maxDepthHF = " << hdc.getMaxDepth(2) << std::endl;
58  edm::LogInfo("HCAL") << "mode = " << hdc.getTopoMode() << ", maxDepthHB = " << hdc.getMaxDepth(0)
59  << ", maxDepthHE = " << hdc.getMaxDepth(1) << ", maxDepthHF = " << hdc.getMaxDepth(2);
60 #endif
61  ReturnType myTopo(new HcalTopology(&hdc, m_mergePosition));
62 
64  if (!m_restrictions.empty()) {
66  if (!error.empty()) {
67  throw cms::Exception("Parse Error", "Parse error on Exclude " + error);
68  }
69  }
70  return myTopo;
71 }
ConfigurationDescriptions.h
HcalTopologyIdealEP::m_hdcToken
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > m_hdcToken
Definition: HcalTopologyIdealEP.h:29
HcalDDDRecConstants::getTopoMode
int getTopoMode() const
Definition: HcalDDDRecConstants.h:106
edm::ESInputTag
Definition: ESInputTag.h:87
MessageLogger.h
HcalTopologyIdealEP::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HcalTopologyIdealEP.cc:40
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
writedatasetfile.parser
parser
Definition: writedatasetfile.py:7
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
relativeConstraints.error
error
Definition: relativeConstraints.py:53
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
HcalTopologyIdealEP::produce
ReturnType produce(const HcalRecNumberingRecord &)
Definition: HcalTopologyIdealEP.cc:48
HcalTopologyIdealEP::ReturnType
std::unique_ptr< HcalTopology > ReturnType
Definition: HcalTopologyIdealEP.h:21
HcalTopologyIdealEP::m_restrictions
std::string m_restrictions
Definition: HcalTopologyIdealEP.h:30
ParameterSetDescription.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
HcalTopologyIdealEP::HcalTopologyIdealEP
HcalTopologyIdealEP(const edm::ParameterSet &)
Definition: HcalTopologyIdealEP.cc:29
HcalTopologyRestrictionParser.h
HcalRecNumberingRecord
Definition: HcalRecNumberingRecord.h:23
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
HcalTopology::HcalTopology
HcalTopology(const HcalDDDRecConstants *hcons, const bool mergePosition=false)
Definition: HcalTopology.cc:17
HcalTopologyIdealEP::m_mergePosition
bool m_mergePosition
Definition: HcalTopologyIdealEP.h:31
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalTopologyIdealEP.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
Exception
Definition: hltDiff.cc:245
HcalDDDRecConstants.h
Exception.h
HcalDDDRecConstants::getMaxDepth
int getMaxDepth(const int &type) const
Definition: HcalDDDRecConstants.h:88
HcalDDDRecConstants
Definition: HcalDDDRecConstants.h:23
HcalTopologyRestrictionParser
Definition: HcalTopologyRestrictionParser.h:21