EDM4eic
EIC data model
Loading...
Searching...
No Matches
ClusterCollectionData.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_Cluster_CollectionData_H
4#define EDM4EIC_Cluster_CollectionData_H
5
6// datamodel specific includes
9#include "edm4eic/Cluster.h"
11#include "edm4hep/ParticleID.h"
12
13// schema evolution specific includes
14
15// podio specific includes
16#include "podio/CollectionBuffers.h"
17#include "podio/ICollectionProvider.h"
18
19#include <deque>
20#include <memory>
21
22namespace edm4eic {
23
24
25using ClusterObjPointerContainer = std::deque<ClusterObj*>;
26using ClusterDataContainer = std::vector<ClusterData>;
27
28
29/**
30 * Class encapsulating everything related to storage of data that is needed by a
31 * collection.
32 */
34public:
35 /**
36 * The Objs of this collection
37 */
39
40 /**
41 * Default constructor setting up the necessary buffers
42 */
44
45 /**
46 * Constructor from existing I/O buffers
47 */
48 ClusterCollectionData(podio::CollectionReadBuffers buffers, bool isSubsetColl);
49
50 /**
51 * Non copy-able, move-only class
52 */
57
58 /**
59 * Destructor
60 */
62
63 void clear(bool isSubsetColl);
64
65 podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl);
66
67 void prepareForWrite(bool isSubsetColl);
68
69 void prepareAfterRead(uint32_t collectionID);
70
72
73 void createRelations(ClusterObj* obj);
74
75 bool setReferences(const podio::ICollectionProvider* collectionProvider, bool isSubsetColl);
76
77private:
78 // members to handle 1-to-N-relations
79 podio::UVecPtr<edm4eic::Cluster> m_rel_clusters{std::make_unique<std::vector<edm4eic::Cluster>>()}; ///< Relation buffer for read / write
80 std::vector<podio::UVecPtr<edm4eic::Cluster>> m_rel_clusters_tmp{}; ///< Relation buffer for internal book-keeping
81 podio::UVecPtr<edm4eic::CalorimeterHit> m_rel_hits{std::make_unique<std::vector<edm4eic::CalorimeterHit>>()}; ///< Relation buffer for read / write
82 std::vector<podio::UVecPtr<edm4eic::CalorimeterHit>> m_rel_hits_tmp{}; ///< Relation buffer for internal book-keeping
83 podio::UVecPtr<edm4hep::ParticleID> m_rel_particleIDs{std::make_unique<std::vector<edm4hep::ParticleID>>()}; ///< Relation buffer for read / write
84 std::vector<podio::UVecPtr<edm4hep::ParticleID>> m_rel_particleIDs_tmp{}; ///< Relation buffer for internal book-keeping
85
86 // members to handle vector members
87 podio::UVecPtr<float> m_vec_shapeParameters{nullptr}; /// combined vector of all objects in collection
88 std::vector<podio::UVecPtr<float>> m_vecs_shapeParameters{}; /// pointers to individual member vectors
89 podio::UVecPtr<float> m_vec_hitContributions{nullptr}; /// combined vector of all objects in collection
90 std::vector<podio::UVecPtr<float>> m_vecs_hitContributions{}; /// pointers to individual member vectors
91 podio::UVecPtr<float> m_vec_subdetectorEnergies{nullptr}; /// combined vector of all objects in collection
92 std::vector<podio::UVecPtr<float>> m_vecs_subdetectorEnergies{}; /// pointers to individual member vectors
93
94 // I/O related buffers
95 podio::CollRefCollection m_refCollections{};
96 podio::VectorMembersInfo m_vecmem_info{};
97 std::unique_ptr<ClusterDataContainer> m_data{nullptr};
98};
99
100
101} // namespace edm4eic
102
103
104#endif
void clear(bool isSubsetColl)
Definition ClusterCollectionData.cc:63
ClusterObjPointerContainer entries
Definition ClusterCollectionData.h:38
ClusterCollectionData & operator=(const ClusterCollectionData &)=delete
void prepareForWrite(bool isSubsetColl)
Definition ClusterCollectionData.cc:142
ClusterCollectionData(ClusterCollectionData &&other)=default
void prepareAfterRead(uint32_t collectionID)
Definition ClusterCollectionData.cc:222
podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl)
Definition ClusterCollectionData.cc:126
void makeSubsetCollection()
Definition ClusterCollectionData.cc:318
ClusterCollectionData()
Definition ClusterCollectionData.cc:15
ClusterCollectionData(const ClusterCollectionData &)=delete
bool setReferences(const podio::ICollectionProvider *collectionProvider, bool isSubsetColl)
Definition ClusterCollectionData.cc:257
void createRelations(ClusterObj *obj)
Definition ClusterCollectionData.cc:242
ClusterCollectionData & operator=(ClusterCollectionData &&other)=default
Definition ClusterObj.h:21
Definition CalorimeterHit.cc:17
std::deque< ClusterObj * > ClusterObjPointerContainer
Definition ClusterCollectionData.h:25
std::vector< ClusterData > ClusterDataContainer
Definition ClusterCollectionData.h:26