DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
#include "trgtools/EmulateTCUnit.hpp"
#include "trgtools/TAFileHandler.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 "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 | SaveFragments (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 > > > | SortFilesPerWriter (const std::vector< std::string > &_files) |
Returns sorted map of HDF5 files per datawriter application. | |
std::pair< uint64_t, uint64_t > | GetAvailableSliceIDRange (const std::map< std::string, std::vector< std::shared_ptr< hdf5libs::HDF5RawDataFile > > > &_files, bool _quiet) |
Retrieves the available slice ID range. | |
void | ParseApp (CLI::App &_app, Options &_opts) |
Adds options to our CLI application. | |
int | main (int argc, char const *argv[]) |
std::pair< uint64_t, uint64_t > GetAvailableSliceIDRange | ( | const std::map< std::string, std::vector< std::shared_ptr< hdf5libs::HDF5RawDataFile > > > & | _files, |
bool | _quiet ) |
Retrieves the available slice ID range.
Finds the overlap in the slice ID range between the provided files, and returns that overlap as an available range – or crashes if there is a file with a range that does not overlap.
_files | a map of writer app names & vectors of HDF5 files from that application. |
_quiet | Do we want to quiet down the cout? |
Definition at line 145 of file emulate_from_tpstream.cxx.
int main | ( | int | argc, |
char const * | argv[] ) |
Definition at line 252 of file emulate_from_tpstream.cxx.
void ParseApp | ( | CLI::App & | _app, |
Options & | _opts ) |
Adds options to our CLI application.
_app | CLI application |
_opts | Struct with the available options |
Definition at line 232 of file emulate_from_tpstream.cxx.
void SaveFragments | ( | 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 31 of file emulate_from_tpstream.cxx.
std::map< std::string, std::vector< std::shared_ptr< hdf5libs::HDF5RawDataFile > > > SortFilesPerWriter | ( | const std::vector< std::string > & | _files | ) |
Returns sorted map of HDF5 files per datawriter application.
_files | vector of strings corresponding to the input file paths |
Definition at line 99 of file emulate_from_tpstream.cxx.