Skip to content
Snippets Groups Projects
Commit b9616b51 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

WIP: the provider in XML.

parent 52d17121
No related branches found
No related tags found
No related merge requests found
/*
* 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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment