ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigMonitoring
TrigIDR4Monitoring
src
ParentView.h
Go to the documentation of this file.
1
/* emacs: this is -*- c++ -*- */
15
16
17
#ifndef TRIGIDR4MONITORING_PARENTVIEW_H
18
#define TRIGIDR4MONITORING_PARENTVIEW_H
19
20
#include "
ChildView.h
"
21
#include "
TrackView.h
"
22
23
#include <vector>
24
#include <iostream>
25
26
31
32
class
ParentView
:
public
TrackView
{
33
34
public
:
35
36
template
<
typename
T>
37
ParentView
(
const
T* pobj) :
TrackView
( pobj ) {
addChildren
(); }
38
39
ParentView
(
const
ParentView
& t ) =
default
;
40
41
ParentView
(
const
ParentView
* ) =
delete
;
// don't want implicitly creating a ParentView with an internal ParentView*
42
ParentView
(
ParentView
* ) =
delete
;
43
44
bool
isComposite
()
const override
{
return
true
; }
45
46
bool
hasChildren
()
const override
{
return
m_children
.size()>0; }
47
48
size_t
childCount
()
const override
{
return
m_children
.size(); }
49
50
const
TrackView
*
child
(
size_t
i)
const override
{
return
&
m_children
[i]; }
51
52
std::vector<ChildView>::const_iterator
begin
()
const
{
return
m_children
.begin(); }
53
std::vector<ChildView>::const_iterator
end
()
const
{
return
m_children
.end(); }
54
55
void
claimChildren
() {
56
for
(
ChildView
& c :
m_children
) c.setParent(
this
);
57
}
58
59
private
:
60
62
63
void
addChildren
() {
vtable
()->
addChildren
(
ptr
(),
m_children
); }
64
65
private
:
66
67
std::vector<ChildView>
m_children
;
68
69
};
70
71
72
#endif
// TRIGIDR4MONITORING_PARENTVIEW_H
73
74
75
76
77
78
79
80
81
82
ChildView.h
TrackView.h
ChildView
a TrackView that can have a parent to store the Electron, or Tau etc Z bosons etc
Definition
ChildView.h:26
ParentView::child
const TrackView * child(size_t i) const override
Definition
ParentView.h:50
ParentView::begin
std::vector< ChildView >::const_iterator begin() const
Definition
ParentView.h:52
ParentView::claimChildren
void claimChildren()
Definition
ParentView.h:55
ParentView::childCount
size_t childCount() const override
Definition
ParentView.h:48
ParentView::end
std::vector< ChildView >::const_iterator end() const
Definition
ParentView.h:53
ParentView::hasChildren
bool hasChildren() const override
Definition
ParentView.h:46
ParentView::isComposite
bool isComposite() const override
standard TrackView can't have any children
Definition
ParentView.h:44
ParentView::ParentView
ParentView(const ParentView &t)=default
ParentView::ParentView
ParentView(const ParentView *)=delete
ParentView::addChildren
void addChildren()
for populating with the children ...
Definition
ParentView.h:63
ParentView::m_children
std::vector< ChildView > m_children
Definition
ParentView.h:67
ParentView::ParentView
ParentView(const T *pobj)
Definition
ParentView.h:37
ParentView::ParentView
ParentView(ParentView *)=delete
TrackView::ptr
const void * ptr() const
Definition
TrackView.h:80
TrackView::vtable
const VTable * vtable() const
Definition
TrackView.h:172
TrackView::TrackView
TrackView(const T *pobj)
Definition
TrackView.h:48
TrackView::VTable::addChildren
void(* addChildren)(const void *, std::vector< CHILDTYPE > &)
need this in the vtable, but we don't want it exposed in the TrackView
Definition
TrackView.h:237
Generated on
for ATLAS Offline Software by
1.17.0