AnalysisTree
Toggle main menu visibility
Loading...
Searching...
No Matches
core
IndexedObject.hpp
1
/* Copyright (C) 2019-2021 GSI, MEPhI
2
SPDX-License-Identifier: GPL-3.0-only
3
Authors: Eugeny Kashirin, Ilya Selyuzhenkov */
4
#ifndef ANALYSISTREE_INDEXEDOBJECT_H
5
#define ANALYSISTREE_INDEXEDOBJECT_H
6
7
#include "Constants.hpp"
8
#include <TObject.h>
9
10
namespace
AnalysisTree
{
11
12
class
IndexedObject
;
13
18
class
IndexAccessor
{
19
20
public
:
21
static
void
InitIndexedObject(
IndexedObject
* indexedObject,
size_t
newID);
22
};
23
30
class
IndexedObject {
31
public
:
32
IndexedObject() =
default
;
//, id_(-1) {}
33
39
explicit
IndexedObject
(
size_t
id
) : id_(id) {}
40
46
IndexedObject
(
const
IndexedObject& indexedObject) =
default
;
47
IndexedObject(IndexedObject&& indexedObject) =
default
;
48
IndexedObject& operator=(IndexedObject&&) =
default
;
49
IndexedObject& operator=(
const
IndexedObject& indexedObject) =
default
;
50
virtual
~IndexedObject() =
default
;
51
52
ANALYSISTREE_ATTR_NODISCARD
inline
size_t
GetId()
const
{
53
return
id_;
54
}
55
56
friend
bool
operator==(
const
IndexedObject
& that,
const
IndexedObject
& other) {
57
if
(&that == &other) {
58
return
true
;
59
}
60
61
return
that.id_ == other.id_;
62
}
63
64
friend
bool
operator!=(
const
IndexedObject& that,
const
IndexedObject& other) {
65
return
!(that == other);
66
}
67
68
private
:
69
friend
class
IndexAccessor;
70
71
size_t
id_{0};
72
73
ClassDef(IndexedObject, 2)
74
};
75
76
}
// namespace AnalysisTree
77
78
#endif
//ANALYSISTREE_INDEXEDOBJECT_H
AnalysisTree::IndexAccessor
Definition
IndexedObject.hpp:18
AnalysisTree::IndexedObject
Definition
IndexedObject.hpp:30
AnalysisTree::IndexedObject::IndexedObject
IndexedObject(size_t id)
Definition
IndexedObject.hpp:39
AnalysisTree::IndexedObject::IndexedObject
IndexedObject(const IndexedObject &indexedObject)=default
AnalysisTree
Cuts keep list of SimpleCuts. Logical AND is applied for all SimpleCut in the Cuts object.
Definition
BranchConfig.cpp:10
Generated by
1.17.0