DD4hep
1.32.0
Detector Description Toolkit for High Energy Physics
Main Page
Related Pages
Modules
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
_
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
u
Enumerator
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Functions
b
d
g
o
p
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
x
Functions
_
c
d
g
h
i
l
m
n
o
p
r
s
u
Variables
Typedefs
_
a
c
d
e
f
g
j
l
o
p
r
s
t
u
v
x
Enumerations
Enumerator
Macros
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
DDDetectors
src
SurfaceExamplePlugin.cpp
Go to the documentation of this file.
1
//==========================================================================
2
// AIDA Detector description implementation
3
//--------------------------------------------------------------------------
4
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5
// All rights reserved.
6
//
7
// For the licensing terms see $DD4hepINSTALL/LICENSE.
8
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9
//
10
// Author : M.Frank
11
//
12
//==========================================================================
13
//
14
// Specialized generic detector plugin
15
//
16
//==========================================================================
17
// Framework include files
18
namespace
{
struct
UserData {
/* int a,b,c; */
}; }
19
#define SURFACEINSTALLER_DATA UserData
20
#define DD4HEP_USE_SURFACEINSTALL_HELPER DD4hep_SurfaceExamplePlugin
21
#include "
DD4hep/SurfaceInstaller.h
"
22
23
namespace
{
24
template
<>
void
Installer<UserData>::handle_arguments(
int
argc,
char
** argv) {
25
for
(
int
i=0; i<argc; ++i) {
26
double
value = -1;
27
char
* ptr = ::strchr(argv[i],
'='
);
28
if
( ptr ) {
29
value =
dd4hep::_toDouble
(++ptr);
30
}
31
std::cout <<
"SurfaceExamplePlugin: argument["
<< i <<
"] = "
<< argv[i]
32
<<
" value = "
<< value << std::endl;
33
}
34
}
35
37
template
<>
38
void
Installer<UserData>::install(
dd4hep::DetElement
/* component */
,
dd4hep::PlacedVolume
/* pv */
) {
39
// Do here whatever is necessary ....
40
}
41
}
SurfaceInstaller.h
dd4hep::PlacedVolume
Handle class holding a placed volume (also called physical volume)
Definition:
Volumes.h:164
dd4hep::DetElement
Handle class describing a detector element.
Definition:
DetElement.h:187
dd4hep::_toDouble
double _toDouble(const std::string &value)
String conversions: string to double value.
Definition:
Handle.cpp:116
Generated on Wed May 7 2025 12:36:17 for DD4hep by
1.8.18