ATLAS Offline Software
Trigger
TrigTruthEvent
TrigTruthEventTPCnv
src
TrigInDetTrackTruthMap_old_cnv.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
// Converter from TrigInDetTrackTruthMap_old to TrigInDetTrackTruthMap.
6
// $Id: TrigInDetTrackTruthMap_old_cnv.cxx,v 1.2 2009-02-11 02:33:13 ssnyder Exp $
7
8
#include "
TrigTruthEventTPCnv/TrigInDetTrackTruthMap_old_cnv.h
"
9
10
void
11
TrigInDetTrackTruthMap_old_cnv::Convert
(
TrigInDetTrackTruthMap
* newobj,
12
const
TrigInDetTrackTruthMap_old
*
13
oldobj)
14
{
15
newobj->
m_truth_vec
= oldobj->
m_truth_vec
;
16
newobj->
m_elink_vec
.
clear
();
17
for
(
size_t
i
=0;
i
< oldobj->
m_elink_vec
.size();
i
++) {
18
// Note: this was originally a push_back of m_elink_vec[i] directly.
19
// This didn't work though. The ELs in the vector are default-constructed;
20
// then the data member is overwritten by root. Thus, the store
21
// pointer doesn't get set. (Note that ELStreamer won't do that any more.)
22
// If we explicitly construct a new EL here, the store pointer will
23
// get set correctly.
24
//
25
// Could use a push_back with emplacement here...
26
const
ElementLink<TrigInDetTrackCollection>
& el0= oldobj->
m_elink_vec
[
i
];
27
ElementLink<TrigInDetTrackCollection>
el
(el0.
key
(), el0.
index
());
28
newobj->
m_elink_vec
.
push_back
(
el
);
29
}
30
}
ElementLink::key
sgkey_t key() const
Get the key that we reference, as a hash.
Definition:
A/AthLinks/ElementLink.h:155
TrigInDetTrackTruthMap_old_cnv.h
ElementLinkVector::push_back
void push_back(const ElemLink &link)
Definition:
AthLinks/ElementLinkVector.h:316
ElementLinkVector::clear
void clear()
Definition:
AthLinks/ElementLinkVector.h:341
TrigInDetTrackTruthMap_old::m_elink_vec
std::vector< ElementLink< TrigInDetTrackCollection > > m_elink_vec
Definition:
TrigInDetTrackTruthMap_old.h:19
lumiFormat.i
int i
Definition:
lumiFormat.py:85
TrigInDetTrackTruthMap
Definition:
TrigInDetTrackTruthMap.h:38
plotIsoValidation.el
el
Definition:
plotIsoValidation.py:197
TrigInDetTrackTruthMap::m_elink_vec
ElementLinkVector< TrigInDetTrackCollection > m_elink_vec
Definition:
TrigInDetTrackTruthMap.h:103
ElementLink< TrigInDetTrackCollection >
TrigInDetTrackTruthMap_old
Definition:
TrigInDetTrackTruthMap_old.h:17
TrigInDetTrackTruthMap_old_cnv::Convert
virtual void Convert(TrigInDetTrackTruthMap *newobj, const TrigInDetTrackTruthMap_old *oldobj)
Do the conversion.
Definition:
TrigInDetTrackTruthMap_old_cnv.cxx:11
TrigInDetTrackTruthMap::m_truth_vec
std::vector< TrigInDetTrackTruth > m_truth_vec
Definition:
TrigInDetTrackTruthMap.h:104
ElementLink::index
index_type index() const
Get the index of the element inside of its container.
Definition:
A/AthLinks/ElementLink.h:150
TrigInDetTrackTruthMap_old::m_truth_vec
std::vector< TrigInDetTrackTruth > m_truth_vec
Definition:
TrigInDetTrackTruthMap_old.h:20
Generated on Thu Nov 7 2024 21:29:52 for ATLAS Offline Software by
1.8.18