![]() |
Belle II Software prerelease-10-00-00a
|
Public Member Functions | |
__init__ (self, listname, variables, filename, Optional[str] hdf_table_name=None) | |
buffer (self) | |
buffer_full (self) | |
initialize (self) | |
event_buffer (self) | |
clear_buffer (self) | |
append_buffer (self) | |
initialize_feather_writer (self) | |
initialize_parquet_writer (self) | |
initialize_csv_writer (self) | |
initialize_hdf5_writer (self) | |
fill_event_buffer (self) | |
write_buffer (self) | |
event (self) | |
terminate (self) | |
Public Attributes | |
buffer = "hdf5": | |
buffer_full | |
Protected Attributes | |
_filename = filename | |
Output filename. | |
_listname = listname | |
Particle list name. | |
_variables = list(set(variables)) | |
List of variables. | |
str | _format = "csv" |
Output format. | |
tuple | _table_name |
Table name in the hdf5 file. | |
_event_buffer_size = event_buffer_size | |
Event buffer size. | |
int | _event_buffer_counter = 0 |
Event buffer counter. | |
_writer_kwargs = writer_kwargs | |
writer kwargs | |
list | _varnames |
variable names | |
_std_varnames = variables.std_vector(*self._varnames) | |
std.vector of variable names | |
_evtmeta = ROOT.Belle2.PyStoreObj("EventMetaData") | |
Event metadata. | |
_plist = ROOT.Belle2.PyStoreObj(self._listname) | |
Pointer to the particle list. | |
_dtypes = dtypes | |
The data type. | |
_buffer = np.empty(self._event_buffer_size * 10, dtype=self._dtypes) | |
event variables buffer (will be automatically grown if necessary) | |
int | _buffer_index = 0 |
current start index in the event variables buffer | |
list | _schema |
A list of tuples and py.DataTypes to define the pyarrow schema. | |
_feather_writer | |
a writer object to write data into a feather file | |
_parquet_writer | |
A list of tuples and py.DataTypes to define the pyarrow schema. | |
_csv_writer = CSVWriter(self._filename, schema=pa.schema(self._schema), **self._writer_kwargs) | |
A list of tuples and py.DataTypes to define the pyarrow schema. | |
_hdf5_writer | |
The pytable file. | |
_table | |
The pytable. | |
Legacy class to not break existing code
Definition at line 330 of file b2pandas_utils.py.
__init__ | ( | self, | |
listname, | |||
variables, | |||
filename, | |||
Optional[str] | hdf_table_name = None ) |
Definition at line 335 of file b2pandas_utils.py.
|
inherited |
"Append" a new event to the buffer by moving the buffer index forward by particle list size Automatically replaces the buffer by a larger one if necessary
Definition at line 179 of file b2pandas_utils.py.
|
inherited |
The buffer slice across multiple entries
Definition at line 159 of file b2pandas_utils.py.
|
inherited |
check if the buffer is full
Definition at line 276 of file b2pandas_utils.py.
|
inherited |
Reset the buffer event counter and index
Definition at line 172 of file b2pandas_utils.py.
|
inherited |
Event processing function executes the fill_buffer function and writes the data to the output file in chunks of event_buffer_size
Definition at line 299 of file b2pandas_utils.py.
|
inherited |
The buffer slice for the current event
Definition at line 166 of file b2pandas_utils.py.
|
inherited |
Assign values for all variables for all particles in the particle list to the current event buffer
Definition at line 255 of file b2pandas_utils.py.
|
inherited |
Setup variable lists, pointers, buffers and file writers
Definition at line 102 of file b2pandas_utils.py.
|
inherited |
Initialize the csv writer using pyarrow
Definition at line 225 of file b2pandas_utils.py.
|
inherited |
Initialize the feather writer using pyarrow
Definition at line 197 of file b2pandas_utils.py.
|
inherited |
Initialize the hdf5 writer using pytables
Definition at line 236 of file b2pandas_utils.py.
|
inherited |
Initialize the parquet writer using pyarrow
Definition at line 212 of file b2pandas_utils.py.
|
inherited |
save and close the output
Definition at line 312 of file b2pandas_utils.py.
|
inherited |
write the buffer to the output file
Definition at line 282 of file b2pandas_utils.py.
|
protectedinherited |
event variables buffer (will be automatically grown if necessary)
Definition at line 144 of file b2pandas_utils.py.
|
protectedinherited |
current start index in the event variables buffer
Definition at line 147 of file b2pandas_utils.py.
|
protectedinherited |
A list of tuples and py.DataTypes to define the pyarrow schema.
a writer object to write data into a csv file
Definition at line 234 of file b2pandas_utils.py.
|
protectedinherited |
The data type.
Definition at line 141 of file b2pandas_utils.py.
|
protectedinherited |
Event buffer counter.
Definition at line 98 of file b2pandas_utils.py.
|
protectedinherited |
Event buffer size.
Definition at line 96 of file b2pandas_utils.py.
|
protectedinherited |
Event metadata.
Definition at line 121 of file b2pandas_utils.py.
|
protectedinherited |
a writer object to write data into a feather file
Definition at line 206 of file b2pandas_utils.py.
|
protectedinherited |
Output filename.
Definition at line 70 of file b2pandas_utils.py.
|
protectedinherited |
Output format.
Definition at line 79 of file b2pandas_utils.py.
|
protectedinherited |
The pytable file.
Definition at line 241 of file b2pandas_utils.py.
|
protectedinherited |
Particle list name.
Definition at line 72 of file b2pandas_utils.py.
|
protectedinherited |
A list of tuples and py.DataTypes to define the pyarrow schema.
a writer object to write data into a parquet file
Definition at line 221 of file b2pandas_utils.py.
|
protectedinherited |
Pointer to the particle list.
Definition at line 125 of file b2pandas_utils.py.
|
protectedinherited |
A list of tuples and py.DataTypes to define the pyarrow schema.
Definition at line 202 of file b2pandas_utils.py.
|
protectedinherited |
std.vector of variable names
Definition at line 118 of file b2pandas_utils.py.
|
protectedinherited |
The pytable.
Definition at line 251 of file b2pandas_utils.py.
|
protectedinherited |
Table name in the hdf5 file.
Definition at line 92 of file b2pandas_utils.py.
|
protectedinherited |
List of variables.
Definition at line 74 of file b2pandas_utils.py.
|
protectedinherited |
variable names
Definition at line 110 of file b2pandas_utils.py.
|
protectedinherited |
writer kwargs
Definition at line 100 of file b2pandas_utils.py.
|
inherited |
Definition at line 288 of file b2pandas_utils.py.
|
inherited |
Definition at line 308 of file b2pandas_utils.py.