uproot-custom 2.3.0__tar.gz → 2.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/.github/workflows/test-package.yml +1 -1
  2. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/.gitignore +1 -1
  3. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/.pre-commit-config.yaml +2 -2
  4. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/PKG-INFO +5 -4
  5. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/README.md +2 -2
  6. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/cpp/include/uproot-custom/uproot-custom.hh +41 -36
  7. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/cpp/src/uproot-custom.cc +247 -247
  8. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/example/override-streamer.md +11 -11
  9. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/example/read-tobjarray.md +18 -18
  10. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/index.md +1 -1
  11. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/reference/reader-backends.md +1 -1
  12. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/reference/version-requirements.md +1 -3
  13. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/tutorial/customize-factory-reader/investigate-data.md +8 -8
  14. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/tutorial/customize-factory-reader/pipeline.md +14 -14
  15. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/tutorial/customize-factory-reader/port-to-cpp.md +37 -37
  16. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/tutorial/customize-factory-reader/reader-and-factory.md +28 -28
  17. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/tutorial/customize-factory-reader.md +1 -1
  18. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/pyproject.toml +3 -2
  19. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/uproot_custom/_version.py +3 -3
  20. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/uproot_custom/factories.py +1 -1
  21. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/uproot_custom/readers/python.py +206 -203
  22. uproot_custom-2.3.0/.github/workflows/auto-update.yml +0 -49
  23. uproot_custom-2.3.0/uv.lock +0 -3488
  24. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/.clang-format +0 -0
  25. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/.github/release.yml +0 -0
  26. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/.github/workflows/build-wheels.yml +0 -0
  27. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/.github/workflows/deploy-docs.yml +0 -0
  28. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/.github/workflows/python-publish.yml +0 -0
  29. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/.github/workflows/semantic-pr-titles.yml +0 -0
  30. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/.github/workflows/weekly-build.yml +0 -0
  31. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/LICENSE +0 -0
  32. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/cpp/CMakeLists.txt +0 -0
  33. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/cpp/share/cmake/uproot-customConfig.cmake +0 -0
  34. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/Doxyfile +0 -0
  35. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/conf.py +0 -0
  36. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/get-started.md +0 -0
  37. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/reference/api/.gitignore +0 -0
  38. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/reference/api/cpp-api.md +0 -0
  39. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/reference/api/cpp-module.md +0 -0
  40. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/reference/api/uproot-custom-ref.md +0 -0
  41. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/reference/api.md +0 -0
  42. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/reference/binary-format.md +0 -0
  43. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/docs/tutorial/customize-factory-reader/project-setup.md +0 -0
  44. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/conftest.py +0 -0
  45. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/data/test_cstyle_array.root +0 -0
  46. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/data/test_pointers.root +0 -0
  47. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/data/test_primitive.root +0 -0
  48. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/data/test_root_objects.root +0 -0
  49. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/data/test_simple_obj.root +0 -0
  50. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/data/test_stl_array.root +0 -0
  51. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/data/test_stl_complicated.root +0 -0
  52. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/data/test_stl_map.root +0 -0
  53. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/data/test_stl_map_with_obj.root +0 -0
  54. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/data/test_stl_nested.root +0 -0
  55. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/data/test_stl_seq_with_obj.root +0 -0
  56. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/data/test_stl_sequence.root +0 -0
  57. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/data/test_stl_string.root +0 -0
  58. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/CMakeLists.txt +0 -0
  59. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/README.md +0 -0
  60. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/LinkDef.h +0 -0
  61. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/TBasicTypes.hh +0 -0
  62. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/TCStyleArray.hh +0 -0
  63. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/TComplicatedSTL.hh +0 -0
  64. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/TNestedSTL.hh +0 -0
  65. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/TPointers.hh +0 -0
  66. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/TRootObjects.hh +0 -0
  67. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/TSTLArray.hh +0 -0
  68. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/TSTLMap.hh +0 -0
  69. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/TSTLMapWithObj.hh +0 -0
  70. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/TSTLSeqWithObj.hh +0 -0
  71. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/TSTLSequence.hh +0 -0
  72. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/TSTLString.hh +0 -0
  73. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/include/TSimpleObject.hh +0 -0
  74. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/gen-test-data/src/main.cc +0 -0
  75. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/test_AsCustom.py +0 -0
  76. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/tests/test_readers.py +0 -0
  77. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/uproot_custom/AsCustom.py +0 -0
  78. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/uproot_custom/__init__.py +0 -0
  79. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/uproot_custom/cpp.pyi +0 -0
  80. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/uproot_custom/readers/__init__.py +0 -0
  81. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/uproot_custom/readers/_forth.py +0 -0
  82. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/uproot_custom/readers/_numba.py +0 -0
  83. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/uproot_custom/readers/cpp.py +0 -0
  84. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/uproot_custom/share/cmake/__init__.py +0 -0
  85. {uproot_custom-2.3.0 → uproot_custom-2.4.0}/uproot_custom/utils.py +0 -0
