EICd
EIC data model
MergedClusterRelationsConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_ConstMergedClusterRelations_H
4 #define EICD_ConstMergedClusterRelations_H
5 
7 
8 #include "eicd/Index.h"
9 #include <array>
10 #include "podio/ObjectID.h"
11 
12 
13 
14 namespace eic {
15 
16 
17 /** @class ConstMergedClusterRelations
18  * Relational info between a merged cluster and its parents
19  * @author: S. Joosten
20  */
22 
23  friend class MergedClusterRelations;
26 
27 public:
28  /// default constructor
30  ConstMergedClusterRelations(eic::Index clusterID, std::uint32_t size, std::array<eic::Index, 4> parent);
31 
32  /// constructor from existing MergedClusterRelationsObj
34 
35  /// copy constructor
37 
38  /// copy-assignment operator
40 
41  /// support cloning (deep-copy)
43 
44  /// destructor
46 
47 
48 public:
49 
50  /// Access the associated cluster ID
51  const eic::Index& clusterID() const;
52 
53  /// Access the number of valid parents
54  const std::uint32_t& size() const;
55 
56  /// Access the (up to 4) parents for this cluster
57  const std::array<eic::Index, 4>& parent() const;
58  /// Access item i of the (up to 4) parents for this cluster
59  const eic::Index& parent(size_t i) const;
60 
61 
62 
63 
64  /// check whether the object is actually available
65  bool isAvailable() const;
66  /// disconnect from MergedClusterRelationsObj instance
67  void unlink() { m_obj = nullptr; }
68 
69  bool operator==(const ConstMergedClusterRelations& other) const { return m_obj == other.m_obj; }
70  bool operator==(const MergedClusterRelations& other) const;
71 
72  // less comparison operator, so that objects can be e.g. stored in sets.
73  bool operator<(const ConstMergedClusterRelations& other) const { return m_obj < other.m_obj; }
74 
75  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
76 
77  const podio::ObjectID getObjectID() const;
78 
79 private:
81 };
82 
83 } // namespace eic
84 
85 
86 #endif
eic::ConstMergedClusterRelations::operator=
ConstMergedClusterRelations & operator=(const ConstMergedClusterRelations &other)
copy-assignment operator
Definition: MergedClusterRelationsConst.cc:31
eic::Index
Definition: Index.h:11
eic::ConstMergedClusterRelations::operator==
bool operator==(const ConstMergedClusterRelations &other) const
Definition: MergedClusterRelationsConst.h:69
eic::ConstMergedClusterRelations::getObjectID
const podio::ObjectID getObjectID() const
Definition: MergedClusterRelationsConst.cc:65
eic::MergedClusterRelations
Definition: MergedClusterRelations.h:23
eic::ConstMergedClusterRelations::parent
const std::array< eic::Index, 4 > & parent() const
Access the (up to 4) parents for this cluster.
Definition: MergedClusterRelationsConst.cc:50
eic::ConstMergedClusterRelations::clone
ConstMergedClusterRelations clone() const
support cloning (deep-copy)
Definition: MergedClusterRelationsConst.cc:41
eic
Definition: BasicParticle.cc:13
eic::ConstMergedClusterRelations::clusterID
const eic::Index & clusterID() const
Access the associated cluster ID.
Definition: MergedClusterRelationsConst.cc:48
eic::ConstMergedClusterRelations::unlink
void unlink()
disconnect from MergedClusterRelationsObj instance
Definition: MergedClusterRelationsConst.h:67
MergedClusterRelationsObj.h
eic::MergedClusterRelationsObj
Definition: MergedClusterRelationsObj.h:18
eic::ConstMergedClusterRelations::ConstMergedClusterRelations
ConstMergedClusterRelations()
default constructor
Definition: MergedClusterRelationsConst.cc:16
eic::ConstMergedClusterRelations::size
const std::uint32_t & size() const
Access the number of valid parents.
Definition: MergedClusterRelationsConst.cc:49
eic::ConstMergedClusterRelations::~ConstMergedClusterRelations
~ConstMergedClusterRelations()
destructor
Definition: MergedClusterRelationsConst.cc:45
eic::ConstMergedClusterRelations::id
unsigned int id() const
Definition: MergedClusterRelationsConst.h:75
eic::ConstMergedClusterRelations::operator<
bool operator<(const ConstMergedClusterRelations &other) const
Definition: MergedClusterRelationsConst.h:73
eic::MergedClusterRelationsConstCollectionIterator
Definition: MergedClusterRelationsCollection.h:51
eic::ConstMergedClusterRelations::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: MergedClusterRelationsConst.cc:58
eic::MergedClusterRelationsCollection
Definition: MergedClusterRelationsCollection.h:76
Index.h
eic::ConstMergedClusterRelations
Definition: MergedClusterRelationsConst.h:21