Skip to content

Commit efb7f1b

Browse files
jesgumaalkin
authored andcommitted
from string_view to span
1 parent d05c30f commit efb7f1b

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

ALICE3/Core/FlatTrackSmearer.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ bool TrackSmearer::viewTable(int pdg, std::span<std::byte> const& span, bool for
170170
return viewTable(pdg, reinterpret_cast<const uint8_t*>(span.data()), span.size_bytes(), forceReload);
171171
}
172172

173+
bool TrackSmearer::viewTable(int pdg, std::string_view sv, bool forceReload)
174+
{
175+
return viewTable(pdg, reinterpret_cast<const uint8_t*>(sv.data()), sv.size(), forceReload);
176+
}
177+
173178
bool TrackSmearer::hasTable(int pdg) const
174179
{
175180
const int ipdg = getIndexPDG(pdg);

ALICE3/Core/FlatTrackSmearer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class TrackSmearer
3333
bool adoptTable(int pdg, const uint8_t* buffer, size_t size, bool forceReload = false);
3434
bool viewTable(int pdg, const uint8_t* buffer, size_t size, bool forceReload = false);
3535
bool viewTable(int pdg, std::span<std::byte> const& span, bool forceReload = false);
36+
bool viewTable(int pdg, std::string_view sv, bool forceReload = false);
37+
3638
bool hasTable(int pdg) const;
3739

3840
void useEfficiency(bool val) { mUseEfficiency = val; }

0 commit comments

Comments
 (0)