There is a bit of an inconsistency on how one works with Categories on Frames:
getAvailableCategories returns std::vector<std::string_view>:
|
virtual std::vector<std::string_view> getAvailableCategories() const = 0; |
- but then
readFrame and getEntries on the category requires a string anyway:
|
virtual podio::Frame readFrame(const std::string& name, size_t index, |
|
const std::vector<std::string>& collsToRead) = 0; |
|
virtual size_t getEntries(const std::string& name) const = 0; |
We're not clear on what the motivation for this choice is, but it forces us to do an explicit conversion where we feel we could just as well continue using string_view:
for (const auto& _category : podio_source->getAvailableCategories()) {
std::string category = _category;
std::size_t n = podio_source->getEntries(category);
}
There is a bit of an inconsistency on how one works with Categories on Frames:
getAvailableCategoriesreturnsstd::vector<std::string_view>:podio/include/podio/Reader.h
Line 32 in 2c2a0f5
readFrameandgetEntrieson the category requires astringanyway:podio/include/podio/Reader.h
Lines 27 to 29 in 2c2a0f5
We're not clear on what the motivation for this choice is, but it forces us to do an explicit conversion where we feel we could just as well continue using
string_view: