Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CEPCSW
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dhb112358@mail.ustc.edu.cn
CEPCSW
Commits
52d17121
Commit
52d17121
authored
3 years ago
by
lintao@ihep.ac.cn
Browse files
Options
Downloads
Patches
Plain Diff
WIP: add the factory for Generic B-Field Map.
parent
087ab6fd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Detector/MagneticFieldMap/CMakeLists.txt
+1
-0
1 addition, 0 deletions
Detector/MagneticFieldMap/CMakeLists.txt
Detector/MagneticFieldMap/src/GenericBFieldMapBrBzFactory.cpp
+39
-0
39 additions, 0 deletions
...ctor/MagneticFieldMap/src/GenericBFieldMapBrBzFactory.cpp
with
40 additions
and
0 deletions
Detector/MagneticFieldMap/CMakeLists.txt
+
1
−
0
View file @
52d17121
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
gaudi_add_module
(
MagneticFieldMap
gaudi_add_module
(
MagneticFieldMap
SOURCES src/GenericBFieldMapBrBz.cpp
SOURCES src/GenericBFieldMapBrBz.cpp
src/GenericBFieldMapBrBzFactory.cpp
LINK Gaudi::GaudiKernel
LINK Gaudi::GaudiKernel
${
DD4hep_COMPONENT_LIBRARIES
}
${
DD4hep_COMPONENT_LIBRARIES
}
${
ROOT_LIBRARIES
}
${
ROOT_LIBRARIES
}
...
...
This diff is collapsed.
Click to expand it.
Detector/MagneticFieldMap/src/GenericBFieldMapBrBzFactory.cpp
0 → 100644
+
39
−
0
View file @
52d17121
/*
* In this file, the xml is parsed and the GenericBFieldMapBrBz object is created and configured.
*
* -- Tao Lin <lintao AT ihep.ac.cn>
*/
#include
"GenericBFieldMapBrBz.h"
#include
<DD4hep/Version.h>
#if DD4HEP_VERSION_GE(0,24)
#include
<DD4hep/detail/Handle.inl>
#else
#include
<DD4hep/Handle.inl>
#endif
#include
<DD4hep/FieldTypes.h>
#include
<DD4hep/DetFactoryHelper.h>
#include
<XML/Utilities.h>
static
dd4hep
::
Ref_t
create_GenericBFieldMapBrBz
(
dd4hep
::
Detector
&
,
dd4hep
::
xml
::
Handle_t
handle
)
{
// 1. retrieve the parameters from xml
dd4hep
::
xml
::
Component
xmlParameter
(
handle
);
// 2. create the CartesianField
dd4hep
::
CartesianField
obj
;
GenericBFieldMapBrBz
*
ptr
=
new
GenericBFieldMapBrBz
();
obj
.
assign
(
ptr
,
xmlParameter
.
nameStr
(),
xmlParameter
.
typeStr
());
return
obj
;
}
DECLARE_XMLELEMENT
(
GenericBFieldMapBrBz
,
create_GenericBFieldMapBrBz
)
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