diff --git a/DDCore/include/DD4hep/Shapes.h b/DDCore/include/DD4hep/Shapes.h index 71d94314d..9d035e55b 100644 --- a/DDCore/include/DD4hep/Shapes.h +++ b/DDCore/include/DD4hep/Shapes.h @@ -43,7 +43,7 @@ #include "TGeoParaboloid.h" #include "TGeoCompositeShape.h" #include "TGeoShapeAssembly.h" -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) #include "TGeoTessellated.h" #endif @@ -1422,7 +1422,7 @@ namespace dd4hep { EightPointSolid& operator=(const EightPointSolid& copy) = default; }; -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) /// Class describing a tessellated shape /** * For any further documentation please see the following ROOT documentation: diff --git a/DDCore/src/Handle.cpp b/DDCore/src/Handle.cpp index 4fa2e7cc4..b327c009d 100644 --- a/DDCore/src/Handle.cpp +++ b/DDCore/src/Handle.cpp @@ -403,7 +403,7 @@ DD4HEP_INSTANTIATE_SHAPE_HANDLE(TGeoTrd2); DD4HEP_INSTANTIATE_SHAPE_HANDLE(TGeoSphere); DD4HEP_INSTANTIATE_SHAPE_HANDLE(TGeoTorus); -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) #include "TGeoTessellated.h" DD4HEP_INSTANTIATE_SHAPE_HANDLE(TGeoTessellated); #endif diff --git a/DDCore/src/ShapeUtilities.cpp b/DDCore/src/ShapeUtilities.cpp index ee00e6eb8..c7cb8ea28 100644 --- a/DDCore/src/ShapeUtilities.cpp +++ b/DDCore/src/ShapeUtilities.cpp @@ -77,7 +77,7 @@ namespace dd4hep { template bool isInstance (const Handle& solid); template bool isInstance (const Handle& solid); template bool isInstance (const Handle& solid); -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) template bool isInstance (const Handle& solid); #endif template bool isInstance (const Handle& solid); @@ -151,7 +151,7 @@ namespace dd4hep { template bool isA(const Handle& solid); template bool isA(const Handle& solid); template bool isA(const Handle& solid); -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) template bool isA(const Handle& solid); #endif template <> bool isA(const Handle& solid) { @@ -338,7 +338,7 @@ namespace dd4hep { return pars; } -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) template <> vector dimensions(const TGeoShape* shape) { TGeoTessellated* sh = get_ptr(shape); int num_facet = sh->GetNfacets(); @@ -416,7 +416,7 @@ namespace dd4hep { template vector dimensions (const Handle& shape); template vector dimensions (const Handle& shape); template vector dimensions (const Handle& shape); -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) template vector dimensions (const Handle& shape); #endif template vector dimensions (const Handle& shape); @@ -511,7 +511,7 @@ namespace dd4hep { return dimensions(shape.ptr()); else if (cl == TGeoScaledShape::Class()) return dimensions(shape.ptr()); -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) else if (cl == TGeoTessellated::Class()) return dimensions(shape.ptr()); #endif @@ -745,7 +745,7 @@ namespace dd4hep { s_sh.access()->SetDimensions(&pars[3]); } -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) template <> void set_dimensions(TGeoTessellated* sh, const std::vector& params) { int num_vtx = params[0]; int num_facet = params[1]; @@ -837,7 +837,7 @@ namespace dd4hep { { set_dimensions(shape.ptr(), params); } template <> void set_dimensions(EightPointSolid shape, const std::vector& params) { set_dimensions(shape.ptr(), params); } -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) template <> void set_dimensions(TessellatedSolid shape, const std::vector& params) { set_dimensions(shape.ptr(), params); } #endif @@ -1041,7 +1041,7 @@ namespace dd4hep { set_dimensions(ExtrudedPolygon(shape), params); else if (cl == TGeoArb8::Class()) set_dimensions(EightPointSolid(shape), params); -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) else if (cl == TGeoTessellated::Class()) set_dimensions(TessellatedSolid(shape), params); #endif diff --git a/DDCore/src/Shapes.cpp b/DDCore/src/Shapes.cpp index c504a66a3..c9b4808ad 100644 --- a/DDCore/src/Shapes.cpp +++ b/DDCore/src/Shapes.cpp @@ -716,7 +716,7 @@ void EightPointSolid::make(const string& nam, double dz, const double* vtx) { _assign(new TGeoArb8(nam.c_str(), dz, (double*)vtx), "", EIGHTPOINTSOLID_TAG, true); } -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) /// Internal helper method to support object construction void TessellatedSolid::make(const std::string& nam, int num_facets) { _assign(new TGeoTessellated(nam.c_str(), num_facets), nam, TESSELLATEDSOLID_TAG, false); @@ -952,6 +952,6 @@ INSTANTIATE(TGeoTrd1); INSTANTIATE(TGeoTrd2); INSTANTIATE(TGeoCompositeShape); -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) INSTANTIATE(TGeoTessellated); #endif diff --git a/DDCore/src/plugins/ShapePlugins.cpp b/DDCore/src/plugins/ShapePlugins.cpp index 0c52f1c3f..76c3fabfb 100644 --- a/DDCore/src/plugins/ShapePlugins.cpp +++ b/DDCore/src/plugins/ShapePlugins.cpp @@ -310,7 +310,7 @@ static Handle create_EightPointSolid(Detector&, xml_h element) { } DECLARE_XML_SHAPE(EightPointSolid__shape_constructor,create_EightPointSolid) -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) /// Plugin factory to created tessellated shapes static Handle create_TessellatedSolid(Detector&, xml_h element) { xml_dim_t e(element); @@ -631,7 +631,7 @@ static Ref_t create_shape(Detector& description, xml_h e, Ref_t /* sens */) { instance_test = isInstance(solid); else if ( 0 == strcasecmp(solid->GetTitle(),EXTRUDEDPOLYGON_TAG) ) instance_test = isInstance(solid); -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) else if ( 0 == strcasecmp(solid->GetTitle(),TESSELLATEDSOLID_TAG) ) instance_test = isInstance(solid); #endif diff --git a/DDG4/src/Geant4Converter.cpp b/DDG4/src/Geant4Converter.cpp index 6a5029f07..a02b8232c 100644 --- a/DDG4/src/Geant4Converter.cpp +++ b/DDG4/src/Geant4Converter.cpp @@ -574,7 +574,7 @@ void* Geant4Converter::handleSolid(const string& name, const TGeoShape* shape) c solid = convertShape(shape); else if (isa == TGeoArb8::Class()) solid = convertShape(shape); -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) else if (isa == TGeoTessellated::Class()) solid = convertShape(shape); #endif diff --git a/DDG4/src/Geant4ShapeConverter.cpp b/DDG4/src/Geant4ShapeConverter.cpp index cfa24fc5a..23dc838ab 100644 --- a/DDG4/src/Geant4ShapeConverter.cpp +++ b/DDG4/src/Geant4ShapeConverter.cpp @@ -230,7 +230,7 @@ namespace dd4hep { } // End namespace sim } // End namespace dd4hep -#if ROOT_VERSION_CODE > ROOT_VERSION(6,19,0) +#if ROOT_VERSION_CODE > ROOT_VERSION(6,21,0) #include "G4TessellatedSolid.hh" #include "G4TriangularFacet.hh" #include "G4QuadrangularFacet.hh" diff --git a/examples/ClientTests/CMakeLists.txt b/examples/ClientTests/CMakeLists.txt index ea2581cd6..1db49ca56 100644 --- a/examples/ClientTests/CMakeLists.txt +++ b/examples/ClientTests/CMakeLists.txt @@ -194,7 +194,7 @@ list(APPEND ClientTests_ShapeTests Box Cone ConeSegment Tube ElTube CutTube Hype list(APPEND ClientTests_ShapeTests EightPointSolid Eightpoint_Reflect_Volume Eightpoint_Reflect_DetElement) list(APPEND ClientTests_ShapeTests Polycone Polyhedra PseudoTrap PseudoTrap2 Sphere Torus Trap Trd1 Trd2) list(APPEND ClientTests_ShapeTests TruncatedTube ExtrudedPolygon) -if(${ROOT_VERSION} VERSION_GREATER 6.19.00) +if(${ROOT_VERSION} VERSION_GREATER 6.21.00) list(APPEND ClientTests_ShapeTests Tesselated) endif() foreach (test ${ClientTests_ShapeTests}) diff --git a/examples/ClientTests/compact/Check_Shape_Tesselated.xml b/examples/ClientTests/compact/Check_Shape_Tesselated.xml index 0ac494040..42f840ad1 100644 --- a/examples/ClientTests/compact/Check_Shape_Tesselated.xml +++ b/examples/ClientTests/compact/Check_Shape_Tesselated.xml @@ -195,7 +195,7 @@ - +