|
DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
#include "trgtools/TCEmulationUnit.hpp"#include "trgtools/TAEmulationWorker.hpp"#include "CLI/App.hpp"#include "CLI/Config.hpp"#include "CLI/Formatter.hpp"#include <fmt/core.h>#include <fmt/format.h>#include <fmt/chrono.h>#include <filesystem>#include <optional>#include "hdf5libs/HDF5RawDataFile.hpp"#include "hdf5libs/HDF5SourceIDHandler.hpp"#include "triggeralgs/TriggerCandidateFactory.hpp"Go to the source code of this file.
Classes | |
| struct | Options |
| Struct with available cli application options. More... | |
Functions | |
| void | save_fragments (const std::string &_outputfilename, const hdf5libs::HDF5SourceIDHandler::source_id_geo_id_map_t &_sourceid_geoid_map, std::map< uint64_t, std::vector< std::unique_ptr< daqdataformats::Fragment > > > _frags, bool _quiet) |
| Saves fragments in timeslice format into output HDF5 file. | |
| std::map< std::string, std::vector< std::shared_ptr< hdf5libs::HDF5RawDataFile > > > | sort_files_per_writer (const std::vector< std::string > &_files) |
| Group and order input TimeSlice files per TPStream writer application. | |
| std::pair< uint64_t, uint64_t > | get_available_slice_id_range (const std::map< std::string, std::vector< std::shared_ptr< hdf5libs::HDF5RawDataFile > > > &_files, bool _quiet) |
| Compute the common SliceID interval shared by all writer groups. | |
| void | parse_app (CLI::App &_app, Options &_opts) |
| Adds options to our CLI application. | |
| int | main (int argc, char const *argv[]) |
| std::pair< uint64_t, uint64_t > get_available_slice_id_range | ( | const std::map< std::string, std::vector< std::shared_ptr< hdf5libs::HDF5RawDataFile > > > & | _files, |
| bool | _quiet ) |
Compute the common SliceID interval shared by all writer groups.
For each writer application, this function scans all of its files and finds the minimum and maximum available record IDs. It then computes the global intersection across applications:
The returned range is therefore the SliceID window for which data is expected to be available from every application.
| _files | Map of writer application names to vectors of input HDF5 files. |
| _quiet | If false, print per-application and global range diagnostics. |
{global_start, global_end} of overlapping SliceIDs. | std::runtime_error | If _files is empty, if any file has no records, or if no overlapping SliceID interval exists. |
Definition at line 168 of file emulate_from_tpstream.cxx.
| int main | ( | int | argc, |
| char const * | argv[] ) |
Definition at line 282 of file emulate_from_tpstream.cxx.
| void parse_app | ( | CLI::App & | _app, |
| Options & | _opts ) |
Adds options to our CLI application.
| _app | CLI application |
| _opts | Struct with the available options |
Definition at line 259 of file emulate_from_tpstream.cxx.
| void save_fragments | ( | const std::string & | _outputfilename, |
| const hdf5libs::HDF5SourceIDHandler::source_id_geo_id_map_t & | _sourceid_geoid_map, | ||
| std::map< uint64_t, std::vector< std::unique_ptr< daqdataformats::Fragment > > > | _frags, | ||
| bool | _quiet ) |
Saves fragments in timeslice format into output HDF5 file.
| _outputfilename | Name of the hdf5 file to save the output into |
| _sourceid_geoid_map | sourceid–geoid map required to create a HDF5 file |
| _frags | Map of fragments, with a vector of fragment pointers for each slice id |
| _quiet | Do we want to quiet down the cout? |
Definition at line 32 of file emulate_from_tpstream.cxx.
| std::map< std::string, std::vector< std::shared_ptr< hdf5libs::HDF5RawDataFile > > > sort_files_per_writer | ( | const std::vector< std::string > & | _files | ) |
Group and order input TimeSlice files per TPStream writer application.
Opens each input file, validates that it is of TimeSlice type, and groups files by their application_name attribute. Within each application group, files are sorted by their file_index attribute so consecutive segments from the same writer are processed in order.
| _files | Vector of input HDF5 file paths. |
application_name, each value a vector of file handles ordered by file_index. | std::runtime_error | If any input file is not of type TimeSlice. |
Definition at line 114 of file emulate_from_tpstream.cxx.