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
Li Zhihao
CEPCSW
Commits
b9616b51
There was an error fetching the commit references. Please try again later.
Commit
b9616b51
authored
3 years ago
by
lintao@ihep.ac.cn
Browse files
Options
Downloads
Patches
Plain Diff
WIP: the provider in XML.
parent
52d17121
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
Detector/MagneticFieldMap/src/GenericBFieldMapBrBzFactory.cpp
+16
-1
16 additions, 1 deletion
...ctor/MagneticFieldMap/src/GenericBFieldMapBrBzFactory.cpp
with
16 additions
and
1 deletion
Detector/MagneticFieldMap/src/GenericBFieldMapBrBzFactory.cpp
+
16
−
1
View file @
b9616b51
/*
* In this file, the xml is parsed and the GenericBFieldMapBrBz object is created and configured.
*
*
* The properties for the GenericBFieldMapBrBz
* - provider
* - [file, db]
* - source
* - file path for the 'file' mode.
* - DB ... for the 'db' mode.
* - rhoMin, rhoMax, zMin, zMax
*
* -- Tao Lin <lintao AT ihep.ac.cn>
*/
#include
"GenericBFieldMapBrBz.h"
...
...
@@ -26,6 +34,13 @@ static dd4hep::Ref_t create_GenericBFieldMapBrBz(dd4hep::Detector& ,
// 1. retrieve the parameters from xml
dd4hep
::
xml
::
Component
xmlParameter
(
handle
);
// - provider
bool
hasProvider
=
xmlParameter
.
hasAttr
(
_Unicode
(
provider
));
if
(
!
hasProvider
)
{
std
::
string
error_msg
=
"[ERROR] GenericBFieldMapBrBz: Must specify the 'provider'. "
;
throw
std
::
runtime_error
(
error_msg
);
}
// 2. create the CartesianField
dd4hep
::
CartesianField
obj
;
GenericBFieldMapBrBz
*
ptr
=
new
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