28 py::class_<HDF5RawDataFile>(m,
"_HDF5RawDataFile")
29 .def(py::init<std::filesystem::path>())
31 .def(
"get_attribute_names", &HDF5RawDataFile::get_attribute_names,
"Get a list of attribute names")
34 py::overload_cast<const std::string&>(&HDF5RawDataFile::get_attribute<std::string>),
37 .def(
"get_int_attribute",
38 py::overload_cast<const std::string&>(&HDF5RawDataFile::get_attribute<size_t>),
39 "Get integer attribute")
41 .def(
"get_file_name", &HDF5RawDataFile::get_file_name,
"Get file name")
42 .def(
"get_recorded_size", &HDF5RawDataFile::get_recorded_size,
"Get recorded size")
43 .def(
"get_record_type", &HDF5RawDataFile::get_record_type,
"Get record type")
44 .def(
"is_trigger_record_type", &HDF5RawDataFile::is_trigger_record_type,
"Is record type TriggerRecord")
45 .def(
"is_timeslice_type", &HDF5RawDataFile::is_timeslice_type,
"Is record type TimeSlice")
46 .def(
"get_version", &HDF5RawDataFile::get_version,
"FileLayout version number")
48 .def(
"get_dataset_paths",
49 &HDF5RawDataFile::get_dataset_paths,
50 "Get all dataset paths under specified top group in file",
51 py::arg(
"top_level_group_name") =
"")
53 .def(
"get_all_record_ids", &HDF5RawDataFile::get_all_record_ids,
"Get all record/sequence number pairs.")
54 .def(
"get_all_trigger_record_ids",
55 &HDF5RawDataFile::get_all_trigger_record_ids,
56 "Get all trigger record/sequence number pairs.")
57 .def(
"get_all_timeslice_ids", &HDF5RawDataFile::get_all_timeslice_ids,
"Get all timeslice/sequence number pairs.")
59 .def(
"get_record_header_dataset_paths",
60 &HDF5RawDataFile::get_record_header_dataset_paths,
61 "Get all paths to record header datasets")
62 .def(
"get_trigger_record_header_dataset_paths",
63 &HDF5RawDataFile::get_trigger_record_header_dataset_paths,
64 "Get all paths to TriggerRecordHeader datasets")
65 .def(
"get_timeslice_header_dataset_paths",
66 &HDF5RawDataFile::get_timeslice_header_dataset_paths,
67 "Get all paths to TimeSliceHeader datasets")
69 .def(
"get_record_header_dataset_path",
70 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_record_header_dataset_path),
71 "Get record header path for record id")
72 .def(
"get_record_header_dataset_path",
73 py::overload_cast<const uint64_t, const daqdataformats::sequence_number_t>
74 (&HDF5RawDataFile::get_record_header_dataset_path),
75 "Get record header path for record number and sequence number",
77 py::arg(
"seq_num") = 0)
80 "get_trigger_record_header_dataset_path",
81 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_trigger_record_header_dataset_path),
82 "Get record header path for trigger record id")
83 .def(
"get_trigger_record_header_dataset_path",
84 py::overload_cast<const daqdataformats::trigger_number_t, const daqdataformats::sequence_number_t>(
85 &HDF5RawDataFile::get_trigger_record_header_dataset_path),
86 "Get record header path for trigger record number and sequence number",
88 py::arg(
"seq_num") = 0)
90 .def(
"get_timeslice_header_dataset_path",
91 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_timeslice_header_dataset_path),
92 "Get record header path for timeslice record id")
94 "get_timeslice_header_dataset_path",
95 py::overload_cast<const daqdataformats::timeslice_number_t>(&HDF5RawDataFile::get_timeslice_header_dataset_path),
96 "Get record header path for timeslice number")
98 .def(
"get_all_fragment_dataset_paths",
99 &HDF5RawDataFile::get_all_fragment_dataset_paths,
100 "Get all paths to Fragment datasets")
101 .def(
"get_fragment_dataset_paths",
102 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_fragment_dataset_paths),
103 "Get fragment datasets for record ID")
104 .def(
"get_fragment_dataset_paths",
105 py::overload_cast<const uint64_t, const daqdataformats::sequence_number_t>
106 (&HDF5RawDataFile::get_fragment_dataset_paths),
107 "Get fragment datasets for record number and sequence number",
109 py::arg(
"seq_num") = 0)
110 .def(
"get_fragment_dataset_paths",
111 py::overload_cast<const HDF5RawDataFile::record_id_t&, const daqdataformats::SourceID::Subsystem>(
112 &HDF5RawDataFile::get_fragment_dataset_paths),
113 "Get fragment datasets for record ID and SourceID Subsystem")
114 .def(
"get_fragment_dataset_paths",
115 py::overload_cast<const HDF5RawDataFile::record_id_t&, const std::string&>(
116 &HDF5RawDataFile::get_fragment_dataset_paths),
117 "Get fragment datasets for record ID and SourceID Subsystem string")
119 .def(
"get_fragment_dataset_paths",
120 py::overload_cast<const daqdataformats::SourceID::Subsystem>(&HDF5RawDataFile::get_fragment_dataset_paths),
121 "Get fragment datasets for SourceID Subsystem")
122 .def(
"get_fragment_dataset_paths",
123 py::overload_cast<const std::string&>(&HDF5RawDataFile::get_fragment_dataset_paths),
124 "Get fragment datasets for SourceID Subsystem string")
125 .def(
"get_fragment_dataset_paths",
126 py::overload_cast<const daqdataformats::SourceID>(&HDF5RawDataFile::get_fragment_dataset_paths),
127 "Get fragment datasets for SourceID")
128 .def(
"get_fragment_dataset_paths",
129 py::overload_cast<const daqdataformats::SourceID::Subsystem,const uint32_t>
130 (&HDF5RawDataFile::get_fragment_dataset_paths),
131 "Get fragment datasets for SourceID Subsystem")
132 .def(
"get_fragment_dataset_paths",
133 py::overload_cast<const std::string&,const uint32_t>
134 (&HDF5RawDataFile::get_fragment_dataset_paths),
135 "Get fragment datasets for SourceID Subsystem string")
138 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_geo_ids),
139 "Get all GeoIDs in a record id")
141 py::overload_cast<const uint64_t, const daqdataformats::sequence_number_t>
142 (&HDF5RawDataFile::get_geo_ids),
143 "Get all GeoIDs in a record/sequence number")
144 .def(
"get_geo_ids_for_subdetector",
145 py::overload_cast<const HDF5RawDataFile::record_id_t&, const detdataformats::DetID::Subdetector>(
146 &HDF5RawDataFile::get_geo_ids_for_subdetector),
147 "Get all GeoIDs in a record id with the specified Subdetector type")
148 .def(
"get_source_ids",
149 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_source_ids),
150 "Get all source IDs in a record id")
151 .def(
"get_source_ids",
152 py::overload_cast<const uint64_t, const daqdataformats::sequence_number_t>
153 (&HDF5RawDataFile::get_source_ids),
154 "Get all source IDs in a record/sequence number")
155 .def(
"get_source_ids_for_fragment_type",
156 py::overload_cast<const HDF5RawDataFile::record_id_t&, const std::string&>(
157 &HDF5RawDataFile::get_source_ids_for_fragment_type),
158 "Get all source IDs in a record id with a given fragment type")
159 .def(
"get_source_ids_for_fragtype_and_subdetector",
160 py::overload_cast<const HDF5RawDataFile::record_id_t&, const std::string&, const std::string&>(
161 &HDF5RawDataFile::get_source_ids_for_fragtype_and_subdetector),
162 "Get all source IDs in a record id matching the specified fragment and subdetector types")
164 .def(
"get_source_ids",
165 py::overload_cast<const HDF5RawDataFile::record_id_t&,const daqdataformats::SourceID::Subsystem>
166 (&HDF5RawDataFile::get_source_ids),
167 "Get all source IDs in a record id with a given SourceID Subsystem")
168 .def(
"get_source_ids",
171 (&HDF5RawDataFile::get_source_ids),
172 "Get all source IDs in a record/sequence number with a given SourceID Subsystem")
173 .def(
"get_source_ids",
174 py::overload_cast<const HDF5RawDataFile::record_id_t&,const std::string&>
175 (&HDF5RawDataFile::get_source_ids),
176 "Get all source IDs in a record id with a given SourceID Subsystem string")
177 .def(
"get_source_ids",
180 (&HDF5RawDataFile::get_source_ids),
181 "Get all source IDs in a record/sequence number with a given SourceID Subsystem string")
182 .def(
"get_source_ids",
183 py::overload_cast<const daqdataformats::SourceID::Subsystem>
184 (&HDF5RawDataFile::get_source_ids),
185 "Get all source IDs with a given SourceID Subsystem")
186 .def(
"get_source_ids",
187 py::overload_cast<const std::string&>
188 (&HDF5RawDataFile::get_source_ids),
189 "Get all source IDs with a given SourceID Subsystem string")
195 .def(
"get_frag", py::overload_cast<const std::string&>(&HDF5RawDataFile::get_frag_ptr),
"Get Fragment from dataset")
197 py::overload_cast<
const uint64_t,
200 "Get Fragment from record/sequence number and SourceID")
202 py::overload_cast<const HDF5RawDataFile::record_id_t&, const daqdataformats::SourceID&>(
203 &HDF5RawDataFile::get_frag_ptr),
204 "Get Fragment from record id and SourceID")
207 py::overload_cast<
const uint64_t,
211 (&HDF5RawDataFile::get_frag_ptr),
212 "Get Fragment from record/sequence number and SourceID elements")
214 py::overload_cast<
const HDF5RawDataFile::record_id_t&,
217 (&HDF5RawDataFile::get_frag_ptr),
218 "Get Fragment from record id and SourceID elements")
221 py::overload_cast<
const uint64_t,
225 (&HDF5RawDataFile::get_frag_ptr),
226 "Get Fragment from record/sequence number and SourceID elements")
228 py::overload_cast<
const HDF5RawDataFile::record_id_t&,
231 (&HDF5RawDataFile::get_frag_ptr),
232 "Get Fragment from record id and SourceID elements")
235 py::overload_cast<
const HDF5RawDataFile::record_id_t&,
237 (&HDF5RawDataFile::get_frag_ptr),
238 "Get Fragment from record id and GeoID")
240 py::overload_cast<
const uint64_t,
243 (&HDF5RawDataFile::get_frag_ptr),
244 "Get Fragment from record/sequence number and GeoID")
250 py::overload_cast<const std::string&>(&HDF5RawDataFile::get_trh_ptr),
251 "Get TriggerRecordHeader from dataset")
253 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_trh_ptr),
254 "Get TriggerRecordHeader from record id")
256 py::overload_cast<const daqdataformats::trigger_number_t, daqdataformats::sequence_number_t>(
257 &HDF5RawDataFile::get_trh_ptr),
258 "Get TriggerRecordHeader from record/sequence number")
262 py::overload_cast<const std::string&>(&HDF5RawDataFile::get_tsh_ptr),
263 "Get TimeSliceHeader from datset")
265 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_tsh_ptr),
266 "Get TimeSliceHeader from record id")
268 py::overload_cast<const daqdataformats::timeslice_number_t>
269 (&HDF5RawDataFile::get_tsh_ptr),
270 "Get TimeSliceHeader from timeslince number")
272 .def(
"get_trigger_record",
273 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_trigger_record),
274 "Get TriggerRecord object from record id")
275 .def(
"get_trigger_record",
276 py::overload_cast<const daqdataformats::trigger_number_t, const daqdataformats::sequence_number_t>(
277 &HDF5RawDataFile::get_trigger_record),
278 "Get TriggerRecord object from record/sequence number")
279 .def(
"get_timeslice",
280 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_timeslice),
281 "Get TimeSlice object from record id")
282 .def(
"get_timeslice",
283 py::overload_cast<const daqdataformats::timeslice_number_t>(&HDF5RawDataFile::get_timeslice),
284 "Get TimeSlice object from timeslice number");