38 template <>
void Converter<Readout>::operator()(
xml_h element)
const;
39 template <>
void Converter<LimitSet>::operator()(
xml_h element)
const;
40 template <>
void Converter<Constant>::operator()(
xml_h element)
const;
41 template <>
void Converter<VisAttr>::operator()(
xml_h element)
const;
43 template <>
void Converter<include_file>::operator()(
xml_h element)
const;
44 template <>
void Converter<plugins>::operator()(
xml_h element)
const;
45 template <>
void Converter<plugin>::operator()(
xml_h element)
const;
46 template <>
void Converter<dd4hep::arg>::operator()(
xml_h element)
const;
57 template <>
void Converter<dd4hep::arg>::operator()(
xml_h e)
const {
59 std::string val = c.valueStr();
60 std::vector<std::string>* args = (std::vector<std::string>*)param;
61 args->emplace_back(val);
70 template <>
void Converter<plugin>::operator()(
xml_h e)
const {
72 std::string nam = c.nameStr();
73 std::vector<std::string> args;
74 std::vector<const char*> cargs;
78 for(std::vector<std::string>::const_iterator i=args.begin(); i!=args.end();++i)
79 cargs.emplace_back((*i).c_str());
80 printout(INFO,
"ConverterPlugin",
"+++ Now executing plugin:%s [%d args]",nam.c_str(),
int(cargs.size()));
81 description.apply(nam.c_str(),
int(cargs.size()),(
char**)&cargs[0]);
90 template <>
void Converter<include_file>::operator()(
xml_h element)
const {
92 xml_h node = doc.root();
93 std::string tag = node.
tag();
94 if ( tag ==
"plugin" )
95 Converter<plugin>(description,param)(node);
96 else if ( tag ==
"plugins" )
97 Converter<plugins>(description,param)(node);
99 throw std::runtime_error(
"Undefined tag name in XML structure:"+tag+
" XML parsing abandoned.");
108 template <>
void Converter<plugins>::operator()(
xml_h e)
const {
118 static long handle_plugins(
Detector& description,
const xml_h& element) {
119 (dd4hep::Converter < plugins > (description))(element);