Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-30 07:57:06

0001 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
0002 
0003 #ifndef ACTSPODIOEDM_Measurement_CollectionData_H
0004 #define ACTSPODIOEDM_Measurement_CollectionData_H
0005 
0006 // datamodel specific includes
0007 #include "ActsPodioEdm/Measurement.h"
0008 #include "ActsPodioEdm/MeasurementData.h"
0009 #include "ActsPodioEdm/MeasurementObj.h"
0010 
0011 #include "edm4hep/SimTrackerHit.h"
0012 
0013 // schema evolution specific includes
0014 
0015 // podio specific includes
0016 #include <deque>
0017 #include <memory>
0018 
0019 #include "podio/CollectionBuffers.h"
0020 #include "podio/ICollectionProvider.h"
0021 
0022 namespace ActsPodioEdm {
0023 
0024 using MeasurementObjPointerContainer = std::deque<MeasurementObj*>;
0025 using MeasurementDataContainer = std::vector<MeasurementData>;
0026 
0027 /**
0028  * Class encapsulating everything related to storage of data that is needed by a
0029  * collection.
0030  */
0031 class MeasurementCollectionData {
0032  public:
0033   /**
0034    * The Objs of this collection
0035    */
0036   MeasurementObjPointerContainer entries{};
0037 
0038   /**
0039    * Default constructor setting up the necessary buffers
0040    */
0041   MeasurementCollectionData();
0042 
0043   /**
0044    * Constructor from existing I/O buffers
0045    */
0046   MeasurementCollectionData(podio::CollectionReadBuffers buffers,
0047                             bool isSubsetColl);
0048 
0049   /**
0050    * Non copy-able, move-only class
0051    */
0052   MeasurementCollectionData(const MeasurementCollectionData&) = delete;
0053   MeasurementCollectionData& operator=(const MeasurementCollectionData&) =
0054       delete;
0055   MeasurementCollectionData(MeasurementCollectionData&& other) = default;
0056   MeasurementCollectionData& operator=(MeasurementCollectionData&& other) =
0057       default;
0058 
0059   /**
0060    * Destructor
0061    */
0062   ~MeasurementCollectionData() = default;
0063 
0064   void clear(bool isSubsetColl);
0065 
0066   podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl);
0067 
0068   void prepareForWrite(bool isSubsetColl);
0069 
0070   void prepareAfterRead(uint32_t collectionID);
0071 
0072   void makeSubsetCollection();
0073 
0074   void createRelations(MeasurementObj* obj);
0075 
0076   bool setReferences(const podio::ICollectionProvider* collectionProvider,
0077                      bool isSubsetColl);
0078 
0079  private:
0080   // members to handle 1-to-N-relations
0081   podio::UVecPtr<edm4hep::SimTrackerHit> m_rel_simHit{std::make_unique<
0082       std::vector<edm4hep::SimTrackerHit>>()};  ///< Relation buffer for read /
0083                                                 ///< write
0084 
0085   // members to handle vector members
0086   podio::UVecPtr<std::uint16_t> m_vec_indices{
0087       nullptr};  /// combined vector of all objects in collection
0088   std::vector<podio::UVecPtr<std::uint16_t>>
0089       m_vecs_indices{};  /// pointers to individual member vectors
0090   podio::UVecPtr<double> m_vec_parameterValues{
0091       nullptr};  /// combined vector of all objects in collection
0092   std::vector<podio::UVecPtr<double>>
0093       m_vecs_parameterValues{};  /// pointers to individual member vectors
0094   podio::UVecPtr<double> m_vec_covarianceValues{
0095       nullptr};  /// combined vector of all objects in collection
0096   std::vector<podio::UVecPtr<double>>
0097       m_vecs_covarianceValues{};  /// pointers to individual member vectors
0098 
0099   // I/O related buffers
0100   podio::CollRefCollection m_refCollections{};
0101   podio::VectorMembersInfo m_vecmem_info{};
0102   std::unique_ptr<MeasurementDataContainer> m_data{nullptr};
0103 };
0104 
0105 }  // namespace ActsPodioEdm
0106 
0107 #endif