11#ifndef HDF5LIBS_TESTUTILITIES_HPP_
12#define HDF5LIBS_TESTUTILITIES_HPP_
25std::vector<std::string>
28 std::regex regex_search_pattern(pattern);
29 std::vector<std::string> file_list;
30 for (
const auto& entry : std::filesystem::directory_iterator(path)) {
31 if (std::regex_match(entry.path().filename().string(), regex_search_pattern)) {
32 file_list.push_back(entry.path());
38std::vector<std::string>
41 std::regex regex_search_pattern(pattern);
42 std::vector<std::string> file_list;
43 for (
const auto& entry : std::filesystem::directory_iterator(path)) {
44 if (std::regex_match(entry.path().filename().string(), regex_search_pattern)) {
45 if (std::filesystem::remove(entry.path())) {
46 file_list.push_back(entry.path());
56 return (
static_cast<uint64_t
>(stream_id) << 48) | (
static_cast<uint64_t
>(slot_id) << 32) |
57 (
static_cast<uint64_t
>(crate_id) << 16) | det_id;
std::map< daqdataformats::SourceID, std::vector< uint64_t > > source_id_geo_id_map_t
HDF5SourceIDHandler::source_id_geo_id_map_t create_srcid_geoid_map()
std::vector< std::string > get_files_matching_pattern(const std::string &path, const std::string &pattern)
uint64_t encode_geoid(int det_id, int crate_id, int slot_id, int stream_id)
std::vector< std::string > delete_files_matching_pattern(const std::string &path, const std::string &pattern)