EICd
EIC data model
TrackCollectionData.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EICD_Track_CollectionData_H
4#define EICD_Track_CollectionData_H
5
6// datamodel specific includes
7#include "eicd/TrackData.h"
8#include "eicd/TrackObj.h"
10#include "eicd/TrackerHit.h"
11
12// podio specific includes
13#include "podio/CollectionBuffers.h"
14#include "podio/ICollectionProvider.h"
15
16#include <deque>
17#include <memory>
18
19namespace eicd {
20
21
22using TrackObjPointerContainer = std::deque<TrackObj*>;
23using TrackDataContainer = std::vector<TrackData>;
24
25
26/**
27 * Class encapsulating everything related to storage of data that is needed by a
28 * collection.
29 */
31public:
32 /**
33 * The Objs of this collection
34 */
36
37 /**
38 * Default constructor setting up the necessary buffers
39 */
41
42 /**
43 * Non copy-able, move-only class
44 */
49
50 /**
51 * Deconstructor
52 */
54
55 void clear(bool isSubsetColl);
56
57 podio::CollectionBuffers getCollectionBuffers(bool isSubsetColl);
58
59 void prepareForWrite(bool isSubsetColl);
60
61 void prepareAfterRead(int collectionID);
62
64
65 void createRelations(TrackObj* obj);
66
67 bool setReferences(const podio::ICollectionProvider* collectionProvider, bool isSubsetColl);
68
69private:
70 // members to handle 1-to-N-relations
71 podio::UVecPtr<eicd::TrackParameters> m_rel_parameters; ///< Relation buffer for read / write
72 std::vector<podio::UVecPtr<eicd::TrackParameters>> m_rel_parameters_tmp{}; ///< Relation buffer for internal book-keeping
73 podio::UVecPtr<eicd::TrackerHit> m_rel_trackerHits; ///< Relation buffer for read / write
74 std::vector<podio::UVecPtr<eicd::TrackerHit>> m_rel_trackerHits_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
78 // members to handle vector members
79
80 // I/O related buffers
81 podio::CollRefCollection m_refCollections{};
82 podio::VectorMembersInfo m_vecmem_info{};
83 std::unique_ptr<TrackDataContainer> m_data{nullptr};
84};
85
86
87} // namespace eicd
88
89
90#endif
Definition: TrackCollectionData.h:30
TrackCollectionData(const TrackCollectionData &)=delete
void createRelations(TrackObj *obj)
Definition: TrackCollectionData.cc:152
podio::CollectionBuffers getCollectionBuffers(bool isSubsetColl)
Definition: TrackCollectionData.cc:74
void clear(bool isSubsetColl)
Definition: TrackCollectionData.cc:22
void prepareForWrite(bool isSubsetColl)
Definition: TrackCollectionData.cc:82
TrackCollectionData(TrackCollectionData &&other)=default
TrackCollectionData()
Definition: TrackCollectionData.cc:12
void makeSubsetCollection()
Definition: TrackCollectionData.cc:228
TrackCollectionData & operator=(TrackCollectionData &&other)=default
TrackCollectionData & operator=(const TrackCollectionData &)=delete
bool setReferences(const podio::ICollectionProvider *collectionProvider, bool isSubsetColl)
Definition: TrackCollectionData.cc:161
void prepareAfterRead(int collectionID)
Definition: TrackCollectionData.cc:135
TrackObjPointerContainer entries
Definition: TrackCollectionData.h:35
Definition: TrackObj.h:20
Definition: CalorimeterHit.cc:13
std::deque< TrackObj * > TrackObjPointerContainer
Definition: TrackCollectionData.h:22
std::vector< TrackData > TrackDataContainer
Definition: TrackCollectionData.h:23