@@ -16,7 +16,7 @@ jobs:
16
16
  runs-on: ${{ matrix.os }}
17
17
  strategy:
18
18
  matrix:
19
- python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
19
+ python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
20
20
  os: [ubuntu-latest, macos-latest, windows-latest]
21
21
 
22
22
  steps:
@@ -98,7 +98,7 @@ ipython_config.py
98
98
  # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
99
  # This is especially recommended for binary packages to ensure reproducibility, and is more
100
100
  # commonly ignored for libraries.
101
- #uv.lock
101
+ uv.lock
102
102
 
103
103
  # poetry
104
104
  # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
@@ -23,12 +23,12 @@ repos:
23
23
  - id: trailing-whitespace
24
24
 
25
25
  - repo: https://github.com/psf/black-pre-commit-mirror
26
- rev: 26.1.0
26
+ rev: 26.3.1
27
27
  hooks:
28
28
  - id: black
29
29
 
30
30
  - repo: https://github.com/astral-sh/ruff-pre-commit
31
- rev: v0.15.4
31
+ rev: v0.15.12
32
32
  hooks:
33
33
  - id: ruff-check
34
34
  args: [--fix, --show-fixes]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: uproot-custom
3
- Version: 2.3.0
3
+ Version: 2.4.0
4
4
  Summary: uproot extension for reading custom classes
5
5
  Author-Email: Mingrun Li <mrli@ihep.ac.cn>
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
22
23
  Classifier: Topic :: Scientific/Engineering
23
24
  Classifier: Topic :: Scientific/Engineering :: Information Analysis
24
25
  Classifier: Topic :: Scientific/Engineering :: Mathematics
@@ -26,7 +27,7 @@ Classifier: Topic :: Scientific/Engineering :: Physics
26
27
  Classifier: Topic :: Software Development
27
28
  Classifier: Topic :: Utilities
28
29
  Project-URL: Homepage, https://github.com/mrzimu/uproot-custom
29
- Requires-Python: <3.14,>=3.9
30
+ Requires-Python: <3.15,>=3.9
30
31
  Requires-Dist: uproot>=5.6.7
31
32
  Requires-Dist: numpy
32
33
  Requires-Dist: awkward>=2.8.0
@@ -72,7 +73,7 @@ flowchart TD
72
73
  raw_data --> build_ak
73
74
  ```
74
75
 
75
- - `Reader` is a class that implements the logic to read data from binary buffers. It can be written in **Python** (for development and debugging) or **C++** (for production performance).
76
+ - `Reader` is a class that implements the logic to read data from binary streams. It can be written in **Python** (for development and debugging) or **C++** (for production performance).
76
77
  - `Factory` is a Python class that creates, combines `Reader`s, and post-processes the data read by `Reader`s.
77
78
 
78
79
  This mechanism is implemented as `AsCustom` interpretation. This makes uproot-custom well compatible with Uproot.
@@ -86,7 +87,7 @@ This mechanism is implemented as `AsCustom` interpretation. This makes uproot-cu
86
87
  ## System Requirements
87
88
 
88
89
  - **C++17 compatible compiler**: Required for building C++ readers and the uproot-custom extension module. The CMake configuration sets `CMAKE_CXX_STANDARD 17`.
89
- - **Python 3.9+**: Uproot-custom supports Python 3.9 through 3.13.
90
+ - **Python 3.9+**: Uproot-custom supports Python 3.9 through 3.14.
90
91
 
91
92
  ## Documentation
92
93
 
@@ -38,7 +38,7 @@ flowchart TD
38
38
  raw_data --> build_ak
39
39
  ```
40
40
 
41
- - `Reader` is a class that implements the logic to read data from binary buffers. It can be written in **Python** (for development and debugging) or **C++** (for production performance).
41
+ - `Reader` is a class that implements the logic to read data from binary streams. It can be written in **Python** (for development and debugging) or **C++** (for production performance).
42
42
  - `Factory` is a Python class that creates, combines `Reader`s, and post-processes the data read by `Reader`s.
43
43
 
44
44
  This mechanism is implemented as `AsCustom` interpretation. This makes uproot-custom well compatible with Uproot.
@@ -52,7 +52,7 @@ This mechanism is implemented as `AsCustom` interpretation. This makes uproot-cu
52
52
  ## System Requirements
53
53
 
54
54
  - **C++17 compatible compiler**: Required for building C++ readers and the uproot-custom extension module. The CMake configuration sets `CMAKE_CXX_STANDARD 17`.
55
- - **Python 3.9+**: Uproot-custom supports Python 3.9 through 3.13.
55
+ - **Python 3.9+**: Uproot-custom supports Python 3.9 through 3.14.
56
56
 
57
57
  ## Documentation
58
58
 
@@ -47,7 +47,7 @@ namespace uproot {
47
47
 
48
48
  const uint16_t kStreamedMemberWise = 1 << 14; // streamed member-wise mask
49
49
 
50
- class BinaryBuffer {
50
+ class BinaryStream {
51
51
  public:
52
52
  enum EStatusBits {
53
53
  kCanDelete = 1ULL << 0, ///< if object in a list can be deleted
@@ -75,11 +75,11 @@ namespace uproot {
75
75
  using Reference = std::variant<RefCls, RefObj>;
76
76
 
77
77
  /**
78
- * @brief Construct a BinaryBuffer from numpy arrays.
78
+ * @brief Construct a BinaryStream from numpy arrays.
79
79
  * @param data A numpy array of uint8_t containing the raw data.
80
80
  * @param offsets A numpy array of uint32_t containing the offsets for each entry.
81
81
  */
82
- BinaryBuffer( py::array_t<uint8_t> data, py::array_t<uint32_t> offsets,
82
+ BinaryStream( py::array_t<uint8_t> data, py::array_t<uint32_t> offsets,
83
83
  uint32_t initial_cursor_position )
84
84
  : m_data( static_cast<uint8_t*>( data.request().ptr ) )
85
85
  , m_offsets( static_cast<uint32_t*>( offsets.request().ptr ) )
@@ -88,10 +88,10 @@ namespace uproot {
88
88
  , m_cursor( static_cast<uint8_t*>( data.request().ptr ) ) {}
89
89
 
90
90
  /**
91
- * @brief Read a value of type T from the buffer, handling endianness.
91
+ * @brief Read a value of type T from the stream, handling endianness.
92
92
  *
93
93
  * @tparam T The type to read.
94
- * @return The value read from the buffer.
94
+ * @return The value read from the stream.
95
95
  */
96
96
  template <typename T>
97
97
  const T read() {
@@ -136,14 +136,14 @@ namespace uproot {
136
136
  }
137
137
 
138
138
  /**
139
- * @brief Read the fVersion field from the buffer
139
+ * @brief Read the fVersion field from the stream
140
140
  *
141
141
  * @return The fVersion value
142
142
  */
143
143
  const int16_t read_fVersion() { return read<int16_t>(); }
144
144
 
145
145
  /**
146
- * @brief Read the fNBytes field from the buffer, checking the byte count mask.
146
+ * @brief Read the fNBytes field from the stream, checking the byte count mask.
147
147
  *
148
148
  * @return The fNBytes value without the mask.
149
149
  * @exception std::runtime_error if the byte count mask is not set.
@@ -156,9 +156,9 @@ namespace uproot {
156
156
  }
157
157
 
158
158
  /**
159
- * @brief Read a null-terminated (`\0`) string from the buffer.
159
+ * @brief Read a null-terminated (`\0`) string from the stream.
160
160
  *
161
- * @return The string read from the buffer.
161
+ * @return The string read from the stream.
162
162
  */
163
163
  const std::string read_null_terminated_string() {
164
164
  auto start = m_cursor;
@@ -168,7 +168,7 @@ namespace uproot {
168
168
  }
169
169
 
170
170
  /**
171
- * @brief Read an object header from the buffer. The object header has `fNBytes`,
171
+ * @brief Read an object header from the stream. The object header has `fNBytes`,
172
172
  * `fVersion`, `fTag`. If `fTag == kNewClassTag`, then a null-terminated class name
173
173
  * follows.
174
174
  *
@@ -183,11 +183,11 @@ namespace uproot {
183
183
  }
184
184
 
185
185
  /**
186
- * @brief Read a TString from the buffer. A TString has `length` (uint8_t). If `length
186
+ * @brief Read a TString from the stream. A TString has `length` (uint8_t). If `length
187
187
  * == 255`, then the `length` is a following uint32_t. Then following `length` bytes of
188
188
  * string data.
189
189
  *
190
- * @return The TString data read from the buffer, as a std::string.
190
+ * @return The TString data read from the stream, as a std::string.
191
191
  */
192
192
  const std::string read_TString() {
193
193
  uint32_t length = read<uint8_t>();
@@ -198,7 +198,7 @@ namespace uproot {
198
198
  }
199
199
 
200
200
  /**
201
- * @brief Skip `n` bytes in the buffer.
201
+ * @brief Skip `n` bytes in the stream.
202
202
  *
203
203
  * @param n Number of bytes to skip.
204
204
  */
@@ -216,7 +216,7 @@ namespace uproot {
216
216
  void skip_fVersion() { skip( 2 ); }
217
217
 
218
218
  /**
219
- * @brief Skip a null-terminated (`\0`) string in the buffer.
219
+ * @brief Skip a null-terminated (`\0`) string in the stream.
220
220
  */
221
221
  void skip_null_terminated_string() {
222
222
  while ( *m_cursor != 0 ) { m_cursor++; }
@@ -224,7 +224,7 @@ namespace uproot {
224
224
  }
225
225
 
226
226
  /**
227
- * @brief Skip an object header in the buffer. The object header has `fNBytes`,
227
+ * @brief Skip an object header in the stream. The object header has `fNBytes`,
228
228
  * `fVersion`, `fTag`. If `fTag == kNewClassTag`, then a null-terminated class name
229
229
  * follows.
230
230
  */
@@ -235,7 +235,7 @@ namespace uproot {
235
235
  }
236
236
 
237
237
  /**
238
- * @brief Skip a TObject in the buffer. A TObject has `fVersion` (2 bytes), `fUniqueID`
238
+ * @brief Skip a TObject in the stream. A TObject has `fVersion` (2 bytes), `fUniqueID`
239
239
  * (4 bytes), `fBits` (4 bytes). If `fBits & kIsReferenced`, then a `pidf` (2 bytes)
240
240
  * follows.
241
241
  */
@@ -311,6 +311,11 @@ namespace uproot {
311
311
  ///< reading
312
312
  };
313
313
 
314
+ // backward compatibility
315
+ using BinaryBuffer
316
+ [[deprecated( "BinaryBuffer is deprecated. Use BinaryStream instead." )]] =
317
+ BinaryStream;
318
+
314
319
  /*
315
320
  -----------------------------------------------------------------------------
316
321
  -----------------------------------------------------------------------------
@@ -342,11 +347,11 @@ namespace uproot {
342
347
  virtual const std::string name() const { return m_name; }
343
348
 
344
349
  /**
345
- * @brief Read an element from the buffer.
350
+ * @brief Read an element from the stream.
346
351
  *
347
- * @param buffer The binary buffer to read from.
352
+ * @param stream The binary stream to read from.
348
353
  */
349
- virtual void read( BinaryBuffer& buffer ) = 0;
354
+ virtual void read( BinaryStream& stream ) = 0;
350
355
 
351
356
  /**
352
357
  * @brief Get the data read by the reader. This should be called after the whole
@@ -357,53 +362,53 @@ namespace uproot {
357
362
  virtual py::object data() const = 0;
358
363
 
359
364
  /**
360
- * @brief Read multiple elements from the buffer in one go. Repeatedly calls @ref
365
+ * @brief Read multiple elements from the stream in one go. Repeatedly calls @ref
361
366
  * read() by default.
362
367
  *
363
368
  * @note When multiple elements are stored together, some classes may have "one common
364
369
  * header + multiple data objects" format. This method can be overridden to handle such
365
370
  * cases more efficiently.
366
371
  *
367
- * @param buffer The binary buffer to read from.
372
+ * @param stream The binary stream to read from.
368
373
  * @param count Number of elements to read.
369
374
  * @return Number of elements read.
370
375
  */
371
- virtual uint32_t read_many( BinaryBuffer& buffer, const int64_t count ) {
372
- for ( int32_t i = 0; i < count; i++ ) { read( buffer ); }
376
+ virtual uint32_t read_many( BinaryStream& stream, const int64_t count ) {
377
+ for ( int32_t i = 0; i < count; i++ ) { read( stream ); }
373
378
  return count;
374
379
  }
375
380
 
376
381
  /**
377
- * @brief Read elements from the buffer until reaching the end position. Repeatedly
382
+ * @brief Read elements from the stream until reaching the end position. Repeatedly
378
383
  * calls @ref read() method by default.
379
384
  *
380
385
  * @note When multiple elements are stored together, some classes may have "one common
381
386
  * header + multiple data objects" format. This method can be overridden to handle such
382
387
  * cases more efficiently.
383
388
  *
384
- * @param buffer The binary buffer to read from.
389
+ * @param stream The binary stream to read from.
385
390
  * @param end_pos The end position pointer.
386
391
  * @return Number of elements read.
387
392
  */
388
- virtual uint32_t read_until( BinaryBuffer& buffer, const uint8_t* end_pos ) {
393
+ virtual uint32_t read_until( BinaryStream& stream, const uint8_t* end_pos ) {
389
394
  uint32_t cur_count = 0;
390
- while ( buffer.get_cursor() < end_pos )
395
+ while ( stream.get_cursor() < end_pos )
391
396
  {
392
- read( buffer );
397
+ read( stream );
393
398
  cur_count++;
394
399
  }
395
400
  return cur_count;
396
401
  }
397
402
 
398
403
  /**
399
- * @brief Read multiple elements from the buffer in member-wise fashion. Readers
404
+ * @brief Read multiple elements from the stream in member-wise fashion. Readers
400
405
  * that need to handle member-wise data reading must implement this method.
401
406
  *
402
- * @param buffer The binary buffer to read from.
407
+ * @param stream The binary stream to read from.
403
408
  * @param count Number of elements to read.
404
409
  * @return Number of elements read.
405
410
  */
406
- virtual uint32_t read_many_memberwise( BinaryBuffer& buffer, const int64_t count ) {
411
+ virtual uint32_t read_many_memberwise( BinaryStream& stream, const int64_t count ) {
407
412
  throw std::runtime_error( name() + "::read_many_memberwise is not implemented." );
408
413
  }
409
414
  };
@@ -509,20 +514,20 @@ namespace uproot {
509
514
  }
510
515
 
511
516
  /**
512
- * @brief Debug print function for BinaryBuffer. Prints only when macro or environment
513
- * varialbe with name `UPROOT_DEBUG` is defined. Call @ref BinaryBuffer::debug_print()
517
+ * @brief Debug print function for BinaryStream. Prints only when macro or environment
518
+ * variable with name `UPROOT_DEBUG` is defined. Call @ref BinaryStream::debug_print()
514
519
  * internally.
515
520
  *
516
- * @param buffer The BinaryBuffer to print.
521
+ * @param stream The BinaryStream to print.
517
522
  * @param n Number of bytes to print.
518
523
  */
519
- inline void debug_printf( uproot::BinaryBuffer& buffer, const size_t n = 100 ) {
524
+ inline void debug_printf( uproot::BinaryStream& stream, const size_t n = 100 ) {
520
525
  bool do_print = getenv( "UPROOT_DEBUG" );
521
526
  #ifdef UPROOT_DEBUG
522
527
  do_print = true;
523
528
  #endif
524
529
  if ( !do_print ) return;
525
- buffer.debug_print( n );
530
+ stream.debug_print( n );
526
531
  }
527
532
 
528
533
  } // namespace uproot