Skip to content
Snippets Groups Projects
Commit 120d132d authored by Markus Frank's avatar Markus Frank
Browse files

Fix to compile with gcc46

parent bd15bf82
No related branches found
No related tags found
No related merge requests found
...@@ -195,26 +195,22 @@ namespace { ...@@ -195,26 +195,22 @@ namespace {
#define DECLARE_XMLELEMENT(name,func) \ #define DECLARE_XMLELEMENT(name,func) \
namespace DD4hep { namespace Geometry { namespace { struct xml_element_##name {}; } \ namespace DD4hep { namespace Geometry { namespace { struct xml_element_##name {}; } \
using DD4hep::Geometry::xml_element_##name; \ template <> DD4hep::Geometry::Ref_t XMLElementFactory<DD4hep::Geometry::xml_element_##name>::create(DD4hep::Geometry::LCDD& l,const DD4hep::XML::Handle_t& e) {return func(l,e);} }}\
template <> DD4hep::Geometry::Ref_t XMLElementFactory<xml_element_##name>::create(DD4hep::Geometry::LCDD& l,const XML::Handle_t& e) {return func(l,e);} }}\
PLUGINSVC_FACTORY_WITH_ID(xml_element_##name,std::string(#name),TNamed*(DD4hep::Geometry::LCDD*,const DD4hep::XML::Handle_t*)) PLUGINSVC_FACTORY_WITH_ID(xml_element_##name,std::string(#name),TNamed*(DD4hep::Geometry::LCDD*,const DD4hep::XML::Handle_t*))
#define DECLARE_XML_DOC_READER(name,func) \ #define DECLARE_XML_DOC_READER(name,func) \
namespace DD4hep { namespace Geometry { namespace { struct xml_document_##name {}; } \ namespace DD4hep { namespace Geometry { namespace { struct xml_document_##name {}; } \
using DD4hep::Geometry::xml_document_##name; \ template <> long XMLDocumentReaderFactory<DD4hep::Geometry::xml_document_##name>::create(DD4hep::Geometry::LCDD& l,const DD4hep::XML::Handle_t& e) {return func(l,e);} }}\
template <> long XMLDocumentReaderFactory<xml_document_##name>::create(DD4hep::Geometry::LCDD& l,const XML::Handle_t& e) {return func(l,e);} }}\
PLUGINSVC_FACTORY_WITH_ID(xml_document_##name,std::string(#name "_XML_reader"),long(DD4hep::Geometry::LCDD*,const DD4hep::XML::Handle_t*)) PLUGINSVC_FACTORY_WITH_ID(xml_document_##name,std::string(#name "_XML_reader"),long(DD4hep::Geometry::LCDD*,const DD4hep::XML::Handle_t*))
#define DECLARE_DETELEMENT(name,func) \ #define DECLARE_DETELEMENT(name,func) \
namespace DD4hep { namespace Geometry { namespace { struct det_element_##name {}; } \ namespace DD4hep { namespace Geometry { namespace { struct det_element_##name {}; } \
using DD4hep::Geometry::det_element_##name; \ template <> DD4hep::Geometry::Ref_t DetElementFactory<DD4hep::Geometry::det_element_##name>::create(LCDD& l,const DD4hep::XML::Handle_t& e,SensitiveDetector& s){return func(l,e,s);}}}\
template <> DD4hep::Geometry::Ref_t DetElementFactory<det_element_##name>::create(LCDD& l,const XML::Handle_t& e,SensitiveDetector& s){return func(l,e,s);}}}\
PLUGINSVC_FACTORY_WITH_ID(det_element_##name,std::string(#name),TNamed*(DD4hep::Geometry::LCDD*,const DD4hep::XML::Handle_t*,DD4hep::Geometry::SensitiveDetector*)) PLUGINSVC_FACTORY_WITH_ID(det_element_##name,std::string(#name),TNamed*(DD4hep::Geometry::LCDD*,const DD4hep::XML::Handle_t*,DD4hep::Geometry::SensitiveDetector*))
#define DECLARE_SUBDETECTOR(name,func) \ #define DECLARE_SUBDETECTOR(name,func) \
namespace DD4hep { namespace Geometry { namespace { struct det_element_##name {}; } \ namespace DD4hep { namespace Geometry { namespace { struct det_element_##name {}; } \
using DD4hep::Geometry::det_element_##name; \ template <> DD4hep::Geometry::Ref_t DetElementFactory<DD4hep::Geometry::det_element_##name>::create(DD4hep::Geometry::LCDD& l,const DD4hep::XML::Handle_t& e,SensitiveDetector&){return func(l,e);}}}\
template <> DD4hep::Geometry::Ref_t DetElementFactory<det_element_##name>::create(DD4hep::Geometry::LCDD& l,const XML::Handle_t& e,SensitiveDetector&){return func(l,e);}}}\
PLUGINSVC_FACTORY_WITH_ID(det_element_##name,std::string(#name),TNamed*(DD4hep::Geometry::LCDD*,const DD4hep::XML::Handle_t*,DD4hep::Geometry::SensitiveDetector*)) PLUGINSVC_FACTORY_WITH_ID(det_element_##name,std::string(#name),TNamed*(DD4hep::Geometry::LCDD*,const DD4hep::XML::Handle_t*,DD4hep::Geometry::SensitiveDetector*))
#endif // DD4HEP_FACTORIES_H #endif // DD4HEP_FACTORIES_H
...@@ -100,7 +100,6 @@ namespace { ...@@ -100,7 +100,6 @@ namespace {
#define DECLARE_GEANT4_SETUP(name,func) \ #define DECLARE_GEANT4_SETUP(name,func) \
namespace DD4hep { namespace Simulation { namespace { struct xml_g4_setup_##name {}; } \ namespace DD4hep { namespace Simulation { namespace { struct xml_g4_setup_##name {}; } \
using DD4hep::Simulation::xml_g4_setup_##name; \ template <> long Geant4SetupAction<DD4hep::Simulation::xml_g4_setup_##name>::create(LCDD& l,const DD4hep::Simulation::Geant4Converter& e, const std::map<std::string,std::string>& a) {return func(l,e,a);} }} \
template <> long Geant4SetupAction<xml_g4_setup_##name>::create(LCDD& l,const DD4hep::Simulation::Geant4Converter& e, const std::map<std::string,std::string>& a) {return func(l,e,a);} }} \
PLUGINSVC_FACTORY_WITH_ID(xml_g4_setup_##name,std::string(#name "_Geant4_action"),long(DD4hep::Geometry::LCDD*,const DD4hep::Simulation::Geant4Converter*,const std::map<std::string,std::string>*)) PLUGINSVC_FACTORY_WITH_ID(xml_g4_setup_##name,std::string(#name "_Geant4_action"),long(DD4hep::Geometry::LCDD*,const DD4hep::Simulation::Geant4Converter*,const std::map<std::string,std::string>*))
#endif // DDG4_FACTORIES_H #endif // DDG4_FACTORIES_H
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