42 class align_conditions;
43 class align_arbitrary;
53 template <>
void Converter<include>::operator()(
xml_h seq)
const;
54 template <>
void Converter<arbitrary>::operator()(
xml_h seq)
const;
55 template <>
void Converter<conditions>::operator()(
xml_h seq)
const;
68 : detector(
det), stack(stk)
79 return elt.
attr<std::string>(
_UC(validity));
86 std::string subpath = e.
hasAttr(
_U(path)) ? e.
attr<std::string>(
_U(path)) : std::string();
94 std::string name = e.hasAttr(
_U(name)) ? e.nameStr() : e.tag();
130 template <>
void Converter<arbitrary>::operator()(
xml_h e)
const {
132 std::string tag = elt.tag();
133 ConversionArg* arg = _param<ConversionArg>();
135 except(
"ConditionsParser",
"++ Invalid parser argument [Internal Error]");
136 else if ( tag ==
"conditions" )
137 Converter<conditions>(description,param,optional)(e);
138 else if ( arg->stack && tag ==
"detelement" )
139 Converter<conditions>(description,param,optional)(e);
140 else if ( tag ==
"open_transaction" )
142 else if ( tag ==
"close_transaction" )
144 else if ( tag ==
"include" )
145 Converter<include>(description,param,optional)(e);
146 else if ( tag ==
"detelements" )
148 else if ( tag ==
"subdetectors" )
150 else if ( tag ==
"alignment" ) {
152 val->value = elt.attr<std::string>(
_U(ref));
154 except(
"ConditionsParser",
"Non-existing Conditions stack:%s %d",__FILE__, __LINE__);
156 arg->stack->emplace_back(val.release());
160 val->value = elt.hasAttr(
_U(value)) ? elt.valueStr() : e.
text();
162 except(
"ConditionsParser",
"Non-existing Conditions stack:%s %d",__FILE__, __LINE__);
164 arg->stack->emplace_back(val.release());
174 template <>
void Converter<include>::operator()(
xml_h element)
const {
194 template <>
void Converter<conditions>::operator()(
xml_h e)
const {
195 ConversionArg* arg = _param<ConversionArg>();
196 DetElement elt = arg->detector;
209 static void* setup_global_Conditions(
dd4hep::Detector& description,
int argc,
char** argv) {
214 (dd4hep::Converter<dd4hep::conditions>(description,&args))(e);
217 dd4hep::except(
"XML_DOC_READER",
"Invalid number of arguments to interprete conditions: %d != %d.",argc,2);