DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
#include <HDF5SourceIDHandler.hpp>
Public Types | |
typedef std::map< daqdataformats::SourceID, std::string > | source_id_path_map_t |
typedef std::map< daqdataformats::SourceID, std::vector< uint64_t > > | source_id_geo_id_map_t |
typedef std::map< daqdataformats::SourceID::Subsystem, std::set< daqdataformats::SourceID > > | subsystem_source_id_map_t |
typedef std::map< daqdataformats::FragmentType, std::set< daqdataformats::SourceID > > | fragment_type_source_id_map_t |
typedef std::map< detdataformats::DetID::Subdetector, std::set< daqdataformats::SourceID > > | subdetector_source_id_map_t |
Public Member Functions | |
HDF5SourceIDHandler (const uint32_t version) | |
Constructor. | |
void | fetch_file_level_geo_id_info (const HighFive::File &h5_file, source_id_geo_id_map_t &the_map) |
void | fetch_record_level_geo_id_info (const HighFive::Group &record_group, source_id_geo_id_map_t &the_map) |
daqdataformats::SourceID | fetch_record_header_source_id (const HighFive::Group &record_group) |
void | fetch_source_id_path_info (const HighFive::Group &record_group, source_id_path_map_t &the_map) |
void | fetch_fragment_type_source_id_info (const HighFive::Group &record_group, fragment_type_source_id_map_t &the_map) |
void | fetch_subdetector_source_id_info (const HighFive::Group &record_group, subdetector_source_id_map_t &the_map) |
Static Private Member Functions | |
static std::string | get_json_string (const daqdataformats::SourceID &source_id) |
static std::string | get_json_string (const source_id_path_map_t &source_id_path_map) |
static std::string | get_json_string (const source_id_geo_id_map_t &source_id_geo_id_map) |
static std::string | get_json_string (const fragment_type_source_id_map_t &fragment_type_source_id_map) |
static std::string | get_json_string (const subdetector_source_id_map_t &subdetector_source_id_map) |
static void | parse_json_string (const std::string &json_string, daqdataformats::SourceID &source_id) |
static void | parse_json_string (const std::string &json_string, source_id_path_map_t &source_id_path_map) |
static void | parse_json_string (const std::string &json_string, source_id_geo_id_map_t &source_id_geo_id_map) |
static void | parse_json_string (const std::string &json_string, fragment_type_source_id_map_t &fragment_type_source_id_map) |
static void | parse_json_string (const std::string &json_string, subdetector_source_id_map_t &subdetector_source_id_map) |
template<typename C , typename T > | |
static void | write_attribute (HighFive::AnnotateTraits< C > &h5annt, const std::string &name, T value) |
template<typename C , typename T > | |
static T | get_attribute (const HighFive::AnnotateTraits< C > &h5annt, const std::string &name) |
Private Attributes | |
uint32_t | m_version |
version number | |
At the moment, this class is designed to handle different versions of translation (to/from strings) when reading data. For writing data, the interface is currently designed to only support the current version of the translation. If we ever decide to add support for writing of different versions, then the 'store' methods would become non-static.
Definition at line 45 of file HDF5SourceIDHandler.hpp.
std::map<daqdataformats::FragmentType, std::set<daqdataformats::SourceID> > dunedaq::hdf5libs::HDF5SourceIDHandler::fragment_type_source_id_map_t |
Definition at line 51 of file HDF5SourceIDHandler.hpp.
std::map<daqdataformats::SourceID, std::vector<uint64_t> > dunedaq::hdf5libs::HDF5SourceIDHandler::source_id_geo_id_map_t |
Definition at line 49 of file HDF5SourceIDHandler.hpp.
std::map<daqdataformats::SourceID, std::string> dunedaq::hdf5libs::HDF5SourceIDHandler::source_id_path_map_t |
Definition at line 48 of file HDF5SourceIDHandler.hpp.
std::map<detdataformats::DetID::Subdetector, std::set<daqdataformats::SourceID> > dunedaq::hdf5libs::HDF5SourceIDHandler::subdetector_source_id_map_t |
Definition at line 52 of file HDF5SourceIDHandler.hpp.
std::map<daqdataformats::SourceID::Subsystem, std::set<daqdataformats::SourceID> > dunedaq::hdf5libs::HDF5SourceIDHandler::subsystem_source_id_map_t |
Definition at line 50 of file HDF5SourceIDHandler.hpp.
|
explicit |
Constructor.
Definition at line 114 of file HDF5SourceIDHandler.cpp.
|
static |
Adds the specified FragmentType and SourceId to the specified fragment_type_source_id map.
Definition at line 218 of file HDF5SourceIDHandler.cpp.
|
static |
Adds the specified SourceID and GeoID list to the specified source_id_geo_id map.
Definition at line 204 of file HDF5SourceIDHandler.cpp.
|
static |
Adds the specified SourceID and HDF5 Path to the specified source_id_path map.
Definition at line 196 of file HDF5SourceIDHandler.cpp.
|
static |
Adds the specified Subdetector and SourceId to the specified subdetector_source_id map.
Definition at line 232 of file HDF5SourceIDHandler.cpp.
|
static |
Adds the specified Subsystem and SourceId to the specified subsystem_source_id map.
Definition at line 246 of file HDF5SourceIDHandler.cpp.
void dunedaq::hdf5libs::HDF5SourceIDHandler::fetch_file_level_geo_id_info | ( | const HighFive::File & | h5_file, |
source_id_geo_id_map_t & | the_map ) |
Adds entries to the specified SourceID-to-GeoID map using information stored at the file level in the specified HighFive::File.
Definition at line 120 of file HDF5SourceIDHandler.cpp.
void dunedaq::hdf5libs::HDF5SourceIDHandler::fetch_fragment_type_source_id_info | ( | const HighFive::Group & | record_group, |
fragment_type_source_id_map_t & | the_map ) |
Adds entries to the specified FragmentType-to-SourceID map using information stored at the record level in the specified HighFive::Group.
Definition at line 170 of file HDF5SourceIDHandler.cpp.
daqdataformats::SourceID dunedaq::hdf5libs::HDF5SourceIDHandler::fetch_record_header_source_id | ( | const HighFive::Group & | record_group | ) |
Fetches the record header SourceID using information stored at the record level in the specified HighFive::Group.
Definition at line 143 of file HDF5SourceIDHandler.cpp.
void dunedaq::hdf5libs::HDF5SourceIDHandler::fetch_record_level_geo_id_info | ( | const HighFive::Group & | record_group, |
source_id_geo_id_map_t & | the_map ) |
Adds entries to the specified SourceID-to-GeoID map using information stored at the record level in the specified HighFive::Group.
Definition at line 133 of file HDF5SourceIDHandler.cpp.
void dunedaq::hdf5libs::HDF5SourceIDHandler::fetch_source_id_path_info | ( | const HighFive::Group & | record_group, |
source_id_path_map_t & | the_map ) |
Adds entries to the specified SourceID-to-HDF5-Path map using information stored at the record level in the specified HighFive::Group.
Definition at line 157 of file HDF5SourceIDHandler.cpp.
void dunedaq::hdf5libs::HDF5SourceIDHandler::fetch_subdetector_source_id_info | ( | const HighFive::Group & | record_group, |
subdetector_source_id_map_t & | the_map ) |
Adds entries to the specified Subdetector-to-SourceID map using information stored at the record level in the specified HighFive::Group.
Definition at line 183 of file HDF5SourceIDHandler.cpp.
|
staticprivate |
Fetches the attribute with the specified name from the specified HightFive File or Group.
Definition at line 240 of file HDF5SourceIDHandler.hpp.
|
staticprivate |
Produces the JSON string that corresponds to the specified source_id
Definition at line 260 of file HDF5SourceIDHandler.cpp.
|
staticprivate |
Produces the JSON string that corresponds to the specified fragment_type_source_id map
|
staticprivate |
Produces the JSON string that corresponds to the specified source_id_geo_id map
Definition at line 283 of file HDF5SourceIDHandler.cpp.
|
staticprivate |
Produces the JSON string that corresponds to the specified source_id_path map
Definition at line 269 of file HDF5SourceIDHandler.cpp.
|
staticprivate |
Produces the JSON string that corresponds to the specified subdetector_source_id map
|
static |
Definition at line 30 of file HDF5SourceIDHandler.cpp.
|
staticprivate |
Parses the specified JSON string into the specified source_id
Definition at line 341 of file HDF5SourceIDHandler.cpp.
|
staticprivate |
Parses the specified JSON string into the specified fragment_type_source_id_map
|
staticprivate |
Parses the specified JSON string into the specified source_id_geo_id map
Definition at line 364 of file HDF5SourceIDHandler.cpp.
|
staticprivate |
Parses the specified JSON string into the specified source_id_path map
Definition at line 351 of file HDF5SourceIDHandler.cpp.
|
staticprivate |
Parses the specified JSON string into the specified subdetector_source_id_map
|
static |
Stores the map from SourceID to GeoID in the specified HighFive::File.
Definition at line 82 of file HDF5SourceIDHandler.cpp.
|
static |
Stores the SourceID of the record header DataSet in the specified HighFive::Group.
Definition at line 88 of file HDF5SourceIDHandler.cpp.
|
static |
Stores the map from FragmentType to SourceID in the specified HighFive::Group.
Definition at line 101 of file HDF5SourceIDHandler.cpp.
|
static |
Stores the map from SourceID to HDF5 Path in the specified HighFive::Group.
Definition at line 95 of file HDF5SourceIDHandler.cpp.
|
static |
Stores the map from DetID::Subdetector to SourceID in the specified HighFive::Group.
Definition at line 108 of file HDF5SourceIDHandler.cpp.
|
staticprivate |
Writes the specified attribute name and value to the specified HightFive File or Group.
Definition at line 230 of file HDF5SourceIDHandler.hpp.
|
private |
version number
Definition at line 163 of file HDF5SourceIDHandler.hpp.