File indexing completed on 2025-07-06 08:07:38
0001
0002
0003 #ifndef ACTSPODIOEDM_MutableBoundParameters_H
0004 #define ACTSPODIOEDM_MutableBoundParameters_H
0005
0006 #include "ActsPodioEdm/BoundParametersObj.h"
0007
0008
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
0021 namespace ActsPodioEdm {
0022 class BoundParametersCollection;
0023 }
0024
0025 namespace ActsPodioEdm {
0026
0027
0028
0029
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
0041 MutableBoundParameters();
0042
0043
0044 MutableBoundParameters(ActsPodioEdm::BoundParametersInfo data);
0045
0046
0047 MutableBoundParameters(const MutableBoundParameters& other) = default;
0048
0049
0050 MutableBoundParameters& operator=(MutableBoundParameters other);
0051
0052
0053
0054 MutableBoundParameters clone(bool cloneRelations = true) const;
0055
0056
0057 ~MutableBoundParameters() = default;
0058
0059 public:
0060
0061 const ActsPodioEdm::BoundParametersInfo& getData() const;
0062
0063
0064 void setData(ActsPodioEdm::BoundParametersInfo value);
0065
0066 ActsPodioEdm::BoundParametersInfo& getData();
0067
0068 [[deprecated("use getData instead")]] ActsPodioEdm::BoundParametersInfo&
0069 data();
0070
0071
0072 bool isAvailable() const;
0073
0074 void unlink() {
0075 m_obj = podio::utils::MaybeSharedPtr<BoundParametersObj>{nullptr};
0076 }
0077
0078 bool operator==(const MutableBoundParameters& other) const {
0079 return m_obj == other.m_obj;
0080 }
0081 bool operator==(const BoundParameters& other) const;
0082
0083 bool operator!=(const MutableBoundParameters& other) const {
0084 return !(*this == other);
0085 }
0086 bool operator!=(const BoundParameters& other) const {
0087 return !(*this == other);
0088 }
0089
0090
0091 bool operator<(const MutableBoundParameters& other) const {
0092 return podio::detail::getOrderKey(*this) <
0093 podio::detail::getOrderKey(other);
0094 }
0095
0096 podio::ObjectID id() const { return getObjectID(); }
0097
0098 const podio::ObjectID getObjectID() const;
0099
0100 friend void swap(MutableBoundParameters& a, MutableBoundParameters& b) {
0101 using std::swap;
0102 swap(a.m_obj, b.m_obj);
0103 }
0104
0105 private:
0106
0107 explicit MutableBoundParameters(
0108 podio::utils::MaybeSharedPtr<BoundParametersObj> obj);
0109
0110 podio::utils::MaybeSharedPtr<BoundParametersObj> m_obj{nullptr};
0111 };
0112
0113 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0114 void to_json(nlohmann::json& j, const MutableBoundParameters& value);
0115 #endif
0116
0117 }
0118
0119 #endif