Go to the documentation of this file.00001 #ifndef SensitiveDetector_SensitiveDetectorMaker_h
00002 #define SensitiveDetector_SensitiveDetectorMaker_h
00003
00004
00005
00006
00007
00016
00017
00018
00019
00020
00021
00022
00023 #include <memory>
00024
00025
00026 #include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorMakerBase.h"
00027 #include "SimG4Core/Notification/interface/SimActivityRegistryEnroller.h"
00028
00029
00030
00031 template<class T>
00032 class SensitiveDetectorMaker : public SensitiveDetectorMakerBase
00033 {
00034
00035 public:
00036 SensitiveDetectorMaker(){}
00037
00038
00039
00040 virtual void make(const std::string& iname,
00041 const DDCompactView& cpv,
00042 SensitiveDetectorCatalog& clg,
00043 const edm::ParameterSet& p,
00044 const SimTrackManager* m,
00045 SimActivityRegistry& reg,
00046 std::auto_ptr<SensitiveTkDetector>& oTK,
00047 std::auto_ptr<SensitiveCaloDetector>& oCalo) const
00048 {
00049 std::auto_ptr<T> returnValue(new T(iname, cpv, clg, p, m));
00050 SimActivityRegistryEnroller::enroll(reg, returnValue.get());
00051
00052 this->convertTo(returnValue.get(), oTK,oCalo);
00053
00054 returnValue.release();
00055 }
00056
00057
00058
00059
00060
00061 private:
00062 SensitiveDetectorMaker(const SensitiveDetectorMaker&);
00063
00064 const SensitiveDetectorMaker& operator=(const SensitiveDetectorMaker&);
00065
00066
00067
00068 };
00069
00070
00071 #endif