Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:28:05

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 namespace ActsPodioEdm {
0021 
0022 /** @class MutableBoundParameters
0023  *  Local track parameters
0024  *  @author: Paul Gessinger, CERN
0025  */
0026 class MutableBoundParameters {
0027   friend class BoundParametersCollection;
0028   friend class BoundParametersMutableCollectionIterator;
0029   friend class BoundParameters;
0030 
0031  public:
0032   using object_type = BoundParameters;
0033   using collection_type = BoundParametersCollection;
0034 
0035   /// default constructor
0036   MutableBoundParameters();
0037 
0038   /// Constructor initializing all members
0039   MutableBoundParameters(ActsPodioEdm::BoundParametersInfo data);
0040 
0041   /// copy constructor
0042   MutableBoundParameters(const MutableBoundParameters& other) = default;
0043 
0044   /// copy-assignment operator
0045   MutableBoundParameters& operator=(MutableBoundParameters other);
0046 
0047   /// create a mutable deep-copy of the object with identical relations
0048   /// if cloneRelations=false, the relations are not cloned and will be empty
0049   MutableBoundParameters clone(bool cloneRelations = true) const;
0050 
0051   /// destructor
0052   ~MutableBoundParameters() = default;
0053 
0054  public:
0055   /// Access the parameter information
0056   const ActsPodioEdm::BoundParametersInfo& getData() const;
0057 
0058   /// Set the parameter information
0059   void setData(ActsPodioEdm::BoundParametersInfo value);
0060   /// Get mutable reference to parameter information
0061   ActsPodioEdm::BoundParametersInfo& getData();
0062   /// Get reference to parameter information
0063   [[deprecated("use getData instead")]] ActsPodioEdm::BoundParametersInfo&
0064   data();
0065 
0066   /// check whether the object is actually available
0067   bool isAvailable() const;
0068   /// disconnect from BoundParametersObj instance
0069   void unlink() {
0070     m_obj = podio::utils::MaybeSharedPtr<BoundParametersObj>{nullptr};
0071   }
0072 
0073   bool operator==(const MutableBoundParameters& other) const {
0074     return m_obj == other.m_obj;
0075   }
0076   bool operator==(const BoundParameters& other) const;
0077 
0078   bool operator!=(const MutableBoundParameters& other) const {
0079     return !(*this == other);
0080   }
0081   bool operator!=(const BoundParameters& other) const {
0082     return !(*this == other);
0083   }
0084 
0085   // less comparison operator, so that objects can be e.g. stored in sets.
0086   bool operator<(const MutableBoundParameters& other) const {
0087     return m_obj < other.m_obj;
0088   }
0089 
0090   podio::ObjectID id() const { return getObjectID(); }
0091 
0092   const podio::ObjectID getObjectID() const;
0093 
0094   friend void swap(MutableBoundParameters& a, MutableBoundParameters& b) {
0095     using std::swap;
0096     swap(a.m_obj, b.m_obj);  // swap out the internal pointers
0097   }
0098 
0099  private:
0100   /// constructor from existing BoundParametersObj
0101   explicit MutableBoundParameters(
0102       podio::utils::MaybeSharedPtr<BoundParametersObj> obj);
0103 
0104   podio::utils::MaybeSharedPtr<BoundParametersObj> m_obj{nullptr};
0105 };
0106 
0107 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0108 void to_json(nlohmann::json& j, const MutableBoundParameters& value);
0109 #endif
0110 
0111 }  // namespace ActsPodioEdm
0112 
0113 #endif