Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:27

0001 #ifndef Physics_PhysicsListMaker_h
0002 #define Physics_PhysicsListMaker_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Physics
0006 // Class  :     PhysicsListMaker
0007 //
0008 /**\class PhysicsListMaker PhysicsListMaker.h SimG4Core/Physics/interface/PhysicsListMaker.h
0009 
0010  Description: <one line class summary>
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:
0018 //         Created:  Tue Nov 22 13:03:44 EST 2005
0019 //
0020 
0021 // system include files
0022 #include <memory>
0023 
0024 // user include files
0025 #include "SimG4Core/Physics/interface/PhysicsListMakerBase.h"
0026 #include "SimG4Core/Notification/interface/SimActivityRegistryEnroller.h"
0027 
0028 // forward declarations
0029 
0030 template <class T>
0031 class PhysicsListMaker : public PhysicsListMakerBase {
0032 public:
0033   PhysicsListMaker() {}
0034 
0035   // ---------- const member functions ---------------------
0036   std::unique_ptr<PhysicsList> make(const edm::ParameterSet& p, SimActivityRegistry& reg) const override {
0037     std::unique_ptr<T> returnValue(new T(p));
0038     SimActivityRegistryEnroller::enroll(reg, returnValue.get());
0039 
0040     return returnValue;
0041   }
0042 
0043   PhysicsListMaker(const PhysicsListMaker&) = delete;
0044   const PhysicsListMaker& operator=(const PhysicsListMaker&) = delete;
0045 };
0046 
0047 #endif