Back to home page

EIC code displayed by LXR

 
 

    


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 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
0002 
0003 #ifndef EDM4EIC_ReconstructedParticle_CollectionData_H
0004 #define EDM4EIC_ReconstructedParticle_CollectionData_H
0005 
0006 // datamodel specific includes
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 // schema evolution specific includes
0016 
0017 // podio specific includes
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  * Class encapsulating everything related to storage of data that is needed by a
0033  * collection.
0034  */
0035 class ReconstructedParticleCollectionData {
0036 public:
0037   /**
0038    * The Objs of this collection
0039    */
0040   ReconstructedParticleObjPointerContainer entries{};
0041 
0042   /**
0043    * Default constructor setting up the necessary buffers
0044    */
0045   ReconstructedParticleCollectionData();
0046 
0047   /**
0048    * Constructor from existing I/O buffers
0049    */
0050   ReconstructedParticleCollectionData(podio::CollectionReadBuffers buffers, bool isSubsetColl);
0051 
0052   /**
0053    * Non copy-able, move-only class
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    * Destructor
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   // members to handle 1-to-N-relations
0081   podio::UVecPtr<edm4eic::Cluster> m_rel_clusters{std::make_unique<std::vector<edm4eic::Cluster>>()}; ///< Relation buffer for read / write
0082   std::vector<podio::UVecPtr<edm4eic::Cluster>> m_rel_clusters_tmp{}; ///< Relation buffer for internal book-keeping
0083   podio::UVecPtr<edm4eic::Track> m_rel_tracks{std::make_unique<std::vector<edm4eic::Track>>()}; ///< Relation buffer for read / write
0084   std::vector<podio::UVecPtr<edm4eic::Track>> m_rel_tracks_tmp{}; ///< Relation buffer for internal book-keeping
0085   podio::UVecPtr<edm4eic::ReconstructedParticle> m_rel_particles{std::make_unique<std::vector<edm4eic::ReconstructedParticle>>()}; ///< Relation buffer for read / write
0086   std::vector<podio::UVecPtr<edm4eic::ReconstructedParticle>> m_rel_particles_tmp{}; ///< Relation buffer for internal book-keeping
0087   podio::UVecPtr<edm4hep::ParticleID> m_rel_particleIDs{std::make_unique<std::vector<edm4hep::ParticleID>>()}; ///< Relation buffer for read / write
0088   std::vector<podio::UVecPtr<edm4hep::ParticleID>> m_rel_particleIDs_tmp{}; ///< Relation buffer for internal book-keeping
0089   podio::UVecPtr<edm4eic::Vertex> m_rel_startVertex{std::make_unique<std::vector<edm4eic::Vertex>>()}; ///< Relation buffer for read / write
0090   podio::UVecPtr<edm4hep::ParticleID> m_rel_particleIDUsed{std::make_unique<std::vector<edm4hep::ParticleID>>()}; ///< Relation buffer for read / write
0091 
0092   // members to handle vector members
0093 
0094   // I/O related buffers
0095   podio::CollRefCollection m_refCollections{};
0096   podio::VectorMembersInfo m_vecmem_info{};
0097   std::unique_ptr<ReconstructedParticleDataContainer> m_data{nullptr};
0098 };
0099 
0100 
0101 } // namespace edm4eic
0102 
0103 
0104 #endif