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 
57  hcalTopologyConstants.add<std::string>( "mode", "HcalTopologyMode::LHC" );
58  hcalTopologyConstants.add<int>( "maxDepthHB", 2 );
59  hcalTopologyConstants.add<int>( "maxDepthHE", 3 );
60 
61  edm::ParameterSetDescription hcalSLHCTopologyConstants;
62  hcalSLHCTopologyConstants.add<std::string>( "mode", "HcalTopologyMode::SLHC" );
63  hcalSLHCTopologyConstants.add<int>( "maxDepthHB", 7 );
64  hcalSLHCTopologyConstants.add<int>( "maxDepthHE", 7 );
65 
67  desc.addUntracked<std::string>( "Exclude", "" );
68  desc.addOptional<edm::ParameterSetDescription>( "hcalTopologyConstants", hcalTopologyConstants );
69  descriptions.add( "hcalTopologyIdeal", desc );
70 
72  descSLHC.addUntracked<std::string>( "Exclude", "" );
73  descSLHC.addOptional<edm::ParameterSetDescription>( "hcalTopologyConstants", hcalSLHCTopologyConstants );
74  descriptions.add( "hcalTopologyIdealSLHC", descSLHC );
75 }
76 
77 //
78 // member functions
79 //
80 
81 // ------------ method called to produce the data ------------
84 #ifdef DebugLog
85  std::cout << "HcalTopologyIdealEP::produce(const IdealGeometryRecord& iRecord)" << std::endl;
86  edm::LogInfo("HCAL") << "HcalTopologyIdealEP::produce(const HcalGeometryRecord& iRecord)";
87 #endif
89  iRecord.get( pHRNDC );
90  const HcalDDDRecConstants* hdc = &(*pHRNDC);
91 
92 #ifdef DebugLog
93  std::cout << "mode = " << hdc->getTopoMode() << ", maxDepthHB = "
94  << hdc->getMaxDepth(0) << ", maxDepthHE = " << hdc->getMaxDepth(1)
95  << ", maxDepthHF = " << hdc->getMaxDepth(2) << std::endl;
96  edm::LogInfo("HCAL") << "mode = " << hdc->getTopoMode() << ", maxDepthHB = "
97  << hdc->getMaxDepth(0) << ", maxDepthHE = "
98  << hdc->getMaxDepth(1) << ", maxDepthHF = "
99  << hdc->getMaxDepth(2);
100 #endif
101  ReturnType myTopo(new HcalTopology(hdc));
102 
104  if (!m_restrictions.empty()) {
106  if (!error.empty()) {
107  throw cms::Exception("Parse Error","Parse error on Exclude "+error);
108  }
109  }
110  return myTopo ;
111 }
112 
113 
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
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
int getMaxDepth(const int type) const
boost::shared_ptr< HcalTopology > ReturnType
HcalTopologyIdealEP(const edm::ParameterSet &)
void get(HolderT &iHolder) const
ReturnType produce(const HcalRecNumberingRecord &)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
tuple conf
Definition: dbtoconf.py:185
void add(std::string const &label, ParameterSetDescription const &psetDescription)
tuple cout
Definition: gather_cfg.py:121
HcalTopology(const HcalDDDRecConstants *hcons, HcalTopologyMode::TriggerMode tmode=HcalTopologyMode::tm_LHC_PreLS1)
Definition: HcalTopology.cc:16