Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
6781216b
Commit
6781216b
authored
11 years ago
by
Frank Gaede
Browse files
Options
Downloads
Patches
Plain Diff
- asbstract factory interface
parent
912263b5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDG4/include/DDG4/G4SDFactory.h
+53
-0
53 additions, 0 deletions
DDG4/include/DDG4/G4SDFactory.h
with
53 additions
and
0 deletions
DDG4/include/DDG4/G4SDFactory.h
0 → 100644
+
53
−
0
View file @
6781216b
// $Id: $
//====================================================================
// AIDA Detector description implementation
//--------------------------------------------------------------------
//
// Author : F.Gaede, DESY
//
//====================================================================
#ifndef DD4HEP_G4SDFactory_H
#define DD4HEP_G4SDFactory_H
#include
<string>
namespace
DD4hep
{
namespace
Geometry
{
class
LCDD
;
}
}
class
G4VSensitiveDetector
;
/* DD4hep namespace declaration */
namespace
DD4hep
{
namespace
Simulation
{
/** @class G4SDFactory G4SDFactory.h DDG4/G4SDFactory.h
* Abstract factory base class for createion of G4VSensitiveDetectors
*
* @author F.Gaede, DESY
* @version $Id:$
*/
class
G4SDFactory
{
public:
/** Implement this to create a new SD with name, initialized with the information in lcdd */
virtual
G4VSensitiveDetector
*
createSD
(
const
std
::
string
&
name
,
DD4hep
::
Geometry
::
LCDD
&
lcdd
)
=
0
;
}
;
/** Simpleimplementation of factory for SDs that have a c'tor of the form
* T( const std::string& name, DD4hep::Geometry::LCDD& lcdd )
*/
template
<
class
T
>
class
SimpleG4SDFactory
:
public
G4SDFactory
{
virtual
G4VSensitiveDetector
*
createSD
(
const
std
::
string
&
name
,
DD4hep
::
Geometry
::
LCDD
&
lcdd
){
return
new
T
(
name
,
lcdd
)
;
}
}
;
}
// End namespace Simulation
}
// End namespace DD4hep
#endif // DD4HEP_GEANT4SENSITIVEDETECTOR_H
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment