EICd
EIC data model
ClusterCollectionData.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EICD_Cluster_CollectionData_H
4#define EICD_Cluster_CollectionData_H
5
6// datamodel specific includes
7#include "eicd/ClusterData.h"
8#include "eicd/ClusterObj.h"
10#include "edm4hep/ParticleID.h"
11
12// podio specific includes
13#include "podio/CollectionBuffers.h"
14#include "podio/ICollectionProvider.h"
15
16#include <deque>
17#include <memory>
18
19namespace eicd {
20
21
22using ClusterObjPointerContainer = std::deque<ClusterObj*>;
23using ClusterDataContainer = std::vector<ClusterData>;
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 * Non copy-able, move-only class
44 */
49
50 /**
51 * Deconstructor
52 */
54
55 void clear(bool isSubsetColl);
56
57 podio::CollectionBuffers getCollectionBuffers(bool isSubsetColl);
58
59 void prepareForWrite(bool isSubsetColl);
60
61 void prepareAfterRead(int collectionID);
62
64
65 void createRelations(ClusterObj* obj);
66
67 bool setReferences(const podio::ICollectionProvider* collectionProvider, bool isSubsetColl);
68
69private:
70 // members to handle 1-to-N-relations
71 podio::UVecPtr<eicd::Cluster> m_rel_clusters; ///< Relation buffer for read / write
72 std::vector<podio::UVecPtr<eicd::Cluster>> m_rel_clusters_tmp{}; ///< Relation buffer for internal book-keeping
73 podio::UVecPtr<eicd::CalorimeterHit> m_rel_hits; ///< Relation buffer for read / write
74 std::vector<podio::UVecPtr<eicd::CalorimeterHit>> m_rel_hits_tmp{}; ///< Relation buffer for internal book-keeping
75 podio::UVecPtr<edm4hep::ParticleID> m_rel_particleIDs; ///< Relation buffer for read / write
76 std::vector<podio::UVecPtr<edm4hep::ParticleID>> m_rel_particleIDs_tmp{}; ///< Relation buffer for internal book-keeping
77
78 // members to handle vector members
79 podio::UVecPtr<float> m_vec_shapeParameters; /// combined vector of all objects in collection
80 std::vector<podio::UVecPtr<float>> m_vecs_shapeParameters{}; /// pointers to individual member vectors
81 podio::UVecPtr<float> m_vec_hitContributions; /// combined vector of all objects in collection
82 std::vector<podio::UVecPtr<float>> m_vecs_hitContributions{}; /// pointers to individual member vectors
83 podio::UVecPtr<float> m_vec_subdetectorEnergies; /// combined vector of all objects in collection
84 std::vector<podio::UVecPtr<float>> m_vecs_subdetectorEnergies{}; /// 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<ClusterDataContainer> m_data{nullptr};
90};
91
92
93} // namespace eicd
94
95
96#endif
Definition: ClusterCollectionData.h:30
ClusterCollectionData()
Definition: ClusterCollectionData.cc:13
void createRelations(ClusterObj *obj)
Definition: ClusterCollectionData.cc:203
ClusterCollectionData & operator=(const ClusterCollectionData &)=delete
bool setReferences(const podio::ICollectionProvider *collectionProvider, bool isSubsetColl)
Definition: ClusterCollectionData.cc:218
ClusterCollectionData(const ClusterCollectionData &)=delete
ClusterObjPointerContainer entries
Definition: ClusterCollectionData.h:35
void prepareAfterRead(int collectionID)
Definition: ClusterCollectionData.cc:183
ClusterCollectionData & operator=(ClusterCollectionData &&other)=default
podio::CollectionBuffers getCollectionBuffers(bool isSubsetColl)
Definition: ClusterCollectionData.cc:90
void clear(bool isSubsetColl)
Definition: ClusterCollectionData.cc:29
void makeSubsetCollection()
Definition: ClusterCollectionData.cc:285
ClusterCollectionData(ClusterCollectionData &&other)=default
void prepareForWrite(bool isSubsetColl)
Definition: ClusterCollectionData.cc:103
Definition: ClusterObj.h:20
Definition: CalorimeterHit.cc:13
std::deque< ClusterObj * > ClusterObjPointerContainer
Definition: ClusterCollectionData.h:22
std::vector< ClusterData > ClusterDataContainer
Definition: ClusterCollectionData.h:23