From 7a3e3190dc993fb86996032b48ad5d9a4c4d7fd8 Mon Sep 17 00:00:00 2001 From: Markus Frank <Markus.Frank@cern.ch> Date: Wed, 15 Mar 2017 16:48:40 +0100 Subject: [PATCH] Group common XML parsers (XMLParsers.h,XMLParsers.cpp). --- DDCond/src/plugins/ConditionsRepositoryParser.cpp | 4 ++-- DDCore/include/DD4hep/objects/ConditionsInterna.h | 3 --- DDCore/include/DD4hep/objects/OpaqueData_inl.h | 8 ++++++++ DDCore/src/AlignmentData.cpp | 2 ++ 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/DDCond/src/plugins/ConditionsRepositoryParser.cpp b/DDCond/src/plugins/ConditionsRepositoryParser.cpp index 2086fbd98..5750f425d 100644 --- a/DDCond/src/plugins/ConditionsRepositoryParser.cpp +++ b/DDCond/src/plugins/ConditionsRepositoryParser.cpp @@ -343,8 +343,8 @@ namespace DD4hep { xml_h child_rot, child_pos, child_piv; ConversionArg* arg = _param<ConversionArg>(); Condition con = create_condition(arg->detector, e); - Alignments::Delta& del = con.bind<Alignments::Delta>(); - XML::parse(e, del); + //Alignments::Delta& del = con.bind<Alignments::Delta>(); + XML::parse_delta(e, con->data); con->setFlag(Condition::ALIGNMENT); arg->manager.registerUnlocked(arg->pool, con); } diff --git a/DDCore/include/DD4hep/objects/ConditionsInterna.h b/DDCore/include/DD4hep/objects/ConditionsInterna.h index b01ee3f13..b700d55e7 100644 --- a/DDCore/include/DD4hep/objects/ConditionsInterna.h +++ b/DDCore/include/DD4hep/objects/ConditionsInterna.h @@ -243,9 +243,6 @@ namespace DD4hep { #define DD4HEP_DEFINE_CONDITIONS_TYPE(x) \ namespace DD4hep { \ - template x& OpaqueDataBlock::bind<x>(); \ - template x& OpaqueDataBlock::bind<x>(const std::string& val); \ - template x& OpaqueDataBlock::set<x> (const std::string& val); \ namespace Conditions { \ template x& Condition::bind<x>(const std::string& val); \ template x& Condition::bind<x>(); \ diff --git a/DDCore/include/DD4hep/objects/OpaqueData_inl.h b/DDCore/include/DD4hep/objects/OpaqueData_inl.h index be035e98e..81dd36ff2 100644 --- a/DDCore/include/DD4hep/objects/OpaqueData_inl.h +++ b/DDCore/include/DD4hep/objects/OpaqueData_inl.h @@ -78,4 +78,12 @@ namespace DD4hep { } } /* End namespace DD4hep */ + +#define DD4HEP_DEFINE_OPAQUEDATA_TYPE(x) \ + namespace DD4hep { \ + template x& OpaqueDataBlock::bind<x>(); \ + template x& OpaqueDataBlock::bind<x>(const std::string& val); \ + template x& OpaqueDataBlock::set<x> (const std::string& val); \ + } + #endif /* DD4HEP_OPAQUEDATA_INL_H */ diff --git a/DDCore/src/AlignmentData.cpp b/DDCore/src/AlignmentData.cpp index a6fd9e113..793b7af6c 100644 --- a/DDCore/src/AlignmentData.cpp +++ b/DDCore/src/AlignmentData.cpp @@ -204,6 +204,8 @@ Alignment AlignmentData::nominal() const { #include "DD4hep/ToStream.h" #include "DD4hep/objects/ConditionsInterna.h" +DD4HEP_DEFINE_OPAQUEDATA_TYPE(Delta) +DD4HEP_DEFINE_OPAQUEDATA_TYPE(AlignmentData) DD4HEP_DEFINE_CONDITIONS_TYPE_DUMMY(Delta) DD4HEP_DEFINE_CONDITIONS_TYPE_DUMMY(AlignmentData) -- GitLab