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 // $Id: SensitiveDetectorMaker.h,v 1.3 2007/05/08 23:11:53 sunanda Exp $
20 //
21 
22 // system include files
23 #include <memory>
24 
25 // user include files
28 
29 // forward declarations
30 
31 template<class T>
33 {
34 
35  public:
37  //virtual ~SensitiveDetectorMaker();
38 
39  // ---------- const member functions ---------------------
40  virtual void make(const std::string& iname,
41  const DDCompactView& cpv,
43  const edm::ParameterSet& p,
44  const SimTrackManager* m,
46  std::auto_ptr<SensitiveTkDetector>& oTK,
47  std::auto_ptr<SensitiveCaloDetector>& oCalo) const
48  {
49  std::auto_ptr<T> returnValue(new T(iname, cpv, clg, p, m));
50  SimActivityRegistryEnroller::enroll(reg, returnValue.get());
51 
52  this->convertTo(returnValue.get(), oTK,oCalo);
53  //ownership was passed in the previous function
54  returnValue.release();
55  }
56 
57  // ---------- static member functions --------------------
58 
59  // ---------- member functions ---------------------------
60 
61  private:
62  SensitiveDetectorMaker(const SensitiveDetectorMaker&); // stop default
63 
64  const SensitiveDetectorMaker& operator=(const SensitiveDetectorMaker&); // stop default
65 
66  // ---------- member data --------------------------------
67 
68 };
69 
70 
71 #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