#include <ObjBase.h>
Definition at line 10 of file ObjBase.h.
◆ ObjBase()
podio::ObjBase::ObjBase |
( |
ObjectID |
id_, |
|
|
unsigned |
i |
|
) |
| |
|
inline |
Constructor from ObjectID and initial object-count.
Definition at line 13 of file ObjBase.h.
13 :
id(id_), ref_counter(i) {
14 }
podio::ObjectID id
ID of the object.
◆ ~ObjBase()
virtual podio::ObjBase::~ObjBase |
( |
| ) |
|
|
virtualdefault |
◆ acquire()
void podio::ObjBase::acquire |
( |
| ) |
|
|
inline |
checks whether object is "untracked" by a collection if yes, increases reference count
Definition at line 18 of file ObjBase.h.
18 {
20 ++ref_counter;
21 }
22 };
static const int untracked
not part of a collection
◆ release()
int podio::ObjBase::release |
( |
| ) |
|
|
inline |
checks whether object is "untracked" by a collection if yes, decrease reference count and delete itself if count===0
Definition at line 26 of file ObjBase.h.
26 {
28 return 1;
29 };
30 if (--ref_counter == 0) {
31 delete this;
32 }
33 return 0;
34 };
◆ id
ID of the object.
Definition at line 41 of file ObjBase.h.
The documentation for this class was generated from the following file: