EDM4eic
EIC data model
Loading...
Searching...
No Matches
TrackCollectionData.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_Track_CollectionData_H
4#define EDM4EIC_Track_CollectionData_H
5
6// datamodel specific includes
7#include "edm4eic/TrackData.h"
8#include "edm4eic/TrackObj.h"
10#include "edm4eic/Trajectory.h"
11
12// schema evolution specific includes
13
14// podio specific includes
15#include "podio/CollectionBuffers.h"
16#include "podio/ICollectionProvider.h"
17
18#include <deque>
19#include <memory>
20
21namespace edm4eic {
22
23
24using TrackObjPointerContainer = std::deque<TrackObj*>;
25using TrackDataContainer = std::vector<TrackData>;
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 * Constructor from existing I/O buffers
46 */
47 TrackCollectionData(podio::CollectionReadBuffers buffers, bool isSubsetColl);
48
49 /**
50 * Non copy-able, move-only class
51 */
56
57 /**
58 * Deconstructor
59 */
61
62 void clear(bool isSubsetColl);
63
64 podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl);
65
66 void prepareForWrite(bool isSubsetColl);
67
68 void prepareAfterRead(uint32_t collectionID);
69
71
72 void createRelations(TrackObj* obj);
73
74 bool setReferences(const podio::ICollectionProvider* collectionProvider, bool isSubsetColl);
75
76private:
77 // members to handle 1-to-N-relations
78 podio::UVecPtr<edm4eic::Measurement2D> m_rel_measurements; ///< Relation buffer for read / write
79 std::vector<podio::UVecPtr<edm4eic::Measurement2D>> m_rel_measurements_tmp{}; ///< Relation buffer for internal book-keeping
80 podio::UVecPtr<edm4eic::Track> m_rel_tracks; ///< Relation buffer for read / write
81 std::vector<podio::UVecPtr<edm4eic::Track>> m_rel_tracks_tmp{}; ///< Relation buffer for internal book-keeping
82 podio::UVecPtr<edm4eic::Trajectory> m_rel_trajectory{nullptr}; ///< 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<TrackDataContainer> m_data{nullptr};
90};
91
92
93} // namespace edm4eic
94
95
96#endif
Definition TrackCollectionData.h:32
TrackCollectionData(const TrackCollectionData &)=delete
bool setReferences(const podio::ICollectionProvider *collectionProvider, bool isSubsetColl)
Definition TrackCollectionData.cc:167
void prepareForWrite(bool isSubsetColl)
Definition TrackCollectionData.cc:94
TrackCollectionData & operator=(const TrackCollectionData &)=delete
TrackCollectionData & operator=(TrackCollectionData &&other)=default
void makeSubsetCollection()
Definition TrackCollectionData.cc:233
podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl)
Definition TrackCollectionData.cc:85
void clear(bool isSubsetColl)
Definition TrackCollectionData.cc:40
void prepareAfterRead(uint32_t collectionID)
Definition TrackCollectionData.cc:144
TrackCollectionData(TrackCollectionData &&other)=default
TrackObjPointerContainer entries
Definition TrackCollectionData.h:37
TrackCollectionData()
Definition TrackCollectionData.cc:12
void createRelations(TrackObj *obj)
Definition TrackCollectionData.cc:160
Definition TrackObj.h:23
Definition CalorimeterHit.cc:18
std::vector< TrackData > TrackDataContainer
Definition TrackCollectionData.h:25
std::deque< TrackObj * > TrackObjPointerContainer
Definition TrackCollectionData.h:24