ATLAS Offline Software
graphics
VP1
VP1Systems
VP1TrackSystems
src
TrackCollHandle_TrackContainer.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
7
// //
8
// Implementation of class TrackCollHandle_TrackContainer //
9
// //
10
// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11
// Initial version: May 2008 //
12
// //
14
15
#include "
VP1TrackSystems/TrackCollHandle_TrackContainer.h
"
16
#include "
VP1TrackSystems/TrackHandle_TrackContainer.h
"
17
18
//#include "TrackProxy/TrackParticleContainer.h"
19
#include "
xAODTracking/TrackParticleContainer.h
"
20
21
#include "
VP1Base/IVP1System.h
"
22
#include "
VP1Utils/VP1SGAccessHelper.h
"
23
#include "
VP1Utils/VP1SGContentsHelper.h
"
24
#include <QStringList>
25
26
//____________________________________________________________________
27
QStringList
TrackCollHandle_TrackContainer::availableCollections
(
IVP1System
*
sys
)
28
{
29
return
VP1SGContentsHelper
(
sys
).
getKeys
<
ActsTrk::TrackContainer
>();
30
}
31
32
//____________________________________________________________________
33
class
TrackCollHandle_TrackContainer::Imp
{
34
public
:
35
TrackCollHandle_TrackContainer
*
theclass
;
36
int
updateGUICounter
;
37
void
possiblyUpdateGUI
() {
//Fixme: to TrackCollHandleBase
38
if
(!((
updateGUICounter
++)%50)) {
39
theclass
->
systemBase
()->
updateGUI
();
40
}
41
}
42
};
43
44
45
//____________________________________________________________________
46
TrackCollHandle_TrackContainer::TrackCollHandle_TrackContainer
(
TrackSysCommonData
*
cd
,
47
const
QString&
name
)
48
:
TrackCollHandleBase
(
cd
,
name
,
TrackType
::ACTS), m_d(
new
Imp
)
49
{
50
m_d
->
theclass
=
this
;
51
m_d
->
updateGUICounter
= 0;
52
}
53
54
//____________________________________________________________________
55
TrackCollHandle_TrackContainer::~TrackCollHandle_TrackContainer
()
56
{
57
delete
m_d
;
58
}
59
60
//____________________________________________________________________
61
bool
TrackCollHandle_TrackContainer::load
()
62
{
63
//Get collection:
64
const
ActsTrk::TrackContainer
* coll(
nullptr
);
65
if
(!
VP1SGAccessHelper
(
systemBase
()).
retrieve
(coll,
name
())) {
66
message
(
"Error: Could not retrieve track particle collection with key="
+
name
());
67
return
false
;
68
}
69
70
//Make appropriate trk::track handles:
71
hintNumberOfTracksInEvent
(coll->size());
72
for
(
auto
it
: *coll) {
73
m_d
->
possiblyUpdateGUI
();
74
// if (!*it) {
75
// messageDebug("WARNING: Ignoring null TrackProxy pointer.");
76
// continue;
77
// }
78
// if ((*it)->charge()==0.0) {
79
// messageDebug("WARNING: Ignoring TrackProxy which claims to be neutral (charge()==0.0).");
80
// continue;
81
// }
82
addTrackHandle
(
new
TrackHandle_TrackContainer
(
this
,
it
, *coll));
83
}
84
85
return
true
;
86
}
87
88
//____________________________________________________________________
89
bool
TrackCollHandle_TrackContainer::cut
(
TrackHandleBase
* handle)
90
{
91
if
(!
TrackCollHandleBase::cut
(handle))
92
return
false
;
93
94
//Fixme: more?
95
96
return
true
;
97
}
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition:
PyKernel.py:110
TrackCollHandle_TrackContainer::TrackCollHandle_TrackContainer
TrackCollHandle_TrackContainer(TrackSysCommonData *, const QString &name)
Definition:
TrackCollHandle_TrackContainer.cxx:46
TrackCollHandle_TrackContainer::Imp::possiblyUpdateGUI
void possiblyUpdateGUI()
Definition:
TrackCollHandle_TrackContainer.cxx:37
TrackCollHandleBase
Definition:
TrackCollHandleBase.h:49
ActsTrk::TrackContainer
Definition:
TrackContainer.h:31
CSV_InDetExporter.new
new
Definition:
CSV_InDetExporter.py:145
skel.it
it
Definition:
skel.GENtoEVGEN.py:396
TrackHandle_TrackContainer
Definition:
TrackHandle_TrackContainer.h:28
TrackCollHandleBase::hintNumberOfTracksInEvent
void hintNumberOfTracksInEvent(unsigned)
Definition:
TrackCollHandleBase.cxx:509
mapkey::sys
@ sys
Definition:
TElectronEfficiencyCorrectionTool.cxx:42
TrackCollHandle_TrackContainer::load
virtual bool load()
Definition:
TrackCollHandle_TrackContainer.cxx:61
VP1SGContentsHelper::getKeys
QStringList getKeys() const
Definition:
VP1SGContentsHelper.h:55
TrackCollHandleBase::cut
virtual bool cut(TrackHandleBase *)
Definition:
TrackCollHandleBase.cxx:316
TrackCollHandle_TrackContainer::cut
virtual bool cut(TrackHandleBase *)
Definition:
TrackCollHandle_TrackContainer.cxx:89
IVP1System
Definition:
IVP1System.h:36
TrackSysCommonData
Definition:
TrackSysCommonData.h:50
VP1HelperClassBase::systemBase
IVP1System * systemBase() const
Definition:
VP1HelperClassBase.h:50
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
TrackCollHandleBase::addTrackHandle
void addTrackHandle(TrackHandleBase *)
Definition:
TrackCollHandleBase.cxx:515
TrackCollHandle_TrackContainer::Imp::updateGUICounter
int updateGUICounter
Definition:
TrackCollHandle_TrackContainer.cxx:36
VP1SGContentsHelper
Definition:
VP1SGContentsHelper.h:26
TrackHandle_TrackContainer.h
IVP1System::updateGUI
void updateGUI()
Definition:
IVP1System.cxx:262
TrackCollHandle_TrackContainer::m_d
Imp * m_d
Definition:
TrackCollHandle_TrackContainer.h:40
calibdata.cd
cd
Definition:
calibdata.py:51
TrackCollHandle_TrackContainer
Definition:
TrackCollHandle_TrackContainer.h:20
VP1HelperClassBase::message
void message(const QString &) const
Definition:
VP1HelperClassBase.cxx:49
TrackCollHandle_TrackContainer::Imp
Definition:
TrackCollHandle_TrackContainer.cxx:33
VP1SGAccessHelper
Definition:
VP1SGAccessHelper.h:25
TrackCollHandle_TrackContainer::Imp::theclass
TrackCollHandle_TrackContainer * theclass
Definition:
TrackCollHandle_TrackContainer.cxx:35
TrackHandleBase
Definition:
TrackHandleBase.h:56
TrackCollHandle_TrackContainer::~TrackCollHandle_TrackContainer
virtual ~TrackCollHandle_TrackContainer()
Definition:
TrackCollHandle_TrackContainer.cxx:55
VP1SGAccessHelper.h
IVP1System.h
TrackCollHandle_TrackContainer::availableCollections
static QStringList availableCollections(IVP1System *)
Definition:
TrackCollHandle_TrackContainer.cxx:27
TrackParticleContainer.h
TrackCollHandle_TrackContainer.h
VP1SGContentsHelper.h
TrackType
Definition:
TrackTypes.h:10
TrackCollHandleBase::name
const QString & name() const
Definition:
TrackCollHandleBase.cxx:310
Generated on Sun Dec 22 2024 21:20:17 for ATLAS Offline Software by
1.8.18