CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/SimG4Core/SensitiveDetector/interface/SensitiveDetectorMakerBase.h

Go to the documentation of this file.
00001 #ifndef SensitiveDetector_SensitiveDetectorMakerBase_h
00002 #define SensitiveDetector_SensitiveDetectorMakerBase_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     SensitiveDetector
00006 // Class  :     SensitiveDetectorMakerBase
00007 // 
00016 //
00017 // Original Author:  
00018 //         Created:  Mon Nov 14 11:50:24 EST 2005
00019 // $Id: SensitiveDetectorMakerBase.h,v 1.3 2007/05/08 23:11:53 sunanda Exp $
00020 //
00021 
00022 // system include files
00023 #include <string>
00024 
00025 // user include files
00026 #include "SimG4Core/SensitiveDetector/interface/SensitiveTkDetector.h"
00027 #include "SimG4Core/SensitiveDetector/interface/SensitiveCaloDetector.h"
00028 // forward declarations
00029 class SimActivityRegistry;
00030 class DDCompactView;
00031 class SimTrackManager;
00032 
00033 namespace edm{
00034   class ParameterSet;
00035 }
00036 
00037 class SensitiveDetectorMakerBase
00038 {
00039 
00040    public:
00041       SensitiveDetectorMakerBase(){}
00042       virtual ~SensitiveDetectorMakerBase(){}
00043 
00044       // ---------- const member functions ---------------------
00045       virtual void make(const std::string& iname,
00046                         const DDCompactView& cpv,
00047                         SensitiveDetectorCatalog& clg,
00048                         const edm::ParameterSet& p,
00049                         const SimTrackManager* m,
00050                         SimActivityRegistry& reg,
00051                         std::auto_ptr<SensitiveTkDetector>& oTK,
00052                         std::auto_ptr<SensitiveCaloDetector>& oCalo) const =0;
00053       
00054       // ---------- static member functions --------------------
00055 
00056       // ---------- member functions ---------------------------
00057 
00058    protected:
00059       //used to identify which type of Sensitive Detector we have
00060       void convertTo( SensitiveTkDetector* iFrom, 
00061                       std::auto_ptr<SensitiveTkDetector>& oTo,
00062                       std::auto_ptr<SensitiveCaloDetector>&) const{
00063         oTo= std::auto_ptr<SensitiveTkDetector>(iFrom);
00064       }
00065       void convertTo( SensitiveCaloDetector* iFrom,
00066                       std::auto_ptr<SensitiveTkDetector>&,
00067                       std::auto_ptr<SensitiveCaloDetector>& oTo) const{
00068         oTo=std::auto_ptr<SensitiveCaloDetector>(iFrom);
00069       }
00070 
00071    private:
00072       SensitiveDetectorMakerBase(const SensitiveDetectorMakerBase&); // stop default
00073 
00074       const SensitiveDetectorMakerBase& operator=(const SensitiveDetectorMakerBase&); // stop default
00075 
00076       // ---------- member data --------------------------------
00077 
00078 };
00079 
00080 
00081 #endif