Warning, file /include/edm4eic/ReconstructedParticleCollectionData.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003 #ifndef EDM4EIC_ReconstructedParticle_CollectionData_H
0004 #define EDM4EIC_ReconstructedParticle_CollectionData_H
0005
0006
0007 #include "edm4eic/ReconstructedParticleData.h"
0008 #include "edm4eic/ReconstructedParticleObj.h"
0009 #include "edm4eic/ReconstructedParticle.h"
0010 #include "edm4eic/Cluster.h"
0011 #include "edm4eic/Track.h"
0012 #include "edm4eic/Vertex.h"
0013 #include "edm4hep/ParticleID.h"
0014
0015
0016
0017
0018 #include "podio/CollectionBuffers.h"
0019 #include "podio/ICollectionProvider.h"
0020
0021 #include <deque>
0022 #include <memory>
0023
0024 namespace edm4eic {
0025
0026
0027 using ReconstructedParticleObjPointerContainer = std::deque<ReconstructedParticleObj*>;
0028 using ReconstructedParticleDataContainer = std::vector<ReconstructedParticleData>;
0029
0030
0031
0032
0033
0034
0035 class ReconstructedParticleCollectionData {
0036 public:
0037
0038
0039
0040 ReconstructedParticleObjPointerContainer entries{};
0041
0042
0043
0044
0045 ReconstructedParticleCollectionData();
0046
0047
0048
0049
0050 ReconstructedParticleCollectionData(podio::CollectionReadBuffers buffers, bool isSubsetColl);
0051
0052
0053
0054
0055 ReconstructedParticleCollectionData(const ReconstructedParticleCollectionData&) = delete;
0056 ReconstructedParticleCollectionData& operator=(const ReconstructedParticleCollectionData&) = delete;
0057 ReconstructedParticleCollectionData(ReconstructedParticleCollectionData&& other) = default;
0058 ReconstructedParticleCollectionData& operator=(ReconstructedParticleCollectionData&& other) = default;
0059
0060
0061
0062
0063 ~ReconstructedParticleCollectionData() = default;
0064
0065 void clear(bool isSubsetColl);
0066
0067 podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl);
0068
0069 void prepareForWrite(bool isSubsetColl);
0070
0071 void prepareAfterRead(uint32_t collectionID);
0072
0073 void makeSubsetCollection();
0074
0075 void createRelations(ReconstructedParticleObj* obj);
0076
0077 bool setReferences(const podio::ICollectionProvider* collectionProvider, bool isSubsetColl);
0078
0079 private:
0080
0081 podio::UVecPtr<edm4eic::Cluster> m_rel_clusters{std::make_unique<std::vector<edm4eic::Cluster>>()};
0082 std::vector<podio::UVecPtr<edm4eic::Cluster>> m_rel_clusters_tmp{};
0083 podio::UVecPtr<edm4eic::Track> m_rel_tracks{std::make_unique<std::vector<edm4eic::Track>>()};
0084 std::vector<podio::UVecPtr<edm4eic::Track>> m_rel_tracks_tmp{};
0085 podio::UVecPtr<edm4eic::ReconstructedParticle> m_rel_particles{std::make_unique<std::vector<edm4eic::ReconstructedParticle>>()};
0086 std::vector<podio::UVecPtr<edm4eic::ReconstructedParticle>> m_rel_particles_tmp{};
0087 podio::UVecPtr<edm4hep::ParticleID> m_rel_particleIDs{std::make_unique<std::vector<edm4hep::ParticleID>>()};
0088 std::vector<podio::UVecPtr<edm4hep::ParticleID>> m_rel_particleIDs_tmp{};
0089 podio::UVecPtr<edm4eic::Vertex> m_rel_startVertex{std::make_unique<std::vector<edm4eic::Vertex>>()};
0090 podio::UVecPtr<edm4hep::ParticleID> m_rel_particleIDUsed{std::make_unique<std::vector<edm4hep::ParticleID>>()};
0091
0092
0093
0094
0095 podio::CollRefCollection m_refCollections{};
0096 podio::VectorMembersInfo m_vecmem_info{};
0097 std::unique_ptr<ReconstructedParticleDataContainer> m_data{nullptr};
0098 };
0099
0100
0101 }
0102
0103
0104 #endif