CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
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 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
T getUntrackedParameter(std::string const &, T const &) const
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::string parse(const std::string &line)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
HcalTopologyIdealEP(const edm::ParameterSet &)
HcalTopology(const HcalDDDRecConstants *hcons, const bool mergePosition=false)
Definition: HcalTopology.cc:17
ReturnType produce(const HcalRecNumberingRecord &)
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > m_hdcToken
Log< level::Info, false > LogInfo
int getMaxDepth(const int &type) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
tuple cout
Definition: gather_cfg.py:144
std::unique_ptr< HcalTopology > ReturnType