|
1 | 1 | /****************************************************************************** |
2 | 2 | * Copyright (C) 2022 GSI Helmholtzzentrum für Schwerionenforschung GmbH * |
3 | | - * Copyright (C) 2022-2023 Members of R3B Collaboration * |
| 3 | + * Copyright (C) 2022-2026 Members of R3B Collaboration * |
4 | 4 | * * |
5 | 5 | * This software is distributed under the terms of the * |
6 | 6 | * GNU General Public Licence (GPL) version 3, * |
|
17 | 17 |
|
18 | 18 | #include "R3BAlpideHitData.h" |
19 | 19 | #include <fmt/core.h> |
20 | | -// Needed for TVector3 fmt |
21 | | -template <> |
22 | | -struct fmt::formatter<TVector3> |
23 | | -{ |
24 | | - constexpr auto parse(fmt::format_parse_context& ctx) { return ctx.begin(); } |
25 | | - |
26 | | - template <typename FormatContext> |
27 | | - auto format(const TVector3& vec, FormatContext& ctx) |
28 | | - { |
29 | | - return fmt::format_to(ctx.out(), "({}, {}, {})", vec.X(), vec.Y(), vec.Z()); |
30 | | - } |
31 | | -}; |
32 | | -// Needed for std::vector<double> |
33 | | -template <> |
34 | | -struct fmt::formatter<std::vector<double>> |
35 | | -{ |
36 | | - constexpr auto parse(fmt::format_parse_context& ctx) { return ctx.begin(); } |
37 | | - |
38 | | - template <typename FormatContext> |
39 | | - auto format(const std::vector<double>& v, FormatContext& ctx) |
40 | | - { |
41 | | - std::string s = "["; |
42 | | - for (size_t i = 0; i < v.size(); ++i) |
43 | | - { |
44 | | - s += fmt::format("{}", v[i]); |
45 | | - if (i + 1 < v.size()) |
46 | | - s += ", "; |
47 | | - } |
48 | | - s += "]"; |
49 | | - return fmt::format_to(ctx.out(), "{}", s); |
50 | | - } |
51 | | -}; |
52 | 20 | R3BAlpideHitData::R3BAlpideHitData(uint16_t sensorId, |
53 | 21 | uint16_t clustersize, |
54 | 22 | uint16_t genus, |
@@ -83,16 +51,14 @@ R3BAlpideHitData::R3BAlpideHitData(uint16_t sensorId, |
83 | 51 |
|
84 | 52 | std::string R3BAlpideHitData::toString() const |
85 | 53 | { |
86 | | - return fmt::format("SensorID: {}, ClusterSize: {},Genus: {},Elong: {},MajorUnit:{},HolePerimeter: " |
87 | | - "{},TotalPerimeter:{},Hu:{}, Xpos: {}, Ypos: {}, Zpos: {}", |
| 54 | + return fmt::format("SensorID: {}, ClusterSize: {},Genus: {},Elong: {},HolePerimeter: " |
| 55 | + "{},TotalPerimeter:{}, Xpos: {}, Ypos: {}, Zpos: {}", |
88 | 56 | GetSensorId(), |
89 | 57 | GetClusterSize(), |
90 | 58 | GetGenus(), |
91 | 59 | GetElong(), |
92 | | - GetMajorUnit(), |
93 | 60 | GetHolePerimeter(), |
94 | 61 | GetTotalPerimeter(), |
95 | | - GetHu(), |
96 | 62 | GetX(), |
97 | 63 | GetY(), |
98 | 64 | GetZ()); |
|
0 commit comments