ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
graphics
VP1
VP1Systems
VP1AODSystems
src
VertexCollHandle.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
7
// //
8
// Header file for class VertexCollHandle //
9
// //
10
// Description: class for Vertex collection handles //
11
// //
12
// //
14
15
#ifndef VP1AODSYSTEMS_VERTEXCOLLHANDLEBASE_H
16
#define VP1AODSYSTEMS_VERTEXCOLLHANDLEBASE_H
17
18
//Local
19
#include "
VP1AODSystems/AODSystemController.h
"
20
#include "
AODCollHandleBase.h
"
21
22
//VP1
23
#include "
VP1Base/VP1Interval.h
"
24
#include "
VP1Base/VP1QtUtils.h
"
25
26
27
28
// Qt
29
#include <QtGui/QColor>
30
#include <QList>
31
32
33
34
class
AODSysCommonData
;
35
class
VertexHandle
;
36
class
SoSeparator;
37
class
SoMaterial;
38
class
VP1ExtraSepLayerHelper
;
39
class
VertexCollectionSettingsButton
;
40
41
class
VertexCollHandle
:
public
AODCollHandleBase
42
{
43
44
Q_OBJECT
45
46
public
:
47
48
//Each derived class should implement a "static QStringList
49
//availableCollections();" method, which the collection widget will
50
//use to determine the available collections.
51
52
VertexCollHandle
(
AODSysCommonData
*,
53
const
QString&
name
,
54
xAOD::Type::ObjectType
);
55
56
virtual
void
init
(
VP1MaterialButtonBase
* matBut=0);
//reimplementations must start with a call to VP1StdCollection::init.
57
virtual
~VertexCollHandle
();
58
59
protected
:
61
virtual
void
setupSettingsFromControllerSpecific
(
const
AODSystemController
*);
62
63
64
public
:
65
66
// The button is responsible for the settings of the vertex collection, e.g. colouring, vertex size etc.
67
const
VertexCollectionSettingsButton
&
collSettingsButton
()
const
;
68
70
// For loading the data and resetting after each event: //
72
static
QStringList
availableCollections
(
IVP1System
*);
//For the collection widget.
73
74
virtual
QByteArray
persistifiableState
()
const
;
75
virtual
void
setState
(
const
QByteArray&);
76
77
protected
:
78
80
virtual
bool
load
();
81
82
//Must be called from derived classes when filling in new track handles.
83
void
hintNumberOfHandlesInEvent
(
unsigned
);
84
void
addHandle
(
AODHandleBase
*);
85
86
//For iterating over track handles:
87
void
handleIterationBegin
();
88
AODHandleBase
*
getNextHandle
();
//Returns 0 when done.
89
QList<AODHandleBase*>
getHandlesList
()
const
;
90
91
//Override if special cuts. Remember to call base class implementation also for common cuts.
92
virtual
bool
cut
(
AODHandleBase
*);
//Return true if should be shown (based on various cuts), false otherwise.
93
94
//Utility (fixme: put in utility class elsewhere).
95
template
<
class
T>
void
cleanupPtrContainer
(T&)
const
;
//Delete pointers and calls .clear()
96
// template <class T> void cleanupNodeContainer(T&) const;//unref's pointers and calls .clear()
97
98
void
recheckCutStatus
(
VertexHandle
*);
//Call in derived classes for handles that might be effected by a change in cuts.
99
100
//Convenience methods which can be called from derived classes or
101
//the trackcollwidget (but specialised procedures might be more
102
//optimal)
103
104
virtual
bool
mayHaveAssociatedObjects
()
const
{
return
false
; }
105
106
protected
:
107
virtual
QColor
defaultColor
()
const
{
return
QColor::fromRgbF(1.0f, 0.5f, 0.5f); }
// light red
108
109
110
private
Q_SLOTS:
111
void
resetCachedValuesCuts
();
112
113
public
Q_SLOTS:
114
// void rerandomiseRandomVertexColours();
115
116
117
// setters
118
void
setCutAllowedY
(
const
VP1Interval
&);
119
void
setCutAllowedZ
(
const
VP1Interval
&);
120
void
setCutAllowedR
(
const
VP1Interval
&);
121
void
setVertexSize
(
int
);
122
123
//getters
124
const
VP1Interval
&
getCutAllowedY
() {
return
m_cut_allowedY
; };
125
const
VP1Interval
&
getCutAllowedZ
() {
return
m_cut_allowedZ
; };
126
const
VP1Interval
&
getCutAllowedR
() {
return
m_cut_allowedR
; };
127
bool
getYAllowall
() {
return
m_cut_y_allowall
; };
128
bool
getZAllowall
() {
return
m_cut_z_allowall
; };
129
bool
getRAllowall
() {
return
m_cut_r_allowall
; };
130
131
private
:
132
133
class
Imp;
134
Imp
*
m_d
;
135
136
137
VP1Interval
m_cut_allowedY
;
138
VP1Interval
m_cut_allowedR
;
139
VP1Interval
m_cut_allowedZ
;
140
bool
m_cut_y_allowall
=
false
;
141
bool
m_cut_r_allowall
;
142
bool
m_cut_z_allowall
;
143
bool
m_cut_ry_allwillfail
=
false
;
144
bool
m_cut_rz_allwillfail
;
145
};
146
147
//Fixme: Move elsewhere:
148
template
<
class
T>
void
VertexCollHandle::cleanupPtrContainer
(T&t)
const
149
{
150
typename
T::iterator it(t.begin()), itE(t.end());
151
for
(;it!=itE;++it)
152
delete
*it;
153
t.clear();
154
}
155
156
#endif
157
158
159
160
AODCollHandleBase.h
AODSystemController.h
VP1Interval.h
VP1QtUtils.h
AODCollHandleBase::AODCollHandleBase
AODCollHandleBase(AODSysCommonData *, const QString &name, xAOD::Type::ObjectType)
Definition
AODCollHandleBase.cxx:66
AODCollHandleBase::name
const QString & name() const
Definition
AODCollHandleBase.cxx:130
AODHandleBase
Definition
AODHandleBase.h:43
AODSysCommonData
Definition
AODSysCommonData.h:42
AODSystemController
Definition
AODSystemController.h:43
IVP1System
Definition
IVP1System.h:36
VP1ExtraSepLayerHelper
Definition
VP1ExtraSepLayerHelper.h:22
VP1Interval
Definition
VP1Interval.h:23
VP1MaterialButtonBase
Definition
VP1MaterialButton.h:25
VertexCollHandle::Imp
Definition
VertexCollHandle.cxx:65
VertexCollHandle::cleanupPtrContainer
void cleanupPtrContainer(T &) const
Definition
VertexCollHandle.h:148
VertexCollHandle::getCutAllowedZ
const VP1Interval & getCutAllowedZ()
Definition
VertexCollHandle.h:125
VertexCollHandle::defaultColor
virtual QColor defaultColor() const
Definition
VertexCollHandle.h:107
VertexCollHandle::availableCollections
static QStringList availableCollections(IVP1System *)
Definition
VertexCollHandle.cxx:141
VertexCollHandle::m_cut_r_allowall
bool m_cut_r_allowall
Definition
VertexCollHandle.h:141
VertexCollHandle::getCutAllowedY
const VP1Interval & getCutAllowedY()
Definition
VertexCollHandle.h:124
VertexCollHandle::VertexCollHandle
VertexCollHandle(AODSysCommonData *, const QString &name, xAOD::Type::ObjectType)
Definition
VertexCollHandle.cxx:93
VertexCollHandle::setState
virtual void setState(const QByteArray &)
Provide specific implementation.
Definition
VertexCollHandle.cxx:444
VertexCollHandle::m_cut_y_allowall
bool m_cut_y_allowall
Definition
VertexCollHandle.h:140
VertexCollHandle::getNextHandle
AODHandleBase * getNextHandle()
Definition
VertexCollHandle.cxx:351
VertexCollHandle::m_cut_ry_allwillfail
bool m_cut_ry_allwillfail
Definition
VertexCollHandle.h:143
VertexCollHandle::persistifiableState
virtual QByteArray persistifiableState() const
Provide specific implementation.
Definition
VertexCollHandle.cxx:464
VertexCollHandle::setupSettingsFromControllerSpecific
virtual void setupSettingsFromControllerSpecific(const AODSystemController *)
For extensions specific to this collection.
Definition
VertexCollHandle.cxx:161
VertexCollHandle::load
virtual bool load()
Actually load the EDM objects.
Definition
VertexCollHandle.cxx:199
VertexCollHandle::handleIterationBegin
void handleIterationBegin()
Definition
VertexCollHandle.cxx:344
VertexCollHandle::setVertexSize
void setVertexSize(int)
Definition
VertexCollHandle.cxx:436
VertexCollHandle::getZAllowall
bool getZAllowall()
Definition
VertexCollHandle.h:128
VertexCollHandle::setCutAllowedZ
void setCutAllowedZ(const VP1Interval &)
Definition
VertexCollHandle.cxx:412
VertexCollHandle::getHandlesList
QList< AODHandleBase * > getHandlesList() const
Definition
VertexCollHandle.cxx:260
VertexCollHandle::getCutAllowedR
const VP1Interval & getCutAllowedR()
Definition
VertexCollHandle.h:126
VertexCollHandle::m_cut_z_allowall
bool m_cut_z_allowall
Definition
VertexCollHandle.h:142
VertexCollHandle::~VertexCollHandle
virtual ~VertexCollHandle()
Definition
VertexCollHandle.cxx:119
VertexCollHandle::setCutAllowedY
void setCutAllowedY(const VP1Interval &)
Definition
VertexCollHandle.cxx:388
VertexCollHandle::m_cut_rz_allwillfail
bool m_cut_rz_allwillfail
Definition
VertexCollHandle.h:144
VertexCollHandle::addHandle
void addHandle(AODHandleBase *)
Definition
VertexCollHandle.cxx:332
VertexCollHandle::recheckCutStatus
void recheckCutStatus(VertexHandle *)
VertexCollHandle::hintNumberOfHandlesInEvent
void hintNumberOfHandlesInEvent(unsigned)
Definition
VertexCollHandle.cxx:326
VertexCollHandle::cut
virtual bool cut(AODHandleBase *)
Definition
VertexCollHandle.cxx:267
VertexCollHandle::getRAllowall
bool getRAllowall()
Definition
VertexCollHandle.h:129
VertexCollHandle::m_cut_allowedZ
VP1Interval m_cut_allowedZ
Definition
VertexCollHandle.h:139
VertexCollHandle::init
virtual void init(VP1MaterialButtonBase *matBut=0)
Definition
VertexCollHandle.cxx:149
VertexCollHandle::resetCachedValuesCuts
void resetCachedValuesCuts()
Definition
VertexCollHandle.cxx:177
VertexCollHandle::collSettingsButton
const VertexCollectionSettingsButton & collSettingsButton() const
Definition
VertexCollHandle.cxx:190
VertexCollHandle::mayHaveAssociatedObjects
virtual bool mayHaveAssociatedObjects() const
Definition
VertexCollHandle.h:104
VertexCollHandle::setCutAllowedR
void setCutAllowedR(const VP1Interval &)
Definition
VertexCollHandle.cxx:359
VertexCollHandle::m_d
Imp * m_d
Definition
VertexCollHandle.h:134
VertexCollHandle::getYAllowall
bool getYAllowall()
Definition
VertexCollHandle.h:127
VertexCollHandle::m_cut_allowedY
VP1Interval m_cut_allowedY
Definition
VertexCollHandle.h:137
VertexCollHandle::m_cut_allowedR
VP1Interval m_cut_allowedR
Definition
VertexCollHandle.h:138
VertexCollectionSettingsButton
Definition
VertexCollectionSettingsButton.h:14
VertexHandle
Definition
VertexHandle.h:39
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition
ObjectType.h:32
Generated on
for ATLAS Offline Software by
1.17.0