ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
groups.hpp
1// This file is part of the ACTS project.
2//
3// Copyright (C) 2016 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 https://mozilla.org/MPL/2.0/.
8
9#pragma once
10
11// Actsvg include(s)
12#include "actsvg/core.hpp"
13
14// System include(s)
15#include <string>
16#include <vector>
17
18namespace detray::svgtools::utils {
19
20template <typename iterator_t>
21inline auto group(const std::string& identification,
22 const iterator_t& iterator) {
23 actsvg::svg::object ret;
24 ret._tag = "g";
25 ret._id = identification;
26 for (const auto& item : iterator) {
27 ret.add_object(item);
28 }
29 return ret;
30}
31
32inline auto group(const std::string& identification) {
33 return group(identification, std::vector<actsvg::svg::object>{});
34}
35} // namespace detray::svgtools::utils