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