DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
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:163
dd4hep::DetElement
Handle class describing a detector element.
Definition:
DetElement.h:188
dd4hep::_toDouble
double _toDouble(const std::string &value)
String conversions: string to double value.
Definition:
Handle.cpp:116
Generated on Sat Jan 25 2025 11:08:20 for DD4hep by
1.8.18