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 
30  : m_restrictions(conf.getUntrackedParameter<std::string>("Exclude")),
31  m_mergePosition(conf.getUntrackedParameter<bool>("MergePosition")) {
32 #ifdef DebugLog
33  std::cout << "HcalTopologyIdealEP::HcalTopologyIdealEP with Exclude: "
34  << m_restrictions << " MergePosition: " << m_mergePosition
35  << std::endl;
36  edm::LogInfo("HCAL") << "HcalTopologyIdealEP::HcalTopologyIdealEP";
37 #endif
38  setWhatProduced(this,
40 }
41 
43 
45  desc.addUntracked<std::string>( "Exclude", "" );
46  desc.addUntracked<bool>("MergePosition", false);
47  descriptions.add( "hcalTopologyIdealBase", desc );
48 }
49 
50 // ------------ method called to produce the data ------------
53 #ifdef DebugLog
54  std::cout << "HcalTopologyIdealEP::produce(const IdealGeometryRecord& iRecord)" << std::endl;
55  edm::LogInfo("HCAL") << "HcalTopologyIdealEP::produce(const HcalGeometryRecord& iRecord)";
56 #endif
58  iRecord.get( pHRNDC );
59  const HcalDDDRecConstants* hdc = &(*pHRNDC);
60 
61 #ifdef DebugLog
62  std::cout << "mode = " << hdc->getTopoMode() << ", maxDepthHB = "
63  << hdc->getMaxDepth(0) << ", maxDepthHE = " << hdc->getMaxDepth(1)
64  << ", maxDepthHF = " << hdc->getMaxDepth(2) << std::endl;
65  edm::LogInfo("HCAL") << "mode = " << hdc->getTopoMode() << ", maxDepthHB = "
66  << hdc->getMaxDepth(0) << ", maxDepthHE = "
67  << hdc->getMaxDepth(1) << ", maxDepthHF = "
68  << hdc->getMaxDepth(2);
69 #endif
70  ReturnType myTopo(new HcalTopology(hdc,m_mergePosition));
71 
73  if (!m_restrictions.empty()) {
75  if (!error.empty()) {
76  throw cms::Exception("Parse Error","Parse error on Exclude "+error);
77  }
78  }
79  return myTopo ;
80 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:116
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::string parse(const std::string &line)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
HcalTopologyIdealEP(const edm::ParameterSet &)
HcalTopology(const HcalDDDRecConstants *hcons, const bool mergePosition=false)
Definition: HcalTopology.cc:16
ReturnType produce(const HcalRecNumberingRecord &)
int getMaxDepth(const int &type) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool get(HolderT &iHolder) const
std::unique_ptr< HcalTopology > ReturnType