Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-19 10:06:38

0001 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
0002 
0003 #ifndef ACTSPODIOEDM_MutableBoundParameters_H
0004 #define ACTSPODIOEDM_MutableBoundParameters_H
0005 
0006 #include "ActsPodioEdm/BoundParametersObj.h"
0007 // Make the immutable class available from its mutable version but not vice
0008 // versa
0009 #include "ActsPodioEdm/BoundParameters.h"
0010 #include "ActsPodioEdm/BoundParametersInfo.h"
0011 
0012 #include <cstdint>
0013 
0014 #include "podio/utilities/MaybeSharedPtr.h"
0015 
0016 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0017 #include "nlohmann/json_fwd.hpp"
0018 #endif
0019 
0020 // forward declarations
0021 namespace ActsPodioEdm {
0022 class BoundParametersCollection;
0023 }
0024 
0025 namespace ActsPodioEdm {
0026 
0027 /** @class MutableBoundParameters
0028  *  Local track parameters
0029  *  @author: Paul Gessinger, CERN
0030  */
0031 class MutableBoundParameters {
0032   friend class BoundParametersCollection;
0033   friend class BoundParametersMutableCollectionIterator;
0034   friend class BoundParameters;
0035 
0036  public:
0037   using object_type = BoundParameters;
0038   using collection_type = BoundParametersCollection;
0039 
0040   /// default constructor
0041   MutableBoundParameters() = default;
0042 
0043   /// Constructor initializing all members
0044   MutableBoundParameters(const ActsPodioEdm::BoundParametersInfo& data);
0045 
0046   /// copy constructor
0047   MutableBoundParameters(const MutableBoundParameters& other) noexcept =
0048       default;
0049 
0050   /// move constructor
0051   MutableBoundParameters(MutableBoundParameters&& other) noexcept = default;
0052 
0053   /// copy-assignment operator
0054   MutableBoundParameters& operator=(
0055       MutableBoundParameters
0056           other) &;  // Rebind this to other's internal object
0057   MutableBoundParameters& operator=(MutableBoundParameters other) && =
0058       delete;  // Prevent rebinding temporary as the changes wouldn't persist
0059 
0060   /// create a mutable deep-copy of the object with identical relations
0061   /// if cloneRelations=false, the relations are not cloned and will be empty
0062   MutableBoundParameters clone(bool cloneRelations = true) const;
0063 
0064   /// destructor
0065   ~MutableBoundParameters() = default;
0066 
0067  public:
0068   /// Access the parameter information
0069   const ActsPodioEdm::BoundParametersInfo& getData() const;
0070 
0071   /// Set the parameter information
0072   void setData(const ActsPodioEdm::BoundParametersInfo& data);
0073   /// Get mutable reference to parameter information
0074   ActsPodioEdm::BoundParametersInfo& getData();
0075 
0076   /// check whether the object is actually available
0077   bool isAvailable() const;
0078   /// disconnect from BoundParametersObj instance
0079   void unlink() {
0080     m_obj = podio::utils::MaybeSharedPtr<BoundParametersObj>{nullptr};
0081   }
0082 
0083   constexpr bool operator==(const MutableBoundParameters& other) const {
0084     return m_obj == other.m_obj;
0085   }
0086   bool operator==(const BoundParameters& other) const;
0087 
0088   constexpr bool operator!=(const MutableBoundParameters& other) const {
0089     return !(*this == other);
0090   }
0091   bool operator!=(const BoundParameters& other) const {
0092     return !(*this == other);
0093   }
0094 
0095   // less comparison operator, so that objects can be e.g. stored in sets.
0096   bool operator<(const MutableBoundParameters& other) const {
0097     return podio::detail::getOrderKey(*this) <
0098            podio::detail::getOrderKey(other);
0099   }
0100 
0101   podio::ObjectID id() const { return getObjectID(); }
0102 
0103   const podio::ObjectID getObjectID() const;
0104 
0105   friend std::hash<MutableBoundParameters>;
0106 
0107   friend void swap(MutableBoundParameters& a, MutableBoundParameters& b) {
0108     using std::swap;
0109     swap(a.m_obj, b.m_obj);  // swap out the internal pointers
0110   }
0111 
0112  private:
0113   /// constructor from existing BoundParametersObj
0114   explicit MutableBoundParameters(
0115       podio::utils::MaybeSharedPtr<BoundParametersObj> obj);
0116 
0117   podio::utils::MaybeSharedPtr<BoundParametersObj> m_obj{
0118       new BoundParametersObj{}, podio::utils::MarkOwned};
0119 };
0120 
0121 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0122 void to_json(nlohmann::json& j, const MutableBoundParameters& value);
0123 #endif
0124 
0125 }  // namespace ActsPodioEdm
0126 
0127 template <>
0128 struct std::hash<ActsPodioEdm::MutableBoundParameters> {
0129   std::size_t operator()(
0130       const ActsPodioEdm::MutableBoundParameters& obj) const {
0131     return std::hash<ActsPodioEdm::BoundParametersObj*>{}(obj.m_obj.get());
0132   }
0133 };
0134 
0135 #endif