EDM4eic
EIC data model
Toggle main menu visibility
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
7
#include "
edm4eic/TensorData.h
"
8
#include "
edm4eic/TensorObj.h
"
9
#include "
edm4eic/Tensor.h
"
10
11
// schema evolution specific includes
12
13
// podio specific includes
14
#include "podio/CollectionBuffers.h"
15
#include "podio/ICollectionProvider.h"
16
17
#include <deque>
18
#include <memory>
19
20
namespace
edm4eic
{
21
22
23
using
TensorObjPointerContainer
= std::deque<TensorObj*>;
24
using
TensorDataContainer
= std::vector<TensorData>;
25
26
27
/**
28
* Class encapsulating everything related to storage of data that is needed by a
29
* collection.
30
*/
31
class
TensorCollectionData
{
32
public
:
33
/**
34
* The Objs of this collection
35
*/
36
TensorObjPointerContainer
entries
{};
37
38
/**
39
* Default constructor setting up the necessary buffers
40
*/
41
TensorCollectionData
();
42
43
/**
44
* Constructor from existing I/O buffers
45
*/
46
TensorCollectionData
(podio::CollectionReadBuffers buffers,
bool
isSubsetColl);
47
48
/**
49
* Non copy-able, move-only class
50
*/
51
TensorCollectionData
(
const
TensorCollectionData
&) =
delete
;
52
TensorCollectionData
&
operator=
(
const
TensorCollectionData
&) =
delete
;
53
TensorCollectionData
(
TensorCollectionData
&& other) =
default
;
54
TensorCollectionData
&
operator=
(
TensorCollectionData
&& other) =
default
;
55
56
/**
57
* Destructor
58
*/
59
~TensorCollectionData
() =
default
;
60
61
void
clear
(
bool
isSubsetColl);
62
63
podio::CollectionWriteBuffers
getCollectionBuffers
(
bool
isSubsetColl);
64
65
void
prepareForWrite
(
bool
isSubsetColl);
66
67
void
prepareAfterRead
(uint32_t collectionID);
68
69
void
makeSubsetCollection
();
70
71
void
createRelations
(
TensorObj
* obj);
72
73
bool
setReferences
(
const
podio::ICollectionProvider* collectionProvider,
bool
isSubsetColl);
74
75
private
:
76
// members to handle 1-to-N-relations
77
78
// members to handle vector members
79
podio::UVecPtr<std::int64_t> m_vec_shape{
nullptr
};
/// combined vector of all objects in collection
80
std::vector<podio::UVecPtr<std::int64_t>> m_vecs_shape{};
/// pointers to individual member vectors
81
podio::UVecPtr<float> m_vec_floatData{
nullptr
};
/// combined vector of all objects in collection
82
std::vector<podio::UVecPtr<float>> m_vecs_floatData{};
/// pointers to individual member vectors
83
podio::UVecPtr<std::int64_t> m_vec_int64Data{
nullptr
};
/// combined vector of all objects in collection
84
std::vector<podio::UVecPtr<std::int64_t>> m_vecs_int64Data{};
/// pointers to individual member vectors
85
86
// I/O related buffers
87
podio::CollRefCollection m_refCollections{};
88
podio::VectorMembersInfo m_vecmem_info{};
89
std::unique_ptr<TensorDataContainer> m_data{
nullptr
};
90
};
91
92
93
}
// namespace edm4eic
94
95
96
#endif
Tensor.h
TensorData.h
TensorObj.h
edm4eic::TensorCollectionData::TensorCollectionData
TensorCollectionData(const TensorCollectionData &)=delete
edm4eic::TensorCollectionData::TensorCollectionData
TensorCollectionData(TensorCollectionData &&other)=default
edm4eic::TensorCollectionData::setReferences
bool setReferences(const podio::ICollectionProvider *collectionProvider, bool isSubsetColl)
Definition
TensorCollectionData.cc:170
edm4eic::TensorCollectionData::getCollectionBuffers
podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl)
Definition
TensorCollectionData.cc:81
edm4eic::TensorCollectionData::makeSubsetCollection
void makeSubsetCollection()
Definition
TensorCollectionData.cc:189
edm4eic::TensorCollectionData::createRelations
void createRelations(TensorObj *obj)
Definition
TensorCollectionData.cc:161
edm4eic::TensorCollectionData::~TensorCollectionData
~TensorCollectionData()=default
edm4eic::TensorCollectionData::TensorCollectionData
TensorCollectionData()
Definition
TensorCollectionData.cc:13
edm4eic::TensorCollectionData::entries
TensorObjPointerContainer entries
Definition
TensorCollectionData.h:36
edm4eic::TensorCollectionData::operator=
TensorCollectionData & operator=(const TensorCollectionData &)=delete
edm4eic::TensorCollectionData::clear
void clear(bool isSubsetColl)
Definition
TensorCollectionData.cc:55
edm4eic::TensorCollectionData::prepareAfterRead
void prepareAfterRead(uint32_t collectionID)
Definition
TensorCollectionData.cc:144
edm4eic::TensorCollectionData::operator=
TensorCollectionData & operator=(TensorCollectionData &&other)=default
edm4eic::TensorCollectionData::prepareForWrite
void prepareForWrite(bool isSubsetColl)
Definition
TensorCollectionData.cc:97
edm4eic::TensorObj
Definition
TensorObj.h:19
edm4eic
Definition
CalorimeterHit.cc:17
edm4eic::TensorObjPointerContainer
std::deque< TensorObj * > TensorObjPointerContainer
Definition
TensorCollectionData.h:23
edm4eic::TensorDataContainer
std::vector< TensorData > TensorDataContainer
Definition
TensorCollectionData.h:24
build
edm4eic
TensorCollectionData.h
Generated by
1.17.0