CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SensitiveDetectorMaker.h
Go to the documentation of this file.
1 #ifndef SensitiveDetector_SensitiveDetectorMaker_h
2 #define SensitiveDetector_SensitiveDetectorMaker_h
3 // -*- C++ -*-
4 //
5 // Package: SensitiveDetector
6 // Class : SensitiveDetectorMaker
7 //
16 //
17 // Original Author:
18 // Created: Mon Nov 14 11:56:05 EST 2005
19 //
20 
21 // system include files
22 #include <memory>
23 
24 // user include files
27 
28 // forward declarations
29 
30 template<class T>
32 {
33 
34  public:
36  //virtual ~SensitiveDetectorMaker();
37 
38  // ---------- const member functions ---------------------
39  virtual void make(const std::string& iname,
40  const DDCompactView& cpv,
42  const edm::ParameterSet& p,
43  const SimTrackManager* m,
45  std::auto_ptr<SensitiveTkDetector>& oTK,
46  std::auto_ptr<SensitiveCaloDetector>& oCalo) const
47  {
48  std::auto_ptr<T> returnValue(new T(iname, cpv, clg, p, m));
49  SimActivityRegistryEnroller::enroll(reg, returnValue.get());
50 
51  this->convertTo(returnValue.get(), oTK,oCalo);
52  //ownership was passed in the previous function
53  returnValue.release();
54  }
55 
56  // ---------- static member functions --------------------
57 
58  // ---------- member functions ---------------------------
59 
60  private:
61  SensitiveDetectorMaker(const SensitiveDetectorMaker&); // stop default
62 
63  const SensitiveDetectorMaker& operator=(const SensitiveDetectorMaker&); // stop default
64 
65  // ---------- member data --------------------------------
66 
67 };
68 
69 
70 #endif
void convertTo(SensitiveTkDetector *iFrom, std::auto_ptr< SensitiveTkDetector > &oTo, std::auto_ptr< SensitiveCaloDetector > &) const
type of data representation of DDCompactView
Definition: DDCompactView.h:77
static void enroll(SimActivityRegistry &iReg, T *iObj)
virtual void make(const std::string &iname, const DDCompactView &cpv, SensitiveDetectorCatalog &clg, const edm::ParameterSet &p, const SimTrackManager *m, SimActivityRegistry &reg, std::auto_ptr< SensitiveTkDetector > &oTK, std::auto_ptr< SensitiveCaloDetector > &oCalo) const
const SensitiveDetectorMaker & operator=(const SensitiveDetectorMaker &)
long double T