CMS 3D CMS Logo

SensitiveDetectorMaker.h
Go to the documentation of this file.
1 #ifndef SimG4Core_SensitiveDetector_SensitiveDetectorMaker_h
2 #define SimG4Core_SensitiveDetector_SensitiveDetectorMaker_h
3 // -*- C++ -*-
4 //
5 // Package: SensitiveDetector
6 // Class : SensitiveDetectorMaker
7 //
8 //
9 // Original Author:
10 // Created: Mon Nov 14 11:56:05 EST 2005
11 //
12 
13 // system include files
14 #include <memory>
15 
16 // user include files
19 
20 // forward declarations
21 
22 template<class T>
24 {
25 public:
27 
28  // ---------- const member functions ---------------------
29  void make(const std::string& iname,
30  const DDCompactView& cpv,
31  const SensitiveDetectorCatalog& clg,
32  const edm::ParameterSet& p,
33  const SimTrackManager* man,
35  std::auto_ptr<SensitiveTkDetector>& oTK,
36  std::auto_ptr<SensitiveCaloDetector>& oCalo) const override
37  {
38  std::auto_ptr<T> returnValue(new T(iname, cpv, clg, p, man));
39  SimActivityRegistryEnroller::enroll(reg, returnValue.get());
40 
41  convertTo(returnValue.get(), oTK, oCalo);
42  //ownership was passed in the previous function
43  returnValue.release();
44  }
45 
46 private:
49 };
50 
51 #endif
const SensitiveDetectorMaker & operator=(const SensitiveDetectorMaker &)=delete
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:83
void make(const std::string &iname, const DDCompactView &cpv, const SensitiveDetectorCatalog &clg, const edm::ParameterSet &p, const SimTrackManager *man, SimActivityRegistry &reg, std::auto_ptr< SensitiveTkDetector > &oTK, std::auto_ptr< SensitiveCaloDetector > &oCalo) const override
static void enroll(SimActivityRegistry &iReg, T *iObj)
void convertTo(SensitiveTkDetector *iFrom, std::auto_ptr< SensitiveTkDetector > &oTo, std::auto_ptr< SensitiveCaloDetector >) const
long double T