EICd
EIC data model
ReconstructedParticleCollectionData.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EICD_ReconstructedParticle_CollectionData_H
4#define EICD_ReconstructedParticle_CollectionData_H
5
6// datamodel specific includes
9#include "eicd/Cluster.h"
10#include "eicd/Track.h"
11#include "eicd/Vertex.h"
12#include "edm4hep/ParticleID.h"
13
14// podio specific includes
15#include "podio/CollectionBuffers.h"
16#include "podio/ICollectionProvider.h"
17
18#include <deque>
19#include <memory>
20
21namespace eicd {
22
23
24using ReconstructedParticleObjPointerContainer = std::deque<ReconstructedParticleObj*>;
25using ReconstructedParticleDataContainer = std::vector<ReconstructedParticleData>;
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 * Non copy-able, move-only class
46 */
51
52 /**
53 * Deconstructor
54 */
56
57 void clear(bool isSubsetColl);
58
59 podio::CollectionBuffers getCollectionBuffers(bool isSubsetColl);
60
61 void prepareForWrite(bool isSubsetColl);
62
63 void prepareAfterRead(int collectionID);
64
66
68
69 bool setReferences(const podio::ICollectionProvider* collectionProvider, bool isSubsetColl);
70
71private:
72 // members to handle 1-to-N-relations
73 podio::UVecPtr<eicd::Cluster> m_rel_clusters; ///< Relation buffer for read / write
74 std::vector<podio::UVecPtr<eicd::Cluster>> m_rel_clusters_tmp{}; ///< Relation buffer for internal book-keeping
75 podio::UVecPtr<eicd::Track> m_rel_tracks; ///< Relation buffer for read / write
76 std::vector<podio::UVecPtr<eicd::Track>> m_rel_tracks_tmp{}; ///< Relation buffer for internal book-keeping
77 podio::UVecPtr<eicd::ReconstructedParticle> m_rel_particles; ///< Relation buffer for read / write
78 std::vector<podio::UVecPtr<eicd::ReconstructedParticle>> m_rel_particles_tmp{}; ///< Relation buffer for internal book-keeping
79 podio::UVecPtr<edm4hep::ParticleID> m_rel_particleIDs; ///< Relation buffer for read / write
80 std::vector<podio::UVecPtr<edm4hep::ParticleID>> m_rel_particleIDs_tmp{}; ///< Relation buffer for internal book-keeping
81 podio::UVecPtr<eicd::Vertex> m_rel_startVertex; ///< Relation buffer for read / write
82 podio::UVecPtr<edm4hep::ParticleID> m_rel_particleIDUsed; ///< Relation buffer for read / write
83
84 // members to handle vector members
85
86 // I/O related buffers
87 podio::CollRefCollection m_refCollections{};
88 podio::VectorMembersInfo m_vecmem_info{};
89 std::unique_ptr<ReconstructedParticleDataContainer> m_data{nullptr};
90};
91
92
93} // namespace eicd
94
95
96#endif
Definition: ReconstructedParticleCollectionData.h:32
ReconstructedParticleCollectionData(ReconstructedParticleCollectionData &&other)=default
void makeSubsetCollection()
Definition: ReconstructedParticleCollectionData.cc:334
ReconstructedParticleCollectionData & operator=(const ReconstructedParticleCollectionData &)=delete
void prepareAfterRead(int collectionID)
Definition: ReconstructedParticleCollectionData.cc:192
void clear(bool isSubsetColl)
Definition: ReconstructedParticleCollectionData.cc:30
bool setReferences(const podio::ICollectionProvider *collectionProvider, bool isSubsetColl)
Definition: ReconstructedParticleCollectionData.cc:221
void createRelations(ReconstructedParticleObj *obj)
Definition: ReconstructedParticleCollectionData.cc:210
ReconstructedParticleCollectionData()
Definition: ReconstructedParticleCollectionData.cc:14
ReconstructedParticleCollectionData(const ReconstructedParticleCollectionData &)=delete
ReconstructedParticleObjPointerContainer entries
Definition: ReconstructedParticleCollectionData.h:37
void prepareForWrite(bool isSubsetColl)
Definition: ReconstructedParticleCollectionData.cc:112
ReconstructedParticleCollectionData & operator=(ReconstructedParticleCollectionData &&other)=default
podio::CollectionBuffers getCollectionBuffers(bool isSubsetColl)
Definition: ReconstructedParticleCollectionData.cc:104
Definition: ReconstructedParticleObj.h:28
Definition: CalorimeterHit.cc:13
std::vector< ReconstructedParticleData > ReconstructedParticleDataContainer
Definition: ReconstructedParticleCollectionData.h:25
std::deque< ReconstructedParticleObj * > ReconstructedParticleObjPointerContainer
Definition: ReconstructedParticleCollectionData.h:24