PODIO v00-16-03
An Event-Data-Model Toolkit for High Energy Physics Experiments
Loading...
Searching...
No Matches
ObjectID.h
Go to the documentation of this file.
1#ifndef PODIO_OBJECTID_H
2#define PODIO_OBJECTID_H
3
4namespace podio {
5
6class ObjectID {
7
8public:
9 /// index of object in collection
10 int index;
11 /// ID of the collection
13
14 /// not part of a collection
15 static const int untracked = -1;
16 /// invalid or non-available object
17 static const int invalid = -2;
18
19 /// index and collectionID uniquely defines the object.
20 /// this operator is necessary for meaningful comparisons in python
21 bool operator==(const ObjectID& other) const {
22 return index == other.index && collectionID == other.collectionID;
23 }
24};
25
26} // namespace podio
27
28#endif
static const int invalid
invalid or non-available object
Definition: ObjectID.h:17
bool operator==(const ObjectID &other) const
Definition: ObjectID.h:21
int index
index of object in collection
Definition: ObjectID.h:10
static const int untracked
not part of a collection
Definition: ObjectID.h:15
int collectionID
ID of the collection.
Definition: ObjectID.h:12