EDM4eic
EIC data model
Loading...
Searching...
No Matches
TensorCollectionData.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_Tensor_CollectionData_H
4#define EDM4EIC_Tensor_CollectionData_H
5
6// datamodel specific includes
8#include "edm4eic/TensorObj.h"
9
10// schema evolution specific includes
11
12// podio specific includes
13#include "podio/CollectionBuffers.h"
14#include "podio/ICollectionProvider.h"
15
16#include <deque>
17#include <memory>
18
19namespace edm4eic {
20
21
22using TensorObjPointerContainer = std::deque<TensorObj*>;
23using TensorDataContainer = std::vector<TensorData>;
24
25
26/**
27 * Class encapsulating everything related to storage of data that is needed by a
28 * collection.
29 */
31public:
32 /**
33 * The Objs of this collection
34 */
36
37 /**
38 * Default constructor setting up the necessary buffers
39 */
41
42 /**
43 * Constructor from existing I/O buffers
44 */
45 TensorCollectionData(podio::CollectionReadBuffers buffers, bool isSubsetColl);
46
47 /**
48 * Non copy-able, move-only class
49 */
54
55 /**
56 * Deconstructor
57 */
59
60 void clear(bool isSubsetColl);
61
62 podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl);
63
64 void prepareForWrite(bool isSubsetColl);
65
66 void prepareAfterRead(uint32_t collectionID);
67
69
70 void createRelations(TensorObj* obj);
71
72 bool setReferences(const podio::ICollectionProvider* collectionProvider, bool isSubsetColl);
73
74private:
75 // members to handle 1-to-N-relations
76
77 // members to handle vector members
78 podio::UVecPtr<std::int64_t> m_vec_shape{nullptr}; /// combined vector of all objects in collection
79 std::vector<podio::UVecPtr<std::int64_t>> m_vecs_shape{}; /// pointers to individual member vectors
80 podio::UVecPtr<float> m_vec_floatData{nullptr}; /// combined vector of all objects in collection
81 std::vector<podio::UVecPtr<float>> m_vecs_floatData{}; /// pointers to individual member vectors
82 podio::UVecPtr<std::int64_t> m_vec_int64Data{nullptr}; /// combined vector of all objects in collection
83 std::vector<podio::UVecPtr<std::int64_t>> m_vecs_int64Data{}; /// pointers to individual member vectors
84
85 // I/O related buffers
86 podio::CollRefCollection m_refCollections{};
87 podio::VectorMembersInfo m_vecmem_info{};
88 std::unique_ptr<TensorDataContainer> m_data{nullptr};
89};
90
91
92} // namespace edm4eic
93
94
95#endif
Definition TensorCollectionData.h:30
TensorCollectionData(const TensorCollectionData &)=delete
TensorCollectionData(TensorCollectionData &&other)=default
bool setReferences(const podio::ICollectionProvider *collectionProvider, bool isSubsetColl)
Definition TensorCollectionData.cc:152
podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl)
Definition TensorCollectionData.cc:63
void makeSubsetCollection()
Definition TensorCollectionData.cc:171
void createRelations(TensorObj *obj)
Definition TensorCollectionData.cc:143
TensorCollectionData()
Definition TensorCollectionData.cc:11
TensorObjPointerContainer entries
Definition TensorCollectionData.h:35
TensorCollectionData & operator=(const TensorCollectionData &)=delete
void clear(bool isSubsetColl)
Definition TensorCollectionData.cc:39
void prepareAfterRead(uint32_t collectionID)
Definition TensorCollectionData.cc:126
TensorCollectionData & operator=(TensorCollectionData &&other)=default
void prepareForWrite(bool isSubsetColl)
Definition TensorCollectionData.cc:79
Definition TensorObj.h:18
Definition CalorimeterHit.cc:18
std::deque< TensorObj * > TensorObjPointerContainer
Definition TensorCollectionData.h:22
std::vector< TensorData > TensorDataContainer
Definition TensorCollectionData.h:23