EDepSimSDFactory.hh
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////
2 // $Id: EDepSim::SDFactory.hh,v 1.1 2004/12/04 17:33:13 jnurep Exp $
3 //
4 #ifndef EDepSim_SDFactory_hh_seen
5 #define EDepSim_SDFactory_hh_seen
6 
7 #include <G4String.hh>
8 class G4VSensitiveDetector;
9 
10 /// Create an object to build a sensitive detector (SD) based on a name and
11 /// type. The name of the SD will be used by the G4 SD manager to see if the
12 /// detector already exists. If it doesn't then a new SD of "type" will be
13 /// built.
14 namespace EDepSim {class SDFactory;}
16 public:
17  /// Build a factory to build sensitive detectors specified by "type".
18  SDFactory(G4String type);
19  virtual ~SDFactory();
20 
21  /// Get pointer to a sensitive detector built by this factory, but return
22  /// null if the detector doesn't exist.
23  G4VSensitiveDetector* GetSD(G4String name);
24 
25  /// Get pointer to a sensitive detector built by this factory, and create
26  /// a new sensitive detector if required.
27  G4VSensitiveDetector* MakeSD(G4String name);
28 
29 private:
30  /// The type of sensitive detector that this will build.
31  G4String fType;
32 
33 };
34 #endif
static QCString name
Definition: declinfo.cpp:673
G4VSensitiveDetector * GetSD(G4String name)
G4VSensitiveDetector * MakeSD(G4String name)
G4String fType
The type of sensitive detector that this will build.
Construct a module from components.
Definition: TG4HitSegment.h:10
SDFactory(G4String type)
Build a factory to build sensitive detectors specified by "type".