EDM4eic
EIC data model
Loading...
Searching...
No Matches
TruthinessCollectionData.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_Truthiness_CollectionData_H
4#define EDM4EIC_Truthiness_CollectionData_H
5
6// datamodel specific includes
12#include "edm4hep/MCParticle.h"
13
14// schema evolution specific includes
15
16// podio specific includes
17#include "podio/CollectionBuffers.h"
18#include "podio/ICollectionProvider.h"
19
20#include <deque>
21#include <memory>
22
23namespace edm4eic {
24
25
26using TruthinessObjPointerContainer = std::deque<TruthinessObj*>;
27using TruthinessDataContainer = std::vector<TruthinessData>;
28
29
30/**
31 * Class encapsulating everything related to storage of data that is needed by a
32 * collection.
33 */
35public:
36 /**
37 * The Objs of this collection
38 */
40
41 /**
42 * Default constructor setting up the necessary buffers
43 */
45
46 /**
47 * Constructor from existing I/O buffers
48 */
49 TruthinessCollectionData(podio::CollectionReadBuffers buffers, bool isSubsetColl);
50
51 /**
52 * Non copy-able, move-only class
53 */
58
59 /**
60 * Destructor
61 */
63
64 void clear(bool isSubsetColl);
65
66 podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl);
67
68 void prepareForWrite(bool isSubsetColl);
69
70 void prepareAfterRead(uint32_t collectionID);
71
73
75
76 bool setReferences(const podio::ICollectionProvider* collectionProvider, bool isSubsetColl);
77
78private:
79 // members to handle 1-to-N-relations
80 podio::UVecPtr<edm4eic::MCRecoParticleAssociation> m_rel_associations{std::make_unique<std::vector<edm4eic::MCRecoParticleAssociation>>()}; ///< Relation buffer for read / write
81 std::vector<podio::UVecPtr<edm4eic::MCRecoParticleAssociation>> m_rel_associations_tmp{}; ///< Relation buffer for internal book-keeping
82 podio::UVecPtr<edm4hep::MCParticle> m_rel_unassociatedMCParticles{std::make_unique<std::vector<edm4hep::MCParticle>>()}; ///< Relation buffer for read / write
83 std::vector<podio::UVecPtr<edm4hep::MCParticle>> m_rel_unassociatedMCParticles_tmp{}; ///< Relation buffer for internal book-keeping
84 podio::UVecPtr<edm4eic::ReconstructedParticle> m_rel_unassociatedRecoParticles{std::make_unique<std::vector<edm4eic::ReconstructedParticle>>()}; ///< Relation buffer for read / write
85 std::vector<podio::UVecPtr<edm4eic::ReconstructedParticle>> m_rel_unassociatedRecoParticles_tmp{}; ///< Relation buffer for internal book-keeping
86
87 // members to handle vector members
88 podio::UVecPtr<edm4eic::TruthinessContribution> m_vec_associationContributions{nullptr}; /// combined vector of all objects in collection
89 std::vector<podio::UVecPtr<edm4eic::TruthinessContribution>> m_vecs_associationContributions{}; /// pointers to individual member vectors
90
91 // I/O related buffers
92 podio::CollRefCollection m_refCollections{};
93 podio::VectorMembersInfo m_vecmem_info{};
94 std::unique_ptr<TruthinessDataContainer> m_data{nullptr};
95};
96
97
98} // namespace edm4eic
99
100
101#endif
bool setReferences(const podio::ICollectionProvider *collectionProvider, bool isSubsetColl)
Definition TruthinessCollectionData.cc:220
void prepareAfterRead(uint32_t collectionID)
Definition TruthinessCollectionData.cc:191
TruthinessCollectionData(const TruthinessCollectionData &)=delete
void prepareForWrite(bool isSubsetColl)
Definition TruthinessCollectionData.cc:129
TruthinessCollectionData & operator=(TruthinessCollectionData &&other)=default
void createRelations(TruthinessObj *obj)
Definition TruthinessCollectionData.cc:209
void clear(bool isSubsetColl)
Definition TruthinessCollectionData.cc:58
void makeSubsetCollection()
Definition TruthinessCollectionData.cc:281
TruthinessCollectionData & operator=(const TruthinessCollectionData &)=delete
TruthinessCollectionData()
Definition TruthinessCollectionData.cc:16
TruthinessObjPointerContainer entries
Definition TruthinessCollectionData.h:39
TruthinessCollectionData(TruthinessCollectionData &&other)=default
podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl)
Definition TruthinessCollectionData.cc:115
Definition TruthinessObj.h:23
Definition CalorimeterHit.cc:17
std::deque< TruthinessObj * > TruthinessObjPointerContainer
Definition TruthinessCollectionData.h:26
std::vector< TruthinessData > TruthinessDataContainer
Definition TruthinessCollectionData.h:27