EDM4eic
EIC data model
Loading...
Searching...
No Matches
ReconstructedParticleCollectionData.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_ReconstructedParticle_CollectionData_H
4#define EDM4EIC_ReconstructedParticle_CollectionData_H
5
6// datamodel specific includes
10#include "edm4eic/Cluster.h"
11#include "edm4eic/Track.h"
12#include "edm4eic/Vertex.h"
13#include "edm4hep/ParticleID.h"
14
15// schema evolution specific includes
16
17// podio specific includes
18#include "podio/CollectionBuffers.h"
19#include "podio/ICollectionProvider.h"
20
21#include <deque>
22#include <memory>
23
24namespace edm4eic {
25
26
27using ReconstructedParticleObjPointerContainer = std::deque<ReconstructedParticleObj*>;
28using ReconstructedParticleDataContainer = std::vector<ReconstructedParticleData>;
29
30
31/**
32 * Class encapsulating everything related to storage of data that is needed by a
33 * collection.
34 */
36public:
37 /**
38 * The Objs of this collection
39 */
41
42 /**
43 * Default constructor setting up the necessary buffers
44 */
46
47 /**
48 * Constructor from existing I/O buffers
49 */
50 ReconstructedParticleCollectionData(podio::CollectionReadBuffers buffers, bool isSubsetColl);
51
52 /**
53 * Non copy-able, move-only class
54 */
59
60 /**
61 * Destructor
62 */
64
65 void clear(bool isSubsetColl);
66
67 podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl);
68
69 void prepareForWrite(bool isSubsetColl);
70
71 void prepareAfterRead(uint32_t collectionID);
72
74
76
77 bool setReferences(const podio::ICollectionProvider* collectionProvider, bool isSubsetColl);
78
79private:
80 // members to handle 1-to-N-relations
81 podio::UVecPtr<edm4eic::Cluster> m_rel_clusters{std::make_unique<std::vector<edm4eic::Cluster>>()}; ///< Relation buffer for read / write
82 std::vector<podio::UVecPtr<edm4eic::Cluster>> m_rel_clusters_tmp{}; ///< Relation buffer for internal book-keeping
83 podio::UVecPtr<edm4eic::Track> m_rel_tracks{std::make_unique<std::vector<edm4eic::Track>>()}; ///< Relation buffer for read / write
84 std::vector<podio::UVecPtr<edm4eic::Track>> m_rel_tracks_tmp{}; ///< Relation buffer for internal book-keeping
85 podio::UVecPtr<edm4eic::ReconstructedParticle> m_rel_particles{std::make_unique<std::vector<edm4eic::ReconstructedParticle>>()}; ///< Relation buffer for read / write
86 std::vector<podio::UVecPtr<edm4eic::ReconstructedParticle>> m_rel_particles_tmp{}; ///< Relation buffer for internal book-keeping
87 podio::UVecPtr<edm4hep::ParticleID> m_rel_particleIDs{std::make_unique<std::vector<edm4hep::ParticleID>>()}; ///< Relation buffer for read / write
88 std::vector<podio::UVecPtr<edm4hep::ParticleID>> m_rel_particleIDs_tmp{}; ///< Relation buffer for internal book-keeping
89 podio::UVecPtr<edm4eic::Vertex> m_rel_startVertex{std::make_unique<std::vector<edm4eic::Vertex>>()}; ///< Relation buffer for read / write
90 podio::UVecPtr<edm4hep::ParticleID> m_rel_particleIDUsed{std::make_unique<std::vector<edm4hep::ParticleID>>()}; ///< Relation buffer for read / write
91
92 // members to handle vector members
93
94 // I/O related buffers
95 podio::CollRefCollection m_refCollections{};
96 podio::VectorMembersInfo m_vecmem_info{};
97 std::unique_ptr<ReconstructedParticleDataContainer> m_data{nullptr};
98};
99
100
101} // namespace edm4eic
102
103
104#endif
ReconstructedParticleCollectionData(const ReconstructedParticleCollectionData &)=delete
void prepareAfterRead(uint32_t collectionID)
Definition ReconstructedParticleCollectionData.cc:226
ReconstructedParticleObjPointerContainer entries
Definition ReconstructedParticleCollectionData.h:40
ReconstructedParticleCollectionData()
Definition ReconstructedParticleCollectionData.cc:16
ReconstructedParticleCollectionData(ReconstructedParticleCollectionData &&other)=default
void createRelations(ReconstructedParticleObj *obj)
Definition ReconstructedParticleCollectionData.cc:244
bool setReferences(const podio::ICollectionProvider *collectionProvider, bool isSubsetColl)
Definition ReconstructedParticleCollectionData.cc:255
ReconstructedParticleCollectionData & operator=(const ReconstructedParticleCollectionData &)=delete
ReconstructedParticleCollectionData & operator=(ReconstructedParticleCollectionData &&other)=default
void makeSubsetCollection()
Definition ReconstructedParticleCollectionData.cc:358
podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl)
Definition ReconstructedParticleCollectionData.cc:137
void prepareForWrite(bool isSubsetColl)
Definition ReconstructedParticleCollectionData.cc:146
void clear(bool isSubsetColl)
Definition ReconstructedParticleCollectionData.cc:61
Definition ReconstructedParticleObj.h:29
Definition CalorimeterHit.cc:17
std::deque< ReconstructedParticleObj * > ReconstructedParticleObjPointerContainer
Definition ReconstructedParticleCollectionData.h:27
std::vector< ReconstructedParticleData > ReconstructedParticleDataContainer
Definition ReconstructedParticleCollectionData.h:28