27 py::class_<HDF5RawDataFile>(m,
"_HDF5RawDataFile")
28 .def(py::init<std::string>())
30 .def(
"get_attribute_names",
31 &HDF5RawDataFile::get_attribute_names,
32 "Get a list of attribute names")
35 py::overload_cast<const std::string&>
36 (&HDF5RawDataFile::get_attribute<std::string>),
39 .def(
"get_int_attribute",
40 py::overload_cast<const std::string&>
41 (&HDF5RawDataFile::get_attribute<size_t>),
42 "Get integer attribute")
45 &HDF5RawDataFile::get_file_name,
"Get file name")
46 .def(
"get_recorded_size",
47 &HDF5RawDataFile::get_recorded_size,
"Get recorded size")
48 .def(
"get_record_type",
49 &HDF5RawDataFile::get_record_type,
"Get record type")
50 .def(
"is_trigger_record_type",
51 &HDF5RawDataFile::is_trigger_record_type,
"Is record type TriggerRecord")
52 .def(
"is_timeslice_type",
53 &HDF5RawDataFile::is_timeslice_type,
"Is record type TimeSlice")
55 &HDF5RawDataFile::get_version,
"FileLayout version number")
57 .def(
"get_dataset_paths",
58 &HDF5RawDataFile::get_dataset_paths,
59 "Get all dataset paths under specified top group in file",
60 py::arg(
"top_level_group_name")=
"")
62 .def(
"get_all_record_ids",
63 &HDF5RawDataFile::get_all_record_ids,
"Get all record/sequence number pairs.")
64 .def(
"get_all_trigger_record_ids",
65 &HDF5RawDataFile::get_all_trigger_record_ids,
"Get all trigger record/sequence number pairs.")
66 .def(
"get_all_timeslice_ids",
67 &HDF5RawDataFile::get_all_timeslice_ids,
"Get all timeslice/sequence number pairs.")
69 .def(
"get_record_header_dataset_paths",
70 &HDF5RawDataFile::get_record_header_dataset_paths,
"Get all paths to record header datasets")
71 .def(
"get_trigger_record_header_dataset_paths",
72 &HDF5RawDataFile::get_trigger_record_header_dataset_paths,
"Get all paths to TriggerRecordHeader datasets")
73 .def(
"get_timeslice_header_dataset_paths",
74 &HDF5RawDataFile::get_timeslice_header_dataset_paths,
"Get all paths to TimeSliceHeader datasets")
76 .def(
"get_record_header_dataset_path",
77 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_record_header_dataset_path),
78 "Get record header path for record id")
79 .def(
"get_record_header_dataset_path",
80 py::overload_cast<const uint64_t,const daqdataformats::sequence_number_t>
81 (&HDF5RawDataFile::get_record_header_dataset_path),
82 "Get record header path for record number and sequence number",
83 py::arg(
"rec_num"),py::arg(
"seq_num")=0)
85 .def(
"get_trigger_record_header_dataset_path",
86 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_trigger_record_header_dataset_path),
87 "Get record header path for trigger record id")
88 .def(
"get_trigger_record_header_dataset_path",
89 py::overload_cast<const daqdataformats::trigger_number_t,const daqdataformats::sequence_number_t>
90 (&HDF5RawDataFile::get_trigger_record_header_dataset_path),
91 "Get record header path for trigger record number and sequence number",
92 py::arg(
"trig_num"),py::arg(
"seq_num")=0)
94 .def(
"get_timeslice_header_dataset_path",
95 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_timeslice_header_dataset_path),
96 "Get record header path for timeslice record id")
97 .def(
"get_timeslice_header_dataset_path",
98 py::overload_cast<const daqdataformats::timeslice_number_t>
99 (&HDF5RawDataFile::get_timeslice_header_dataset_path),
100 "Get record header path for timeslice number")
102 .def(
"get_all_fragment_dataset_paths",
103 &HDF5RawDataFile::get_all_fragment_dataset_paths,
104 "Get all paths to Fragment datasets")
105 .def(
"get_fragment_dataset_paths",
106 py::overload_cast<const HDF5RawDataFile::record_id_t&>(&HDF5RawDataFile::get_fragment_dataset_paths),
107 "Get fragment datasets for record ID")
108 .def(
"get_fragment_dataset_paths",
109 py::overload_cast<const uint64_t,const daqdataformats::sequence_number_t>
110 (&HDF5RawDataFile::get_fragment_dataset_paths),
111 "Get fragment datasets for record number and sequence number",
112 py::arg(
"rec_num"),py::arg(
"seq_num")=0)
113 .def(
"get_fragment_dataset_paths",
114 py::overload_cast<const HDF5RawDataFile::record_id_t&,const daqdataformats::SourceID::Subsystem>
115 (&HDF5RawDataFile::get_fragment_dataset_paths),
116 "Get fragment datasets for record ID and SourceID Subsystem")
117 .def(
"get_fragment_dataset_paths",
118 py::overload_cast<const HDF5RawDataFile::record_id_t&,const std::string&>
119 (&HDF5RawDataFile::get_fragment_dataset_paths),
120 "Get fragment datasets for record ID and SourceID Subsystem string")
122 .def(
"get_fragment_dataset_paths",
123 py::overload_cast<const daqdataformats::SourceID::Subsystem>(&HDF5RawDataFile::get_fragment_dataset_paths),
124 "Get fragment datasets for SourceID Subsystem")
125 .def(
"get_fragment_dataset_paths",
126 py::overload_cast<const std::string&>(&HDF5RawDataFile::get_fragment_dataset_paths),
127 "Get fragment datasets for SourceID Subsystem string")
128 .def(
"get_fragment_dataset_paths",
129 py::overload_cast<const daqdataformats::SourceID>(&HDF5RawDataFile::get_fragment_dataset_paths),
130 "Get fragment datasets for SourceID")
131 .def(
"get_fragment_dataset_paths",
132 py::overload_cast<const daqdataformats::SourceID::Subsystem,const uint32_t>
133 (&HDF5RawDataFile::get_fragment_dataset_paths),
134 "Get fragment datasets for SourceID Subsystem")
135 .def(
"get_fragment_dataset_paths",
136 py::overload_cast<const std::string&,const uint32_t>
137 (&HDF5RawDataFile::get_fragment_dataset_paths),
138 "Get fragment datasets for SourceID Subsystem string")
141 py::overload_cast<const HDF5RawDataFile::record_id_t&>
142 (&HDF5RawDataFile::get_geo_ids),
143 "Get all GeoIDs in a record id")
145 py::overload_cast<const uint64_t,const daqdataformats::sequence_number_t>
146 (&HDF5RawDataFile::get_geo_ids),
147 "Get all GeoIDs in a record/sequence number")
148 .def(
"get_geo_ids_for_subdetector",
149 py::overload_cast<const HDF5RawDataFile::record_id_t&,const detdataformats::DetID::Subdetector>
150 (&HDF5RawDataFile::get_geo_ids_for_subdetector),
151 "Get all GeoIDs in a record id with the specified Subdetector type")
152 .def(
"get_source_ids",
153 py::overload_cast<const HDF5RawDataFile::record_id_t&>
154 (&HDF5RawDataFile::get_source_ids),
155 "Get all source IDs in a record id")
156 .def(
"get_source_ids",
157 py::overload_cast<const uint64_t,const daqdataformats::sequence_number_t>
158 (&HDF5RawDataFile::get_source_ids),
159 "Get all source IDs in a record/sequence number")
160 .def(
"get_source_ids_for_fragment_type",
161 py::overload_cast<const HDF5RawDataFile::record_id_t&,const std::string&>
162 (&HDF5RawDataFile::get_source_ids_for_fragment_type),
163 "Get all source IDs in a record id with a given fragment type")
164 .def(
"get_source_ids_for_fragtype_and_subdetector",
165 py::overload_cast<const HDF5RawDataFile::record_id_t&,const std::string&,const std::string&>
166 (&HDF5RawDataFile::get_source_ids_for_fragtype_and_subdetector),
167 "Get all source IDs in a record id matching the specified fragment and subdetector types")
169 .def(
"get_source_ids",
170 py::overload_cast<const HDF5RawDataFile::record_id_t&,const daqdataformats::SourceID::Subsystem>
171 (&HDF5RawDataFile::get_source_ids),
172 "Get all source IDs in a record id with a given SourceID Subsystem")
173 .def(
"get_source_ids",
176 (&HDF5RawDataFile::get_source_ids),
177 "Get all source IDs in a record/sequence number with a given SourceID Subsystem")
178 .def(
"get_source_ids",
179 py::overload_cast<const HDF5RawDataFile::record_id_t&,const std::string&>
180 (&HDF5RawDataFile::get_source_ids),
181 "Get all source IDs in a record id with a given SourceID Subsystem string")
182 .def(
"get_source_ids",
185 (&HDF5RawDataFile::get_source_ids),
186 "Get all source IDs in a record/sequence number with a given SourceID Subsystem string")
187 .def(
"get_source_ids",
188 py::overload_cast<const daqdataformats::SourceID::Subsystem>
189 (&HDF5RawDataFile::get_source_ids),
190 "Get all source IDs with a given SourceID Subsystem")
191 .def(
"get_source_ids",
192 py::overload_cast<const std::string&>
193 (&HDF5RawDataFile::get_source_ids),
194 "Get all source IDs with a given SourceID Subsystem string")
201 py::overload_cast<const std::string & >
202 (&HDF5RawDataFile::get_frag_ptr),
203 "Get Fragment from dataset")
205 py::overload_cast<
const uint64_t,
208 (&HDF5RawDataFile::get_frag_ptr),
209 "Get Fragment from record/sequence number and SourceID")
211 py::overload_cast<
const HDF5RawDataFile::record_id_t&,
213 (&HDF5RawDataFile::get_frag_ptr),
214 "Get Fragment from record id and SourceID")
217 py::overload_cast<
const uint64_t,
221 (&HDF5RawDataFile::get_frag_ptr),
222 "Get Fragment from record/sequence number and SourceID elements")
224 py::overload_cast<
const HDF5RawDataFile::record_id_t&,
227 (&HDF5RawDataFile::get_frag_ptr),
228 "Get Fragment from record id and SourceID elements")
231 py::overload_cast<
const uint64_t,
235 (&HDF5RawDataFile::get_frag_ptr),
236 "Get Fragment from record/sequence number and SourceID elements")
238 py::overload_cast<
const HDF5RawDataFile::record_id_t&,
241 (&HDF5RawDataFile::get_frag_ptr),
242 "Get Fragment from record id and SourceID elements")
245 py::overload_cast<
const HDF5RawDataFile::record_id_t&,
247 (&HDF5RawDataFile::get_frag_ptr),
248 "Get Fragment from record id and GeoID")
250 py::overload_cast<
const uint64_t,
253 (&HDF5RawDataFile::get_frag_ptr),
254 "Get Fragment from record/sequence number and GeoID")
260 py::overload_cast<const std::string & >
261 (&HDF5RawDataFile::get_trh_ptr),
262 "Get TriggerRecordHeader from dataset")
264 py::overload_cast<const HDF5RawDataFile::record_id_t&>
265 (&HDF5RawDataFile::get_trh_ptr),
266 "Get TriggerRecordHeader from record id")
268 py::overload_cast<const daqdataformats::trigger_number_t,daqdataformats::sequence_number_t>
269 (&HDF5RawDataFile::get_trh_ptr),
270 "Get TriggerRecordHeader from record/sequence number")
274 py::overload_cast<const std::string & >
275 (&HDF5RawDataFile::get_tsh_ptr),
276 "Get TimeSliceHeader from datset")
278 py::overload_cast<const HDF5RawDataFile::record_id_t&>
279 (&HDF5RawDataFile::get_tsh_ptr),
280 "Get TimeSliceHeader from record id")
282 py::overload_cast<const daqdataformats::timeslice_number_t>
283 (&HDF5RawDataFile::get_tsh_ptr),
284 "Get TimeSliceHeader from timeslince number")
286 .def(
"get_trigger_record",
287 py::overload_cast<const HDF5RawDataFile::record_id_t&>
288 (&HDF5RawDataFile::get_trigger_record),
289 "Get TriggerRecord object from record id")
290 .def(
"get_trigger_record",
293 (&HDF5RawDataFile::get_trigger_record),
294 "Get TriggerRecord object from record/sequence number")
295 .def(
"get_timeslice",
296 py::overload_cast<const HDF5RawDataFile::record_id_t&>
297 (&HDF5RawDataFile::get_timeslice),
298 "Get TimeSlice object from record id")
299 .def(
"get_timeslice",
300 py::overload_cast<const daqdataformats::timeslice_number_t>
301 (&HDF5RawDataFile::get_timeslice),
302 "Get TimeSlice object from timeslice number")