From 240704239ab2a8678d25e5df5dda4f022cc454af Mon Sep 17 00:00:00 2001 From: tmadlener <16774861+tmadlener@users.noreply.github.com> Date: Tue, 14 May 2024 14:55:47 +0000 Subject: [PATCH] Update documentation for master --- master/ReleaseNotes.html | 1 + master/advanced_topics.html | 1 + master/contributing.html | 1 + master/cpp_api/api.html | 1 + .../class/classpodio_1_1_collection_base.html | 1 + ...sspodio_1_1_collection_buffer_factory.html | 3 +- .../classpodio_1_1_collection_i_d_table.html | 1 + ...io_1_1_datamodel_definition_collector.html | 1 + ...podio_1_1_datamodel_definition_holder.html | 1 + .../classpodio_1_1_datamodel_registry.html | 25 +- .../cpp_api/class/classpodio_1_1_frame.html | 222 ++++- .../classpodio_1_1_generic_parameters.html | 9 +- .../classpodio_1_1_i_collection_provider.html | 1 + .../class/classpodio_1_1_object_i_d.html | 1 + .../classpodio_1_1_r_n_tuple_reader.html | 111 ++- .../classpodio_1_1_r_n_tuple_writer.html | 90 +- .../classpodio_1_1_r_o_o_t_frame_data.html | 1 + .../classpodio_1_1_r_o_o_t_legacy_reader.html | 91 +- .../class/classpodio_1_1_r_o_o_t_reader.html | 89 +- .../class/classpodio_1_1_r_o_o_t_writer.html | 80 +- .../class/classpodio_1_1_relation_range.html | 3 +- .../class/classpodio_1_1_s_i_o_block.html | 1 + .../classpodio_1_1_s_i_o_block_factory.html | 1 + ...spodio_1_1_s_i_o_block_library_loader.html | 1 + .../classpodio_1_1_s_i_o_block_user_data.html | 1 + ..._1_1_s_i_o_collection_i_d_table_block.html | 1 + ...podio_1_1_s_i_o_event_meta_data_block.html | 1 + ...lasspodio_1_1_s_i_o_file_t_o_c_record.html | 1 + .../classpodio_1_1_s_i_o_frame_data.html | 1 + .../classpodio_1_1_s_i_o_legacy_reader.html | 70 +- ...io_1_1_s_i_o_numbered_meta_data_block.html | 1 + .../class/classpodio_1_1_s_i_o_reader.html | 87 +- .../class/classpodio_1_1_s_i_o_writer.html | 58 +- .../classpodio_1_1_schema_evolution.html | 7 +- .../classpodio_1_1_user_data_collection.html | 3 +- ...sspodio_1_1utils_1_1_maybe_shared_ptr.html | 1 + master/cpp_api/classlist.html | 6 +- master/cpp_api/file/_collection_base_8h.html | 1 + .../cpp_api/file/_collection_branches_8h.html | 1 + .../file/_collection_buffer_factory_8h.html | 3 +- .../cpp_api/file/_collection_buffers_8h.html | 1 + .../file/_collection_i_d_table_8h.html | 1 + .../cpp_api/file/_datamodel_registry_8h.html | 25 +- .../_datamodel_registry_i_o_helpers_8h.html | 1 + master/cpp_api/file/_frame_8h.html | 222 ++++- master/cpp_api/file/_frame_categories_8h.html | 4 +- .../cpp_api/file/_generic_parameters_8h.html | 9 +- .../file/_i_collection_provider_8h.html | 1 + master/cpp_api/file/_maybe_shared_ptr_8h.html | 1 + master/cpp_api/file/_object_i_d_8h.html | 1 + master/cpp_api/file/_r_n_tuple_reader_8h.html | 111 ++- master/cpp_api/file/_r_n_tuple_writer_8h.html | 93 +- .../cpp_api/file/_r_o_o_t_frame_data_8h.html | 1 + .../file/_r_o_o_t_frame_reader_8h.html | 1 + .../file/_r_o_o_t_frame_writer_8h.html | 1 + .../file/_r_o_o_t_legacy_reader_8h.html | 91 +- master/cpp_api/file/_r_o_o_t_reader_8h.html | 89 +- master/cpp_api/file/_r_o_o_t_writer_8h.html | 78 +- master/cpp_api/file/_relation_range_8h.html | 3 +- master/cpp_api/file/_s_i_o_block_8h.html | 1 + .../file/_s_i_o_block_user_data_8h.html | 1 + master/cpp_api/file/_s_i_o_frame_data_8h.html | 1 + .../cpp_api/file/_s_i_o_frame_reader_8h.html | 1 + .../cpp_api/file/_s_i_o_frame_writer_8h.html | 1 + .../cpp_api/file/_s_i_o_legacy_reader_8h.html | 70 +- master/cpp_api/file/_s_i_o_reader_8h.html | 85 +- master/cpp_api/file/_s_i_o_writer_8h.html | 56 +- master/cpp_api/file/_schema_evolution_8h.html | 7 +- master/cpp_api/file/_type_helpers_8h.html | 1 + .../file/_user_data_collection_8h.html | 3 +- master/cpp_api/file/podio_version_8h.html | 5 +- master/cpp_api/filelist.html | 7 +- master/cpp_api/namespace/namespacepodio.html | 933 +++++++++++++++--- .../namespacepodio_1_1_category.html | 4 +- .../namespace/namespacepodio_1_1det.html | 1 + .../namespacepodio_1_1root__utils.html | 1 + .../namespacepodio_1_1sio__helpers.html | 1 + .../namespace/namespacepodio_1_1utils.html | 1 + .../namespace/namespacepodio_1_1version.html | 5 +- master/cpp_api/namespace/namespacesio.html | 1 + master/cpp_api/namespacelist.html | 6 +- ...ructpodio_1_1_collection_read_buffers.html | 1 + ...uctpodio_1_1_collection_write_buffers.html | 1 + ...ructpodio_1_1_frame_1_1_frame_concept.html | 1 + ...structpodio_1_1_frame_1_1_frame_model.html | 1 + ..._r_n_tuple_reader_1_1_collection_info.html | 1 + ..._r_n_tuple_writer_1_1_collection_info.html | 1 + ..._1_1_r_o_o_t_reader_1_1_category_info.html | 1 + ..._1_1_r_o_o_t_writer_1_1_category_info.html | 1 + .../structpodio_1_1_relation_names.html | 1 + ...dio_1_1_s_i_o_file_t_o_c_record_block.html | 1 + .../structpodio_1_1_s_i_o_map_block.html | 1 + .../structpodio_1_1_s_i_o_version_block.html | 1 + ...io_1_1_schema_evolution_1_1_map_index.html | 1 + .../structpodio_1_1det_1_1nonesuch.html | 1 + ..._1root__utils_1_1_collection_branches.html | 1 + ..._1_maybe_shared_ptr_1_1_control_block.html | 1 + .../structpodio_1_1version_1_1_version.html | 5 +- master/cpp_api/structlist.html | 1 + master/datamodel_syntax.html | 9 +- master/design.html | 1 + master/doc.html | 1 + master/doc_title.html | 1 + master/examples.html | 1 + master/frame.html | 1 + master/genindex.html | 15 +- master/index.html | 2 + master/objects.inv | Bin 43371 -> 43363 bytes master/py-modindex.html | 1 + master/py_api/modules.html | 3 +- master/py_api/podio.html | 63 +- master/py_api/podio_class_generator.html | 1 + master/py_api/podio_gen.html | 9 +- master/py_api/podio_schema_evolution.html | 1 + master/search.html | 1 + master/searchindex.js | 2 +- master/templates.html | 3 +- master/userdata.html | 1 + 118 files changed, 2538 insertions(+), 506 deletions(-) diff --git a/master/ReleaseNotes.html b/master/ReleaseNotes.html index 34b7323dd..aa9e442ea 100644 --- a/master/ReleaseNotes.html +++ b/master/ReleaseNotes.html @@ -62,6 +62,7 @@
The CollectionBufferFactory allows to create buffers of known datatypes, which can then be populated by e.g.
+The CollectionBufferFactory allows one to create buffers of known datatypes, which can then be populated by e.g.
readers. In order to support schema evolution, the buffers have a version and this factory will also require a schema version to create buffers.
It is implemented as a singleton, which is populated at the time a shared datamodel library is loaded. It is assumed that that happens early on in the startup of an application, such that only a single thread will access the factory instance for registering datatypes. Since the necessary creation functions are part of the core datamodel library, this should be very easy to achieve by simply linking to that library. Once the factory is populated it can be safely accessed from multiple threads concurrently to obtain buffers.
name – The name of the datamodel
+name – The name of the datamodel
+The high level definition of the datamodel in JSON format
Get the defintion (in JSON format) of the datamodel wth the given index.
+Get the definition (in JSON format) of the datamodel with the given index.
If no datamodel is found under the given index, an empty datamodel definition, i.e. an empty JSON object (“{}”), is returned.
index – The datamodel definition index that can be obtained from each collection
+index – The datamodel definition index that can be obtained from each collection
+The high level definition of the datamodel in JSON format
index – The datamodel definition index that can be obtained from each collection
+index – The datamodel definition index that can be obtained from each collection
+The name of the datamodel
Register a datamodel return the index in the registry.
+Register a datamodel and return its index in the registry.
This is the hook that is called during dynamic loading of an EDM to register information for this EDM. If an EDM has already been registered under this name, than the index to the existing EDM in the registry will be returned.
name – The name of the EDM that should be registered
definition – The datamodel definition from which this EDM has been generated in JSON format
relationNames – the names of the relations and vector members for all datatypes that are defined for this EDM
relationNames – the names of the relations and vector members for all datatypes that are defined for this EDM
The index of this datamodel in the registry
+Frame class that serves as a container of collection and meta data.
+The Frame is a generalized (event) data container that aggregates all relevant data.
+It is possible to store collections as well as parameters / meta data in a Frame and all I/O facilities of podio operate on Frames.
Public Functions
Frame constructor from (almost) arbitrary raw data.
+FrameDataT – Arbitrary data container that provides access to the collection buffers as well as the metadata, when requested by the Frame. The unique_ptr has to be checked for validity before calling this construtor.
+std::invalid_argument – if the passed pointer is a nullptr.
+Frame constructor from (almost) arbitrary raw data.
-This r-value overload is mainly present for enabling the python bindings, where cppyy seems to strip the std::unique_ptr somewhere in the process
+This r-value overload is mainly present for enabling the python bindings, where cppyy seems to strip the std::unique_ptr somewhere in the process
+FrameDataT – Arbitrary data container that provides access to the collection buffers as well as the metadata, when requested by the Frame.
+A Frame is move-only.
+A Frame is move-only.
+Frame move constructor.
+Frame move assignment operator.
+Frame destructor.
+Note
+Since the Frame owns all the collections that have been put into it, or that can be obtained from it, this invalidates all references to these collections.
+Get a collection from the Frame.
+Get a collection from the Frame by name.
+CollT – The type of the desired collection
+name – The name of the collection
+A const reference to the collection if it is available or to an empty (static) collection
+Get a collection from the Frame.
-This is the pointer-to-base version for type-erased access (e.g. python interface)
+Get a collection pointer from the Frame by name.
+This is a type-erased version that is also used by the python bindings.
+A const pointer to a collection if it is available or a nullptr if it is not
+(Destructively) move a collection into the Frame and get a const reference back for further use
+(Destructively) move a collection into the Frame and get a reference to the inserted collection back for further use.
+The collection that is passed into the Frame has to be moved into it explicitly and the moved-from collection will be in the typical valid but undefined state in c++.
+CollT – The type of the collection
+coll – An rvalue reference to the collection to put into the Frame.
name – The name under which this collection should be stored in the Frame
A const reference to the collection that has just been inserted
+Move a collection into the Frame handing over ownership to the Frame.
+(Destructively) move a collection into the Frame.
+coll – The collection that should be moved into the Frame
name – The name under which this collection should be stored in the Frame
Add a value to the parameters of the Frame (if the type is supported).
-Copy the value into the internal store
+T – The type of the parameter. Has to be one of the types that is supported by GenericParameters
+key – The name under which this parameter should be stored
value – The value of the parameter. A copy will be put into the Frame
Add a string value to the parameters of the Frame by copying it.
-Dedicated overload for enabling the on-the-fly conversion on the string literals.
+Add a string value to the parameters of the Frame.
+This is a dedicated overload for enabling on-the-fly conversion from string literals.
+key – The name under which this parameter should be stored
value – The value of the parameter. A copy will be put into the Frame
Add a vector of strings to the parameters of the Frame (via copy).
-Dedicated overload for enabling on-the-fly conversions of initializer_list of string literals.
+Add a vector of strings value the parameters of the Frame.
+This is a dedicated overload for enabling on-the-fly conversion from an initializer_list of string literals
+key – The name under which this parameter should be stored
values – The values of the parameter. A copy will be put into the Frame
Add a vector of values into the parameters of the Frame.
-Overload for catching on-the-fly conversions of initializer_lists of values.
+Add a vector of values to the parameters of the Frame (if the type is supported).
+This is a dedicated overload for enabling on-the-fly conversions of initializer_list of values
+T – The type of the parameter. Has to be one of the types that is supported by GenericParameters
+key – The name under which this parameter should be stored
values – The values of the parameter. A copy will be put into the Frame
Retrieve parameters via key from the internal store.
-Return type will either by a const reference or a value depending on the desired type.
+The return type will either be a const reference or a value depending on the desired type. See podio::GenericParameters for more details.
+T – The desired type of the parameter (can also be std::vector<T>)
+key – The key under which the value is stored
+The value of the parameter or an empty default value
+Get all parameters that are stored in this Frame.
+Retrieve all parameters stored in this Frame.
+This is mainly intended for I/O purposes and we encourage to use the Frame functionality of getParameters or getParameterKeys in general.
+The internally used GenericParameters
+Get the keys of all stored parameters for a given type.
+T – The desired parameter type
+A vector of keys for this parameter type
+Get all currently available collections (including potentially unpacked ones from raw data)
+Get all currently available collection names.
+The names of all collections, including those that might still need unpacking from the internal FrameData
+Get the GenericParameters for writing.
+Get the name of the passed collection.
+coll – The collection for which the name should be obtained
+The name of the collection or an empty optional if this collection is not known to the Frame
+Get the name for the passed collectionID.
+collectionID – The collection ID of the collection for which the name should be obtained
+The name of the collection or an empty optional if this collectionID is not known to the Frame
+Get a collection for writing (in a prepared and “ready-to-write” state)
+Get a collection for writing.
+Note
+This method is intended for I/O purposes only and should not be used in other code.
+The collection pointer in a prepared and “ready-to-write” state
+Get the internal CollectionIDTable for writing.
+Note
+This method is intended for I/O purposes only and should not be used in other code.
+A copy of the internal collection id table
+GenericParameters objects allow to store generic named parameters of type int, float and string or vectors of these types.
+GenericParameters objects allow one to store generic named parameters of type int, float and string or vectors of these types.
They can be used to store (user) meta data that is run, event or collection dependent. (based on lcio::LCParameters)
F. Gaede, DESY
@@ -579,7 +580,11 @@GenericParameters are copyable NOTE: This is currently mainly done to keep the ROOT I/O happy, because that needs a copy constructor.
+GenericParameters are copyable.
+Note
+This is currently mainly done to keep the ROOT I/O happy, because that needs a copy constructor
+This class has the function to read available data from disk and to prepare collections and buffers.
+The RNTupleReader can be used to read files that have been written with the RNTuple backend.
+The RNTupleReader provides the data as ROOTFrameData from which a podio::Frame can be constructed. It can be used to read files written by the RNTupleWriter.
Public Functions
Create a RNTupleReader.
+Destructor.
+The RNTupleReader is not copy-able.
+The RNTupleReader is not copy-able.
+Open a single file for reading.
+filename – The name of the input file
+Open multiple files for reading and then treat them as if they are one file.
+Note
+All of the files are assumed to have the same structure. Specifically this means:
The same categories are available from all files
The collections that are contained in the individual categories are the same across all files
This usually boils down to “the files have been written with the same
+”settings”, e.g. they are outputs of a batched process.
+filenames – The filenames of all input files that should be read
+Read the next data entry from which a Frame can be constructed for the given name.
-In case there are no more entries left for this name or in case there is no data for this name, this returns a nullptr.
+Read the next data entry for a given category.
+name – The category name for which to read the next entry
+FrameData from which a podio::Frame can be constructed if the category exists and if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed for the given name.
-In case the entry does not exist for this name or in case there is no data for this name, this returns a nullptr.
+Read the desired data entry for a given category.
+name – The category name for which to read the next entry
entry – The entry number to read
FrameData from which a podio::Frame can be constructed if the category and the desired entry exist. Otherwise a nullptr
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file(s).
+The names of the available categores from the file
+Returns number of entries for the given name.
+Get the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the datamodel definition for the given name.
+name – The name of the datamodel
+The high level definition of the datamodel in JSON format
+Get all names of the datamodels that ara available from this reader.
+Get all names of the datamodels that are available from this reader.
+The names of the datamodels
+The RNTupleWriter writes podio files into ROOT files using the new RNTuple format.
+Each category gets its own RNTuple. Additionally, there is a podio_metadata RNTuple that contains metadata that is necessary for interpreting the files for reading.
+Files written with the RNTupleWriter can be read with the RNTupleReader.
+Public Functions
Create a RNTupleWriter to write to a file.
+Note
+Existing files will be overwritten without warning.
+filename – The path to the file that will be created.
+RNTupleWriter destructor.
+This also takes care of writing all the necessary metadata in order to be able to read files back again.
+The RNTupleWriter is not copy-able.
+The RNTupleWriter is not copy-able.
+Store the given frame with the given category.
+This stores all available collections from the Frame.
+Note
+The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+frame – The Frame to store
category – The category name under which this Frame should be stored
Store the given Frame with the given category.
+This stores only the desired collections and not the complete frame.
+Note
+The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+frame – The Frame to store
category – The category name under which this Frame should be stored
collsToWrite – The collection names that should be written
Write the current file, including all the necessary metadata to read it again.
+Note
+The destructor will also call this, so letting a RNTupleWriter go out of scope is also a viable way to write a readable file
+Check whether the collsToWrite are consistent with the state of the passed category.
-Return two vectors of collection names. The first one contains all the names that were missing from the collsToWrite but were present in the category. The second one contains the names that are present in the collsToWrite only. If both vectors are empty the category and the passed collsToWrite are consistent.
-NOTE: This will only be a meaningful check if the first Frame of the passed category has already been written. Also, this check is rather expensive as it has to effectively do two set differences.
+Note
+This will only be a meaningful check if the first Frame of the passed category has already been written. Also, this check is rather expensive as it has to effectively do two set differences.
+collsToWrite – The collection names that should be checked for consistency
category – The category name for which consistency should be checked
two vectors of collection names. The first one contains all the names that were missing from the collsToWrite but were present in the category. The second one contains the names that are present in the collsToWrite only. If both vectors are empty the category and the passed collsToWrite are consistent.
+A root reader for reading legacy podio root files that have been written using the legacy, non Frame based I/O model.
This reader grants Frame based access to those files, by mimicking the Frame I/O functionality and the interfaces of those readers.
-NOTE: Since there was only one category (“events”) for those legacy podio files this reader will really only work if you try to read that category, and will simply return no data if you try to read anything else.
+Note
+Since there was only one category (“events”) for those legacy podio files this reader will really only work if you try to read that category, and will simply return no data if you try to read anything else.
+Public Functions
Create a SIOLegacyReader.
+Destructor.
+The SIOLegacyReader is not copy-able.
+The SIOLegacyReader is not copy-able.
+Open a single file for reading.
+filename – The name of the input file
+Open multiple files for reading and then treat them as if they are one file.
+This usually boils down to “the files have been written with the same
+”settings”, e.g. they are outputs of a batched process.
+ +Note
+All of the files are assumed to have the same structure. Specifically this means:
The collections that are contained in the individual event are always the same
filenames – The filenames of all input files that should be read
+Read the next data entry from which a Frame can be constructed.
-In case there are no more entries left, this returns a nullptr.
-NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.
+Note
+the category name has to be “events” in this case, as only that category is available for legacy files.
+FrameData from which a podio::Frame can be constructed if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed In case the entry does not exist, this returns a nullptr.
-NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.
+Read the desired data entry from which a Frame can be constructed.
+Note
+the category name has to be “events” in this case, as only that category is available for legacy files.
+FrameData from which a podio::Frame can be constructed if the desired entry exists. Otherwise a nullptr
+Returns number of entries for a given category.
+unsigned getEntries(const std::string &name) constGet the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file(s).
+The names of the available categories from the file
+This class has the function to read available data from disk and to prepare collections and buffers.
+This class has the function to read available data from disk in ROOTs TTree format.
+The ROOTReader provides the data as ROOTFrameData from which a podio::Frame can be constructed. It can be used to read files written by the ROOTWriter.
Public Functions
Create a ROOTReader.
+Destructor.
+The ROOTReader is not copy-able.
+The ROOTReader is not copy-able.
+Open multiple files for reading and then treat them as if they are one file.
-NOTE: All of the files are assumed to have the same structure. Specifically this means:
Note
+All of the files are assumed to have the same structure. Specifically this means:
The same categories are available from all files
The collections that are contained in the individual categories are the same across all files
This usually boils down to “the files have been written with the same
+”settings”, e.g. they are outputs of a batched process.
+This usually boils down to “the files have been written with the same
-settings”, e.g. they are outputs of a batched process.
- +filenames – The filenames of all input files that should be read
@@ -608,45 +617,93 @@Read the next data entry from which a Frame can be constructed for the given name.
-In case there are no more entries left for this name or in case there is no data for this name, this returns a nullptr.
+Read the next data entry for a given category.
+name – The category name for which to read the next entry
+FrameData from which a podio::Frame can be constructed if the category exists and if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed for the given name.
-In case the entry does not exist for this name or in case there is no data for this name, this returns a nullptr.
+Read the desired data entry for a given category.
+name – The category name for which to read the next entry
entry – The entry number to read
FrameData from which a podio::Frame can be constructed if the category and the desired entry exist. Otherwise a nullptr
+Returns number of entries for the given name.
+Get the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file(s).
+The names of the available categories from the file
+Get the datamodel definition for the given name.
+name – The name of the datamodel
+The high level definition of the datamodel in JSON format
+Get all names of the datamodels that ara available from this reader.
+Get all names of the datamodels that are available from this reader.
+The names of the datamodels
+The ROOTWriter writes podio files into ROOT files using TTrees.
+Each category gets its own TTree. Additionally, there is a podio_metadata TTree that contains metadata that is necessary for interpreting the files for reading.
+Files written with the ROOTWriter can be read with the ROOTReader.
+Public Functions
Create a ROOTWriter to write to a file.
+Note
+Existing files will be overwritten without warning.
+filename – The path to the file that will be created.
+ROOTWriter destructor.
+This also takes care of writing all the necessary metadata to read files back again.
+The ROOTWriter is not copy-able.
+The ROOTWriter is not copy-able.
+Store the given frame with the given category.
-Store all available collections from the Frame.
-NOTE: The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+This stores all available collections from the Frame.
+Note
+The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+frame – The Frame to store
category – The category name under which this Frame should be stored
Store the given Frame with the given category.
-Store only the collections that are passed.
-NOTE: The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+This stores only the desired collections and not the complete frame.
+Note
+The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+frame – The Frame to store
category – The category name under which this Frame should be stored
collsToWrite – The collection names that should be written
Write the current file, including all the necessary metadata to read it again.
+Note
+The destructor will also call this, so letting a ROOTWriter go out of scope is also a viable way to write a readable file
+Check whether the collsToWrite are consistent with the state of the passed category.
-Return two vectors of collection names. The first one contains all the names that were missing from the collsToWrite but were present in the category. The second one contains the names that are present in the collsToWrite only. If both vectors are empty the category and the passed collsToWrite are consistent.
-NOTE: This will only be a meaningful check if the first Frame of the passed category has already been written. Also, this check is rather expensive as it has to effectively do two set differences.
+Note
+This will only be a meaningful check if the first Frame of the passed category has already been written. Also, this check is rather expensive as it has to effectively do two set differences.
+collsToWrite – The collection names that should be checked for consistency
category – The category name for which consistency should be checked
two vectors of collection names. The first one contains all the names that were missing from the collsToWrite but were present in the category. The second one contains the names that are present in the collsToWrite only. If both vectors are empty the category and the passed collsToWrite are consistent.
+A simple helper class that allows to return related objects in a way that makes it possible to use the return type in a range-based for loop.
+A simple helper class that allows one to return related objects in a way that makes it possible to use the return type in a range-based for loop.
Public Types
A SIO reader for reading legacy podio .sio files that have been written using the legacy, non Frame based I/O model.
This reader grants Frame based access to those files, by mimicking Frame I/O functionality and the interfaces of those readers.
-NOTE: Since there was only one category (“events”) for those legacy podio files this reader will really only work if you try to read that category, and will simply return no data if you try to read anything else.
+Note
+Since there was only one category (“events”) for those legacy podio files this reader will really only work if you try to read that category, and will simply return no data if you try to read anything else.
+Public Functions
Create a SIOLegacyReader.
+Destructor.
+The SIOLegacyReader is not copy-able.
+The SIOLegacyReader is not copy-able.
+Read the next data entry from which a Frame can be constructed.
In case there are no more entries left, this returns a nullptr.
-NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.
+Note
+the category name has to be “events” in this case, as only that category is available for legacy files.
+FrameData from which a podio::Frame can be constructed if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed In case the entry does not exist, this returns a nullptr.
-NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.
+Read the desired data entry from which a Frame can be constructed.
+Note
+the category name has to be “events” in this case, as only that category is available for legacy files.
+FrameData from which a podio::Frame can be constructed if the desired entry exists. Otherwise a nullptr
+Returns the number of.
+Get the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Open a single file for reading.
+filename – The name of the input file
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file(s).
+The names of the available categores from the file
+The SIOReader can be used to read files that have been written with the SIO backend.
+The SIOReader provides the data as SIOFrameData from which a podio::Frame can be constructed. It can be used to read files written by the SIOWriter.
+Public Functions
Create an SIOReader.
+SIOReader destructor.
+The SIOReader is not copy-able.
+The SIOReader is not copy-able.
+Read the next data entry from which a Frame can be constructed for the given name.
-In case there are no more entries left for this name or in case there is no data for this name, this returns a nullptr.
+Read the next data entry for a given category.
+name – The category name for which to read the next entry
+FrameData from which a podio::Frame can be constructed if the category exists and if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed for the given name.
-In case the entry does not exist for this name or in case there is no data for this name, this returns a nullptr.
+Read the desired data entry for a given category.
+name – The category name for which to read the next entry
entry – The entry number to read
FrameData from which a podio::Frame can be constructed if the category and the desired entry exist. Otherwise a nullptr
+Returns number of entries for the given name.
+Get the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Open the passed file for reading.
+filename – The path to the file to read from
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file.
+The names of the available categores from the file
+Get the datamodel definition for the given name.
+name – The name of the datamodel
+The high level definition of the datamodel in JSON format
+Get all names of the datamodels that ara available from this reader.
+Get all names of the datamodels that are available from this reader.
+The names of the datamodels
+The SIOWriter writes podio files into SIO files.
+Each Frame is stored into an SIO record which are written in the order in which Frames are written. As part of the metadata a table of content record is written which is used in the reader to more quickly access the different records.
+Files written with the SIOWriter can be read with the SIOReader
+Public Functions
Create a SIOWriter to write to a file.
+Note
+Existing files will be overwritten without warning.
+filename – The path to the file that will be created.
+SIOWriter destructor.
+This also takes care of writing all the necessary metadata to read files back again.
+The SIOWriter is not copy-able.
+The SIOWriter is not copy-able.
+Write the given Frame with the given category.
+Store the given frame with the given category.
+This stores all available collections from the Frame. Frames of the same category can be independent of each other, i.e. they can have different collection contents.
+frame – The Frame to store
category – The category name under which this Frame should be stored
Write the given Frame with the given category only storing the collections that are desired via collsToWrite.
+Store the given Frame with the given category.
+This stores only the desired collections and not the complete frame. Frames of the same category can be independent of each other, i.e. they can have different collection contents.
+frame – The Frame to store
category – The category name under which this Frame should be stored
collsToWrite – The collection names that should be written
Write the current file, including all the necessary metadata to read it again.
+Note
+The destructor will also call this, so letting a SIOWriter go out of scope is also a viable way to write a readable file
+Evolve the passed in buffers to the current version of the datatype that can be constructed from them.
Internally this will first check if the schema version of the buffers is already the current one and in that case immediately return the passed in buffers again as they do not need schema evolution. If that is not the case it will look up the correct evolution function for the passed in version and call that on the passed in buffers.
+Note
+that these could also be the unchanged input buffers.
+See also
-SupportedUserDataTypes.
+SupportedUserDataTypes.
F.Gaede, DESY
diff --git a/master/cpp_api/class/classpodio_1_1utils_1_1_maybe_shared_ptr.html b/master/cpp_api/class/classpodio_1_1utils_1_1_maybe_shared_ptr.html index 5d83154e2..c27ae71d1 100644 --- a/master/cpp_api/class/classpodio_1_1utils_1_1_maybe_shared_ptr.html +++ b/master/cpp_api/class/classpodio_1_1utils_1_1_maybe_shared_ptr.html @@ -64,6 +64,7 @@Frame::getParameters()
Frame::getParameterKeys()
Frame::getAvailableCollections()
Frame::getGenericParametersForWrite()
Frame::getName()
Frame::getName()
Frame::getCollectionForWrite()
Frame::getCollectionIDTableForWrite()
RNTupleReader::currentFileVersion()
RNTupleReader::getDatamodelDefinition()
RNTupleReader::getAvailableDatamodels()
RNTupleReader::closeFile()
RNTupleWriter::~RNTupleWriter()
RNTupleWriter::RNTupleWriter()
RNTupleWriter::operator=()
RNTupleWriter::fillParams()
RNTupleWriter::writeFrame()
RNTupleWriter::writeFrame()
RNTupleWriter::finish()
The CollectionBufferFactory allows to create buffers of known datatypes, which can then be populated by e.g.
+The CollectionBufferFactory allows one to create buffers of known datatypes, which can then be populated by e.g.
readers. In order to support schema evolution, the buffers have a version and this factory will also require a schema version to create buffers.
It is implemented as a singleton, which is populated at the time a shared datamodel library is loaded. It is assumed that that happens early on in the startup of an application, such that only a single thread will access the factory instance for registering datatypes. Since the necessary creation functions are part of the core datamodel library, this should be very easy to achieve by simply linking to that library. Once the factory is populated it can be safely accessed from multiple threads concurrently to obtain buffers.
name – The name of the datamodel
+name – The name of the datamodel
+The high level definition of the datamodel in JSON format
Get the defintion (in JSON format) of the datamodel wth the given index.
+Get the definition (in JSON format) of the datamodel with the given index.
If no datamodel is found under the given index, an empty datamodel definition, i.e. an empty JSON object (“{}”), is returned.
index – The datamodel definition index that can be obtained from each collection
+index – The datamodel definition index that can be obtained from each collection
+The high level definition of the datamodel in JSON format
index – The datamodel definition index that can be obtained from each collection
+index – The datamodel definition index that can be obtained from each collection
+The name of the datamodel
Register a datamodel return the index in the registry.
+Register a datamodel and return its index in the registry.
This is the hook that is called during dynamic loading of an EDM to register information for this EDM. If an EDM has already been registered under this name, than the index to the existing EDM in the registry will be returned.
name – The name of the EDM that should be registered
definition – The datamodel definition from which this EDM has been generated in JSON format
relationNames – the names of the relations and vector members for all datatypes that are defined for this EDM
relationNames – the names of the relations and vector members for all datatypes that are defined for this EDM
The index of this datamodel in the registry
+Frame class that serves as a container of collection and meta data.
+The Frame is a generalized (event) data container that aggregates all relevant data.
+It is possible to store collections as well as parameters / meta data in a Frame and all I/O facilities of podio operate on Frames.
Public Functions
Frame constructor from (almost) arbitrary raw data.
+FrameDataT – Arbitrary data container that provides access to the collection buffers as well as the metadata, when requested by the Frame. The unique_ptr has to be checked for validity before calling this construtor.
+std::invalid_argument – if the passed pointer is a nullptr.
+Frame constructor from (almost) arbitrary raw data.
-This r-value overload is mainly present for enabling the python bindings, where cppyy seems to strip the std::unique_ptr somewhere in the process
+This r-value overload is mainly present for enabling the python bindings, where cppyy seems to strip the std::unique_ptr somewhere in the process
+FrameDataT – Arbitrary data container that provides access to the collection buffers as well as the metadata, when requested by the Frame.
+A Frame is move-only.
+A Frame is move-only.
+Frame move constructor.
+Frame move assignment operator.
+Frame destructor.
+Note
+Since the Frame owns all the collections that have been put into it, or that can be obtained from it, this invalidates all references to these collections.
+Get a collection from the Frame.
+Get a collection from the Frame by name.
+CollT – The type of the desired collection
+name – The name of the collection
+A const reference to the collection if it is available or to an empty (static) collection
+Get a collection from the Frame.
-This is the pointer-to-base version for type-erased access (e.g. python interface)
+Get a collection pointer from the Frame by name.
+This is a type-erased version that is also used by the python bindings.
+A const pointer to a collection if it is available or a nullptr if it is not
+(Destructively) move a collection into the Frame and get a const reference back for further use
+(Destructively) move a collection into the Frame and get a reference to the inserted collection back for further use.
+The collection that is passed into the Frame has to be moved into it explicitly and the moved-from collection will be in the typical valid but undefined state in c++.
+CollT – The type of the collection
+coll – An rvalue reference to the collection to put into the Frame.
name – The name under which this collection should be stored in the Frame
A const reference to the collection that has just been inserted
+Move a collection into the Frame handing over ownership to the Frame.
+(Destructively) move a collection into the Frame.
+coll – The collection that should be moved into the Frame
name – The name under which this collection should be stored in the Frame
Add a value to the parameters of the Frame (if the type is supported).
-Copy the value into the internal store
+T – The type of the parameter. Has to be one of the types that is supported by GenericParameters
+key – The name under which this parameter should be stored
value – The value of the parameter. A copy will be put into the Frame
Add a string value to the parameters of the Frame by copying it.
-Dedicated overload for enabling the on-the-fly conversion on the string literals.
+Add a string value to the parameters of the Frame.
+This is a dedicated overload for enabling on-the-fly conversion from string literals.
+key – The name under which this parameter should be stored
value – The value of the parameter. A copy will be put into the Frame
Add a vector of strings to the parameters of the Frame (via copy).
-Dedicated overload for enabling on-the-fly conversions of initializer_list of string literals.
+Add a vector of strings value the parameters of the Frame.
+This is a dedicated overload for enabling on-the-fly conversion from an initializer_list of string literals
+key – The name under which this parameter should be stored
values – The values of the parameter. A copy will be put into the Frame
Add a vector of values into the parameters of the Frame.
-Overload for catching on-the-fly conversions of initializer_lists of values.
+Add a vector of values to the parameters of the Frame (if the type is supported).
+This is a dedicated overload for enabling on-the-fly conversions of initializer_list of values
+T – The type of the parameter. Has to be one of the types that is supported by GenericParameters
+key – The name under which this parameter should be stored
values – The values of the parameter. A copy will be put into the Frame
Retrieve parameters via key from the internal store.
-Return type will either by a const reference or a value depending on the desired type.
+The return type will either be a const reference or a value depending on the desired type. See podio::GenericParameters for more details.
+T – The desired type of the parameter (can also be std::vector<T>)
+key – The key under which the value is stored
+The value of the parameter or an empty default value
+Get all parameters that are stored in this Frame.
+Retrieve all parameters stored in this Frame.
+This is mainly intended for I/O purposes and we encourage to use the Frame functionality of getParameters or getParameterKeys in general.
+The internally used GenericParameters
+Get the keys of all stored parameters for a given type.
+T – The desired parameter type
+A vector of keys for this parameter type
+Get all currently available collections (including potentially unpacked ones from raw data)
+Get all currently available collection names.
+The names of all collections, including those that might still need unpacking from the internal FrameData
+Get the name of the passed collection.
+coll – The collection for which the name should be obtained
+The name of the collection or an empty optional if this collection is not known to the Frame
+Get the GenericParameters for writing.
+Get the name for the passed collectionID.
+collectionID – The collection ID of the collection for which the name should be obtained
+The name of the collection or an empty optional if this collectionID is not known to the Frame
+Get a collection for writing (in a prepared and “ready-to-write” state)
+Get a collection for writing.
+Note
+This method is intended for I/O purposes only and should not be used in other code.
+The collection pointer in a prepared and “ready-to-write” state
+Get the internal CollectionIDTable for writing.
+Note
+This method is intended for I/O purposes only and should not be used in other code.
+A copy of the internal collection id table
+The metadata category that is used to store a single Frame that holds data that is valid for a whole file, e.g.
-collection level parameters
+The metadata category that is used to store a single Frame that holds data that is valid for a whole file, for example collection level parameters.
GenericParameters objects allow to store generic named parameters of type int, float and string or vectors of these types.
+GenericParameters objects allow one to store generic named parameters of type int, float and string or vectors of these types.
They can be used to store (user) meta data that is run, event or collection dependent. (based on lcio::LCParameters)
F. Gaede, DESY
@@ -623,7 +624,11 @@GenericParameters are copyable NOTE: This is currently mainly done to keep the ROOT I/O happy, because that needs a copy constructor.
+GenericParameters are copyable.
+Note
+This is currently mainly done to keep the ROOT I/O happy, because that needs a copy constructor
+This class has the function to read available data from disk and to prepare collections and buffers.
+The RNTupleReader can be used to read files that have been written with the RNTuple backend.
+The RNTupleReader provides the data as ROOTFrameData from which a podio::Frame can be constructed. It can be used to read files written by the RNTupleWriter.
Public Functions
Create a RNTupleReader.
+Destructor.
+The RNTupleReader is not copy-able.
+The RNTupleReader is not copy-able.
+Open a single file for reading.
+filename – The name of the input file
+Open multiple files for reading and then treat them as if they are one file.
+Note
+All of the files are assumed to have the same structure. Specifically this means:
The same categories are available from all files
The collections that are contained in the individual categories are the same across all files
This usually boils down to “the files have been written with the same
+”settings”, e.g. they are outputs of a batched process.
+filenames – The filenames of all input files that should be read
+Read the next data entry from which a Frame can be constructed for the given name.
-In case there are no more entries left for this name or in case there is no data for this name, this returns a nullptr.
+Read the next data entry for a given category.
+name – The category name for which to read the next entry
+FrameData from which a podio::Frame can be constructed if the category exists and if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed for the given name.
-In case the entry does not exist for this name or in case there is no data for this name, this returns a nullptr.
+Read the desired data entry for a given category.
+name – The category name for which to read the next entry
entry – The entry number to read
FrameData from which a podio::Frame can be constructed if the category and the desired entry exist. Otherwise a nullptr
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file(s).
+The names of the available categores from the file
+Returns number of entries for the given name.
+Get the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the datamodel definition for the given name.
+name – The name of the datamodel
+The high level definition of the datamodel in JSON format
+Get all names of the datamodels that ara available from this reader.
+Get all names of the datamodels that are available from this reader.
+The names of the datamodels
+Private Functions
diff --git a/master/cpp_api/file/_r_n_tuple_writer_8h.html b/master/cpp_api/file/_r_n_tuple_writer_8h.html index 2e01273f3..c0c22374c 100644 --- a/master/cpp_api/file/_r_n_tuple_writer_8h.html +++ b/master/cpp_api/file/_r_n_tuple_writer_8h.html @@ -62,6 +62,7 @@The RNTupleWriter writes podio files into ROOT files using the new RNTuple format.
+Each category gets its own RNTuple. Additionally, there is a podio_metadata RNTuple that contains metadata that is necessary for interpreting the files for reading.
+Files written with the RNTupleWriter can be read with the RNTupleReader.
Public Functions
Create a RNTupleWriter to write to a file.
+Note
+Existing files will be overwritten without warning.
+filename – The path to the file that will be created.
+RNTupleWriter destructor.
+This also takes care of writing all the necessary metadata in order to be able to read files back again.
+The RNTupleWriter is not copy-able.
+The RNTupleWriter is not copy-able.
+Store the given frame with the given category.
+This stores all available collections from the Frame.
+Note
+The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+frame – The Frame to store
category – The category name under which this Frame should be stored
Store the given Frame with the given category.
+This stores only the desired collections and not the complete frame.
+Note
+The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+frame – The Frame to store
category – The category name under which this Frame should be stored
collsToWrite – The collection names that should be written
Write the current file, including all the necessary metadata to read it again.
+Note
+The destructor will also call this, so letting a RNTupleWriter go out of scope is also a viable way to write a readable file
+Check whether the collsToWrite are consistent with the state of the passed category.
-Return two vectors of collection names. The first one contains all the names that were missing from the collsToWrite but were present in the category. The second one contains the names that are present in the collsToWrite only. If both vectors are empty the category and the passed collsToWrite are consistent.
-NOTE: This will only be a meaningful check if the first Frame of the passed category has already been written. Also, this check is rather expensive as it has to effectively do two set differences.
+Note
+This will only be a meaningful check if the first Frame of the passed category has already been written. Also, this check is rather expensive as it has to effectively do two set differences.
+collsToWrite – The collection names that should be checked for consistency
category – The category name for which consistency should be checked
two vectors of collection names. The first one contains all the names that were missing from the collsToWrite but were present in the category. The second one contains the names that are present in the collsToWrite only. If both vectors are empty the category and the passed collsToWrite are consistent.
+Private Functions
+A root reader for reading legacy podio root files that have been written using the legacy, non Frame based I/O model.
This reader grants Frame based access to those files, by mimicking the Frame I/O functionality and the interfaces of those readers.
-NOTE: Since there was only one category (“events”) for those legacy podio files this reader will really only work if you try to read that category, and will simply return no data if you try to read anything else.
+Note
+Since there was only one category (“events”) for those legacy podio files this reader will really only work if you try to read that category, and will simply return no data if you try to read anything else.
+Public Functions
Create a SIOLegacyReader.
+Destructor.
+The SIOLegacyReader is not copy-able.
+The SIOLegacyReader is not copy-able.
+Open a single file for reading.
+filename – The name of the input file
+Open multiple files for reading and then treat them as if they are one file.
+This usually boils down to “the files have been written with the same
+”settings”, e.g. they are outputs of a batched process.
+ +Note
+All of the files are assumed to have the same structure. Specifically this means:
The collections that are contained in the individual event are always the same
filenames – The filenames of all input files that should be read
+Read the next data entry from which a Frame can be constructed.
-In case there are no more entries left, this returns a nullptr.
-NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.
+Note
+the category name has to be “events” in this case, as only that category is available for legacy files.
+FrameData from which a podio::Frame can be constructed if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed In case the entry does not exist, this returns a nullptr.
-NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.
+Read the desired data entry from which a Frame can be constructed.
+Note
+the category name has to be “events” in this case, as only that category is available for legacy files.
+FrameData from which a podio::Frame can be constructed if the desired entry exists. Otherwise a nullptr
+Returns number of entries for a given category.
+unsigned getEntries(const std::string &name) constGet the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file(s).
+The names of the available categories from the file
+This class has the function to read available data from disk and to prepare collections and buffers.
+This class has the function to read available data from disk in ROOTs TTree format.
+The ROOTReader provides the data as ROOTFrameData from which a podio::Frame can be constructed. It can be used to read files written by the ROOTWriter.
Public Functions
Create a ROOTReader.
+Destructor.
+The ROOTReader is not copy-able.
+The ROOTReader is not copy-able.
+Open multiple files for reading and then treat them as if they are one file.
-NOTE: All of the files are assumed to have the same structure. Specifically this means:
Note
+All of the files are assumed to have the same structure. Specifically this means:
The same categories are available from all files
The collections that are contained in the individual categories are the same across all files
This usually boils down to “the files have been written with the same
+”settings”, e.g. they are outputs of a batched process.
+This usually boils down to “the files have been written with the same
-settings”, e.g. they are outputs of a batched process.
- +filenames – The filenames of all input files that should be read
@@ -609,45 +618,93 @@Read the next data entry from which a Frame can be constructed for the given name.
-In case there are no more entries left for this name or in case there is no data for this name, this returns a nullptr.
+Read the next data entry for a given category.
+name – The category name for which to read the next entry
+FrameData from which a podio::Frame can be constructed if the category exists and if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed for the given name.
-In case the entry does not exist for this name or in case there is no data for this name, this returns a nullptr.
+Read the desired data entry for a given category.
+name – The category name for which to read the next entry
entry – The entry number to read
FrameData from which a podio::Frame can be constructed if the category and the desired entry exist. Otherwise a nullptr
+Returns number of entries for the given name.
+Get the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file(s).
+The names of the available categories from the file
+Get the datamodel definition for the given name.
+name – The name of the datamodel
+The high level definition of the datamodel in JSON format
+Get all names of the datamodels that ara available from this reader.
+Get all names of the datamodels that are available from this reader.
+The names of the datamodels
+The ROOTWriter writes podio files into ROOT files using TTrees.
+Each category gets its own TTree. Additionally, there is a podio_metadata TTree that contains metadata that is necessary for interpreting the files for reading.
+Files written with the ROOTWriter can be read with the ROOTReader.
Public Functions
Create a ROOTWriter to write to a file.
+Note
+Existing files will be overwritten without warning.
+filename – The path to the file that will be created.
+ROOTWriter destructor.
+This also takes care of writing all the necessary metadata to read files back again.
+The ROOTWriter is not copy-able.
+The ROOTWriter is not copy-able.
+Store the given frame with the given category.
-Store all available collections from the Frame.
-NOTE: The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+This stores all available collections from the Frame.
+Note
+The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+frame – The Frame to store
category – The category name under which this Frame should be stored
Store the given Frame with the given category.
-Store only the collections that are passed.
-NOTE: The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+This stores only the desired collections and not the complete frame.
+Note
+The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+frame – The Frame to store
category – The category name under which this Frame should be stored
collsToWrite – The collection names that should be written
Write the current file, including all the necessary metadata to read it again.
+Note
+The destructor will also call this, so letting a ROOTWriter go out of scope is also a viable way to write a readable file
+Check whether the collsToWrite are consistent with the state of the passed category.
-Return two vectors of collection names. The first one contains all the names that were missing from the collsToWrite but were present in the category. The second one contains the names that are present in the collsToWrite only. If both vectors are empty the category and the passed collsToWrite are consistent.
-NOTE: This will only be a meaningful check if the first Frame of the passed category has already been written. Also, this check is rather expensive as it has to effectively do two set differences.
+Note
+This will only be a meaningful check if the first Frame of the passed category has already been written. Also, this check is rather expensive as it has to effectively do two set differences.
+collsToWrite – The collection names that should be checked for consistency
category – The category name for which consistency should be checked
two vectors of collection names. The first one contains all the names that were missing from the collsToWrite but were present in the category. The second one contains the names that are present in the collsToWrite only. If both vectors are empty the category and the passed collsToWrite are consistent.
+A simple helper class that allows to return related objects in a way that makes it possible to use the return type in a range-based for loop.
+A simple helper class that allows one to return related objects in a way that makes it possible to use the return type in a range-based for loop.
Public Types
A SIO reader for reading legacy podio .sio files that have been written using the legacy, non Frame based I/O model.
This reader grants Frame based access to those files, by mimicking Frame I/O functionality and the interfaces of those readers.
-NOTE: Since there was only one category (“events”) for those legacy podio files this reader will really only work if you try to read that category, and will simply return no data if you try to read anything else.
+Note
+Since there was only one category (“events”) for those legacy podio files this reader will really only work if you try to read that category, and will simply return no data if you try to read anything else.
+Public Functions
Create a SIOLegacyReader.
+Destructor.
+The SIOLegacyReader is not copy-able.
+The SIOLegacyReader is not copy-able.
+Read the next data entry from which a Frame can be constructed.
In case there are no more entries left, this returns a nullptr.
-NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.
+Note
+the category name has to be “events” in this case, as only that category is available for legacy files.
+FrameData from which a podio::Frame can be constructed if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed In case the entry does not exist, this returns a nullptr.
-NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.
+Read the desired data entry from which a Frame can be constructed.
+Note
+the category name has to be “events” in this case, as only that category is available for legacy files.
+FrameData from which a podio::Frame can be constructed if the desired entry exists. Otherwise a nullptr
+Returns the number of.
+Get the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Open a single file for reading.
+filename – The name of the input file
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file(s).
+The names of the available categores from the file
+The SIOReader can be used to read files that have been written with the SIO backend.
+The SIOReader provides the data as SIOFrameData from which a podio::Frame can be constructed. It can be used to read files written by the SIOWriter.
Public Functions
Create an SIOReader.
+SIOReader destructor.
+The SIOReader is not copy-able.
+The SIOReader is not copy-able.
+Read the next data entry from which a Frame can be constructed for the given name.
-In case there are no more entries left for this name or in case there is no data for this name, this returns a nullptr.
+Read the next data entry for a given category.
+name – The category name for which to read the next entry
+FrameData from which a podio::Frame can be constructed if the category exists and if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed for the given name.
-In case the entry does not exist for this name or in case there is no data for this name, this returns a nullptr.
+Read the desired data entry for a given category.
+name – The category name for which to read the next entry
entry – The entry number to read
FrameData from which a podio::Frame can be constructed if the category and the desired entry exist. Otherwise a nullptr
+Returns number of entries for the given name.
+Get the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Open the passed file for reading.
+filename – The path to the file to read from
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file.
+The names of the available categores from the file
+Get the datamodel definition for the given name.
+name – The name of the datamodel
+The high level definition of the datamodel in JSON format
+Get all names of the datamodels that ara available from this reader.
+Get all names of the datamodels that are available from this reader.
+The names of the datamodels
+The SIOWriter writes podio files into SIO files.
+Each Frame is stored into an SIO record which are written in the order in which Frames are written. As part of the metadata a table of content record is written which is used in the reader to more quickly access the different records.
+Files written with the SIOWriter can be read with the SIOReader
Public Functions
Create a SIOWriter to write to a file.
+Note
+Existing files will be overwritten without warning.
+filename – The path to the file that will be created.
+SIOWriter destructor.
+This also takes care of writing all the necessary metadata to read files back again.
+The SIOWriter is not copy-able.
+The SIOWriter is not copy-able.
+Write the given Frame with the given category.
+Store the given frame with the given category.
+This stores all available collections from the Frame. Frames of the same category can be independent of each other, i.e. they can have different collection contents.
+frame – The Frame to store
category – The category name under which this Frame should be stored
Write the given Frame with the given category only storing the collections that are desired via collsToWrite.
+Store the given Frame with the given category.
+This stores only the desired collections and not the complete frame. Frames of the same category can be independent of each other, i.e. they can have different collection contents.
+frame – The Frame to store
category – The category name under which this Frame should be stored
collsToWrite – The collection names that should be written
Write the current file, including all the necessary metadata to read it again.
+Note
+The destructor will also call this, so letting a SIOWriter go out of scope is also a viable way to write a readable file
+Evolve the passed in buffers to the current version of the datatype that can be constructed from them.
Internally this will first check if the schema version of the buffers is already the current one and in that case immediately return the passed in buffers again as they do not need schema evolution. If that is not the case it will look up the correct evolution function for the passed in version and call that on the passed in buffers.
+Note
+that these could also be the unchanged input buffers.
+See also
-SupportedUserDataTypes.
+SupportedUserDataTypes.
F.Gaede, DESY
diff --git a/master/cpp_api/file/podio_version_8h.html b/master/cpp_api/file/podio_version_8h.html index 13fab051c..9ba9656b5 100644 --- a/master/cpp_api/file/podio_version_8h.html +++ b/master/cpp_api/file/podio_version_8h.html @@ -62,6 +62,7 @@Version class consisting of 3 16 bit unsigned integers to hold the major, minor and patch version.
-Provides constexpr comparison operators that allow to use this class in constexpr-if clauses.
+Version class consisting of three 16 bit unsigned integers to hold the major, minor and patch version.
+Provides constexpr comparison operators that allow one to use this class in constexpr-if clauses.
Public Members
podio::Frame::getParameters()
podio::Frame::getParameterKeys()
podio::Frame::getAvailableCollections()
podio::Frame::getGenericParametersForWrite()
podio::Frame::getName()
podio::Frame::getName()
podio::Frame::getCollectionForWrite()
podio::Frame::getCollectionIDTableForWrite()
podio::Frame::m_self
podio::RNTupleReader::currentFileVersion()
podio::RNTupleReader::getDatamodelDefinition()
podio::RNTupleReader::getAvailableDatamodels()
podio::RNTupleReader::closeFile()
podio::RNTupleReader::initCategory()
podio::RNTupleReader::readEventMetaData()
podio::RNTupleReader::readParams()
podio::RNTupleWriter::~RNTupleWriter()
podio::RNTupleWriter::RNTupleWriter()
podio::RNTupleWriter::operator=()
podio::RNTupleWriter::fillParams()
podio::RNTupleWriter::writeFrame()
podio::RNTupleWriter::writeFrame()
podio::RNTupleWriter::finish()
podio::RNTupleWriter::checkConsistency()
podio::RNTupleWriter::StoreCollection
podio::RNTupleWriter::fillParams()
podio::RNTupleWriter::createModels()
podio::RNTupleWriter::getCategoryInfo()
podio::RNTupleWriter::getKeyValueVectors()
The CollectionBufferFactory allows to create buffers of known datatypes, which can then be populated by e.g.
+The CollectionBufferFactory allows one to create buffers of known datatypes, which can then be populated by e.g.
readers. In order to support schema evolution, the buffers have a version and this factory will also require a schema version to create buffers.
It is implemented as a singleton, which is populated at the time a shared datamodel library is loaded. It is assumed that that happens early on in the startup of an application, such that only a single thread will access the factory instance for registering datatypes. Since the necessary creation functions are part of the core datamodel library, this should be very easy to achieve by simply linking to that library. Once the factory is populated it can be safely accessed from multiple threads concurrently to obtain buffers.
name – The name of the datamodel
+name – The name of the datamodel
+The high level definition of the datamodel in JSON format
Get the defintion (in JSON format) of the datamodel wth the given index.
+Get the definition (in JSON format) of the datamodel with the given index.
If no datamodel is found under the given index, an empty datamodel definition, i.e. an empty JSON object (“{}”), is returned.
index – The datamodel definition index that can be obtained from each collection
+index – The datamodel definition index that can be obtained from each collection
+The high level definition of the datamodel in JSON format
index – The datamodel definition index that can be obtained from each collection
+index – The datamodel definition index that can be obtained from each collection
+The name of the datamodel
Register a datamodel return the index in the registry.
+Register a datamodel and return its index in the registry.
This is the hook that is called during dynamic loading of an EDM to register information for this EDM. If an EDM has already been registered under this name, than the index to the existing EDM in the registry will be returned.
name – The name of the EDM that should be registered
definition – The datamodel definition from which this EDM has been generated in JSON format
relationNames – the names of the relations and vector members for all datatypes that are defined for this EDM
relationNames – the names of the relations and vector members for all datatypes that are defined for this EDM
The index of this datamodel in the registry
+Frame class that serves as a container of collection and meta data.
+The Frame is a generalized (event) data container that aggregates all relevant data.
+It is possible to store collections as well as parameters / meta data in a Frame and all I/O facilities of podio operate on Frames.
Public Functions
Frame constructor from (almost) arbitrary raw data.
+FrameDataT – Arbitrary data container that provides access to the collection buffers as well as the metadata, when requested by the Frame. The unique_ptr has to be checked for validity before calling this construtor.
+std::invalid_argument – if the passed pointer is a nullptr.
+Frame constructor from (almost) arbitrary raw data.
-This r-value overload is mainly present for enabling the python bindings, where cppyy seems to strip the std::unique_ptr somewhere in the process
+This r-value overload is mainly present for enabling the python bindings, where cppyy seems to strip the std::unique_ptr somewhere in the process
+FrameDataT – Arbitrary data container that provides access to the collection buffers as well as the metadata, when requested by the Frame.
+A Frame is move-only.
+A Frame is move-only.
+Frame move constructor.
+Frame move assignment operator.
+Frame destructor.
+Note
+Since the Frame owns all the collections that have been put into it, or that can be obtained from it, this invalidates all references to these collections.
+Get a collection from the Frame.
+Get a collection from the Frame by name.
+CollT – The type of the desired collection
+name – The name of the collection
+A const reference to the collection if it is available or to an empty (static) collection
+Get a collection from the Frame.
-This is the pointer-to-base version for type-erased access (e.g. python interface)
+Get a collection pointer from the Frame by name.
+This is a type-erased version that is also used by the python bindings.
+A const pointer to a collection if it is available or a nullptr if it is not
+(Destructively) move a collection into the Frame and get a const reference back for further use
+(Destructively) move a collection into the Frame and get a reference to the inserted collection back for further use.
+The collection that is passed into the Frame has to be moved into it explicitly and the moved-from collection will be in the typical valid but undefined state in c++.
+CollT – The type of the collection
+coll – An rvalue reference to the collection to put into the Frame.
name – The name under which this collection should be stored in the Frame
A const reference to the collection that has just been inserted
+Move a collection into the Frame handing over ownership to the Frame.
+(Destructively) move a collection into the Frame.
+coll – The collection that should be moved into the Frame
name – The name under which this collection should be stored in the Frame
Add a value to the parameters of the Frame (if the type is supported).
-Copy the value into the internal store
+T – The type of the parameter. Has to be one of the types that is supported by GenericParameters
+key – The name under which this parameter should be stored
value – The value of the parameter. A copy will be put into the Frame
Add a string value to the parameters of the Frame by copying it.
-Dedicated overload for enabling the on-the-fly conversion on the string literals.
+Add a string value to the parameters of the Frame.
+This is a dedicated overload for enabling on-the-fly conversion from string literals.
+key – The name under which this parameter should be stored
value – The value of the parameter. A copy will be put into the Frame
Add a vector of strings to the parameters of the Frame (via copy).
-Dedicated overload for enabling on-the-fly conversions of initializer_list of string literals.
+Add a vector of strings value the parameters of the Frame.
+This is a dedicated overload for enabling on-the-fly conversion from an initializer_list of string literals
+key – The name under which this parameter should be stored
values – The values of the parameter. A copy will be put into the Frame
Add a vector of values into the parameters of the Frame.
-Overload for catching on-the-fly conversions of initializer_lists of values.
+Add a vector of values to the parameters of the Frame (if the type is supported).
+This is a dedicated overload for enabling on-the-fly conversions of initializer_list of values
+T – The type of the parameter. Has to be one of the types that is supported by GenericParameters
+key – The name under which this parameter should be stored
values – The values of the parameter. A copy will be put into the Frame
Retrieve parameters via key from the internal store.
-Return type will either by a const reference or a value depending on the desired type.
+The return type will either be a const reference or a value depending on the desired type. See podio::GenericParameters for more details.
+T – The desired type of the parameter (can also be std::vector<T>)
+key – The key under which the value is stored
+The value of the parameter or an empty default value
+Get all parameters that are stored in this Frame.
+Retrieve all parameters stored in this Frame.
+This is mainly intended for I/O purposes and we encourage to use the Frame functionality of getParameters or getParameterKeys in general.
+The internally used GenericParameters
+Get the keys of all stored parameters for a given type.
+T – The desired parameter type
+A vector of keys for this parameter type
+Get all currently available collections (including potentially unpacked ones from raw data)
+Get all currently available collection names.
+The names of all collections, including those that might still need unpacking from the internal FrameData
+Get the name of the passed collection.
+coll – The collection for which the name should be obtained
+The name of the collection or an empty optional if this collection is not known to the Frame
+Get the GenericParameters for writing.
+Get the name for the passed collectionID.
+collectionID – The collection ID of the collection for which the name should be obtained
+The name of the collection or an empty optional if this collectionID is not known to the Frame
+Get a collection for writing (in a prepared and “ready-to-write” state)
+Get a collection for writing.
+Note
+This method is intended for I/O purposes only and should not be used in other code.
+The collection pointer in a prepared and “ready-to-write” state
+Get the internal CollectionIDTable for writing.
+Note
+This method is intended for I/O purposes only and should not be used in other code.
+A copy of the internal collection id table
+GenericParameters objects allow to store generic named parameters of type int, float and string or vectors of these types.
+GenericParameters objects allow one to store generic named parameters of type int, float and string or vectors of these types.
They can be used to store (user) meta data that is run, event or collection dependent. (based on lcio::LCParameters)
F. Gaede, DESY
@@ -1655,7 +1837,11 @@GenericParameters are copyable NOTE: This is currently mainly done to keep the ROOT I/O happy, because that needs a copy constructor.
+GenericParameters are copyable.
+Note
+This is currently mainly done to keep the ROOT I/O happy, because that needs a copy constructor
+A simple helper class that allows to return related objects in a way that makes it possible to use the return type in a range-based for loop.
+A simple helper class that allows one to return related objects in a way that makes it possible to use the return type in a range-based for loop.
Public Types
This class has the function to read available data from disk and to prepare collections and buffers.
+The RNTupleReader can be used to read files that have been written with the RNTuple backend.
+The RNTupleReader provides the data as ROOTFrameData from which a podio::Frame can be constructed. It can be used to read files written by the RNTupleWriter.
Public Functions
Create a RNTupleReader.
+Destructor.
+The RNTupleReader is not copy-able.
+The RNTupleReader is not copy-able.
+Open a single file for reading.
+filename – The name of the input file
+Open multiple files for reading and then treat them as if they are one file.
+Note
+All of the files are assumed to have the same structure. Specifically this means:
The same categories are available from all files
The collections that are contained in the individual categories are the same across all files
This usually boils down to “the files have been written with the same
+”settings”, e.g. they are outputs of a batched process.
+filenames – The filenames of all input files that should be read
+Read the next data entry from which a Frame can be constructed for the given name.
-In case there are no more entries left for this name or in case there is no data for this name, this returns a nullptr.
+Read the next data entry for a given category.
+name – The category name for which to read the next entry
+FrameData from which a podio::Frame can be constructed if the category exists and if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed for the given name.
-In case the entry does not exist for this name or in case there is no data for this name, this returns a nullptr.
+Read the desired data entry for a given category.
+name – The category name for which to read the next entry
entry – The entry number to read
FrameData from which a podio::Frame can be constructed if the category and the desired entry exist. Otherwise a nullptr
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file(s).
+The names of the available categores from the file
+Returns number of entries for the given name.
+Get the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the datamodel definition for the given name.
+name – The name of the datamodel
+The high level definition of the datamodel in JSON format
+Get all names of the datamodels that ara available from this reader.
+Get all names of the datamodels that are available from this reader.
+The names of the datamodels
+The RNTupleWriter writes podio files into ROOT files using the new RNTuple format.
+Each category gets its own RNTuple. Additionally, there is a podio_metadata RNTuple that contains metadata that is necessary for interpreting the files for reading.
+Files written with the RNTupleWriter can be read with the RNTupleReader.
Public Functions
Create a RNTupleWriter to write to a file.
+Note
+Existing files will be overwritten without warning.
+filename – The path to the file that will be created.
+RNTupleWriter destructor.
+This also takes care of writing all the necessary metadata in order to be able to read files back again.
+The RNTupleWriter is not copy-able.
+The RNTupleWriter is not copy-able.
+Store the given frame with the given category.
+This stores all available collections from the Frame.
+Note
+The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+frame – The Frame to store
category – The category name under which this Frame should be stored
Store the given Frame with the given category.
+This stores only the desired collections and not the complete frame.
+Note
+The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+frame – The Frame to store
category – The category name under which this Frame should be stored
collsToWrite – The collection names that should be written
Write the current file, including all the necessary metadata to read it again.
+Note
+The destructor will also call this, so letting a RNTupleWriter go out of scope is also a viable way to write a readable file
+Check whether the collsToWrite are consistent with the state of the passed category.
-Return two vectors of collection names. The first one contains all the names that were missing from the collsToWrite but were present in the category. The second one contains the names that are present in the collsToWrite only. If both vectors are empty the category and the passed collsToWrite are consistent.
-NOTE: This will only be a meaningful check if the first Frame of the passed category has already been written. Also, this check is rather expensive as it has to effectively do two set differences.
+Note
+This will only be a meaningful check if the first Frame of the passed category has already been written. Also, this check is rather expensive as it has to effectively do two set differences.
+collsToWrite – The collection names that should be checked for consistency
category – The category name for which consistency should be checked
two vectors of collection names. The first one contains all the names that were missing from the collsToWrite but were present in the category. The second one contains the names that are present in the collsToWrite only. If both vectors are empty the category and the passed collsToWrite are consistent.
+Note
+Since there was only one category (“events”) for those legacy podio files this reader will really only work if you try to read that category, and will simply return no data if you try to read anything else.
+Public Functions
Create a SIOLegacyReader.
+Destructor.
+The SIOLegacyReader is not copy-able.
+The SIOLegacyReader is not copy-able.
+Open a single file for reading.
+filename – The name of the input file
+Open multiple files for reading and then treat them as if they are one file.
+This usually boils down to “the files have been written with the same
+”settings”, e.g. they are outputs of a batched process.
+ +Note
+All of the files are assumed to have the same structure. Specifically this means:
The collections that are contained in the individual event are always the same
filenames – The filenames of all input files that should be read
+Read the next data entry from which a Frame can be constructed.
-In case there are no more entries left, this returns a nullptr.
-NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.
+Note
+the category name has to be “events” in this case, as only that category is available for legacy files.
+FrameData from which a podio::Frame can be constructed if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed In case the entry does not exist, this returns a nullptr.
-NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.
+Read the desired data entry from which a Frame can be constructed.
+Note
+the category name has to be “events” in this case, as only that category is available for legacy files.
+FrameData from which a podio::Frame can be constructed if the desired entry exists. Otherwise a nullptr
+Returns number of entries for a given category.
+unsigned getEntries(const std::string &name) constGet the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file(s).
+The names of the available categories from the file
+This class has the function to read available data from disk and to prepare collections and buffers.
+This class has the function to read available data from disk in ROOTs TTree format.
+The ROOTReader provides the data as ROOTFrameData from which a podio::Frame can be constructed. It can be used to read files written by the ROOTWriter.
Public Functions
Create a ROOTReader.
+Destructor.
+The ROOTReader is not copy-able.
+The ROOTReader is not copy-able.
+Open multiple files for reading and then treat them as if they are one file.
-NOTE: All of the files are assumed to have the same structure. Specifically this means:
Note
+All of the files are assumed to have the same structure. Specifically this means:
The same categories are available from all files
The collections that are contained in the individual categories are the same across all files
This usually boils down to “the files have been written with the same
+”settings”, e.g. they are outputs of a batched process.
+This usually boils down to “the files have been written with the same
-settings”, e.g. they are outputs of a batched process.
- +filenames – The filenames of all input files that should be read
@@ -2281,45 +2668,93 @@Read the next data entry from which a Frame can be constructed for the given name.
-In case there are no more entries left for this name or in case there is no data for this name, this returns a nullptr.
+Read the next data entry for a given category.
+name – The category name for which to read the next entry
+FrameData from which a podio::Frame can be constructed if the category exists and if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed for the given name.
-In case the entry does not exist for this name or in case there is no data for this name, this returns a nullptr.
+Read the desired data entry for a given category.
+name – The category name for which to read the next entry
entry – The entry number to read
FrameData from which a podio::Frame can be constructed if the category and the desired entry exist. Otherwise a nullptr
+Returns number of entries for the given name.
+Get the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file(s).
+The names of the available categories from the file
+Get the datamodel definition for the given name.
+name – The name of the datamodel
+The high level definition of the datamodel in JSON format
+Get all names of the datamodels that ara available from this reader.
+Get all names of the datamodels that are available from this reader.
+The names of the datamodels
+The ROOTWriter writes podio files into ROOT files using TTrees.
+Each category gets its own TTree. Additionally, there is a podio_metadata TTree that contains metadata that is necessary for interpreting the files for reading.
+Files written with the ROOTWriter can be read with the ROOTReader.
Public Functions
Create a ROOTWriter to write to a file.
+Note
+Existing files will be overwritten without warning.
+filename – The path to the file that will be created.
+ROOTWriter destructor.
+This also takes care of writing all the necessary metadata to read files back again.
+The ROOTWriter is not copy-able.
+The ROOTWriter is not copy-able.
+Store the given frame with the given category.
-Store all available collections from the Frame.
-NOTE: The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+This stores all available collections from the Frame.
+Note
+The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+frame – The Frame to store
category – The category name under which this Frame should be stored
Store the given Frame with the given category.
-Store only the collections that are passed.
-NOTE: The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+This stores only the desired collections and not the complete frame.
+Note
+The contents of the first Frame that is written in this way determines the contents that will be written for all subsequent Frames.
+frame – The Frame to store
category – The category name under which this Frame should be stored
collsToWrite – The collection names that should be written
Write the current file, including all the necessary metadata to read it again.
+Note
+The destructor will also call this, so letting a ROOTWriter go out of scope is also a viable way to write a readable file
+Check whether the collsToWrite are consistent with the state of the passed category.
-Return two vectors of collection names. The first one contains all the names that were missing from the collsToWrite but were present in the category. The second one contains the names that are present in the collsToWrite only. If both vectors are empty the category and the passed collsToWrite are consistent.
-NOTE: This will only be a meaningful check if the first Frame of the passed category has already been written. Also, this check is rather expensive as it has to effectively do two set differences.
+Note
+This will only be a meaningful check if the first Frame of the passed category has already been written. Also, this check is rather expensive as it has to effectively do two set differences.
+collsToWrite – The collection names that should be checked for consistency
category – The category name for which consistency should be checked
two vectors of collection names. The first one contains all the names that were missing from the collsToWrite but were present in the category. The second one contains the names that are present in the collsToWrite only. If both vectors are empty the category and the passed collsToWrite are consistent.
+Evolve the passed in buffers to the current version of the datatype that can be constructed from them.
Internally this will first check if the schema version of the buffers is already the current one and in that case immediately return the passed in buffers again as they do not need schema evolution. If that is not the case it will look up the correct evolution function for the passed in version and call that on the passed in buffers.
+Note
+that these could also be the unchanged input buffers.
+Note
+Since there was only one category (“events”) for those legacy podio files this reader will really only work if you try to read that category, and will simply return no data if you try to read anything else.
+Public Functions
Create a SIOLegacyReader.
+Destructor.
+The SIOLegacyReader is not copy-able.
+The SIOLegacyReader is not copy-able.
+Read the next data entry from which a Frame can be constructed.
In case there are no more entries left, this returns a nullptr.
-NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.
+Note
+the category name has to be “events” in this case, as only that category is available for legacy files.
+FrameData from which a podio::Frame can be constructed if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed In case the entry does not exist, this returns a nullptr.
-NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.
+Read the desired data entry from which a Frame can be constructed.
+Note
+the category name has to be “events” in this case, as only that category is available for legacy files.
+FrameData from which a podio::Frame can be constructed if the desired entry exists. Otherwise a nullptr
+Returns the number of.
+Get the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Open a single file for reading.
+filename – The name of the input file
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file(s).
+The names of the available categores from the file
+The SIOReader can be used to read files that have been written with the SIO backend.
+The SIOReader provides the data as SIOFrameData from which a podio::Frame can be constructed. It can be used to read files written by the SIOWriter.
Public Functions
Create an SIOReader.
+SIOReader destructor.
+The SIOReader is not copy-able.
+The SIOReader is not copy-able.
+Read the next data entry from which a Frame can be constructed for the given name.
-In case there are no more entries left for this name or in case there is no data for this name, this returns a nullptr.
+Read the next data entry for a given category.
+name – The category name for which to read the next entry
+FrameData from which a podio::Frame can be constructed if the category exists and if there are still entries left to read. Otherwise a nullptr
+Read the specified data entry from which a Frame can be constructed for the given name.
-In case the entry does not exist for this name or in case there is no data for this name, this returns a nullptr.
+Read the desired data entry for a given category.
+name – The category name for which to read the next entry
entry – The entry number to read
FrameData from which a podio::Frame can be constructed if the category and the desired entry exist. Otherwise a nullptr
+Returns number of entries for the given name.
+Get the number of entries for the given name.
+name – The name of the category
+The number of entries that are available for the category
+Open the passed file for reading.
+filename – The path to the file to read from
+Get the build version of podio that has been used to write the current file.
+The podio build version
+Get the names of all the available Frame categories in the current file(s)
+Get the names of all the available Frame categories in the current file.
+The names of the available categores from the file
+Get the datamodel definition for the given name.
+name – The name of the datamodel
+The high level definition of the datamodel in JSON format
+Get all names of the datamodels that ara available from this reader.
+Get all names of the datamodels that are available from this reader.
+The names of the datamodels
+The SIOWriter writes podio files into SIO files.
+Each Frame is stored into an SIO record which are written in the order in which Frames are written. As part of the metadata a table of content record is written which is used in the reader to more quickly access the different records.
+Files written with the SIOWriter can be read with the SIOReader
Public Functions
Create a SIOWriter to write to a file.
+Note
+Existing files will be overwritten without warning.
+filename – The path to the file that will be created.
+SIOWriter destructor.
+This also takes care of writing all the necessary metadata to read files back again.
+The SIOWriter is not copy-able.
+The SIOWriter is not copy-able.
+Write the given Frame with the given category.
+Store the given frame with the given category.
+This stores all available collections from the Frame. Frames of the same category can be independent of each other, i.e. they can have different collection contents.
+frame – The Frame to store
category – The category name under which this Frame should be stored
Write the given Frame with the given category only storing the collections that are desired via collsToWrite.
+Store the given Frame with the given category.
+This stores only the desired collections and not the complete frame. Frames of the same category can be independent of each other, i.e. they can have different collection contents.
+frame – The Frame to store
category – The category name under which this Frame should be stored
collsToWrite – The collection names that should be written
Write the current file, including all the necessary metadata to read it again.
+Note
+The destructor will also call this, so letting a SIOWriter go out of scope is also a viable way to write a readable file
+See also
-SupportedUserDataTypes.
+SupportedUserDataTypes.
F.Gaede, DESY
@@ -3507,8 +4151,7 @@The metadata category that is used to store a single Frame that holds data that is valid for a whole file, e.g.
-collection level parameters
+The metadata category that is used to store a single Frame that holds data that is valid for a whole file, for example collection level parameters.
Version class consisting of 3 16 bit unsigned integers to hold the major, minor and patch version.
-Provides constexpr comparison operators that allow to use this class in constexpr-if clauses.
+Version class consisting of three 16 bit unsigned integers to hold the major, minor and patch version.
+Provides constexpr comparison operators that allow one to use this class in constexpr-if clauses.
Public Members
The metadata category that is used to store a single Frame that holds data that is valid for a whole file, e.g.
-collection level parameters
+The metadata category that is used to store a single Frame that holds data that is valid for a whole file, for example collection level parameters.
Version class consisting of 3 16 bit unsigned integers to hold the major, minor and patch version.
-Provides constexpr comparison operators that allow to use this class in constexpr-if clauses.
+Version class consisting of three 16 bit unsigned integers to hold the major, minor and patch version.
+Provides constexpr comparison operators that allow one to use this class in constexpr-if clauses.
Public Members
podio::Frame::getParameters()
podio::Frame::getParameterKeys()
podio::Frame::getAvailableCollections()
podio::Frame::getGenericParametersForWrite()
podio::Frame::getName()
podio::Frame::getName()
podio::Frame::getCollectionForWrite()
podio::Frame::getCollectionIDTableForWrite()
podio::RNTupleReader::currentFileVersion()
podio::RNTupleReader::getDatamodelDefinition()
podio::RNTupleReader::getAvailableDatamodels()
podio::RNTupleReader::closeFile()
podio::RNTupleWriter
podio::RNTupleWriter::~RNTupleWriter()
podio::RNTupleWriter::RNTupleWriter()
podio::RNTupleWriter::operator=()
podio::RNTupleWriter::fillParams()
podio::RNTupleWriter::writeFrame()
podio::RNTupleWriter::writeFrame()
podio::RNTupleWriter::finish()
Version class consisting of 3 16 bit unsigned integers to hold the major, minor and patch version.
-Provides constexpr comparison operators that allow to use this class in constexpr-if clauses.
+Version class consisting of three 16 bit unsigned integers to hold the major, minor and patch version.
+Provides constexpr comparison operators that allow one to use this class in constexpr-if clauses.
Public Members
A datamodel definition has only one mandatory field: schema_version
. This
+defines the current version of the datamodel schema and allows to do schema
+evolution. All other fields described below are in principle optional.
A component is just a flat struct containing data. it can be defined via:
@@ -697,7 +704,7 @@H_y%Qhx_kaHq-vV
z+kA6)onrU%i79ZCZGxGXoRG-*XS5{PS;&man2V@Q-jtkvVSh9v$++7ywA@_pa4YBm
zLT>JMyHWH5qz#W@4X-{f{&nF_y~fq3I+wocyDI+vs#CG#b!HGQ-2Omi<#(s2Pq*+`
z`P%il(>X#-?tW$V!e3;AsuR}NK?`C=QaPiSeHIVN