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
11#include "edm4hep/MCParticle.h"
12
13// schema evolution specific includes
14
15// podio specific includes
16#include "podio/CollectionBuffers.h"
17#include "podio/ICollectionProvider.h"
18
19#include <deque>
20#include <memory>
21
22namespace edm4eic {
23
24
25using TruthinessObjPointerContainer = std::deque<TruthinessObj*>;
26using TruthinessDataContainer = std::vector<TruthinessData>;
27
28
29/**
30 * Class encapsulating everything related to storage of data that is needed by a
31 * collection.
32 */
34public:
35 /**
36 * The Objs of this collection
37 */
39
40 /**
41 * Default constructor setting up the necessary buffers
42 */
44
45 /**
46 * Constructor from existing I/O buffers
47 */
48 TruthinessCollectionData(podio::CollectionReadBuffers buffers, bool isSubsetColl);
49
50 /**
51 * Non copy-able, move-only class
52 */
57
58 /**
59 * Destructor
60 */
62
63 void clear(bool isSubsetColl);
64
65 podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl);
66
67 void prepareForWrite(bool isSubsetColl);
68
69 void prepareAfterRead(uint32_t collectionID);
70
72
74
75 bool setReferences(const podio::ICollectionProvider* collectionProvider, bool isSubsetColl);
76
77private:
78 // members to handle 1-to-N-relations
79 podio::UVecPtr<edm4eic::MCRecoParticleAssociation> m_rel_associations; ///< Relation buffer for read / write
80 std::vector<podio::UVecPtr<edm4eic::MCRecoParticleAssociation>> m_rel_associations_tmp{}; ///< Relation buffer for internal book-keeping
81 podio::UVecPtr<edm4hep::MCParticle> m_rel_unassociatedMCParticles; ///< Relation buffer for read / write
82 std::vector<podio::UVecPtr<edm4hep::MCParticle>> m_rel_unassociatedMCParticles_tmp{}; ///< Relation buffer for internal book-keeping
83 podio::UVecPtr<edm4eic::ReconstructedParticle> m_rel_unassociatedRecoParticles; ///< Relation buffer for read / write
84 std::vector<podio::UVecPtr<edm4eic::ReconstructedParticle>> m_rel_unassociatedRecoParticles_tmp{}; ///< Relation buffer for internal book-keeping
85
86 // members to handle vector members
87 podio::UVecPtr<edm4eic::TruthinessContribution> m_vec_associationContributions{nullptr}; /// combined vector of all objects in collection
88 std::vector<podio::UVecPtr<edm4eic::TruthinessContribution>> m_vecs_associationContributions{}; /// pointers to individual member vectors
89
90 // I/O related buffers
91 podio::CollRefCollection m_refCollections{};
92 podio::VectorMembersInfo m_vecmem_info{};
93 std::unique_ptr<TruthinessDataContainer> m_data{nullptr};
94};
95
96
97} // namespace edm4eic
98
99
100#endif
bool setReferences(const podio::ICollectionProvider *collectionProvider, bool isSubsetColl)
Definition TruthinessCollectionData.cc:209
void prepareAfterRead(uint32_t collectionID)
Definition TruthinessCollectionData.cc:180
TruthinessCollectionData(const TruthinessCollectionData &)=delete
void prepareForWrite(bool isSubsetColl)
Definition TruthinessCollectionData.cc:118
TruthinessCollectionData & operator=(TruthinessCollectionData &&other)=default
void createRelations(TruthinessObj *obj)
Definition TruthinessCollectionData.cc:198
void clear(bool isSubsetColl)
Definition TruthinessCollectionData.cc:47
void makeSubsetCollection()
Definition TruthinessCollectionData.cc:270
TruthinessCollectionData & operator=(const TruthinessCollectionData &)=delete
TruthinessCollectionData()
Definition TruthinessCollectionData.cc:16
TruthinessObjPointerContainer entries
Definition TruthinessCollectionData.h:38
TruthinessCollectionData(TruthinessCollectionData &&other)=default
podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl)
Definition TruthinessCollectionData.cc:104
Definition TruthinessObj.h:23
Definition CalorimeterHit.cc:17
std::deque< TruthinessObj * > TruthinessObjPointerContainer
Definition TruthinessCollectionData.h:25
std::vector< TruthinessData > TruthinessDataContainer
Definition TruthinessCollectionData.h:26