Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackingGeometrySvgConverterTests.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackingGeometrySvgConverterTests.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2022 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #include <boost/test/unit_test.hpp>
10 
18 
19 #include <fstream>
20 #include <memory>
21 #include <vector>
22 
24 
25 BOOST_AUTO_TEST_SUITE(ActSvg)
26 
27 BOOST_AUTO_TEST_CASE(CylindricalTrackingGeometrySvg) {
28  Acts::Svg::Style cylinderLayerStyle;
29  cylinderLayerStyle.fillColor = {51, 153, 255};
30  cylinderLayerStyle.fillOpacity = 0.75;
31  cylinderLayerStyle.highlightColor = {255, 153, 51};
32  cylinderLayerStyle.highlights = {"mouseover", "mouseout"};
33  cylinderLayerStyle.strokeColor = {25, 25, 25};
34  cylinderLayerStyle.strokeWidth = 0.5;
35  cylinderLayerStyle.nSegments = 72u;
36 
37  Acts::GeometryIdentifier geoID{0};
38 
40  auto tGeometry = cGeometry();
41 
43  lOptions.name = "cylinder_layer_";
45  {{geoID, cylinderLayerStyle}});
46 
48  tgOptions.prefix = "utest_geometry_";
49  tgOptions.layerOptions =
51  {{geoID, lOptions}});
52 
54  tgContext, *tGeometry, tgOptions);
55 
56  for (const auto& s : geometrySheets) {
57  Acts::Svg::toFile({s}, s._id + ".svg");
58  }
59 }
60 
61 BOOST_AUTO_TEST_SUITE_END()