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 
29 //
30 // constants, enums and typedefs
31 //
32 
33 //
34 // static data member definitions
35 //
36 
37 //
38 // constructors and destructor
39 //
41  : m_restrictions(conf.getUntrackedParameter<std::string>("Exclude")),
42  m_mergePosition(conf.getUntrackedParameter<bool>("MergePosition")),
43  m_pSet(conf) {
44 #ifdef DebugLog
45  std::cout << "HcalTopologyIdealEP::HcalTopologyIdealEP with Exclude: "
46  << m_restrictions << " MergePosition: " << m_mergePosition
47  << std::endl;
48  edm::LogInfo("HCAL") << "HcalTopologyIdealEP::HcalTopologyIdealEP";
49 #endif
50  setWhatProduced(this,
53 }
54 
55 
57 
59 
61  desc.addUntracked<std::string>( "Exclude", "" );
62  desc.addUntracked<bool>("MergePosition", false);
63  descriptions.add( "hcalTopologyIdealBase", desc );
64 }
65 
66 //
67 // member functions
68 //
69 
70 // ------------ method called to produce the data ------------
73 #ifdef DebugLog
74  std::cout << "HcalTopologyIdealEP::produce(const IdealGeometryRecord& iRecord)" << std::endl;
75  edm::LogInfo("HCAL") << "HcalTopologyIdealEP::produce(const HcalGeometryRecord& iRecord)";
76 #endif
78  iRecord.get( pHRNDC );
79  const HcalDDDRecConstants* hdc = &(*pHRNDC);
80 
81 #ifdef DebugLog
82  std::cout << "mode = " << hdc->getTopoMode() << ", maxDepthHB = "
83  << hdc->getMaxDepth(0) << ", maxDepthHE = " << hdc->getMaxDepth(1)
84  << ", maxDepthHF = " << hdc->getMaxDepth(2) << std::endl;
85  edm::LogInfo("HCAL") << "mode = " << hdc->getTopoMode() << ", maxDepthHB = "
86  << hdc->getMaxDepth(0) << ", maxDepthHE = "
87  << hdc->getMaxDepth(1) << ", maxDepthHF = "
88  << hdc->getMaxDepth(2);
89 #endif
90  ReturnType myTopo(new HcalTopology(hdc,m_mergePosition));
91 
93  if (!m_restrictions.empty()) {
95  if (!error.empty()) {
96  throw cms::Exception("Parse Error","Parse error on Exclude "+error);
97  }
98  }
99  return myTopo ;
100 }
101 
102 
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void hcalRecordCallBack(const IdealGeometryRecord &)
std::string parse(const std::string &line)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
HcalTopologyIdealEP(const edm::ParameterSet &)
HcalTopology(const HcalDDDRecConstants *hcons, const bool mergePosition=false)
Definition: HcalTopology.cc:16
void get(HolderT &iHolder) const
ReturnType produce(const HcalRecNumberingRecord &)
int getMaxDepth(const int &type) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::shared_ptr< HcalTopology > ReturnType