CMS 3D CMS Logo

PCaloGeometryBuilder.cc
Go to the documentation of this file.
5 
16 
17 class PCaloGeometryBuilder : public edm::one::EDAnalyzer<edm::one::WatchRuns>
18 {
19 public:
20 
22  : m_ecalE( pset.getUntrackedParameter<bool>( "EcalE", true )),
23  m_ecalP( pset.getUntrackedParameter<bool>( "EcalP", true )),
24  m_hgcal( pset.getUntrackedParameter<bool>( "HGCal", false ))
25  {}
26 
27  void beginRun(edm::Run const& iEvent, edm::EventSetup const&) override;
28  void analyze(edm::Event const& iEvent, edm::EventSetup const&) override {}
29  void endRun(edm::Run const& iEvent, edm::EventSetup const&) override {}
30 
31 private:
32 
33  bool m_ecalE;
34  bool m_ecalP;
35  bool m_hgcal;
36 };
37 
38 void
40 {
41  const std::string toDB ( "_toDB" ) ;
42 
43  std::cout<<"Writing out "<<EcalBarrelGeometry::producerTag()<<std::endl ;
46  EcalBarrelGeometry::producerTag() + toDB, pGeb ) ;
47 
48  if( m_ecalE )
49  {
50  std::cout<<"Writing out "<<EcalEndcapGeometry::producerTag()<<std::endl;
53  }
54 
55  if( m_ecalP )
56  {
57  std::cout<<"Writing out "<<EcalPreshowerGeometry::producerTag()<<std::endl ;
60  }
61 
62  if( m_hgcal )
63  {
64  std::cout<<"Writing out "<<HGCalGeometry::producerTag()<<std::endl;
67  }
68 
69  std::cout<<"Writing out "<<HcalGeometry::producerTag()<<std::endl ;
72  HcalGeometry::producerTag() + toDB, pGhcal ) ;
73 
74  std::cout<<"Writing out "<<CaloTowerGeometry::producerTag()<<std::endl ;
77  CaloTowerGeometry::producerTag() + toDB, pGct ) ;
78 
79  std::cout<<"Writing out "<<ZdcGeometry::producerTag()<<std::endl ;
82  ZdcGeometry::producerTag() + toDB, pGzdc ) ;
83 
84  std::cout<<"Writing out "<<CastorGeometry::producerTag()<<std::endl ;
87  CastorGeometry::producerTag() + toDB, pGcast ) ;
88 }
89 
static std::string producerTag()
Definition: ZdcGeometry.h:46
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
static std::string producerTag()
Definition: HGCalGeometry.h:99
static std::string producerTag()
Definition: HcalGeometry.h:67
static std::string producerTag()
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
static std::string producerTag()
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
static std::string producerTag()
PCaloGeometryBuilder(const edm::ParameterSet &pset)
int iEvent
Definition: GenABIO.cc:230
static std::string producerTag()
static std::string producerTag()
T get() const
Definition: EventSetup.h:63
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
Definition: Run.h:44