test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
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_pSet(conf) {
43 #ifdef DebugLog
44  std::cout << "HcalTopologyIdealEP::HcalTopologyIdealEP" << std::endl;
45  edm::LogInfo("HCAL") << "HcalTopologyIdealEP::HcalTopologyIdealEP";
46 #endif
47  setWhatProduced(this,
50 }
51 
52 
54 
56 
58  desc.addUntracked<std::string>( "Exclude", "" );
59  descriptions.add( "hcalTopologyIdeal", desc );
60 }
61 
62 //
63 // member functions
64 //
65 
66 // ------------ method called to produce the data ------------
69 #ifdef DebugLog
70  std::cout << "HcalTopologyIdealEP::produce(const IdealGeometryRecord& iRecord)" << std::endl;
71  edm::LogInfo("HCAL") << "HcalTopologyIdealEP::produce(const HcalGeometryRecord& iRecord)";
72 #endif
74  iRecord.get( pHRNDC );
75  const HcalDDDRecConstants* hdc = &(*pHRNDC);
76 
77 #ifdef DebugLog
78  std::cout << "mode = " << hdc->getTopoMode() << ", maxDepthHB = "
79  << hdc->getMaxDepth(0) << ", maxDepthHE = " << hdc->getMaxDepth(1)
80  << ", maxDepthHF = " << hdc->getMaxDepth(2) << std::endl;
81  edm::LogInfo("HCAL") << "mode = " << hdc->getTopoMode() << ", maxDepthHB = "
82  << hdc->getMaxDepth(0) << ", maxDepthHE = "
83  << hdc->getMaxDepth(1) << ", maxDepthHF = "
84  << hdc->getMaxDepth(2);
85 #endif
86  ReturnType myTopo(new HcalTopology(hdc));
87 
89  if (!m_restrictions.empty()) {
91  if (!error.empty()) {
92  throw cms::Exception("Parse Error","Parse error on Exclude "+error);
93  }
94  }
95  return myTopo ;
96 }
97 
98 
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)
HcalTopology(const HcalDDDRecConstants *hcons)
Definition: HcalTopology.cc:17
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
int getMaxDepth(const int type) const
boost::shared_ptr< HcalTopology > ReturnType
HcalTopologyIdealEP(const edm::ParameterSet &)
void get(HolderT &iHolder) const
ReturnType produce(const HcalRecNumberingRecord &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
tuple cout
Definition: gather_cfg.py:145