File indexing completed on 2024-04-06 12:30:27
0001 #ifndef Physics_PhysicsListMaker_h
0002 #define Physics_PhysicsListMaker_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <memory>
0023
0024
0025 #include "SimG4Core/Physics/interface/PhysicsListMakerBase.h"
0026 #include "SimG4Core/Notification/interface/SimActivityRegistryEnroller.h"
0027
0028
0029
0030 template <class T>
0031 class PhysicsListMaker : public PhysicsListMakerBase {
0032 public:
0033 PhysicsListMaker() {}
0034
0035
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