EICd
EIC data model
EventInfoConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_ConstEventInfo_H
4 #define EICD_ConstEventInfo_H
5 
6 #include "eicd/EventInfoObj.h"
7 
8 #include "eicd/Weight.h"
9 #include "podio/ObjectID.h"
10 
11 
12 
13 namespace eic {
14 
15 
16 /** @class ConstEventInfo
17  * Event Info
18  * @author: W. Armstrong, S. Joosten
19  */
21 
22  friend class EventInfo;
23  friend class EventInfoCollection;
25 
26 public:
27  /// default constructor
29  ConstEventInfo(std::uint64_t run, std::uint64_t number, std::int32_t type, std::int32_t proc, std::int32_t source, eic::Weight weight);
30 
31  /// constructor from existing EventInfoObj
33 
34  /// copy constructor
35  ConstEventInfo(const ConstEventInfo& other);
36 
37  /// copy-assignment operator
39 
40  /// support cloning (deep-copy)
41  ConstEventInfo clone() const;
42 
43  /// destructor
45 
46 
47 public:
48 
49  /// Access the Run number.
50  const std::uint64_t& run() const;
51 
52  /// Access the Event number.
53  const std::uint64_t& number() const;
54 
55  /// Access the event type identifier (TBD).
56  const std::int32_t& type() const;
57 
58  /// Access the Process identifier (TBD).
59  const std::int32_t& proc() const;
60 
61  /// Access the Source/identifier (TBD)
62  const std::int32_t& source() const;
63 
64  /// Access the Optional event weight (useful for MC)
65  const eic::Weight& weight() const;
66 
67 
68 
69 
70 
71  /// check whether the object is actually available
72  bool isAvailable() const;
73  /// disconnect from EventInfoObj instance
74  void unlink() { m_obj = nullptr; }
75 
76  bool operator==(const ConstEventInfo& other) const { return m_obj == other.m_obj; }
77  bool operator==(const EventInfo& other) const;
78 
79  // less comparison operator, so that objects can be e.g. stored in sets.
80  bool operator<(const ConstEventInfo& other) const { return m_obj < other.m_obj; }
81 
82  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
83 
84  const podio::ObjectID getObjectID() const;
85 
86 private:
87  EventInfoObj* m_obj;
88 };
89 
90 } // namespace eic
91 
92 
93 #endif
eic::ConstEventInfo::operator=
ConstEventInfo & operator=(const ConstEventInfo &other)
copy-assignment operator
Definition: EventInfoConst.cc:34
eic::ConstEventInfo::source
const std::int32_t & source() const
Access the Source/identifier (TBD)
Definition: EventInfoConst.cc:55
eic::ConstEventInfo::id
unsigned int id() const
Definition: EventInfoConst.h:82
EventInfoObj.h
eic::ConstEventInfo::run
const std::uint64_t & run() const
Access the Run number.
Definition: EventInfoConst.cc:51
eic
Definition: BasicParticle.cc:13
eic::EventInfo
Definition: EventInfo.h:22
eic::ConstEventInfo::ConstEventInfo
ConstEventInfo()
default constructor
Definition: EventInfoConst.cc:16
eic::ConstEventInfo::number
const std::uint64_t & number() const
Access the Event number.
Definition: EventInfoConst.cc:52
eic::ConstEventInfo::clone
ConstEventInfo clone() const
support cloning (deep-copy)
Definition: EventInfoConst.cc:44
eic::ConstEventInfo::operator<
bool operator<(const ConstEventInfo &other) const
Definition: EventInfoConst.h:80
eic::ConstEventInfo::type
const std::int32_t & type() const
Access the event type identifier (TBD).
Definition: EventInfoConst.cc:53
eic::ConstEventInfo
Definition: EventInfoConst.h:20
eic::ConstEventInfo::getObjectID
const podio::ObjectID getObjectID() const
Definition: EventInfoConst.cc:70
eic::ConstEventInfo::proc
const std::int32_t & proc() const
Access the Process identifier (TBD).
Definition: EventInfoConst.cc:54
eic::Weight
Definition: Weight.h:11
eic::ConstEventInfo::weight
const eic::Weight & weight() const
Access the Optional event weight (useful for MC)
Definition: EventInfoConst.cc:56
Weight.h
eic::ConstEventInfo::unlink
void unlink()
disconnect from EventInfoObj instance
Definition: EventInfoConst.h:74
eic::EventInfoObj
Definition: EventInfoObj.h:18
eic::EventInfoConstCollectionIterator
Definition: EventInfoCollection.h:51
eic::ConstEventInfo::operator==
bool operator==(const ConstEventInfo &other) const
Definition: EventInfoConst.h:76
eic::EventInfoCollection
Definition: EventInfoCollection.h:76
eic::ConstEventInfo::~ConstEventInfo
~ConstEventInfo()
destructor
Definition: EventInfoConst.cc:48
eic::ConstEventInfo::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: EventInfoConst.cc:63