Project
Loading...
Searching...
No Matches
Objects.h
Go to the documentation of this file.
1// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef O2_FRAMEWORK_AODNATIVE_OBJECTS_H_
13#define O2_FRAMEWORK_AODNATIVE_OBJECTS_H_
14
15#include <cstdint>
16#include <map>
17#include <span>
18#include <string>
19#include <vector>
20
21namespace o2::aod::native
22{
23
27struct BasketRef {
28 uint64_t seek;
29 uint32_t nbytes;
31 int32_t nEntries;
33 std::vector<uint8_t> embeddedPayload;
34};
35
39struct BranchInfo {
40 std::string name;
43 int32_t fixedLen;
44 std::string countBranch;
46 std::vector<BasketRef> baskets;
47};
48
49struct TreeInfo {
50 std::string name;
52 std::vector<BranchInfo> branches;
53};
54
56size_t leafElementSize(char leafClass);
57
60std::map<std::string, std::vector<int>> const& supportedClassVersions();
61
64TreeInfo readTreePayload(std::span<const uint8_t> payload, uint16_t keylen, std::string const& file, uint64_t fileOffset);
65
67std::map<std::string, std::string> readStringMapPayload(std::span<const uint8_t> payload, uint16_t keylen, std::string const& file, uint64_t fileOffset);
68
69} // namespace o2::aod::native
70
71#endif // O2_FRAMEWORK_AODNATIVE_OBJECTS_H_
TreeInfo readTreePayload(std::span< const uint8_t > payload, uint16_t keylen, std::string const &file, uint64_t fileOffset)
Definition Objects.cxx:544
size_t leafElementSize(char leafClass)
Size in bytes of one value of a leaf class on disk.
Definition Objects.cxx:503
std::map< std::string, std::vector< int > > const & supportedClassVersions()
Definition Objects.cxx:521
std::map< std::string, std::string > readStringMapPayload(std::span< const uint8_t > payload, uint16_t keylen, std::string const &file, uint64_t fileOffset)
Deserializes a TMap of TObjString to TObjString (metaData, parentFiles).
Definition Objects.cxx:550
std::vector< uint8_t > embeddedPayload
Definition Objects.h:33
std::vector< BasketRef > baskets
Definition Objects.h:46
std::vector< BranchInfo > branches
Definition Objects.h:52