Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:38

0001 // -*- C++ -*-
0002 //
0003 // Package:    ZdcHardcodeGeometryEP
0004 // Class:      ZdcHardcodeGeometryEP
0005 //
0006 /**\class ZdcHardcodeGeometryEP ZdcHardcodeGeometryEP.h
0007    
0008     Description: <one line class summary>
0009 
0010     Implementation:
0011     <Notes on implementation>
0012 */
0013 //
0014 // Original Author:  Edmundo Garcia
0015 //         Created:  Mon Aug  6 12:33:33 CDT 2007
0016 //
0017 #include "Geometry/Records/interface/ZDCGeometryRecord.h"
0018 #include "Geometry/ForwardGeometry/plugins/ZdcHardcodeGeometryEP.h"
0019 #include "Geometry/ForwardGeometry/interface/ZdcGeometry.h"
0020 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0021 
0022 ZdcHardcodeGeometryEP::ZdcHardcodeGeometryEP(const edm::ParameterSet& ps)
0023     : m_loader(nullptr),
0024       m_topology(),
0025       m_applyAlignment(ps.getParameter<bool>("applyAlignment")),
0026       m_zdcAddRPD(ps.getParameter<bool>("zdcAddRPD")) {
0027   //the following line is needed to tell the framework what
0028   // data is being produced
0029   setWhatProduced(this, ZdcGeometry::producerTag());
0030 
0031   // disable
0032   //   setWhatProduced( this,
0033   //            &ZdcHardcodeGeometryEP::produceIdeal,
0034   //            edm::es::Label( "ZDC" ) );
0035 }
0036 
0037 ZdcHardcodeGeometryEP::~ZdcHardcodeGeometryEP() {}
0038 
0039 //
0040 // member functions
0041 //
0042 
0043 // ------------ method called to produce the data  ------------
0044 
0045 ZdcHardcodeGeometryEP::ReturnType ZdcHardcodeGeometryEP::produce(const ZDCGeometryRecord& iRecord) {
0046   //   ZdcHardcodeGeometryLoader loader ( m_topology ) ;
0047   m_loader = std::make_unique<ZdcHardcodeGeometryLoader>(m_topology);
0048   m_loader->setAddRPD(m_zdcAddRPD);
0049   return ReturnType(m_loader->load());
0050 }
0051 
0052 void ZdcHardcodeGeometryEP::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0053   edm::ParameterSetDescription desc;
0054   desc.add<bool>("applyAlignment", false);
0055   desc.add<bool>("zdcAddRPD", false);
0056   descriptions.addWithDefaultLabel(desc);
0057 }