diff --git a/SimG4Core/Application/interface/OscarMTProducer.h b/SimG4Core/Application/interface/OscarMTProducer.h index 44d1504a584e7..8d7f4496f0d89 100644 --- a/SimG4Core/Application/interface/OscarMTProducer.h +++ b/SimG4Core/Application/interface/OscarMTProducer.h @@ -23,7 +23,7 @@ class OscarMTProducer : public edm::stream::EDProducer< > { public: - typedef std::vector > Producers; + typedef std::vector > Producers; explicit OscarMTProducer(edm::ParameterSet const & p, const OscarMTMasterThread *); virtual ~OscarMTProducer(); diff --git a/SimG4Core/Application/interface/OscarProducer.h b/SimG4Core/Application/interface/OscarProducer.h index e9d1caaee684d..3ea7e1f0403af 100644 --- a/SimG4Core/Application/interface/OscarProducer.h +++ b/SimG4Core/Application/interface/OscarProducer.h @@ -18,7 +18,7 @@ class OscarProducer : public edm::one::EDProducer { public: - typedef std::vector > Producers; + typedef std::vector > Producers; explicit OscarProducer(edm::ParameterSet const & p); virtual ~OscarProducer(); diff --git a/SimG4Core/Application/interface/RunManager.h b/SimG4Core/Application/interface/RunManager.h index 3393944cd8e21..5ad2b40cf185e 100644 --- a/SimG4Core/Application/interface/RunManager.h +++ b/SimG4Core/Application/interface/RunManager.h @@ -17,7 +17,6 @@ #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" #include -#include "boost/shared_ptr.hpp" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" #include "Geometry/Records/interface/IdealGeometryRecord.h" @@ -85,7 +84,7 @@ class RunManager std::vector& sensCaloDetectors() { return m_sensCaloDets; } - std::vector > producers() const { + std::vector > producers() const { return m_producers; } @@ -149,8 +148,8 @@ class RunManager std::vector m_sensCaloDets; SimActivityRegistry m_registry; - std::vector > m_watchers; - std::vector > m_producers; + std::vector > m_watchers; + std::vector > m_producers; std::auto_ptr m_trackManager; sim::FieldBuilder *m_fieldBuilder; diff --git a/SimG4Core/Application/interface/RunManagerMTWorker.h b/SimG4Core/Application/interface/RunManagerMTWorker.h index 92f6766fb8da1..9c53b91e19dc9 100644 --- a/SimG4Core/Application/interface/RunManagerMTWorker.h +++ b/SimG4Core/Application/interface/RunManagerMTWorker.h @@ -8,7 +8,6 @@ #include "SimDataFormats/Forward/interface/LHCTransportLinkContainer.h" #include -#include "boost/shared_ptr.hpp" namespace edm { class ParameterSet; @@ -58,7 +57,7 @@ class RunManagerMTWorker { SimTrackManager* GetSimTrackManager(); std::vector& sensTkDetectors(); std::vector& sensCaloDetectors(); - std::vector > producers(); + std::vector > producers(); private: void initializeTLS(); diff --git a/SimG4Core/Application/src/RunManager.cc b/SimG4Core/Application/src/RunManager.cc index b9208fd48b92d..83b02b16fd31f 100644 --- a/SimG4Core/Application/src/RunManager.cc +++ b/SimG4Core/Application/src/RunManager.cc @@ -75,8 +75,8 @@ static void createWatchers(const edm::ParameterSet& iP, SimActivityRegistry& iReg, - std::vector >& oWatchers, - std::vector >& oProds + std::vector >& oWatchers, + std::vector >& oProds ) { using namespace std; @@ -97,8 +97,8 @@ void createWatchers(const edm::ParameterSet& iP, throw SimG4Exception("Unable to find the requested Watcher"); } - boost::shared_ptr watcherTemp; - boost::shared_ptr producerTemp; + std::shared_ptr watcherTemp; + std::shared_ptr producerTemp; maker->make(*itWatcher,iReg,watcherTemp,producerTemp); oWatchers.push_back(watcherTemp); if(producerTemp) { diff --git a/SimG4Core/Application/src/RunManagerMTWorker.cc b/SimG4Core/Application/src/RunManagerMTWorker.cc index 4963a1a738130..f4d74fee5ea0e 100644 --- a/SimG4Core/Application/src/RunManagerMTWorker.cc +++ b/SimG4Core/Application/src/RunManagerMTWorker.cc @@ -68,8 +68,8 @@ namespace { void createWatchers(const edm::ParameterSet& iP, SimActivityRegistry& iReg, - std::vector >& oWatchers, - std::vector >& oProds + std::vector >& oWatchers, + std::vector >& oProds ) { using namespace std; @@ -89,8 +89,8 @@ namespace { throw SimG4Exception("Unable to find the requested Watcher"); } - boost::shared_ptr watcherTemp; - boost::shared_ptr producerTemp; + std::shared_ptr watcherTemp; + std::shared_ptr producerTemp; maker->make(*itWatcher,iReg,watcherTemp,producerTemp); oWatchers.push_back(watcherTemp); if(producerTemp) { @@ -108,8 +108,8 @@ struct RunManagerMTWorker::TLSData { std::unique_ptr trackManager; std::vector sensTkDets; std::vector sensCaloDets; - std::vector > watchers; - std::vector > producers; + std::vector > watchers; + std::vector > producers; std::unique_ptr fieldBuilder; std::unique_ptr currentRun; edm::RunNumber_t currentRunNumber = 0; @@ -319,7 +319,7 @@ std::vector& RunManagerMTWorker::sensCaloDetectors() { initializeTLS(); return m_tls->sensCaloDets; } -std::vector > RunManagerMTWorker::producers() { +std::vector > RunManagerMTWorker::producers() { initializeTLS(); return m_tls->producers; } diff --git a/SimG4Core/GeometryProducer/interface/GeometryProducer.h b/SimG4Core/GeometryProducer/interface/GeometryProducer.h index 8675a8592c350..128c347b4c1ab 100644 --- a/SimG4Core/GeometryProducer/interface/GeometryProducer.h +++ b/SimG4Core/GeometryProducer/interface/GeometryProducer.h @@ -17,7 +17,6 @@ #include "SimG4Core/SensitiveDetector/interface/SensitiveCaloDetector.h" #include -#include "boost/shared_ptr.hpp" namespace sim { class FieldBuilder; } class SimWatcher; @@ -29,13 +28,13 @@ class SimTrackManager; class GeometryProducer : public edm::EDProducer { public: - typedef std::vector > Producers; + typedef std::vector > Producers; explicit GeometryProducer(edm::ParameterSet const & p); virtual ~GeometryProducer(); virtual void beginJob(); virtual void endJob(); virtual void produce(edm::Event & e, const edm::EventSetup & c); - std::vector > producers() const + std::vector > producers() const { return m_producers; } std::vector& sensTkDetectors() { return m_sensTkDets; } std::vector& sensCaloDetectors() { return m_sensCaloDets; } @@ -45,8 +44,8 @@ class GeometryProducer : public edm::EDProducer edm::ParameterSet m_pField; bool m_pUseSensitiveDetectors; SimActivityRegistry m_registry; - std::vector > m_watchers; - std::vector > m_producers; + std::vector > m_watchers; + std::vector > m_producers; std::auto_ptr m_fieldBuilder; std::auto_ptr m_trackManager; AttachSD * m_attach; diff --git a/SimG4Core/GeometryProducer/src/GeometryProducer.cc b/SimG4Core/GeometryProducer/src/GeometryProducer.cc index 1b9bc6b76c536..688b6f41a05f6 100644 --- a/SimG4Core/GeometryProducer/src/GeometryProducer.cc +++ b/SimG4Core/GeometryProducer/src/GeometryProducer.cc @@ -30,8 +30,8 @@ static void createWatchers(const edm::ParameterSet& iP, SimActivityRegistry& iReg, - std::vector >& oWatchers, - std::vector >& oProds) + std::vector >& oWatchers, + std::vector >& oProds) { using namespace std; using namespace edm; @@ -46,8 +46,8 @@ void createWatchers(const edm::ParameterSet& iP, SimActivityRegistry& iReg, maker(SimWatcherFactory::get()->create(itWatcher->getParameter ("type"))); if(maker.get()==0) { throw SimG4Exception("Unable to find the requested Watcher"); } - boost::shared_ptr watcherTemp; - boost::shared_ptr producerTemp; + std::shared_ptr watcherTemp; + std::shared_ptr producerTemp; maker->make(*itWatcher,iReg,watcherTemp,producerTemp); oWatchers.push_back(watcherTemp); if(producerTemp) oProds.push_back(producerTemp); diff --git a/SimG4Core/Watcher/interface/SimProducer.h b/SimG4Core/Watcher/interface/SimProducer.h index b95b23c1a1d9c..cb986a8e09f44 100644 --- a/SimG4Core/Watcher/interface/SimProducer.h +++ b/SimG4Core/Watcher/interface/SimProducer.h @@ -22,8 +22,8 @@ #include #include #include -#include "boost/bind.hpp" -#include "boost/shared_ptr.hpp" +#include +#include // user include files #include "SimG4Core/Watcher/interface/SimWatcher.h" @@ -79,7 +79,7 @@ class SimProducer : public SimWatcher void registerProducts(edm::ProducerBase& iProd) { std::for_each(m_info.begin(), m_info.end(), - boost::bind(&simproducer::ProductInfoBase::registerProduct,_1, &iProd)); + std::bind(&simproducer::ProductInfoBase::registerProduct, std::placeholders::_1, &iProd)); } protected: template @@ -90,7 +90,7 @@ class SimProducer : public SimWatcher template void produces(const std::string& instanceName) { m_info.push_back( - boost::shared_ptr >(new simproducer::ProductInfo(instanceName) )); + std::make_shared >(instanceName) ); } private: @@ -99,7 +99,7 @@ class SimProducer : public SimWatcher const SimProducer& operator=(const SimProducer&); // stop default // ---------- member data -------------------------------- - std::vector > m_info; + std::vector > m_info; }; diff --git a/SimG4Core/Watcher/interface/SimWatcherMaker.h b/SimG4Core/Watcher/interface/SimWatcherMaker.h index 5d408787295c9..6604093be4eda 100644 --- a/SimG4Core/Watcher/interface/SimWatcherMaker.h +++ b/SimG4Core/Watcher/interface/SimWatcherMaker.h @@ -37,11 +37,11 @@ class SimWatcherMaker : public SimWatcherMakerBase // ---------- const member functions --------------------- virtual void make(const edm::ParameterSet& p, SimActivityRegistry& reg, - boost::shared_ptr& oWatcher, - boost::shared_ptr& oProd + std::shared_ptr& oWatcher, + std::shared_ptr& oProd ) const { - boost::shared_ptr returnValue(new T(p)); + std::shared_ptr returnValue(new T(p)); SimActivityRegistryEnroller::enroll(reg, returnValue.get()); oWatcher = returnValue; @@ -50,13 +50,13 @@ class SimWatcherMaker : public SimWatcherMakerBase } private: - boost::shared_ptr - getSimProducer(SimProducer*, boost::shared_ptr& iProd) const{ - return boost::shared_ptr(iProd); + std::shared_ptr + getSimProducer(SimProducer*, std::shared_ptr& iProd) const{ + return std::shared_ptr(iProd); } - boost::shared_ptr - getSimProducer(void*, boost::shared_ptr& iProd) const{ - return boost::shared_ptr(); + std::shared_ptr + getSimProducer(void*, std::shared_ptr& iProd) const{ + return std::shared_ptr(); } }; diff --git a/SimG4Core/Watcher/interface/SimWatcherMakerBase.h b/SimG4Core/Watcher/interface/SimWatcherMakerBase.h index 2c59b04ae2cf1..9cdd03e5a0a21 100644 --- a/SimG4Core/Watcher/interface/SimWatcherMakerBase.h +++ b/SimG4Core/Watcher/interface/SimWatcherMakerBase.h @@ -20,7 +20,7 @@ // // system include files -#include "boost/shared_ptr.hpp" +#include // user include files @@ -41,8 +41,8 @@ class SimWatcherMakerBase // ---------- const member functions --------------------- virtual void make(const edm::ParameterSet&, SimActivityRegistry&, - boost::shared_ptr&, - boost::shared_ptr& + std::shared_ptr&, + std::shared_ptr& ) const = 0; };